[pLog-svn] r3223 - in plog/trunk: locale templates/summary
Mark Wu
markplace at gmail.com
Tue Apr 11 03:17:24 GMT 2006
Hi Oscar:
See my answer below:
>
> do we really need these min() and max() methods?
>
> I am thinking that they may be unnecessarily adding a few
> extra SQL queries. I have been looking at the code and they
> are only being used to display the article category names in
> different sizes but isn't there any way to avoid these extra
> queries? You can already get the number of articles assigned
> to any global category via
> GlobalArticleCategory::getNumActiveArticles(), isn't there
> any other calculation we can perform to obtain this data?
Yes, the only one problem is I have to go through all objects. Do you think
the perfomance is okay?
My original idea is not go through all global article category objects,
that's why I make two new metod.
> Also, can we make it so that when clicking an article
> category link, it is still displayed in the front page
> instead of the "post list"
> page? That way we could have different front pages depending
> on the category being displayed. There could be a "more..."
> link at the bottom of the list of most recent posts that
> would point to the page with all posts, as it is done now.
Mmm.... Yes, I think it is possible. Need some little changes :D
** But does those readest blogs, readestr post , most commented post also
need to follow the change? If yes, then it is not a lttile change.. :)
Becase I need to modify the summarystats to adapt "global article category"
and pages...
How do you tihnk?
>
> Last but not least, another idea I had about the summary is
> that we could move the calls to load the data to the template
> itself. Instead of loading the most read blogs, most
> commented articles, etc in summarydefaultaction.class.php, we
> would just initialize an object of type SummaryStats and make
> it available to all templates. Now, displaying the list of
> most active blogs would be something like:
>
> {foreach from=$stats->getMostActiveBlogs() item=blog}
> {assign var="url" value=$blog->getBlogRequestGenerator()}
> <li class="item"><a
> href="{$url->blogLink()}">{$blog->getBlog()|strip_tags}</a></li>
> {/foreach}
>
> I know this kind of breaks the idea of separating logic from
> templates, but doing so, users who only want to display the
> list of most recent posts would not need to load every other
> list. The summary definitely is the busiest page in all sites
> and anything we can do to help its performance will help.
I see. I will take care of that.
>
> Oscar
More information about the pLog-svn
mailing list