Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 75
7 members and 68 guests
becgr4komingare, losxwzqangelztw, phy6nssicatqq4l, pla4lnsforby4fc, re7aqypiki, ridatewb3dcymba, seo5wqgks3lasgo
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > PHP-Nuke 7.x > Nuke 7.x - Blocks

Reply
 
LinkBack Thread Tools Display Modes
Where can I find this block?
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 27
Join Date: Dec 2004
Where can I find this block? - 08-04-2008, 12:45 PM

Hi friends,

Where can I find a block that allow me to show the last 10 recent posts in a specific forums...
The idea is only to show the last posts of only 5 forum sections.

Any ideia where I can find?

Or any ideia how to make that in this block?


Code:
<?php

########################################################################
# PHP-Nuke Block: fiblack Center Forum Block v.2                #
# Made for PHP-Nuke 6.5 and up                            #
#                                                                      #
# Made by mikem http://www.nukecops.com                                #
########################################################################
# This block is made only to match the phpib2 Theme pack               #
# 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 you modify this, let me know for fun. =)                          #
######################################################################## 

if (eregi("block-fiblack-Forum.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}
    
global $prefix, $dbi, $sitename, $admin;

$HideViewReadOnly = 0;
            
$Last_New_Topics  = 5;
$show = "  <tr> 
    <td height=\"28\" colspan=\"6\" align=\"center\" class=\"catbottom\" background=\"modules/Forums/templates/arkanian/images/cellpic3.gif\">&nbsp;</td>
  </tr>
</table></td>
        </tr>
      </table></td>
  </tr>
</table><br>";

$Count_Topics = 0;
$Topic_Buffer = "";
$result = sql_query( "SELECT t.topic_id, f.forum_name, f.forum_id, t.topic_last_post_id, t.topic_title, t.topic_poster, t.topic_views, t.topic_replies, t.topic_moved_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id ORDER BY topic_last_post_id DESC", $dbi );
while( list( $topic_id, $forum_name, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result, $dbi ) )

{
   $skip_display = 0;
   if( $HideViewReadOnly == 1 )
   {
      $result1 = sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'", $dbi );
      list( $auth_view, $auth_read ) = sql_fetch_row( $result1, $dbi );
      if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }
   }

   if( $topic_moved_id != 0 )
   {
      // Shadow Topic !!
      $skip_display = 1;
   }
   
   if( $skip_display == 0 )
   {
      $Count_Topics += 1;

$result2 = sql_query("SELECT username, user_id, user_color_gc FROM ".$prefix."_users where user_id='$topic_poster'", $dbi);
list($username, $user_id, $user_color_gc)=sql_fetch_row($result2, $dbi);
$avtor= UsernameColor($user_color_gc, $username);
$sifra=$user_id;

$result3 = sql_query("SELECT poster_id, FROM_UNIXTIME(post_time,'%m/%d/%Y ÃÂ*s %H:%i') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($poster_id, $post_time)=sql_fetch_row($result3, $dbi);

$result4 = sql_query("SELECT username, user_id, user_color_gc FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id, $user_color_gc)=sql_fetch_row($result4, $dbi);
$username= UsernameColor($user_color_gc, $username);

                          $viewlast .="  <tr> 
    <td height=\"34\" bgcolor=\"#0D0E0E\" class=\"row1\"><img src=\"modules/Forums/templates/arkanian/images/folder_new.gif\" border=\"0\" /></td>
    <td width=\"100%\" bgcolor=\"#272727\" class=\"row1\">&nbsp;<b>$forum_name</b><br>&nbsp;&nbsp;<a href=\"modules.php?name=Forums&file=viewtopic&t=$topic_id#$topic_last_post_id\">$topic_title</a></td>
    <td align=\"center\" bgcolor=\"#303030\" class=\"row2\">$topic_replies</td>
    <td align=\"center\" bgcolor=\"#303030\" class=\"row2\">$topic_views</td>
    <td align=\"center\" nowrap bgcolor=\"#414141\" class=\"row3\"><font size=\"-2\"><i>&nbsp;&nbsp;$post_time&nbsp;</i></font><br>
      <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\">$username</a>&nbsp;<a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"><img src=\"modules/Forums/templates/arkanian/images/icon_latest_reply.gif\" border=\"0\" alt=\"Último Post\"></a></td>
  </tr>";
}
   
   if( $Last_New_Topics == $Count_Topics ) { break 1; }
   
}

    $content .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
  <tr>
    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
        <tr>
          <td bgcolor=\"#010101\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\">
  <tr> 
    <th height=\"28\" colspan=\"2\" align=\"center\" nowrap class=\"thcornerl\"><font color=\"#D77700\"><strong>Forum/Tópico</strong></font></th>
    <th width=\"25\" align=\"center\" nowrap class=\"thtop\"><font color=\"#D77700\"><strong>&nbsp;Posts&nbsp;</strong></font></th>
    <th width=\"50\" align=\"center\" nowrap class=\"thtop\"><font color=\"#D77700\"><strong>&nbsp;Visto&nbsp;</strong></font></th>
    <th align=\"center\" nowrap class=\"thcornerr\"><font color=\"#D77700\"><strong>&nbsp;Último Post&nbsp;</strong></font></th>
  </tr><br>";
    $content .= "$viewlast";

 $content .= "$show";

?>
I only want to show this forums id´s: 10, 12, 15, 18, 21
   
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
were can I find link back to us block killerbee Open topics 0 10-12-2005 10:10 PM
Cant find F1 theme :( SlashDot Theme packs 1 11-22-2004 02:33 PM
Where can i find nuke***.tar.gz at? DareDoo Nuke 7.x - General 2 11-11-2004 01:36 PM
Trying to find some info on this for webmail palooka Purged Topics 2 06-13-2003 07:04 PM
Quote of the Day Block? (Where Can I find One?) klipywitz Purged Topics 5 12-06-2002 09:44 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.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