Page 1 of 1

What would be best way to pull last few entries?

Posted: Thu May 05, 2005 10:28 pm
by veggie2u
I am making a summary page as my index.php page for my site. On it will be links to the blog, to my photo gallery, to other things, etc.

I am going to summarize some of the content, such as most recent uploaded images, and last few posts to serendipity.

What would the best way to get these posts be? Use a serendipity function, access the database directly, or parse the RSS feed? Any ideas?

Re: What would be best way to pull last few entries?

Posted: Fri May 06, 2005 10:10 am
by garvinhicking
Using the serendipity functions would be the best way. There are many API functions for most stuff (Serendipity_fetchCOmments, serendipity_fetchEntries) which you could use. But apparently, you could also straightly access the Database, if you care.

Parsing the RSS feed IMHO contains too little information for a thorough start page and is too slow and too un-realtime :)

Regards,
Garvin

Posted: Fri May 06, 2005 4:36 pm
by veggie2u
Thanks, that is kindof what I thought. I thought that the RSS feed would potentially be more stable than serendipity functions, but be a lot of overhead to have it generated and then just parsed again. I want something that closely resembles what I have in my blog, including the category images, so I will look at useing a function or two.

Thanks.