PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  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
nb1
Regular
Regular


Joined: Mar 03, 2005
Posts: 92
Location: OZ

PostPosted: Thu Aug 03, 2006 1:31 pm Reply with quote Back to top

Here's my question when I make a post it shows the time as
Posted by NB on Wednesday, August 02 @ 05:33:21 EEST
Should it not be
Posted by NB on Wednesday, August 02 @ 05:33:21 EST
I Was trying to validate the backend.php rss feed tells me it needs to be corrected how does one go about doing this ?
NSN News 2.0.0
RavenNuke76 v2.02.02 FULL
Only registered users can see links on this board!
Get registered or login to the forums!

Only registered users can see links on this board!
Get registered or login to the forums!


lastBuildDate must be an RFC-822 date-time: Thu, 03 Aug 2006 06:16:20 EEST

needs to be
<pubDate>Wed, 02 Oct 2002 08:00:00 EST</pubDate>

are these the same problem are two different ones?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7487
Location: Arizona

PostPosted: Thu Aug 03, 2006 2:06 pm Reply with quote Back to top

nb1, I cannot find this issue in the core PHP-nuke backend (at least for RN), so your backend.php must be a replacement in the NSN News distro? Can you post the code from that script here so we can take a look?

If this is true that it is from NSN News, I will move this thread over to that Forum so it has better visibility as such.
View user's profile Send private message Visit poster's website
nb1
Regular
Regular


Joined: Mar 03, 2005
Posts: 92
Location: OZ

PostPosted: Thu Aug 03, 2006 2:11 pm Reply with quote Back to top

Exactly which script do I need two post ?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7487
Location: Arizona

PostPosted: Thu Aug 03, 2006 2:13 pm Reply with quote Back to top

You are saying that your backend.php is not valid right? Post that one please.
View user's profile Send private message Visit poster's website
nb1
Regular
Regular


Joined: Mar 03, 2005
Posts: 92
Location: OZ

PostPosted: Thu Aug 03, 2006 2:15 pm Reply with quote Back to top

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management 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.       */
/*                                                                      */
/************************************************************************/
/* Additional coding modifications by Raven 2004                        */
/* http://ravenphpscripts.com -- http://ravenwebhosting.com             */
/************************************************************************/
/* 100% RSS/XML and W3C Compliance by Gaylen Fraley (aka Raven)         */
/* http://ravenphpscripts.com -- http://ravenwebhosting.com             */
/************************************************************************/
$rssFeedLimit = 15;
header("Content-Type: text/xml");
include("mainfile.php");
if (isset($cat) AND !empty($cat)) {
    $cat = intval($cat);
    $catid = $db->sql_fetchrow($db->sql_query("SELECT catid FROM ".$user_prefix."_stories_cat WHERE title LIKE '%$cat%' LIMIT 1"));
    if (empty($catid)) {
      $result = $db->sql_query("SELECT sid, title FROM ".$user_prefix."_stories ORDER BY sid DESC LIMIT $rssFeedLimit");
    } else {
      $catid = intval($catid);
      $result = $db->sql_query("SELECT sid, title FROM ".$user_prefix."_stories WHERE catid='$catid' ORDER BY sid DESC LIMIT $rssFeedLimit");
    }
} else {
    $result = $db->sql_query("SELECT sid, title FROM ".$user_prefix."_stories ORDER BY sid DESC LIMIT $rssFeedLimit");
}

echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n";
echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n";
echo " \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n\n";
echo "<rss version=\"0.91\">\n\n";
echo "<channel>\n";
echo "<title>".htmlspecialchars($sitename)."</title>\n";
echo "<link>$nukeurl</link>\n";
echo "<description>".htmlspecialchars($backend_title)."</description>\n";
echo "<language>$backend_language</language>\n\n";

while ($row = $db->sql_fetchrow($result)) {
    $rsid = intval($row['sid']);
    $rtitle = superhtmlentities($row['title']);
    $rtitle = str_replace('_',' ',$rtitle); //added 9/1/2004
    echo "<item>\n";
    echo "<title>".htmlspecialchars($rtitle)."</title>\n";
    echo "<link>$nukeurl/article-$rsid--0-0.html</link>\n";
    echo "</item>\n\n";
}
echo "</channel>\n";
echo "</rss>";

function superhtmlentities($text) {
        // Thanks to mirrorball_girl for this
        $entities = array(128 => 'euro', 130 => 'sbquo', 131 => 'fnof', 132 => 'bdquo', 133 => 'hellip', 134 => 'dagger', 135 => 'Dagger', 136 => 'circ', 137 => 'permil', 138 => 'Scaron', 139 => 'lsaquo', 140 => 'OElig', 145 => 'lsquo', 146 => 'rsquo', 147 => 'ldquo', 148 => 'rdquo', 149 => 'bull', 150 => '#45', 151 => 'mdash', 152 => 'tilde', 153 => 'trade', 154 => 'scaron', 155 => 'rsaquo', 156 => 'oelig', 159 => 'Yuml');
        $new_text = '';
        for($i = 0; $i < strlen($text); $i++) {
            $num = ord($text {
                $i }
            );
            if (array_key_exists($num, $entities)) {
                switch ($num) {
                    case 150:
                    $new_text .= '-';
                    break;
                    case 153:
                    $new_text .= '(tm)';
                    break;
                    default:
                    $new_text .= "&".$entities[$num].';';
                }
            }
            else
                if ($num < 127 || $num > 159) {
                $new_text .= htmlentities($text {
                    $i }
                );
            }
        }
        $new_text = ereg_replace("  +", " ", $new_text);
        ## remove double spaces.
        return $new_text;
    }
?>

And actually the time and date when posting on man page is incorrect I think this is causing the issue
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7487
Location: Arizona

PostPosted: Thu Aug 03, 2006 2:30 pm Reply with quote Back to top

This is not the one that is failing validation. In your link from your first post, that one is showing RSS version 2.0. There is no PubDate node in the code you posted.
View user's profile Send private message Visit poster's website
nb1
Regular
Regular


Joined: Mar 03, 2005
Posts: 92
Location: OZ

PostPosted: Thu Aug 03, 2006 2:52 pm Reply with quote Back to top

I'm extremely sorry I forgot I had put some extra chatters in front of the original file name for backup purposes Okay my next question is changing the time when the post was made
Posted by NB on Wednesday, August 02 @ 05:33:21 EEST
Should it not be
Posted by NB on Wednesday, August 02 @ 05:33:21 EST
theme is fiapple
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7487
Location: Arizona

PostPosted: Thu Aug 03, 2006 3:25 pm Reply with quote Back to top

Unfortunately, I am not sure how NSN News is doing it. In the core PHP-Nuke News module, it is formatted in modules/News/article.php (may be a few other places), but it seems to be calling a function in mainfile.php:

// Beta 3 code by Quake 08/19/2005
// Written for Nuke-Evolution and Nuke Patched
function formatTimestamp($time) {
global $datetime, $locale;
setlocale(LC_TIME, $locale);
if (!is_numeric($time)) {
preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2})Sad[0-9]{1,2})Sad[0-9]{1,2})/', $time, $datetime);
$time = gmmktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);
}
$time -= date('Z');
$datetime = strftime(_DATESTRING, $time);
$datetime = ucfirst($datetime);
return $datetime;
}

I have a feeling that NSN News is not using this function. It may be a bug but I will need to defer to someone who has NSN News 2.0.0 downloaded and installed. I don't have time to do that right now.

I will move this thread over to the NSN News forum.
View user's profile Send private message Visit poster's website
nb1
Regular
Regular


Joined: Mar 03, 2005
Posts: 92
Location: OZ

PostPosted: Thu Aug 03, 2006 3:30 pm Reply with quote Back to top

Thank you sir I do appreciate your time and effort
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
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