PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Sun Feb 27, 2005 9:55 am Reply with quote Back to top

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!
(cause Sentinel blocks me to post this topic)
Code:

<BODY>
<div id="divUp">
   <a href="#" onmouseover="scroll(-2)" onmouseout="noScroll()">[slow]</a>
   <a href="#" onmouseover="scroll(-7)" onmouseout="noScroll()">[medium]</a>
   <a href="#" onmouseover="scroll(-10)" onmouseout="noScroll()">[fast]</a>
</div>

<div id="divDown">
   <a href="#" onmouseover="scroll(2)" onmouseout="noScroll()">[slow]</a>
   <a href="#" onmouseover="scroll(7)" onmouseout="noScroll()">[medium]</a>
   <a href="#" onmouseover="scroll(10)" onmouseout="noScroll()">[fast]</a>
</div>

<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>";

$content .= "<div id=\"contentlayer\"><img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\"><a href=\"forums.html&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=\"forums.html&file=profile&mode=viewprofile&u=$user_id\"><font color=#F0A20F><b> $username </b></font></a> â <a href=\"forums.html&amp;file=viewforum&amp;f=$forum_id\">$forum_name</a> íà $post_time</i></font></center><br>";
$count = $count + 1;
}
$content .= "<br><center><a href=\"forums.html\"STYLE=\"text-decoration: none\">[ Forums ]</center>";
$content .= "</td></tr></TABLE>";
$content .= "</DIV>";


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?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Sun Mar 27, 2005 1:01 pm Reply with quote Back to top

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>";

$mid_content = "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\"><a href=\"forums.html&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=\"profile-.html$user_id\"><font color=#F0A20F><b> $username </b></font></a> in <a href=\"forums.html&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 .= "&nbsp;<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 .= "&nbsp;<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 .= "&nbsp;<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>";
Image
?>
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum