Zoque.Forum
Dirsek Teması:
Geri Dön Zoque.Forum » Webmaster Kaynaklari » ://www » Varsayılan Haber Scripti Editleme Hk. Yardım


://www Web tasarımı ve internet ile ilgili olarak karşılaştığınız problemleri ve merak ettiklerinizi burada tartışabilirsiniz.

Yanıt
 
LinkBack Seçenekler
Old 26.03.2008   #1 (permalink)
 
Üyelik Tarihi: 06.12.2005
Yer: KOCAELI
Mesaj: 39
Haber Scripti Editleme Hk. Yardım


http://www.gretnafootballclub.co.uk/

bu sitedeki gibi haber linkinin üzerine gelince haberin değişmesini sağlayan kodları HTML olarak sayfamda gösterebildim CSS ve js kodları felan hazır bunları HTML olarak yapabiliyroum fakat şimdi bunları ben kullanmış olduğum haber scriptine nasıl monte edeceğim

Cute News kullanıyorum. Veritabanı kullanmıyor. Dosya sistemi ile yazılmış bir script.

tema özelliği ve haberlerin nasıl görünmesi gerektiğini tema dosyasından {title} , {short-story}, [full-link], {avatar} şeklinde kodları yazarak index.PHP me de
PHP Code:
<?PHP
$PHP_SELF 
"detay.PHP";
 
$number "1";  
$category "1"
include(
"news/show_news.PHP");
?>
şeklinde include ettiğimde haberler istediğim gibi görünüyor.

Fakat şimdi ben hangi kodu nereye yazacağımı bilmiyorum bu haber scriptinde.
aşağıda yazan kodlardan nereye hangi kodu yazmalıyım . Bu aşağıda yazan kodları index.PHP ye koyuyorum. Yoksa tema dosyasına mı koymam lazım tema dosyasına koyduktan sonra aşağıda yazan aArticles[1]['title'] = 'Easter Camps'; title yrine {title} yazsa geçerli olurmu ? yardımlarınızı bekliyorum beğenediğim başka haber scripti yok herşeyi çok güzel yapıyorum ama tek bu tema konusunda sorunum var bunu uygulayamıyorum çok yardıma ihtyiacım var başka script olursada olur bu temayı uygulayabileceğim üzerine gelince haberin değişebileceği bir haber scripti de önerirseniz sevinirim veya Cute News haber scriptini bilen birisi nasıl yapıldığı konusunda yardımcı olursa sevinirim.

Kod:
<div class="mainnewsarticles">
	<ul id="newsarticles">

	<li> <a href="news/2008/03/25/easter-camps/" onmouseover="JavaScript:iPos=1;rotateArticles()">
			<h3>Easter Camps</h3>
	Places available at football festivals</a></li>
	<li> <a href="news/2008/03/25/ticket-information-2/" onmouseover="JavaScript:iPos=2;rotateArticles()">
			<h3>Ticket Information</h3>
	St Mirren reduce admission prices</a></li>

	<li> <a href="news/2008/03/24/fab-farewell/" onmouseover="JavaScript:iPos=3;rotateArticles()">
			<h3>Fab farewell</h3>
	Yantorno leaves Gretna</a></li>
	<li> <a href="news/2008/03/24/celtic-reserves-5-0-gretna-reserves/" onmouseover="JavaScript:iPos=4;rotateArticles()">
			<h3>Celtic Reserves 5-0 Gretna</h3>
	Young team brushed aside</a></li>

	<li> <a href="news/2008/03/24/fantastic/" onmouseover="JavaScript:iPos=5;rotateArticles()">
			<h3>Fantastic</h3>
	Boss delighted with attitude</a></li>
		</ul>
	</div>
<script language="JavaScript" type="text/JavaScript">
<!--//
	var aArticles = new Array(5, 7);
	
	var iPos =1;
	aArticles[1] = Array(5);
	aArticles[1]['title'] 			= 'Easter Camps';
	aArticles[1]['content'] 		= 'Places available at football festivals';
	aArticles[1]['image'] 			= 'images/news/8142.jpg';
	aArticles[1]['link'] 			= 'news/2008/03/25/easter-camps/';
	aArticles[2] = Array(5);
	aArticles[2]['title'] 			= 'Ticket Information';
	aArticles[2]['content'] 		= 'St Mirren reduce admission prices';
	aArticles[2]['image'] 			= 'images/news/196932.jpg';
	aArticles[2]['link'] 			= 'news/2008/03/25/ticket-information-2/';
	aArticles[3] = Array(5);
	aArticles[3]['title'] 			= 'Fab farewell';
	aArticles[3]['content'] 		= 'Yantorno leaves Gretna';
	aArticles[3]['image'] 			= 'images/news/258357.jpg';
	aArticles[3]['link'] 			= 'news/2008/03/24/fab-farewell/';
	aArticles[4] = Array(5);
	aArticles[4]['title'] 			= 'Celtic Reserves 5-0 Gretna';
	aArticles[4]['content'] 		= 'Young team brushed aside';
	aArticles[4]['image'] 			= 'images/news/2470.jpg';
	aArticles[4]['link'] 			= 'news/2008/03/24/celtic-reserves-5-0-gretna-reserves/';
	aArticles[5] = Array(5);
	aArticles[5]['title'] 			= 'Fantastic';
	aArticles[5]['content'] 		= 'Boss delighted with attitude';
	aArticles[5]['image'] 			= 'images/news/2484.jpg';
	aArticles[5]['link'] 			= 'news/2008/03/24/fantastic/';
function rotateArticles()
{

	//alert(iPos);
	if (!iPos || iPos > 5) 
		iPos = 1;
	
	if (!aArticles[iPos])
		iPos = 1;
	
	document.getElementById('articleimage').src = aArticles[iPos]['image'];
	document.getElementById('articlelink').alt = aArticles[iPos]['title'];
	document.getElementById('articlecontent').innerHTML = aArticles[iPos]['content'];
	document.getElementById('articlelink').innerHTML = aArticles[iPos]['title'];
	document.getElementById('articlelink').href = aArticles[iPos]['link'];
	if (aArticles[iPos]['link_target'])
	{
		document.getElementById('articlelink').target = aArticles[iPos]['link_target'];
	}
	else
	{
		document.getElementById('articlelink').removeAttribute('target');
	}
	
	iPos ++;

}

window.setInterval("rotateArticles()", 8000);

// End hiding. -->
</script>
<!-- end nextlast -->
buda haber scriptinin kodları


show_news.PHP

PHP Code:
<?PHP

error_reporting 
(E_ALL E_NOTICE);

$cutepath =  __FILE__;
$cutepath preg_replace"'\\\show_news\.PHP'"""$cutepath);
$cutepath preg_replace"'/show_news\.PHP'"""$cutepath);

require_once(
"$cutepath/inc/functions.inc.PHP");
require_once(
"$cutepath/data/config.PHP");

//----------------------------------
// Check if we are included by PATH
//----------------------------------
if($HTTP_SERVER_VARS["HTTP_ACCEPT"] or $HTTP_SERVER_VARS["HTTP_ACCEPT_CHARSET"] or $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"] or $HTTP_SERVER_VARS["HTTP_CONNECTION"]){ /* do nothing */ }
elseif(
eregi("show_news.PHP"$PHP_SELF)){
die(
"<h4>CuteNews has detected that you are including show_news.PHP using the URL to this file.<br>
This is incorrect and you must include it using the PATH to show_news.PHP</h4><br>Example:<br>
this is <font color=red>WRONG</font> :&nbsp;&nbsp; &lt;?PHP include(\"http://yoursite.com/cutenews/show_news.PHP\"); ?&gt;<br>
this is <font color=green>CORRECT</font>:&nbsp;&nbsp; &lt;?PHP include(\"cutenews/show_news.PHP\"); ?&gt;<br>
<br><BR>// <font size=2>if you think this message shouldn't be shown, open show_news.PHP and delete it from there</font>"
);
}
//----------------------------------
// End of the check
//----------------------------------

if(!isset($subaction) or $subaction == ""){ $subaction $POST["subaction"]; }

if(!isset(
$template) or $template == "" or strtolower($template) == "default"){ require_once("$cutepath/data/Default.tpl"); }
else{
        if(
file_exists("$cutepath/data/${template}.tpl")){ require_once("$cutepath/data/${template}.tpl"); }
    else{ die(
"Error!<br>the template <b>".htmlspecialchars($template)."</b> does not exists, note that templates are case sensetive and you must write the name exactly as it is"); }
}

// Prepare requested categories
if(eregi("[a-z]"$category)){
        die(
"<b>Error</b>!<br>CuteNews has detected that you use \$category = \"$category\"; but you can call the categories only with their <b>ID</b> numbers and not with names<br>
    example:<br><blockquote>&lt;?PHP<br>\$category = \"1\";<br>include(\"path/to/show_news.PHP\");<br>?&gt;</blockquote>"
);
}
$category preg_replace("/ /"""$category);
$tmp_cats_arr explode(","$category);
foreach(
$tmp_cats_arr as $key=>$value){
    if(
$value != ""){ $requested_cats[$value] = TRUE; }
}

if(
$archive == ""){
        
$news_file "$cutepath/data/news.txt";
        
$comm_file "$cutepath/data/comments.txt";
}else{
        
$news_file "$cutepath/data/archives/$archive.news.arch";
        
$comm_file "$cutepath/data/archives/$archive.comments.arch";
}

$allow_add_comment                        FALSE;
$allow_full_story                        FALSE;
$allow_active_news                         FALSE;
$allow_comments                         FALSE;

//<<<------------ Detarime what user want to do
if( $CN_HALT != TRUE and $static != TRUE and ($subaction == "showcomments" or $subaction == "showfull" or $subaction == "addcomment") and ((!isset($category) or $category == "") or $requested_cats[$ucat] == TRUE) ){
    if(
$subaction == "addcomment"){ $allow_add_comment        TRUE$allow_comments TRUE; }
    if(
$subaction == "showcomments"$allow_comments TRUE;
        if((
$subaction == "showcomments" or $allow_comments == TRUE) and $config_show_full_with_comments == "yes"$allow_full_story TRUE;
        if(
$subaction == "showfull"$allow_full_story TRUE;
        if(
$subaction == "showfull" and $config_show_comments_with_full == "yes"$allow_comments TRUE;

}
else{
    if(
$config_reverse_active == "yes"){ $reverse TRUE; }
        
$allow_active_news TRUE;
}
//----------->>> Detarime what user want to do

require("$cutepath/inc/shows.inc.PHP");
    if(
$_GET['archive'] and $_GET['archive'] != ''){ $archive $_GET['archive']; } // stupid fix ?
unset($static$template$requested_cats$category$catid$cat,$reverse$in_use$archives_arr$number$no_prev$no_next$i$showed$prev$used_archives);
?>
<!-- News Powered by CuteNews: http://cutephp.com/ -->
nikefootball şu an çevrimdışı  
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl'e kaydet! http://reddit.com/submit?url=%url%&title=%title%Wong'e kaydet!Yahoo'ya kaydet!Google'a kaydet!MSN'e kaydet!Facebook'e kaydet!
Mesajdan alıntı yaparak yeni bir cevap ekleyin
Sponsorlu Bağlantılar
Zoque.Forum
Reklam
Yanıt

Etiketler

cute news



 
Zoque'a hoşgeldiniz!
Zoque 27.02.1999 tarihinde yayın hayatına başlamış, paylaşıma dayalı bir oluşumdur. Tasarım, teknoloji, web, kültür ve sanat ana başlıkları altında bilgi paylaşımı ve benzer değerlere sahip katılımcıların birbirleriyle iletişime girmelerine imkan sağlar. "Az ama Öz" sloganından yola çıkarak, kaliteli ve nitelikli katılımı temel alır.

Saygın ve ciddi bir ortamda yardımlaşmak, haberleşmek, kendi bildiklerini diğer katılımcılarla paylaşmak isteyen, oluşumumuza düzenli katılımda bulunacağı inancını taşıyan konuklarımızı üye olmaya davet ediyoruz. [ » ]


Üye Girişi:

UslanmaM baktabul.com TEKplatform TEKplatform

En popüler ilk 100 etiket
Tag Cloud
acil adsl ajax almak arama araniyor ariyorum ariyoruz asp bilen bilgi bilgisayar blog calisma css dijital div domain dosya eleman film firefox flash font form forum fotograf freelance google gore grafik grafiker hakkinda hangi hata hatasi hosting html ilgili ilk image internet istanbul istiyorum java javascript karakter kayit kisisel kullanimi link logo mac mail menu muzik mysql nasil neden nedir online oyun photoshop php problemi program programi reklam resim satilik sayfa script server ses sistemi site sitesi son soru sorun sorunsali sorunu sql swf tasarim tasarimci tasarimcisi tasarimi turk turkce veri video web windows wordpress xml yardim yazi yeni zoque
Zoque RSS Aboneliği
Son eklenen konuları e-posta ile haber verelim mi?

Forum Yazılımı: vBulletin® Version 3.7.3 Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

Arayüz/Skin "Güneş" © www.zoque.com / net. Copyright © 1999 - 2008
Forum Saati GMT +2. Şu anda saat: 15:08.