Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 98
9 members and 89 guests
digeoitalpimcf3, fed3feralgrants, forin9extraddpm, han4esonsrmawin, nadimdagostinop, ralfthorburnkh, watpperpr, XRumerTest, yossaphatdobai3
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 > NM Staff > Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
query to create block
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 1
Join Date: Nov 2002
Location: USA
query to create block - 11-21-2002, 02:01 PM

Hi, I extracted this from the recent posts block, but I can't get it to work, I am using php-nuke 5.5 with phpbb2.0.3 port.

Code:
<?php

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

global $prefix, $dbi, $sitename, $admin;

$HideViewReadOnly = 1;

$Last_New_Topics  = 5;

$Count_Topics = 0;
$Topic_Buffer = "";
$result = sql_query( "SELECT topic_id, forum_id, topic_title, topic_moved_id FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC", $dbi );
while( list( $topic_id, $forum_id, $topic_title, $topic_moved_id ) = sql_fetch_row( $result, $dbi ) )

{
   $skip_display = 0;


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

   if( $skip_display == 0 )
   {
          $Count_Topics += 1;
          $content = "";
          $viewlast .="  <tr>
    <td height=\"34\" nowrap bgcolor=\"#272727\" class=\"row1\"><img src=\"modules/Forums/templates/DesertStorm/images/folder_new.gif\" width=\"33\" height=\"25\" border=\"0\" /></td>
    <td width=\"100%\" bgcolor=\"#272727\" class=\"row1\"><a href=\"modules.php?name=Forums&file=viewtopic&t=$topic_id#$topic_last_post_id\">$topic_title</a></td>
    <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$uid\">$uname</a><a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"></a><img src=\"modules/Forums/templates/fiblack/images/icon_minipost_new.gif\"></td>
  </tr>";

 if( $Last_New_Topics == $Count_Topics ) { break 1; }
 
   $content .= "$viewlast";
   
   ?>
I could use some help

Thanks
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Super Moderator
 
coldblooded's Avatar
 
Status: Offline
Posts: 624
Join Date: Jan 2002
Location: USA
11-21-2002, 05:27 PM

There were changes made to the table names in the new phpbb2 port. To use that block with an older verison of the port you need to change:

Code:
$prefix."_bbtopics
to

Code:
$prefix."_topicsbb
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Member
 
Status: Offline
Posts: 359
Join Date: Nov 2002
Location: Michigan, USA
11-21-2002, 06:04 PM

yes that caused me problems as well, had to dig through the code. took me a while to actually realize the error. except this wasnt for the recent posts block, this was for the converter.
  Send a message via AIM to ReNeGaDe  
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
Private message Query furnfield Open topics 2 01-30-2007 11:31 AM
Create a Block that Auto Scroll sentinela Site design 2 10-14-2004 04:49 PM
Number of SQL query breakolami Open topics 0 07-29-2003 04:17 PM
Can somebody create this block for me? From html sweetquads Other "stuff" 4 05-18-2003 05:22 PM
Stuck after the query stage of phpMyAdmin 2.3.3 Luie Site design 2 01-24-2003 09:45 AM




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