Welcome to Geeklog Thursday, October 19 2017 @ 10:24 am EDT


Shrinivas

Anonymous
I read in the other topic about posting other's RSS content as archive to be incorrect and all that but here is my situation. I have a tie-up with this feed provider who would provide me feeds (note that these are not daily feeds, the content is pretty much static with changes to them expected once a week). Instead of hitting the chap's server for every request, we have agreed that I can cache the data on my side for a week and refresh it every week.

The feed that I get, I eventually would be saving all the data in a separate set of tables to cache it but instead of coming up with an alternate link/page and alternate flow for that data, is it possible that I can push it in some form using API into the "Stories" so that the display, search and other features like number of views, etc. are automatically taken care of by GL Framework?

Status: offline

beewee

Forum User
Full Member
Registered: 05/08/2003
Posts: 969
Location:The Netherlands, where else?
Why not try an easier way? There are lots of RSS parsers* like Magpie with a cache option. I do know there is a Wordpress plugin which stores the content of a feed as new stories in the database, but I don't know if there's something like that available for Geeklog.

*Have a look over here: http://sporkmonger.com/2006/02/27/directory-of-feed-parsers
Dutch Geeklog sites about camping/hiking: www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net

Shrinivas

Anonymous
Thanks for the reply, I am sorry for the confusion, the feeds I am getting are not RSS or any standard format. I have the custom code to parse the XML and get the data out of it. Using that data, I have to prepare page information for which I have two options -

1) Custom pages bypassing the geeklog framework completely (only using COM_siteHeader and footer)
2) Dynamically create (and update) the stories and push them into GL_Stories table so that other features like security, comments, search, etc. are taken care of.

I would prefer the second option and wanted to know if there is any API available in the code or is there anything particular that I should be taking care of? I am asking this because after putting the custom code, I do not want to have a need to modify it every time I update my GL version, especially in a version when the GL_STORIES changes.

Thanks
Shrinivas

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
Quote by: Shrinivas

2) Dynamically create (and update) the stories and push them into GL_Stories table so that other features like security, comments, search, etc. are taken care of.

I would prefer the second option and wanted to know if there is any API available in the code or is there anything particular that I should be taking care of?


Yes, there is such an API: PLG_invokeService. It's the same API as used for the Webservices. And I guess it's pretty much the same problem: You get a bunch of information (say, a title, a story text, and maybe a date) and want to create a story from that. This API takes care of that, filling up with defaults, where required.

The wiki page I linked to above explains both the API and the Webservices, but you obviously only need to care about the former (and so you can ignore all the AtomPub stuff).

bye, Dirk

Shrinivas

Anonymous
Thanks Dirk, will have a look at it.

All times are EDT. The time is now 10:24 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content