» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 75
0 members and 75 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11: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
Football Betting - best nfl betting promotions at sportsbook.com.
Oral Chelation - initial cleansing of your veins & arteries
Portatiles - Ofertas en Ordenadores y Portatiles. Increibles Ofertas DELL.

Register Now! Contact Us

About this Page
This is a discussion on query to create block within the Purged Topics forums, part of the NM Staff category; Hi, I extracted this from the recent posts block, but I can't get it to work, I am using ...


Go Back   Nukemods Forum » NM Staff » Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-21-2002, 02:01 PM
Junior Member
 
Join Date: Nov 2002
Location: USA
Posts: 1
query to create block
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
  #2 (permalink)  
Old 11-21-2002, 05:27 PM
coldblooded's Avatar
Super Moderator
 
Join Date: Jan 2002
Location: USA
Posts: 618
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
  #3 (permalink)  
Old 11-21-2002, 06:04 PM
Member
 
Join Date: Nov 2002
Location: Michigan, USA
Posts: 359
Send a message via AIM to ReNeGaDe
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.
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


All times are GMT -5. The time now is 08:24 AM.


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