Author |
Message |
snyper
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Nov 18, 2010
Posts: 28
|
Posted:
Sat Feb 19, 2011 10:26 pm |
|
A center block,.,.i actually edited the one from the link you gave me and works pretty nice now,.got it to display center with bigger text so i should be set.,.thx |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
muskiehunter
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/Misc/072.gif)
Joined: Aug 24, 2011
Posts: 9
|
Posted:
Mon Aug 29, 2011 9:28 am |
|
This sorta works on 2.4 just show the topic's. No latest post, date/time or by who and the time. Any ideas on how to fix this??
Thanks.
Raven wrote: | I took the original code and modified it; actually redesigned it. To get it working in RavenNuke(tm) v2.3.00 you need to save the following code as blocks/block-Forums_Scroll.php
Edited by Raven 2009-01-19 to avoid Shortlinks rewrite . I added a space in the 2 links between name=Forums -> name = Forums to allow the correct links to be shown. So, when you copy the code you need to remove the 2 spaces.
Code:<?php
/************************************************************************/
/* Forums Scrolling Block for RavenNuke(tm) */
/* ================================================= */
/* */
/* Copyright (c) 2009 by Gaylen Fraley (raven@ravenphpscripts.com */
/* http://ravenphpscripts.com */
/* 2009-01-18 Modified for RavenNuke(tm) v2.30.00+ by Gaylen Fraley (Raven) http://ravenphpscripts.com */
/* Added security so that user only sees the forums that he is authorized to see */
/* */
/* Original 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/ */
/* ================================================= */
/* */
/* This Block shows the last (elected number of 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. */
/************************************************************************/
if (eregi("block-ForumsScroll.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
//include_once ('blocks/smileys.php');
global $prefix, $user_prefix, $db, $sitename, $user, $cookie, $group_id;
$count = 1;
$amount = 15;
$content = "<a name= \"scrollingCode\"></a>";
$content .="<marquee behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"235\" scrollamount= \"2\" scrolldelay= \"50\" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <style=\"text-decoration: none\"><font color=\"#FFFFFF\"><b>Last $amount Forum Messages</b></center>";
$sql = 'SELECT t.forum_id, topic_id, topic_last_post_id, topic_title, auth_view, auth_read FROM '.$prefix.'_bbtopics AS t, '.$prefix.'_bbforums AS f WHERE f.forum_id=t.forum_id ORDER BY topic_time DESC LIMIT ' . $amount;
$result = $db->sql_query($sql);
$content .= "<br />";
while (list($forum_id, $topic_id, $topic_last_post_id, $topic_title, $auth_view, $auth_read) = $db->sql_fetchrow($result)) {
if (($auth_view < 2) OR ($auth_read < 2)) {
$sql1 = "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'";
$result1 = $db->sql_query($sql1);
list($topic_id, $poster_id, $post_time) = $db->sql_fetchrow($result1);
$sql2 = 'SELECT username, user_id FROM ' . $user_prefix . '_users where user_id=' . $poster_id;
$result2 = $db->sql_query($sql2);
list($username, $user_id)=$db->sql_fetchrow($result2);
//$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=\"#6677A0\"><b>Message: $count<br /></b>";
$content .= "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\">";
$content .= "<a href=\"modules.php?name = Forums&file=viewtopic&t=".$topic_id."\" style=\"text-decoration: none\"><b> $topic_title </b></a><br />";
//<font color=\"#6677A0\"><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;
}
}
$content .= '<br /><center><a href="modules.php?name = Forums"><b>'.$sitename.' Forums</b></a><br /><br /></center>';
?>
| |
|
Last edited by muskiehunter on Wed Aug 31, 2011 3:20 pm; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
muskiehunter
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Aug 31, 2011 3:18 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/3234de284ee21bd39eecd.jpg)
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Wed Aug 31, 2011 4:12 pm |
|
Did you try removing the // from the lines lines of code to show that?
Code:
<?php
/************************************************************************/
/* Forums Scrolling Block for RavenNuke(tm) */
/* ================================================= */
/* */
/* Copyright (c) 2009 by Gaylen Fraley (raven@ravenphpscripts.com */
/* http://ravenphpscripts.com */
/* 2009-01-18 Modified for RavenNuke(tm) v2.30.00+ by Gaylen Fraley (Raven) http://ravenphpscripts.com */
/* Added security so that user only sees the forums that he is authorized to see */
/* */
/* Original 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/ */
/* ================================================= */
/* */
/* This Block shows the last (elected number of 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. */
/************************************************************************/
if (eregi("block-ForumsScroll.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
//include_once ('blocks/smileys.php');
global $prefix, $user_prefix, $db, $sitename, $user, $cookie, $group_id;
$count = 1;
$amount = 15;
$content = "<a name= \"scrollingCode\"></a>";
$content .="<marquee behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"235\" scrollamount= \"2\" scrolldelay= \"50\" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <style=\"text-decoration: none\"><font color=\"#FFFFFF\"><b>Last $amount Forum Messages</b></center>";
$sql = 'SELECT t.forum_id, topic_id, topic_last_post_id, topic_title, auth_view, auth_read FROM '.$prefix.'_bbtopics AS t, '.$prefix.'_bbforums AS f WHERE f.forum_id=t.forum_id ORDER BY topic_time DESC LIMIT ' . $amount;
$result = $db->sql_query($sql);
$content .= "<br />";
while (list($forum_id, $topic_id, $topic_last_post_id, $topic_title, $auth_view, $auth_read) = $db->sql_fetchrow($result)) {
if (($auth_view < 2) OR ($auth_read < 2)) {
$sql1 = "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'";
$result1 = $db->sql_query($sql1);
list($topic_id, $poster_id, $post_time) = $db->sql_fetchrow($result1);
$sql2 = 'SELECT username, user_id FROM ' . $user_prefix . '_users where user_id=' . $poster_id;
$result2 = $db->sql_query($sql2);
list($username, $user_id)=$db->sql_fetchrow($result2);
$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=\"#6677A0\"><b>Message: $count<br /></b>";
$content .= "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\">";
$content .= "<a href=\"modules.php?name = Forums&file=viewtopic&t=".$topic_id."\" style=\"text-decoration: none\"><b> $topic_title </b></a><br />";
<font color=\"#6677A0\"><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;
}
}
$content .= '<br /><center><a href="modules.php?name = Forums"><b>'.$sitename.' Forums</b></a><br /><br /></center>';
?>
|
|
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Aug 31, 2011 4:14 pm |
|
You will need to remove the spaces from the name = Forums and you will need to use the long link for the profile link unless you are using ShortLinks. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
muskiehunter
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Aug 31, 2011 5:46 pm |
|
It's working just the latest post is not showing up on top for some reason and the time is in 24hr where the forums are 12hr. Must be missing something
Thanks for your help and sorry for the trouble. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 01, 2011 6:26 am |
|
If you want it displayed in 12 hours, I think you will need to modify this line:
Code: $sql1 = "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'";
|
To this:
Code: $sql1 = "SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %r') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'";
|
Have you tried other browsers to see if the block shows the latest post or have you refreshed the browser? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
muskiehunter
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 01, 2011 6:57 am |
|
That fixed the time. Thanks. Everyone in our community see's the same thing as I do the latest on the bottom. Have a look for yourself..
Thanks Again.
www.hungloclan.com |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 01, 2011 8:03 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
muskiehunter
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 01, 2011 9:11 am |
|
Thank you so much.. I must have missed something or messed it up lol
Thanks again have a great labor day weekend. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|