Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Tue Mar 22, 2005 11:13 am Reply with quote

Ok i don't know what to say about it.I just try today to click on the article from this block and i saw that each link is just:
Code:
[b]http://www.novavalna.org/nwdb1/modules.php?name=News&file=article&sid=&mode=&order=0&thold=0[/b]



there's no "sid"...etc.Think there is problem with sql fetching...i'm newbie so there's the code:

Code:
<?php


$usemarquee = 1;
$scrolldirection = "UP";  //edit the direction up or down

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/*      **********************************************                  */
/*      * modified as block-ScrOld_Articles by @ngel *                  */
/*      *                Only registered users can see links on this board! Get registered or login!               *                  */
/*      *        The Unofficial Ibiza Web Site       *                  */
/*      **********************************************                  */
/*                                                                      */
/* 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 (eregi("block-Old_Articles.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $locale, $oldnum, $storynum, $storyhome, $cookie, $categories, $cat, $prefix, $multilingual, $currentlang, $db, $new_topic, $user_news;

$content .= "<Marquee Behavior=\"Scroll\" Direction=\"$scrolldirection\" Height=\"200\" ScrollAmount=\"2\" ScrollDelay=\"20\" onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\"><br>";    //edit the scroll delay, height and amount

if ($multilingual == 1) {
    if ($categories == 1) {
       $querylang = "where catid='$cat' AND (alanguage='$currentlang' OR alanguage='')";
    } else {
       $querylang = "where (alanguage='$currentlang' OR alanguage='')";
   if ($new_topic != 0) {
       $querylang .= " AND topic='$new_topic'";
   }
    }
} else {
    if ($categories == 1) {
      $querylang = "where catid='$cat'";
    } else {
   $querylang = "";
   if ($new_topic != 0) {
       $querylang = "WHERE topic='$new_topic'";
   }
    }
}
if (isset($cookie[3]) AND $user_news == 1) {
    $storynum = $cookie[3];
} else {
    $storynum = $storyhome;
}
$boxstuff = "<table border=\"0\" width=\"100%\">";
$boxTitle = _PASTARTICLES;
$sql = "SELECT sid, title, time, comments FROM ".$prefix."_stories $querylang ORDER BY time DESC LIMIT $storynum, $oldnum";
$result = $db->sql_query($sql);
$vari = 0;

$r_options = "";
if (isset($cookie[4])) { $r_options .= "&amp;mode=$cookie[4]"; }
if (isset($cookie[5])) { $r_options .= "&amp;order=$cookie[5]"; }
if (isset($cookie[6])) { $r_options .= "&amp;thold=$cookie[6]"; }

while ($row = $db->sql_fetchrow($result)) {
    $sid = $row[sid];
    $title = $row[title];
    $time = $row[time];
    $comments = $row[comments];
    $see = 1;
    setlocale(LC_TIME, $locale);
    ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime2);
    $datetime2 = strftime(""._DATESTRING2."", mktime($datetime2[4],$datetime2[5],$datetime2[6],$datetime2[2],$datetime2[3],$datetime2[1]));
    $datetime2 = ucfirst($datetime2);
    if ($articlecomm == 1) {
   $comments = "($comments)";
    } else {
   $comments = "";
    }
    if($time2==$datetime2) {
        $boxstuff .= "<tr><td valign=\"top\"><img src=\"http://novavalna.org/nwdb1/modules/Topics/images/arrow.gif\"></td><td> <a href=\"modules.php?name=News&amp;file=article&amp;sid=$sid$r_options\"><b>$title</b></a>$comments</td></tr>\n";
    } else {
        if($a=="") {
           $boxstuff .= "<tr><td colspan=\"2\">$datetime2</td></tr><tr><td valign=\"top\"><img src=\"http://novavalna.org/nwdb1/modules/Topics/images/arrow.gif\"></td><td> <a href=\"modules.php?name=News&amp;file=article&amp;sid=$sid$r_options\"><b>$title</b></a> $comments</td></tr>\n";
       $time2 = $datetime2;
       $a = 1;
   } else {
       $boxstuff .= "<tr><td colspan=\"2\">$datetime2</td></tr><tr><td valign=\"top\"><img src=\"http://novavalna.org/nwdb1/modules/Topics/images/arrow.gif\"></td><td> <a href=\"modules.php?name=News&amp;file=article&amp;sid=$sid$r_options\"><b>$title</b></a> $comments</td></tr>\n";
       $time2 = $datetime2;
   }
    }
    $vari++;
    if ($vari==$oldnum) {
   if (isset($cookie[3])) {
       $storynum = $cookie[3];
   } else {
       $storynum = $storyhome;
   }
   $min = $oldnum + $storynum;
   $dummy = 1;
    }
}

if ($dummy == 1 AND is_active(Stories_Archive)) {
    $boxstuff .= "</table><br><a href=\"archive.html\"><b>"._OLDERARTICLES."</b></a>\n";
} else {
    $boxstuff .= "</table>";
}

if ($see == 1) {
$content .= $boxstuff;
}

$content .= "</Marquee>";
?>


PLs HELP!!!10x


Last edited by Virgin_Steel on Tue Mar 22, 2005 11:33 am; edited 1 time in total 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Virgin_Steel
PostPosted: Tue Mar 22, 2005 11:31 am Reply with quote

Hm i have a look to php-nuke 7.5 version of the normal block and there this line looks like:
Quote:

$sid = $row['sid'];

Mine was:
Quote:

$sid = $row[sid];

Now everything is fixed!
Raven you can delete this topic!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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 ©