Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.216
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?  Cant login to your admin account ? This s...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriously...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack. ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - Rss feed help needed - thanks in advance
Rss feed help needed - thanks in advance

1 Replies / 2384 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » General PhpNuke

View previous topic :: View next topic


ispgeek
Reputation: 503.5 Add RepSubtract Rep
Local time: 1:10 AM

blank.gif

Noob
Noob

0.01 posts per day
Medals: 0

Joined: Apr 27, 2007
Last Visit: 02 Apr 2011
Posts: 14
Points: 729 

Post Rss feed help needed - thanks in advance Posted: Thu Mar 31, 2011 8:08 pm

Howdy,

I'm using the following code to post our forums feed to twitter and it works fine. I'm in the middle of creating a Facebook page with the same feed using RSS Graffiti but it's not accepting the feeds because of the following:

Symptom
You notice that some or all of the entries in your feed are not published by RSS Graffiti. In the log messages of your feed you see the following error:

"Missing publication date in {number} items in your feed."
Cause
One or more feed entries do not indicate their date of publication.

In RSS for example, there is an element called pubDate which indicates the date when the item was published (created). RSS Graffiti relies on that date to distinguish between old and new items. Every time an item is posted on your wall, RSS Graffiti writes down the date it was published (as indicated by the pubdate field in your feed) and from then on, it looks only for items newer than that, to continue publishing on your wall. If the publication date is missing (not supplied by the feed), then RSS Graffiti has no other way of knowing if the item is new or not and whether it has already been published on your wall or not. As a result items without a publication date are not posted at all on your wall.

Here is the code I'm using :

Code:

<?php

include("mainfile.php");
global $prefix, $dbi, $sitename, $user, $cookie, $group_id;
    header("Content-Type: text/xml");
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
    echo "<rss version=\"0.91\">";
    echo "<channel>";
    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";
    $count = 1;
    $result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT 15", $dbi);
    while(list($topic_id, $topic_last_post_id, $topic_title) = sql_fetch_row($result1, $dbi)) {
   $result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
   list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);

        echo "<item>\n";
        echo "<title>".htmlspecialchars($topic_title)."</title>\n";
        echo "<link>$nukeurl/modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id</link>\n";
        echo "<guid>$nukeurl/modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id</guid>\n";
        echo "</item>\n\n";


   }
    echo "</channel>\n";
    echo "</rss>";
?>
?>


Any help you can offer would be appreciated
 

 
View user's profileSend private message Reply with quote

Guardian
Reputation: 535.9 Add RepSubtract Rep
votes: 1
Local time: 7:10 AM

slovakia.gif



0.04 posts per day
Medals: 0
Respected Member
Respected Member
Joined: Dec 09, 2006
Last Visit: 16 Apr 2012
Posts: 74
Points: 4757 

Post Rss feed help needed - thanks in advance Posted: Mon Jun 27, 2011 9:22 am

First of all, your code uses the old $dbi database abstraction layer which you shouldn't use as it's not secure and it's not very efficient.

I see from the code you posted you don't actually have a puDate XML Namespace, but you do have the SQL statement to get it, so all you need to do is add it to you code after echo guid line, something like
Code:
echo '<puDate>'.$post_time.'</pubDate>'.PHP_EOL;
 

 
View user's profileSend private messageVisit poster's website Reply with quote
Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » General PhpNuke


 
1 Replies / 2384 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
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 cannot attach files in this forum
You can download files in this forum