Events Made Easy › Forums › Bug fixed or feature request implemented › RSS feed 'pubdate' missing
- This topic has 10 replies, 2 voices, and was last updated 12 years, 10 months ago by Franky.
-
AuthorPosts
-
Wed 26 Oct 2011 at 12:41 #43583AnonymousInactive
(SORRY, missed the drop down to put in the correct section, presumed it would just insert where I was in the board)
Hi,
loving eme but having an issue with the RSS feeds which I want to use to update social media channels and some custom modules on other sites. The standard feed does not include the pubdate field which is a requirement.
The changes allowed in settings only support the information you can include in the title and description fields, I cant find anything to include the pubdate.
So basically have I missed something or has someone found a fix or shall I just add the extra field into the code (happy to share but don’t want to duplication some elses work),
thanks for any help
cheers
Wed 26 Oct 2011 at 14:38 #48970FrankyKeymasterI didn’t know pubdate was a requirement?
Wed 26 Oct 2011 at 14:44 #48971AnonymousInactivefor use with RSS Graffiti to allow publication to social media, this is their explanation
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.
what Im trying to achieve is that eme automatically publishes any newly added items on Facebook AND also posts them up again 1 week and 1 day before they happen and then finally again on the day the event is happening … if that makes sense. I know I will have to create several custom feeds for this to work but if pubDate cannot be included then RSS Grafitti wont accept them as valid.
Wed 26 Oct 2011 at 16:52 #48972FrankyKeymasterBut the RSS feed is always dynamically generated, what would then be the value for pubdate?
Wed 26 Oct 2011 at 20:29 #48973AnonymousInactiveI’ve changed the code so that it automatically takes todays date and uses it to create a pubDate so it can be used by RSS Grafitti and similar programs (and the event can be posted multiple times). The only issue now is creating the three RSS links I need as cant find anyway to customise the scope fields.
I need a ‘tomorrow’ and a ‘weektoday’ and a ‘monthtoday’ as well as a ‘today’. The today and tomorrow are covered as can use the existing scopes (eg ?eme_rss=main&scope=today’). The problem lies with the rss for the day a week from today and a day a month from today (30days is fine for this purpose). I can easily create a valid rss code on a page using the code
<a href = "http://schubert.org.uk/wordpress/?eme_rss=main&scope=<?php echo date('Y-m-d', strtotime('+7 days')); ?>&order=ASC&category=&author=&contact_person=&limit=5">Week</a>
but the obvious problem is that if I take the resulting link and paste it into a reader and save it then its just the one date, its not dynamic and so wont change for the next day or the next.
would appreciate any ideas on how to get around this please as new to this.
just to recap I am trying to post an event to Facebook 1 month before it starts, a week before it starts, the day before, and the day of the event automatically.
Cheers 🙂
Wed 26 Oct 2011 at 21:09 #48974FrankyKeymasterI changed the code so the pubdate contains the event creation or modification date:
http://plugins.trac.wordpress.org/changeset/456139
For the scope, try:
scope=tomorrow, scope=next_month etc … See: http://www.e-dynamics.be/wordpress/?cat=18 for all possible values
There was some kind of issue with “tomorrow” for scope, fixed here:
Wed 26 Oct 2011 at 22:24 #48975AnonymousInactivethanks 🙂 couple of things though
pubDate – the pubDate change helps for one off posts but will need to keep that optional as otherwise is stops it from been able to be reposted at a later date as a reminder so will continue to automatically generate from the current server time so there is no issue with reposting.
scope – brilliant, very helpful, especially the tomorrow fix as I was struggling to see where the problem was with that one. I cant see a way of choosing a date in exactly one week or one months time (to act as a trigger and repost as a reminder). Have gotten around this use yahoo pipes to generate the rss request with the date part generated from the current date plus 7 days etc which works fine.
Will look at this a bit more tomorrow as I think an additional shortcode based on current date plus so many days would be useful (scope = weektoday and scope = monthtoday)
thanks for the support with this, it’s very much appreciated and its a big help in learning this coding stuff 🙂
Thu 27 Oct 2011 at 07:13 #48976FrankyKeymasterWel, for months you have the scope range:
Nm–Mm, to get the events from month N in the past/future till month M in the past future (eg. scope=-3m–2m , scope=0m–3m)
I’ll add the same for days in the next release:
Nd–Md
So for you that will then be: 7d–7d
So you can then show events that happen on exacty 7days in the future
Thu 27 Oct 2011 at 21:58 #48977AnonymousInactivethanks, had tried the 7d–7d method but no go, had time to look a little deeper and can see how the custom shortcodes are done for the feed so have added the following code at line 1544 (probably different in others code, it’s just after the tomorrow code).
`elseif ($scope == “weektoday”) {
$weektoday = date(“Y-m-d”,strtotime($today)+604800);
if ($show_ongoing)
$conditions [] = ” (event_start_date = ‘$weektoday’ OR (event_start_date <= ‘$weektoday’ AND event_end_date >= ‘$weektoday’))”;
else
$conditions [] = ” (event_start_date = ‘$weektoday’)”;
}’
Thu 27 Oct 2011 at 23:15 #48978AnonymousInactivePS for anyone else doing this its important when setting the pubDate that you do not dynamically set the time for hours, mins and seconds, keep it to just
$pubdate = date('D, d M Y 00:00:01 T')
otherwise RSS Grafitti or whichever program you use will repost everything for that day as the time will have changed. Keeping it to just the date means it will only fetch each item once per day:)Fri 20 Jan 2012 at 22:53 #48979FrankyKeymasterAdded in trunk: Nd–Md
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.