Add pubDate to RSS feeder?

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
brianpeat
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Tue Jul 10, 2007 3:04 pm
Location: Hendersonville, TN, USA
Contact:

Add pubDate to RSS feeder?

Post by brianpeat » Wed Dec 19, 2007 2:08 pm

Does anyone know what code I'd add to the various files in the mod_feed module to add the pubDate tag to my feeds? I'm building a news headlines site for a client and they really want author and date. Many feeds don't list the Author, so I'm not too worried about that, but I'm sure there's a way to add the pubDate tag to the feeder, I just don't know the exact code. I tried to do it myself and all I get are errors (which didn't surprise me in the least).

thanks!
Brian Peat,
Owner, Peat Creative
https://peatcreative.com

User avatar
brianpeat
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Tue Jul 10, 2007 3:04 pm
Location: Hendersonville, TN, USA
Contact:

Re: Add pubDate to RSS feeder?

Post by brianpeat » Wed Dec 19, 2007 2:25 pm

Argh! I just realized too that the feed titles (not the item titles) don't link back to the original feed. Yet another problem I need a solution for.

I went with Joomla 1.5 because it's the future...only THEN did I realize none of the fancy RSS readers are available for it :)

EDIT: I realized I could turn off the module title and turn on the feed title, but then it's simply a link to the host web site. Oh well, it's a start.
Last edited by brianpeat on Wed Dec 19, 2007 2:27 pm, edited 1 time in total.
Brian Peat,
Owner, Peat Creative
https://peatcreative.com

102020
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Jun 16, 2010 5:34 am

Re: Add pubDate to RSS feeder?

Post by 102020 » Sat Jan 08, 2011 4:27 am

Old post, but here is the answer. I assume users are using mod_feed and want to show the pubDate field from within the xml. Easiest way is to insert the following in default.php in your tmpl folder for mod_feed. You should be using an html override of coarse.


in default.php find:

Code: Select all

for ($j = 0; $j < $totalItems; $j ++)
add the following anywhere between the for statement:

Code: Select all

echo $feed->items[0]->feed->data['child']['']['rss'][0]['child']['']['channel'][0]['child']['']['item'][$j]['child']['']['pubDate'][0]['data'];
Hope this helps,
10


Locked

Return to “Extensions for Joomla! 1.5”