PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  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
snyper
Hangin' Around


Joined: Nov 18, 2010
Posts: 28

PostPosted: Sat Feb 19, 2011 10:26 pm Reply with quote Back to top

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
View user's profile Send private message
muskiehunter
New Member
New Member


Joined: Aug 24, 2011
Posts: 9

PostPosted: Mon Aug 29, 2011 9:28 am Reply with quote Back to top

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 Smile. 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&amp;file=viewtopic&amp;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
View user's profile Send private message
muskiehunter
New Member
New Member


Joined: Aug 24, 2011
Posts: 9

PostPosted: Wed Aug 31, 2011 3:18 pm Reply with quote Back to top

Anyone??
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1535
Location: North Carolina

PostPosted: Wed Aug 31, 2011 4:12 pm Reply with quote Back to top

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&amp;file=viewtopic&amp;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>';
?>
View user's profile Send private message Send e-mail Visit poster's website
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1535
Location: North Carolina

PostPosted: Wed Aug 31, 2011 4:14 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
muskiehunter
New Member
New Member


Joined: Aug 24, 2011
Posts: 9

PostPosted: Wed Aug 31, 2011 5:46 pm Reply with quote Back to top

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.
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1535
Location: North Carolina

PostPosted: Thu Sep 01, 2011 6:26 am Reply with quote Back to top

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?
View user's profile Send private message Send e-mail Visit poster's website
muskiehunter
New Member
New Member


Joined: Aug 24, 2011
Posts: 9

PostPosted: Thu Sep 01, 2011 6:57 am Reply with quote Back to top

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.
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1535
Location: North Carolina

PostPosted: Thu Sep 01, 2011 8:03 am Reply with quote Back to top

I did some modifications to it. See if this works for you.
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Send e-mail Visit poster's website
muskiehunter
New Member
New Member


Joined: Aug 24, 2011
Posts: 9

PostPosted: Thu Sep 01, 2011 9:11 am Reply with quote Back to top

Thank you so much.. I must have missed something or messed it up lol

Thanks again have a great labor day weekend.
View user's profile Send private message
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