Page 1 of 1
OBBLM - RSS Feed
Posted: Wed May 14, 2014 9:38 am
by Vanguard
I'm trying to use the OBBLM RSS feed module to cross-post all updates to our league facebook group. However, it's not co-operating and I suspect it due to the RSS feed not being entirely RSS2.0 compliant. I'm tinkering with it at the moment to see if I can fix it, but could do with a few pointers.
It looks like the generateNewsRssFeed() is called from somewhere to generate the rss.xml file but I can't see where from. I'd guess this is on some kind of schedule to regularly update it. Anyone able to point me in the right direction?
Posted: Wed May 14, 2014 10:55 am
by juergen
I will try to find it. I wrote it a long time ago. As far as i remember my suggestion to update it after a ge has been submitted was rejected
Don't know when I find time for it
Re: OBBLM - RSS Feed
Posted: Wed May 14, 2014 1:05 pm
by Vanguard
Cheers. GE?
Re: OBBLM - RSS Feed
Posted: Wed May 14, 2014 1:55 pm
by Vanguard
Ahah! It seems clicking on the RSS option on the OBBLM homepage causes it to recreate the rss.xml file.
I'd guess this isn't the only way it happens, but it's letting me test my tinkering for the time being.
Re: OBBLM - RSS Feed
Posted: Fri May 16, 2014 11:19 am
by Vanguard
Soo... we have some success.
I've edited
obblm/modules/rss/class_rss.php to change the output to the rss.xml file.
I've replaced line 176 with:
Code: Select all
$el_item->appendChild($dom->createElement('pubDate', date('r', strtotime($item->date))));
This makes the date format compliant with the RFC-822 requirement for RSS feeds.
I've then added a new line immediately after that:
Code: Select all
$el_item->appendChild($dom->createElement('guid', $this->link . 'index.php?' . date('U', strtotime($item->date))));
This is a bit hacky, but it gives each entry in the feed a GUID (Global Unique Identifier) which is created by taking the site address and appending the timestamp (in seconds) of the post. By default, GUID is expected to be a valid hyperlink, this creates a fake hyperlink that'll go to the main site rather than direct to the post, as OBBLM does not have direct linking for individual posts. The site will ignore the timestamp in the address, so it won't cause any errors. A better solution would be to implement the GUID with
isPermaLink set to
false but I couldn't figure out an easy way of doing that.
With those changes in place, the rss.xml file will then work with
RSS Graphitti which I'm using to cross-post all updates to the OBBLM site to our League Facebook group.
I'm sure there's a much more elegant solution that this, but it works if anyone wants to use it.
Re: OBBLM - RSS Feed
Posted: Wed Sep 10, 2014 12:10 pm
by nicholasmr
Vanguard, could you post all the changes you made at code.google.com/p/obblm ? I'd like to implement them into the main distribution.
Re: OBBLM - RSS Feed
Posted: Wed Oct 01, 2014 7:02 pm
by NickJMereel
has this been done?
I would like the RSS to do the same with our fb page and im scared of altering our code?
And I need to use grafitti to populate the info on fb. Any tips on that for me?
Cheers
Nick
Re: OBBLM - RSS Feed
Posted: Thu Oct 02, 2014 8:52 am
by Vanguard
Probably not, I missed Nicholas's request to post the info to code.google. I've added it now.
I'm happy to send you a copy of my modified file if you like, you'd then just need to replace the existing one with it.
As for Graphitti it's pretty straightforward. You just link it to the rss feed by giving it the file location (your.domain.com/rss.xml) and where you would like updates posted to - your Facebook group.
If you're having any specific problems, let me know some details and I'll take another look. Bear in mind that Graphitti only checks every so often and won't back date posts. I've seen it take a day sometimes for posts to appear.
Re: OBBLM - RSS Feed
Posted: Thu Oct 02, 2014 11:40 am
by NickJMereel
And it can post into fb group?
I assume it signs in to my account? Or could I create a new fb account just to post???
Re: OBBLM - RSS Feed
Posted: Thu Oct 02, 2014 1:35 pm
by Vanguard
Yes, it can post to Groups. Effectively it posts as you, so anywhere you can post, it can.
You could create a new account for it - I have considered a League Commissioner account, but so far that has seemed like too much hard work.

Re: OBBLM - RSS Feed
Posted: Thu Oct 02, 2014 5:21 pm
by NickJMereel
Cool. I better have an experiment with it. I like the idea of a second "commish" account