[pLog-general] Thoughts about summarystats.class.php

Oscar Renalias oscar at renalias.net
Sun Apr 24 15:09:03 GMT 2005


> At the moment I can't figure out a easy way to get the 5 most recent
> articles from my blog. (I'd like to link the five most recent articles
> on my homepage.)

$articles = new Articles();
$amount = 5;
$blogArticles = $articles->getBlogArticles( $yourBlogId, -1, $amount, 
POST_STATUS_PUBLISHED );

For more information on this method, see here: 
http://www.plogworld.net/api/d3/db7/classArticles.html#a8

> This problem was already discussed here:
> http://bugs.plogworld.net/view.php?id=239

Obviously, SummaryStats was the wrong place to look at... This class 
implements methods for retrieving data related to all blogs. If all you 
need is information about one blog, use Articles instead.

> I think this would be one of those "small improvements" to plog for the
> 1.0.1 release. I'd like to suggest second solution here:
>
> Why not just write a function for the summarystats class which could be
> named getRecentArticlesOfBlog and would require two params: "number of
> articles" and "blogID".

As I said above, you already have Articles::getBlogArticles(). Or take 
a look at the Articles class, you'll probably find there every single 
methods you could ever think of...

> This wouldn't interfere with the current summary pages and would be an
> easy and fast solution. IMO this function would make many users happy,
> not running plog as a community blogging tool...
>
> I'd even write the function (well I think I'll do it anyway, unless the
> patch submitted by pest makes it into 1.0.1 in any kind of (modified)
> version) ;)
>
> What do guys think?
>
> reto
> _______________________________________________
> pLog-general mailing list
> pLog-general at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-general
>




More information about the pLog-general mailing list