Mordain
see this recent topic
http://phpbuilder.com/board/showthread.php?t=10325015
it is the same as yours, I think
Mordain
see this recent topic
http://phpbuilder.com/board/showthread.php?t=10325015
it is the same as yours, I think
Thanks a bunch!
Hmmm nothing there seems to have done anything. Basically, here's what I want:
My site is www.aetherfluxx.com/php. Underneath the news I would like to have like the top 20 most recent post from the forums there. Something that is set up like this: www.theserverspot.com.
Also, I am completely new to php, so if anyone knows of a free program that I can use that makes it a lot easier to modify the look of my site, I would appreciate it very much. Thanks!
bumping your posts only annoys people, new posts are pointed out in bold, so there is no need to bump stuff, I always read posts from the bottom upwards...
You are using PHP-Nuke and there is a block for that, but just to help you out I will present the code. Just save it as block-scrollforum.php upload it to your blocks folder, then in the ACP go to blocks and click the little drop down box and select the scrollforum.php and activate it and put it where you want.
<?php
/************************************************************************/
/* Forums Block for phpBB 2.0.0 port to PHP Nuke 5.5 */
/* ================================================= */
/* */
/* Copyright (c) 2002 by Francisco Burzi (fbc@mandrakesoft.com) */
/* http://phpnuke.org */
/* */
/* Version 1, modified by Sébastien Vaast */
/* http://membres.lycos.fr/projectpluto/ */
/* */
/* */
/* Last Edited - 09 May 2002 */
/* */
/* This Block shows the last 10 topics where a message was posted, */
/* along with the username of the last poster and the day and time */
/* of the post. */
/* It will also show smileys in the topic titles thanks to the */
/* smileys.php file found in Leo Tan Block Forums version */
/* (http://www.cybercomp.d2g.com). */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/************************************************************************/
/* Modified by Gaylen Fraley http://ravenphpscripts.com */
/************************************************************************/
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 = 7;//set your number here 10 20 50
$content = "<A name= \"scrollingCode\"></A>";
$content .="<br>\n";
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"200\" scrollamount= \"2\" scrolldelay= \"25\" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Last $amount Forum Messages</b></center>";
$result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT $amount", $dbi);
$content .= "<br>";
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_no_message.gif\" border=\"0\"alt=\"\"><a href=\"modules.php?name=Forums&file=viewtopic&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=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"STYLE=\"text-decoration: none\"> $username </a> on $post_time</i></font><br><br>";
$count = $count + 1;
}
$content .= "<br><center>[ <a href=\"modules.php?name=Forums\"STYLE=\"text-decoration: none\">$sitename ]</center>";
//$content .= "<center><img src=\"images/banners/fatalexception-logo-88x31.gif\" border=\"0\"></center>";
$content .= "</a>";
$content .="</center></MARQUEE></center>\n";
$content .= "<table align=\"center\" width=\"100%\" height=\"60\" cellspacing=\"2\" cellpadding=\"2\" border=\"1\"><tr>\n";
$content .= "<td width=\"50%\" align=\"center\"><a href=\"modules.php?name=Forums\">Forums</a></td>\n";
$content .= "<td width=\"50%\" align=\"center\"><a href=\"modules.php?name=Forums&file=search\">Search</a></td></tr><tr>\n";
//$content .= "<td width=\"50%\" align=\"center\"><a href=\"modules.php?name=Forums&file=ranks\">Ranks</a></td>\n";
//$content .= "<td width=\"50%\" align=\"center\"><a href=\"modules.php?name=Forums&file=smilies_list\">Smilies</a></td>\n";
//$content .= "</tr><tr>\n";
//$content .= "<td width=\"50%\" align=\"center\"><a href=\"modules.php?name=Forums&file=arcade\">Arcade</a></td>\n";
//$content .= "<td width=\"50%\" align=\"center\"><a href=\"modules.php?name=Staff\">Staff</a></td>\n";
$content .= "</tr></table>\n";
?>
Wow thanks a lot, that's awesome. I'm only a little bitt familiar with the code, so I was wondering, What could I change to make it stop scrolling? I'm betting I need to change something here:
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"200\" scrollamount= \"2\" scrolldelay= \"25\" onmouseover='this.stop()' onmouseout='this.start()'>";
<MARQUEE you use this
loop=n
Indicates number of times to loop through the marquee. A value of INFINITE means to loop continuously.
in your example will be ( loop=7 )
$content .="<MARQUEE behavior= \"scroll\" loop= \"7\" align= \"center\" direction= \"up\" height=\"200\" scrollamount= \"2\" scrolldelay= \"25\" onmouseover='this.stop()' onmouseout='this.start()'>";
.
see this link for info about <MARQUEE
http://www.html-reference.com/MARQUEE.htm
That gave me some information that is good to know, but how would I stop them from scrolling completely?
$content .="<MARQUEE behavior= \"scroll\" loop= \"7\" align= \"center\" direction= \"up\" height=\"200\" scrollamount= \"2\" scrolldelay= \"25\" onmouseover='this.stop()' onmouseout='this.start()'>";
Just take that out!
and also a bit down
$content .="</center></MARQUEE></center>\n";
take away the marquee end tag: </MARQUEE>
now you have taken away BOTH start and end of that marquee
Alright it looks like I'm all set guys thanks a lot!!!
Well, I've got a new problem. Posts that are made in hidden forums (the Admins Only forums) are showing up on it. Now, only the admins are able to get in, but I would still not like the topics to be showing up. Any ideas?
Hmm why don't you go and look at some other sites that offer some 'blocks' for PHP-Nuke like Nuke Code or Nuke Resources and just have a look at what is already there I believe what you are looking your has already been written, and if you want learn to modify them, or if you have a real problem with doing so then re post here.