Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.5
Author Message
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Thu Sep 08, 2005 4:43 pm Reply with quote

I know this is an old bug.The ultramode.txt shows only 1 news. I found a fix for the mainfile.php but this doesn´t change anything there is still 1 news.I ´m using chmod 666.
Any ideas ?

Original function mainfile.php:

Code:
function ultramode() {

    global $prefix, $db;
    $ultra = "ultramode.txt";
    $file = fopen("$ultra", "w");
    fwrite($file, "General purpose self-explanatory file with news headlines\n");
echo "<link>$nukeurl</link>\n";
    $sql = "SELECT sid, aid, title, time, comments, topic FROM ".$prefix."_stories ORDER BY time DESC LIMIT 0,10";
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
   $sql = "select topictext, topicimage from ".$prefix."_topics where topicid='$row[topic]'";
   $result = $db->sql_query($result);
   $row2 = $db->sql_fetchrow($result);
   $topictext = $row2[topictext];
   $topicimage = $row2[topicimage];
   $content = "%%\n$row[title]\n/modules.php?name=News&file=article&sid=$row[sid]\n$row[time]\n$row[aid]\n$row2[topictext]\n$row[comments]\n$row2[topicimage]\n";
   fwrite($file, $content);
    }
    fclose($file);
}
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Thu Sep 08, 2005 5:56 pm Reply with quote

Here's mine
Code:
function ultramode() {

   global $prefix, $db;
   $ultra = "ultramode.txt";
   $file = fopen($ultra, "w");
   fwrite($file, "General purpose self-explanatory file with news headlines\n");
   $sql = "SELECT sid, aid, title, time, comments, topic FROM ".$prefix."_stories ORDER BY time DESC LIMIT 0,10";
   $result = $db->sql_query($sql);
   while (list($rsid, $raid, $rtitle, $rtime, $rcomments, $rtopic) = $db->sql_fetchrow($result)) {
      $rsid = intval($rsid);
      $rtitle = stripslashes(check_html($rtitle, "nohtml"));
      $rcomments = stripslashes($rcomments);
      $rtopic = intval($rtopic);
      $sql = "select topictext, topicimage from ".$prefix."_topics where topicid='$rtopic'";
                $query = $db->sql_query($sql);
      list($topictext, $topicimage) = $db->sql_fetchrow($query);
      $topictext = stripslashes(check_html($topictext, "nohtml"));
      $content = "%%\n$rtitle\n/modules.php?name=News&file=article&sid=$rsid\n$rtime\n$raid\n$topictext\n$rcomments\n$topicimage\n";
      fwrite($file, $content);
   }
   fclose($file);
   $db->sql_freeresult($result);
}
 
View user's profile Send private message Send e-mail
Susann







PostPosted: Thu Sep 08, 2005 6:25 pm Reply with quote

Thanks,

but it´s still the same error. I quess with your code I have to edit an other file too.
 
Susann







PostPosted: Mon Sep 12, 2005 9:29 am Reply with quote

Great surprise your code is working since I published new articles. Very Happy
I found from 2003 this link: [ Only registered users can see links on this board! Get registered or login! ]

but I don´t have this line in my stories.php:

global , nuke, Resource id #1;

However, its working without changes.
 
Guardian2003







PostPosted: Mon Sep 12, 2005 10:56 am Reply with quote

Thats great that its working for you now.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.5

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 ©