Hi everybody, i have scrolling block of last 20 posts from my forums...but i don't want it to scroll anymore or just to have a way after onmouse over it stops, users to can manually scroll up and down...i think that is an inpossible, so i decided to make it not scrolling but with arrows 'up' and 'down' when onmouse over...posts scroll down and etc...
i found a very cool script (
Only registered users can see links on this board! Get registered or login to the forums!
) so here is the code:
Java Is
Only registered users can see links on this board! Get registered or login to the forums!
<div id="divCont">
<div id="divText">
<table>
<tr>
<td width="120"> test text test text test text test text test text test text<br>
test text test text test text test text test text test text<br>
test text test text test text test text test text test text<br>
test text test text test text test text test text test text<br>
test text test text test text test text test text test text<br>
test text test text test text test text test text test text<br>
test text test text test text test text test text test text<br>
test text test text test text test text test text test text<br>
test text test text test text test text test text test text<br>
test text test text test text test text test text test text - END</td>
</tr>
</table>
</div>
</div>
YOUR REGULAR BODY CONTENT GOES IN HERE
</BODY>
</HTML>
and here is the code of my forum's block (i made it with scroller but i reallly don't like it this way) :
Code:
if (eregi("block-Forums.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
include_once ('blocks/smileys.php');
global $prefix, $dbi, $user, $cookie, $group_id;
$count = 1;
$content ="<DIV STYLE=\"overflow: auto; width: 132px; height: 260;
border-left: 0px gray solid; border-bottom: 0px gray solid;
border-right: 0px gray solid; border-top: 0px gray solid;
padding:0px; margin: 0px\">";
$content .="<TABLE cellspacing=0 cellpadding=2><COL WIDTH=140><tr><td width=100% valign=\"top\" wrap><center><font color='#666666' style='text-decoration: none'><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);
$content .= "<br>";
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 â %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>";
I made file 'updown.js' with the text insiide the <head></head> from the html above...and I included it into my_header.php...so i want to put the rest of the script in my forum's block.
Any help how to do it?
So month later..nobody replies.I got a little progress making Scrolling-forum-block with up/down/pause control, 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:
Quote:
<?php
if (eregi("block-Forums.php", $PHP_SELF)) {
Header("Location: index.php");
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>";
View next topic View previous topic
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