pubDate in mod_feed

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

Moderators: pe7er, 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
bozak
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Apr 29, 2013 11:49 am

pubDate in mod_feed

Post by bozak » Fri May 17, 2013 5:51 pm

Hi.

I'm trying to get the pubDate of the individual items of an RSS feed displayed in the built in Joomla mod_feed module (RSS reader). However everything I tried yet, wasn't successful. Can anybody point in the right direction of how to call the "pubDate" info?

Thanks.

rumpel1
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Oct 17, 2012 8:21 am

Re: pubDate in mod_feed

Post by rumpel1 » Mon May 20, 2013 11:30 am

i assume you know how to create an override for a module? (otherwise see my response here

publishing date is stored in "publishedDate" variable of the feed object. so while in the for loop output (lines 98 to 119), you could add

Code: Select all

<span><?php echo $feed[$i]->publishedDate->format('d.m.Y'); ?></span>
see https://compojoom.com/about/blog/entry/how-to-use-jdate and http://php.net/manual/en/function.date.php for formating dates


Locked

Return to “Extensions for Joomla! 3.x”