help finding a scrolling news block for website!!!!!!!!!

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   help finding a scrolling news block for website!!!!!!!!!
bluerobe
CZ Newbie
bluerobe has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: May 12, 2005
0.00 posts per day
Posts: 4
Points: 129
   
hi im looking to add a scrolling news block to my site. all i want is a block that scrolls text that i entered in news and keeps scrollng over and over. something like in this website......http://demonmk.fu8.com/mk/index.php... i realy ned this thing bad so any help would be apreciated. thanks all



Back to top Reply with quote
#2   re: help finding a scrolling news block for website!!!!!!!!!
mani
CZ Newbie
mani has been a member for over 19 year's 19 Year Member
pakistan.gif texas.gif
Age: 76
Gender: Male
Fav. Sports Team: Pakistan
Website:
Status: Offline
Joined: Sep 06, 2004
0.00 posts per day
Posts: 9
Points: 3,342
 Yahoo Messenger  
Ok here is a code u can name it newsscroll.php (((((<?php

if (eregi("block-Scroll_News.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}

// Set # of stories to show
$total_stories = 10;

global $prefix, $db, $mainindex;
$St = 1;
$content = "<table width='100%' border='0'><tr><td><A name='scrollingCode'></A><MARQUEE behavior= 'scroll' direction= 'up' height='220' scrollamount= '2' scrolldelay= '20' onmouseover='this.stop()' onmouseout='this.start()'><center>";
$sql = "SELECT sid, title FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,$total_stories";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$sid = $row['sid'];
$title = $row[title];
if ($St < 10) $c = "0$St";
else $c = $St;
$content .= "$c.<br><a href='$mainindex?name=News&amp;file=article&amp;sid=$sid'>$title</a><br><br><hr width='50%'><br>";
$St++;
}
$content .= "</center></td></tr></table>";
$content .= "<br><center>[ <a href='$mainindex?name=News'>"._MORENEWS."</a> ]</center>";

?>))))))))



Back to top Reply with quote
#3   re: help finding a scrolling news block for website!!!!!!!!!
bluerobe
CZ Newbie
bluerobe has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: May 12, 2005
0.00 posts per day
Posts: 4
Points: 129
   
where do i copy/paste this code? im a total noob bro sorry.



Back to top Reply with quote
#4   re: help finding a scrolling news block for website!!!!!!!!!
bluerobe
CZ Newbie
bluerobe has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: May 12, 2005
0.00 posts per day
Posts: 4
Points: 129
   
nm i figured it out, create a new block file using notepad... but the code doesnt work, nothing shows on the screen



Back to top Reply with quote
#5   re: help finding a scrolling news block for website!!!!!!!!!
mani
CZ Newbie
mani has been a member for over 19 year's 19 Year Member
pakistan.gif texas.gif
Age: 76
Gender: Male
Fav. Sports Team: Pakistan
Website:
Status: Offline
Joined: Sep 06, 2004
0.00 posts per day
Posts: 9
Points: 3,342
 Yahoo Messenger  
<?php

if (eregi("block-Scroll_News.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.html");
die();
}

// Set # of stories to show
$total_stories = 10;

global $prefix, $db, $mainindex;
$St = 1;
$content = "<table width='100%' border='0'><tr><td><A name='scrollingCode'></A><MARQUEE behavior= 'scroll' direction= 'up' height='220' scrollamount= '2' scrolldelay= '20' onmouseover='this.stop()' onmouseout='this.start()'><center>";
$sql = "SELECT sid, title FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,$total_stories";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$sid = $row['sid'];
$title = $row[title];
if ($St < 10) $c = "0$St";
else $c = $St;
$content .= "$c.<br><a href='$mainindex?name=News&amp;file=article&amp;sid=$sid'>$title</a><br><br><hr width='50%'><br>";
$St++;
}
$content .= "</center></td></tr></table>";
$content .= "<br><center>[ <a href='$mainindex?name=News'>"._MORENEWS."</a> ]</center>";

?>


This is the full code and its working! Fine



Back to top Reply with quote
#6   re: help finding a scrolling news block for website!!!!!!!!!
bluerobe
CZ Newbie
bluerobe has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: May 12, 2005
0.00 posts per day
Posts: 4
Points: 129
   
thanks bro icon_smile.gif



Back to top Reply with quote
#7   re: help finding a scrolling news block for website!!!!!!!!!
mani
CZ Newbie
mani has been a member for over 19 year's 19 Year Member
pakistan.gif texas.gif
Age: 76
Gender: Male
Fav. Sports Team: Pakistan
Website:
Status: Offline
Joined: Sep 06, 2004
0.00 posts per day
Posts: 9
Points: 3,342
 Yahoo Messenger  
No Problem Any time icon_mrgreen.gif



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum