Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
Mamasita
Client



Joined: May 10, 2003
Posts: 40

PostPosted: Thu Jan 18, 2007 9:08 am Reply with quote

Hello to all

I'm currently using the last 20 forum scroll block on my wesbite. I need to know if I can make it to 50. I tried changing it to 50 but it's still showing last 20.

Thanks
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Thu Jan 18, 2007 9:44 am Reply with quote

how did you changed it ?
Saw anything like....LIMIT 20 ?
 
View user's profile Send private message
Mamasita







PostPosted: Thu Jan 18, 2007 5:07 pm Reply with quote

In the block-ForumsScroll.php it says $count = 1; $amount = 20; ( I changed it to 50 but still showing 20 in the block.

Thanks
 
hitwalker







PostPosted: Thu Jan 18, 2007 5:09 pm Reply with quote

try if you can post the code here...
 
Mamasita







PostPosted: Thu Jan 18, 2007 5:52 pm Reply with quote

Code:
if (eregi("block-ForumsScroll.php", $_SERVER['PHP_SELF'])) {

    Header("Location: index.php");
    die();
}

//include_once ('blocks/smileys.php');

global $prefix, $dbi, $sitename, $user, $cookie, $group_id;
$count = 1;
$amount = 50;
$content = "<A n ame= \"scrollin gCode\"></A>";
$content .="<MA RQU EE behavior= \"scr oll\" ali gn= \"cent er\" dire ction= \"u p\" heig ht=\"30 0\" scro llamo unt= \"2\" sc rolld elay= \"25\" on mo useo ver='t his .st op()' onm ous eout='th is .sta rt()'>";
$con tent .="<ce nte r> <S TY  LE=\"te xt-de cora tion: non e\"><font c olor=\"#666666\"><b>L ast $amo unt Foru m Mess ages</b></c enter>";
$re su lt1 = sq l_qu ery("SE LEC T to pic_id, to pic_la st_p ost_id, to pic_titl e FR OM ".$p refix."_bb topi cs O RD ER B Y to pic_la st_po st_ id DE SC LI MIT $a m ou nt", $d bi);
$co nt ent .= "<b r>";
while(list($topic_id, $topic_last_post_id, $topic_title) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %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 = substr("$topic_title", 0,17);
//$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 .= "<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\"STYLE=\"text-decoration: none\"><b> $topic_title </b></a><br><font color=\"#666666\"><i>Last post by <A HREF=\"profile-.html$user_id\"STYLE=\"text-decoration: none\"> $username </a> on $post_time</i></font><br><br>";
$count = $count + 1;
}
?>
 
hitwalker







PostPosted: Thu Jan 18, 2007 5:59 pm Reply with quote

just to try.....

change this part.....

pic_la st_po st_ id DE SC LI MIT $a m ou nt", $d bi);


to this...

pic_last_post_ id DESC LIMIT 20", $d bi);


and change this..
$amount = 50;

to this..
//$amount = 50;


set the block to admin only,so if it gets messed up its only for you to see...
 
Mamasita







PostPosted: Thu Jan 18, 2007 6:07 pm Reply with quote

Thanks Hitwalker but it's not working.
 
hitwalker







PostPosted: Thu Jan 18, 2007 6:13 pm Reply with quote

does this work ?


Code:
<?php


if ( !defined('NUKE_FILE') ) {
    Header("Location: index.php");
    die();
}
include_once ('blocks/smileys.php');

global $prefix, $dbi, $sitename, $user, $cookie, $group_id;
$count = 1;
$content .="<center> <ST YLE=\"text-decoration: none\"><b>The Latest Discussions</b></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 5", $dbi);
$content .= "<br><table width=100% border=\"0\"><tr><td>&nbsp;</td><td><b>Topic</b></td><td><b>Last Post By</b></td><td><b>Posted On</b></td></tr>";
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,'%e-%m-%Y @ %r') 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);

$content .= "<tr><td width=\"40%\"><a href=\"forums.html?amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\"><b> $topic_title </b></a></td><td width=\"30%\"nowrap><A HREF=\"profile-.html$user_id\"STYLE=\"text-decoration: none\"> $username </a></td><td width=\"10%\"nowrap>$post_time</td></tr>";

$count = $count + 1;
}
$content .= "</table><br><center>[ <a href=\"forums.html\"STYLE=\"text-decoration: none\">$sitename Forums ]</center>";
?>



(watch the style tag i broke)
 
Mamasita







PostPosted: Thu Jan 18, 2007 6:28 pm Reply with quote

No change...
 
hitwalker







PostPosted: Thu Jan 18, 2007 6:35 pm Reply with quote

did you changed this...

DESC LIMIT 5"

to

DESC LIMIT 20" ??
and did you cleared your internet history ?
 
Mamasita







PostPosted: Thu Jan 18, 2007 6:42 pm Reply with quote

Again no change. Please check your private message.
 
hitwalker







PostPosted: Thu Jan 18, 2007 6:46 pm Reply with quote

hello,

i replied....

when that block doesnt work then i have no idea why it doesnt work for you....
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©