Author |
Message |
emmaphp
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Aug 22, 2006
Posts: 192
|
Posted:
Sat Jan 17, 2009 8:43 pm |
|
Hi All,
I have tried using a Forums Scrolling block with my new installation of Raven Nuke 2.3, however it does not appear when activated, (as a right hand block).
This worked without any issues with a previous installation of Raven Nuke 2.1.
Additionally, I have noted that if you select the block to display on the left or as a block center up block, then all other blocks on the page disappear.
Please would some one take a look at this (code) and advise what the issue could be and a resolve.
Code:<?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 = 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>";
$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=\"#6677A0\"><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&p=$topic_last_post_id#$topic_last_post_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><font color=\"#A600C9\">[<a href=\"forums.html\"STYLE=\"text-decoration: none\">Click To Visit Forums</a>]</center>";
//$content .= "<center><img src=\"images/banners/fatalexception-logo-88x31.gif\" border=\"0\"></center>";
$content .= "</a>";
?>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Sat Jan 17, 2009 11:05 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
emmaphp
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jan 17, 2009 11:33 pm |
|
Hi Raven,
Thanks for that heads up...I can now see how a few things/blocks may become a little 'messy' when trying to use them with the new 2.3 version of Raven Nuke.
I have followed the advise given in the sticky you quoted, but still the block is not working. Often when a block is not working and there is an issue with the code, it will appear but say something like 'there is currently a problem with this block', but the one I am trying to install does not even appear.
The following code is the code I have amended and am currently having problems with:
Code:<?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, $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>";
$result1 = $db->sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT $amount");
$content .= "<br>";
while(list($topic_id, $topic_last_post_id, $topic_title) = sql_fetch_row($result1, $db)) {
$result2 = $db->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'");
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $db);
$result3 = $db->sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'");
list($username, $user_id)=sql_fetch_row($result3, $db);
//$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=\"\"><a href=\"forums.html?amp;file=viewtopic&p=$topic_last_post_id#$topic_last_post_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><font color=\"#A600C9\">[<a href=\"forums.html\"STYLE=\"text-decoration: none\">Click To Visit Forums</a>]</center>";
//$content .= "<center><img src=\"images/banners/fatalexception-logo-88x31.gif\" border=\"0\"></center>";
$content .= "</a>";
?>
|
I would appreciate it very much if someone could either advise where I have gone wrong, or what the problem is etc.
Also, I am wondering if there is a scrolling forums block for Raven Nuke 2.3 that is already available/updated etc?
Thanks in advance all. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jan 18, 2009 1:01 am |
|
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 Raven on Mon Jan 19, 2009 12:20 pm; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jan 18, 2009 5:03 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sun Jan 18, 2009 9:30 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
emmaphp
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jan 19, 2009 12:47 am |
|
Hi Raven,
Thank you very much for your reply and supplying the code/2 files to make this block work/compatible with Raven Nuke 2.3.
Firstly, I am interested to learn why this block (code) now requires an accompanying second file (the one to be placed in the location ShortLinks/GTB-block-Forums_Scroll.php), in order for the block to work, but the block that works with older versions of Raven Nuke and PHP Nuke only requires the one Scrolling Forums block itself?
More importantly at this time, there is a slight difference with the block displayed using the aforementioned new code/2 files you supplied and I am wondering if, when you have some time for this, you would kindly advise about this.
Simply, the Scrolling Forums block used previously for previous versions of Raven Nuke and PHP Nuke, not only had the title of a Forum posting displayed, but also the subject of that specific posting.
How can we achieve this with the new code/block you have provided?
Thanks again for this 'all'. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Mar 18, 2007
Posts: 1242
|
Posted:
Mon Jan 19, 2009 8:31 am |
|
I installed the blocks as per Raven's mods and when I click on any title in the scroll, I get this:
Code:/forums.html?file=viewtopic&t=7928 was not found on this server
|
Cheers
Edit: Argggh, never mind, I put the block in a 2.0.02 installation. Bah
Just installed it in a 2.3 install and get the same error. Seems the problem is there is no such file as <b>forums.html</b> |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jan 19, 2009 9:36 am |
|
Do you have ShortLinks activated? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jan 19, 2009 9:48 am |
|
Ah, so that's the secret, will let you know when I get home from work, thanks. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jan 19, 2009 11:31 am |
|
O well, I can't use it becaue I don't use ShortLinks. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Mon Jan 19, 2009 12:05 pm |
|
The problem is not with using or not using shortlinks. The problem is that this site uses shortlinks .
This is wrong.
$content .= "<a href=\"forums.html?amp;fi
Not because raven or you posted it wrong, but because this site rewrote it. I will post an offsite text file when I get home unless someone beats me to it. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jan 19, 2009 12:22 pm |
|
I edited the code/post above to allow the code to be shown w/ mod_rewrite butting in
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
emmaphp
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jan 19, 2009 9:27 pm |
|
Hi 'All',
I actually just returned here to report an issue with the aforementioned Scrolling Forums block, but it appears dad7732 has beaten me to this !
Thanks for the fix again Raven!
![Dance-Y](modules/Forums/images/smiles/dance.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jan 19, 2009 9:43 pm |
|
Works now just fine, no ShortLinks needed to be active.
Cheers |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jan 19, 2009 11:01 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jan 20, 2009 7:22 am |
|
Cheers |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Nov 18, 2010
Posts: 28
|
Posted:
Mon Feb 07, 2011 4:13 pm |
|
hey i was wondering if you made a newer scrolling forums block since this 1?
Im currently using this one but when someone reply's to a post it doesnt put the post to the top of the list showing its new,it only display's newest actual post not reply,.,.hope your understanding me.. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 16, 2011 10:27 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 16, 2011 11:06 am |
|
You resurrected a thread that was 2 years old, which is possibly why no one has responded yet.
As far as I know, the latest block is in the downloads on this site but the code posted above was for RavenNuke (tm) 2.3. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Wed Feb 16, 2011 11:12 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 16, 2011 11:34 am |
|
Try the one from RN 2.04.01. I don't remember if we changed it but this site is not (yet) updated to the latest RN. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Feb 19, 2011 1:02 am |
|
thx,.i think i tried the one in the dwnloads here and didnt display and jacked my main page |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Feb 19, 2011 12:11 pm |
|
Ya the one here and at that link you posted are the same blocks,but the one on RN wacks out my page the one at the link doesnt and does show by newest post but is centered to the left and looks funny,.,.
I just thought you might of been able to look at the code youve redone on this post and spot out either how to or why it isnt displaying by newest reply..
Theres alot of scrolling forum blocks out there that i like but dont work with ravennuke and i dont know how to rewrite them.,.I like using raven so i guess ill just deal with the block not displaying replies untill i can find one that works with rn. |
|
|
|
![](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:
Sat Feb 19, 2011 12:51 pm |
|
Are you looking for a center block or a side block? |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|