Bradley and others,
Yesterday I committed to CVS a summary screen. I sent an email to this list...
didn't you see it? The thing is that I was kind of bored and I decided to
implement such feature myself ;) Have a look at summary.php and comment on
that/make any changes if you need to. All the necessary actions and views are
included in the same file because they are all quite easy... It has its own
set of templates (in templates/summary) but the default look is similar to
the 'default' style.
You are also right in that there was no function to get all the articles
available in the database. I quickly noticed that and implemented one to get
them all or the 'n' most recent ones, so now it is available.
Oh, and so orry for stealing your idea :) But please feel free to make more
useful suggestions and/or working code!!!
By the way, while it could be a good idea to use the op=Template parameter to
generate a summary page, it was not meant to do such complex things. The idea
behind the "Template" action is to load a template that is not "tied" to any
of the internal actions while keeping the same look and style of the site.
For instance, have a look at pLog's main site: see the "Features" and "Demo
sites" links? They are both templates which are not attached to any of the
internal actions. But when you click on any of those links, you still get a
page that has a calendar, recent posts column, categories, archives and so
on. This is so because all that data is exported into the template context
and it is therefore available to be used. I didn't think a list with _all_
the posts in the site would be necessary to be exported, but we could add it
if it makes things easier...
Again, thanks for you ideas and help!
On Saturday 26 July 2003 19:59, Bradley Liang wrote:
> I'd be happy to make the summary class structure for pLog, doesn't seem too
> difficult. Except for one thing, I took a look at your class structure and
> I'm a little confused. I was thinking to modify articles.class with a
> getAllRecent function (as referred to yesterday) and add a few files
> summaryaction.class, summaryview.class, and
> summaryutils.class. additionally, a "summary.template" would be included
> in the templates folder (default/lemons/grey/grey-sf).
> Would it just be accessed by [server_self]?op=Template&show=summary
> How would one go about executing the summaryaction/view classes? how would
> you change the op to [$self]?op=summary -- a brief look through the
> structures has me greatly confused. I'll delve into making the above on
> monday when I have more time, and if I run into problems, query the
> list. Any helpful tips before I start are appreciated.
> Actually, if the old summary screen could be easily ported, maybe I'll take
> a look at that instead.
> At 08:24 PM 7/25/2003 -0700, you wrote:
> From: Oscar Renalias <oscar@...>
> >To: plog-general@...
> >Subject: Re: [Plog-general] Addition to articles.class.php
> >Date: Fri, 25 Jul 2003 22:18:07 +0300
> >Reply-To: plog-general@...
> >Thanks again for you help and sugestions :) Haven't had time to work on
> > the summary screen but I was thinking about "porting" the old one that I
> > already wrote to the new codebase. Shouldn't be that difficult :)
> >The problem with your solution is that it is mixing presentation code with
> >data access code. That is, the Articles class simply deals with fetching
> >articles from the database and the presentation stuff is left for the
> >templates. When I decided to rewrite plog I said to myself that I would
> > never ever again mix presentation with logic... so far, this approach
> > maybe it makes it a bit messier [sometimes], but I can't complain :) And
> > for the time being, I'll stick to that :)
> >You actually point out the best solution in the second half of your email:
> >a function to return all the 'n' most recent posts and then let the
> > templates do their job. To be sincere, I'd go for that ;) I can get round
> > to implementing it someday (should not be difficult at all) or for the
> > time being until that moment, it is an unassigned task so candidates
> > please raise your hands ;)
> >Have a nice weekend O:)
> Bradley Liang
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> Plog-general mailing list