Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
twelves
Regular
Regular



Joined: Aug 22, 2003
Posts: 84

PostPosted: Sat May 29, 2004 5:22 pm Reply with quote

Is their a way to modify this script to make Last 10 Topics or last 10 sections also included there?

I doubled over one set of instructions but I got errors.
What Bunch of lines should I focus on?

*this script is abandoned by the way and looking for a new home *Hint *Hint

(I did manage to repair the version I found, but adding an additional Query was out of my skill set.)


See it working at the bottom of my page.

Raven thanks for posting my News!
Page is getting lots of big time notice from industry professionals in Holly wood as well Europe. I’m already receiving my first Boxed Software to Review from Software manufactures.



http://www.nuendo-post.com/





Code:
<?php


/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* 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.       */
/************************************************************************/


/************************************************************************/
/* Modified by Colin Holywell v0.1                                      */
/*                                                                      */
/* cholywell@hotpop.com                                                 */
/* http://www.ehub.no-ip.com                                            */
/************************************************************************/
/* Block to fit perfectly in the center of the site, remember that not all
   blocks looks good on Center, just try and see yourself what fits your needs */

if (eregi("block-Last_10_Articles.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $prefix, $multilingual, $currentlang, $db, $dbi, $sitename;

if ($multilingual == 1) {
    $querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
} else {
    $querylang = "";
}
$content = "<table width=\"100%\" border=\"0\"><tr><td colspan=\"2\" align=\"center\" ><b>Latest News & Announcements</b></td></tr>";

$sql = "SELECT sid, title, comments, counter FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 10";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
    $sid = $row[sid];
    $title = $row[title];
    $comtotal = $row[comments];
    $counter = $row[counter];
    $content .= "<tr><td align=\"left\"><img src=\"images/arrow.gif\" border=\"0\" alt=\"\" title=\"\" width=\"9\" height=\"9\">&nbsp;<a href=\"modules.php?name=News&amp;file=article&amp;sid=$sid\">$title</a></td><td align=\"right\">[ $comtotal "._COMMENTS." - $counter "._READS." ]</td></tr>";
}
$content .= "</table>";
$content .= "<br>";
$content .= "<table align=\"center\" border=\"0\"><tr><td valign=\"top\" align=\"left\"><b>New Downloads</b></td><td valign=\"top\" align=\"left\"><b>New Web Links</b></td></td><td valign=\"top\" align=\"left\"><b>Recent Forum Topics</b></td></tr>";
$content .= "<tr><td valign=\"top\" align=\"left\">";
$a = 1;
$result = sql_query("select lid, title from $prefix"._downloads_downloads." order by date DESC limit 15", $dbi);
while(list($lid, $title) = sql_fetch_row($result, $dbi)) {
    $title2 = ereg_replace(" ", "_", $title);
    $content .= "<img src=\"images/arrow.gif\" border=\"0\" alt=\"\" title=\"\" width=\"9\" height=\"9\">&nbsp;<a href=\"downloads.html?amp;d_op=viewdownloaddetails&amp;lid=$lid&amp;ttitle=$title2\">$title</a><br>";
    $a++;
}


$content .= "</td><td align=\"left\" valign=\"top\">";
$a = 1;
$result = sql_query("select lid, title from $prefix"._links_links." order by date DESC limit 15", $dbi);
while(list($lid, $title) = sql_fetch_row($result, $dbi)) {
    $title2 = ereg_replace(" ", "_", $title);
    $content .= "<img src=\"images/arrow.gif\" border=\"0\" alt=\"\" title=\"\" width=\"9\" height=\"9\">&nbsp;<a href=\"links.html?amp;l_op=viewlinkdetails&amp;lid=$lid&amp;ttitle=$title2\">$title</a><br>";
    $a++;                                                                                                   
}


$result = sql_query("SELECT forum_id, topic_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_time DESC LIMIT 15", $dbi);
$content .= "</td><td align=\"left\" valign=\"top\">";
while(list($forum_id, $topic_id, $topic_title) = sql_fetch_row($result, $dbi)) {
      $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 != 2 ) or ( $auth_read != 2 ) ) {
   $content .= "<img src=\"images/arrow.gif\" border=\"0\" alt=\"\" title=\"\" width=\"9\" height=\"9\">&nbsp;<a href=\"forums.html?amp;file=viewtopic&amp;t=$topic_id\">$topic_title</a><br>";
 }
}



$content .= "</td></tr></table>";



?>
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©