PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Susann
Moderator


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

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

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 Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 4658

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

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 Visit poster's website
Susann
Moderator


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

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

Thanks,

but itīs still the same error. I quess with your code I have to edit an other file too.
View user's profile Send private message Visit poster's website
Susann
Moderator


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

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

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 to the forums!


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

global , nuke, Resource id #1;

However, its working without changes.
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 4658

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

Thats great that its working for you now.
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest Đ 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is Đ copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum