» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 74
0 members and 74 guests
No Members online
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Rimonabant
www.rimonabant-weight-loss.com
Football Betting - best nfl betting promotions at sportsbook.com.
Poker Chips - Clay and composite poker chips for home games.

Register Now! Contact Us

About this Page
This is a discussion on Recent Posts Block within the Purged Topics forums, part of the NM Staff category; Is your Recent Posts Block available from the site?...



Go Back   Nukemods Forum » NM Staff » Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-13-2002, 07:25 PM
Junior Member
 
Join Date: Nov 2002
Posts: 16
Recent Posts Block
Is your Recent Posts Block available from the site?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-14-2002, 10:01 AM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
Re: Recent Posts Block
Originally Posted by Blayloc
Is your Recent Posts Block available from the site?
It should be VERY soon.

The only problem now is that it ONLY works with the theme used on this site. UNLESS you want to mess with the code to get to match your theme, which shouldn't be that hard.

It should be available for download later today.

mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-14-2002, 04:41 PM
Junior Member
 
Join Date: Nov 2002
Posts: 16
Sweet..
I use this theme


If you decide to not put it up becuase it only works with fiblack could you please email it to me?


blayloc@allupnya.net



THanks Mike!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-14-2002, 06:31 PM
dar63's Avatar
Moderator
 
Join Date: Oct 2002
Location: UK
Posts: 473
Use this code

Code:
<?php


/* by: Mat Verdonschot(mverdonschot@lycos.nl)     */
/* http://members.lycos.nl/mverdonschot              */

if( eregi( "block-phpBB_Forums.php",$PHP_SELF ) )
{
   Header("Location: index.php");
   die();
}

global $prefix, $dbi, $sitename;

$Last_5_New_Topics = 5; // Show only 5 last new topics
$border = 1;
$bordercolor = "#E6E6FA"; //#cacaca
$cellspacing = 0;
$bgcolor = "#EAEDF4"; // #F0F8FF #B0C4DE
$bgcolor2 = "#FFFFFF";  //#D6DFF7 #B0C4DE #6495ED 

// Languages

define("_BBFORUM_NEWTOPICS","Topic");
define("_BBFORUM_POSTER", "Poster");
define("_BBFORUM_VIEWS", "Views");
define("_BBFORUM_REPLIES", "Replies");
define("_BBFORUM_LASTPOSTER", "Last Poster");
define("_BBFORUM_TOTTOPICS", "Topics ");
define("_BBFORUM_TOTPOSTS", "Posts ");
define("_BBFORUM_TOTVIEWS", "Views ");
define("_BBFORUM_TOTREPLIES", "Replies ");
define("_BBFORUM_TOTMEMBERS", "Members ");
define("_BBFORUM_FORUM", "Go To Forums");


/* Total Amount of Topics */
$result = sql_query( "SELECT * FROM ".$prefix."_topicsbb", $dbi );
$Amount_Of_Topics = sql_num_rows( $result, $dbi );

/* Total Amount of Posts */
$result = sql_query( "SELECT * FROM ".$prefix."_posts", $dbi );
$Amount_Of_Posts = sql_num_rows( $result, $dbi );

/* Total Amount of Topic Views */
$Amount_Of_Topic_Views = 0;
$result = sql_query( "SELECT topic_views FROM ".$prefix."_topicsbb", $dbi );
while( list( $topic_views ) = sql_fetch_row( $result, $dbi ) )
{
   $Amount_Of_Topic_Views = $Amount_Of_Topic_Views + $topic_views;
}

/* Total Amount of Topic Replies */
$Amount_Of_Topic_Replies = 0;
$result = sql_query( "SELECT topic_replies FROM ".$prefix."_topicsbb", $dbi );
while( list( $topic_replies ) = sql_fetch_row( $result, $dbi ) )
{
   $Amount_Of_Topic_Replies = $Amount_Of_Topic_Replies + $topic_replies;
}

/* Total Amount of Members */
$result = sql_query( "SELECT * FROM ".$prefix."_users", $dbi );
$Amount_Of_Members = sql_num_rows( $result, $dbi );

/* Last 5 New Topics */
$Topic_Buffer = "";
$result1 = sql_query( "SELECT topic_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies FROM ".$prefix."_topicsbb ORDER BY topic_last_post_id DESC LIMIT $Last_5_New_Topics", $dbi );
while( list( $topic_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies ) = 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."_posts where post_id = '$topic_last_post_id'", $dbi );
   list( $topic_id, $poster_id, $post_time ) = sql_fetch_row( $result2, $dbi );

   $result3 = sql_query( "SELECT uname, uid FROM ".$prefix."_users where uid='$poster_id'", $dbi );
   list( $uname, $uid ) = sql_fetch_row( $result3, $dbi );
   $LastPoster = "<A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$uid\"STYLE=\"text-decoration: none\"> $uname </a>";
      
   $result4 = sql_query( "SELECT uname, uid FROM ".$prefix."_users where uid='$topic_poster'", $dbi );
   list( $uname, $uid ) = sql_fetch_row( $result4, $dbi );
   $OrigPoster = "<A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$uid\"STYLE=\"text-decoration: none\"> $uname </a>";
   
$TopicImage = "<img src=\"images/blocks/folder.gif\" border=\"0\" alt=\"\">";

   $TopicTitleShow = "<a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\">$topic_title</a>";
   
   $Topic_Buffer .= "<tr><td>$TopicImage$TopicTitleShow</td><td><div align=\"center\">$OrigPoster</div></td><td><div align=\"center\">$topic_views</div></td><td><div align=\"center\">$topic_replies</div></td><td align=\"center\">$LastPoster
<font size=\"-2\">".substr($post_time,0,strpos($post_time,"at"))."</font></td></tr>";  
}
/*

*/



/* Write Table to Screen  */

$content .= "<table bgcolor=\"$bgcolor\" width=\"100%\" border=\"$border\"  cellspacing=\"$cellspacing\" bordercolor=\"$bordercolor\" >"; // bgcolor=\"$bgcolor\"

$content .= "<tr><td align=\"center\">"._BBFORUM_NEWTOPICS."</td><td align=\"center\">"._BBFORUM_POSTER."</td><td align=\"center\">"._BBFORUM_VIEWS."</td><td align=\"center\">"._BBFORUM_REPLIES."</td><td align=\"center\">"._BBFORUM_LASTPOSTER."</td></tr>";
$content .= "$Topic_Buffer";
$content .= "<tr><td align=\"center\" colspan=\"5\">"._BBFORUM_TOTTOPICS."$Amount_Of_Topics|"._BBFORUM_TOTPOSTS."$Amount_Of_Posts|"._BBFORUM_TOTVIEWS."$Amount_Of_Topic_Views|"._BBFORUM_TOTREPLIES."$Amount_Of_Topic_Replies|<a href=\"modules.php?name=Members_List\">"._BBFORUM_TOTMEMBERS."</a>$Amount_Of_Members</center></td></tr>";
$content .= "<tr><td align=\"center\" colspan=\"5\">[ <a href=\"modules.php?name=Forums\">"._BBFORUM_FORUM."</a> ]</center></td></tr>";
$content .= "</table>";


?>
and name it block-phpBB_Forums.php and upload it to your blocks folder, its the one I use on my site if you want an example, you'll also need to place an image in images/blocks named folder.gif.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-14-2002, 07:07 PM
Junior Member
 
Join Date: Nov 2002
Location: USA
Posts: 89
Send a message via ICQ to Cyberclark
Nice Code
Does anyone know a way to add to it so that the user viewing the last 5 block will only see those headers that he/she has rights to see?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 11-14-2002, 07:28 PM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
Do you mean hidden Forums? Forums that are visible to Admins or Mods only?

I beleive the block we just posted in our d/l section will do that. There is an option in the script to turn on or off Hidden forums.
It is turned on by default. So you shouldn't have to change anything in the block.
I was trying to get it to actually show the hidden Forums if you are logged as an Admin, but couldn't get it. released anyways. Find it in our d/l section. For fiblack theme only.
:roll:
mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 11-14-2002, 08:06 PM
Junior Member
 
Join Date: Nov 2002
Location: USA
Posts: 89
Send a message via ICQ to Cyberclark
Not neccessarily just hidden forums
Out of the 10 or so forums on the one site I am thinking of using this for we have 7 hidden forums and only like 3 visible.

Basically what I am looking for is if user ABC logs in and he only has rights to see the public forums then the last 5 will show the last 5 headers from just those forums.
However if user XYZ logs in and has permissions to see the hidden forums I would like those forums included in the calculation for last 5 along with the public ones?

Does that make sense?


*** buries head back into his php for dummies book *****

The answer has to be in here somewhere I tell ya
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 11-14-2002, 08:19 PM
Junior Member
 
Join Date: Nov 2002
Posts: 35
Well the only Problem wich I see are the pictures. IM to dumb to find out how to replace it with a variable.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 11-20-2002, 03:41 PM
Member
 
Join Date: Nov 2002
Location: Michigan, USA
Posts: 359
Send a message via AIM to ReNeGaDe
you arent the only one rancord

*joins cyber in reading*
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 11-20-2002, 03:59 PM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
You guys and your reading 8O ...Get in that code and plug around... :twisted:

Look for the obvious stuff. :roll:

hehe

mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recent Forum Posts Block? gabi Nuke 6.5 to 6.9 - Blocks 5 03-25-2005 05:29 AM
Recent Posts Block TONG Nuke 6.5 to 6.9 - Blocks 5 07-09-2003 01:53 PM
block for recent forum posts in 6.5? tharow Open topics 2 05-14-2003 05:53 PM
recent posts block for subBlack? Hadron Theme packs 3 04-28-2003 10:02 PM
Recent Posts block? OiSole Nuke 6.5 to 6.9 - Blocks 1 04-04-2003 05:48 PM


All times are GMT -5. The time now is 06:23 PM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31