Scrolling Forum block like Shout Box block???

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Scrolling Forum block like Shout Box block???
Virgin_Steel
CZ Newbie
Virgin_Steel has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Jan 27, 2005
0.00 posts per day
Posts: 3
Points: 543
   
I want to make my Forums block which shows Last 20 Forum Posts scrolling,but with controls to pause,forward and backward just like Shout_Box block...I got a little progress, so need a little more proffesional help!!! Look at the code bellow, with this code i can forward,backward,pause marquee with the content of the forum-block,but the block shows only the oldest post, that have to be in the bottom of the block!If i put ORDER BY t.topic_last_post_id DESC LIMIT 20 it shows only the 20th post!IF i change it to 5 it showsh the 5th etc...I don't maybe something with $count...
Well,here is the code:

<?php
if (eregi("block-Forums.php", $PHP_SELF)) {
    Header("Location: index.html");
    die();
}

include_once ('blocks/smileys.php');
global $prefix, $dbi, $user, $cookie, $top_content, $mid_content, $bottom_content, $Marqueeheight, $group_id;
$Marqueeheight = 100;
$count = 1;
$top_content  = "<center><b>"._LAST20."</b></font></center>";
$result1 = sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id and f.auth_view=0  ORDER BY t.topic_last_post_id DESC LIMIT 20", $dbi);
while(list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y in %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);

$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);

$topic_title=parseEmoticons($topic_title);
// Remove the comment below to add the counter
//$content .="<STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Message: $count<br></b>";

$mid_content = "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\"><a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id\"><b> $topic_title </b></a><br><center><font color=\"#666666\"><i>"._LASTPOST." <A HREF=\"forum-userprofile-.html$user_id\"><font color=#F0A20F><b> $username </b></font></a> in <a href=\"modules.php?name=Forums&amp;file=viewforum&amp;f=$forum_id\">$forum_name</a> at $post_time</i></font></center>";
$count = $count + 1;
}
      $bottom_content = "<div style=\"padding: 1px;\" align=\"center\" class=\"content\">";
      $bottom_content .= " ;;<span style=\"cursor: hand;\" onmouseover=\"SBspeed=4\" onmouseout=\"SBspeed=1\"><img src=\"images/sommaire/admin/up1.gif\" border=\"0\" alt=\"\" width=\"9\" height=\"5\" /></span>";
      $bottom_content .= " ;;<span style=\"cursor: hand;\" onmouseover=\"SBspeed=1-5\" onmouseout=\"SBspeed=1\"><img src=\"images/sommaire/admin/down1.gif\" border=\"0\" alt=\"\" width=\"9\" height=\"5\" /></span>";
      $bottom_content .= " ;;<span style=\"cursor: wait;\" onmouseover=\"SBspeed=0\" onmouseout=\"SBspeed=1\"><img src=\"images/sommaire/admin/pause.gif\" border=\"0\" alt=\"\" width=\"9\" height=\"5\" /></span>";
      $bottom_content .= "</div>";
        $bottom_content .= "<br><center><a href=\"forums.html\"STYLE=\"text-decoration: none\">[ Forums ]</center>";
[img]http://www.novavalna.org/nwdb1/code.jpg[/img]
?>

Can anyone help me with it?

P.S.Sorry for my terrible english
P.S.S. Sorry if this is not the right place to post this!


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