Page 1 of 1

posting webcomics

Posted: Wed Aug 17, 2005 7:43 pm
by wesley
I was sort of thinking about putting webcomics on the front page, in a style
somewhat like some places I visit.

Now, the comics should probably be maintained on its own separately from
the normal blog entries itself (e.g. stuff like guestbook entries) with its
own archive listing, and likely it needs to be kept on the top of the page,
but with the most recent comic showing (automatically updated, of
course).

One way to do this might be to install another instance of s9y, have a sticky
static page on the main blog that loads the 'comic' blog inside somehow.

Then maybe it could be done with some sort of custom tpl file.

But maybe someone could make an event plugin that can do this.

I wonder which would be the most feasible.

Re: posting webcomics

Posted: Wed Aug 17, 2005 8:44 pm
by garvinhicking
How about creating a seperate category for that ("Comics") and then using the "categorytemplates" plugin to assign a different template for those entries? Then you can also use the entryproperties plugin to [x] hide entry from the startpage so that the comics are only shown on the category view.

On top of that you could make a simple event plugin that ready the latest entry from the "Comics" category and output that as in image in the frontend_header event? This would be a very small plugin:

Code: Select all

$oldcat = $serendipity['GET']['category'];
$serendipity['GET']['category'] = '11'; // ID of the "comics" category
$latest_comic = serendipity_fetchEntries(null, true, 1);
print_r($latest_comic);
(Of course with all the plugin API surroinding it).

How's that for starters?

Regards,
Garvin

Posted: Wed Aug 17, 2005 10:15 pm
by wesley
Thanks for the headstart. Perhaps I could make a plugin out of this...

Posted: Wed Aug 17, 2005 11:58 pm
by frodeste
wesley wrote:Thanks for the headstart. Perhaps I could make a plugin out of this...
I'f be interested in this too, if you decide to make a plugin, let me know :)

Posted: Fri Aug 19, 2005 7:10 am
by wesley
But how would the plugin 'know' it's only posting the comic on the front
page? I can't make it differentiate with just ID / category / page (the front
page has none / none / 1, and is the same with 'view full' mode monthly
archive, so if I just used those I'd have the comic showing on the first page
of the monthly entry listings as well). There must be another variable...

Posted: Fri Aug 19, 2005 1:31 pm
by garvinhicking
I might not understand you properly - the extended properties plugin allows to have a checkbox "[x] only show on frontpage". This is in Serendipity 0.9 only, though.

Then the SQL query is expanded that an entry is only shown if browsing the category it is in. If the category is "none" (which is default for the startpage, montly view and so on), then those entries will not be shown.

Regards,
Garvin