posting webcomics

Creating and modifying plugins.
Post Reply
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

posting webcomics

Post 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.
I make s9y plugins, too.
My s9y blog depends on them. :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: posting webcomics

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

Post by wesley »

Thanks for the headstart. Perhaps I could make a plugin out of this...
I make s9y plugins, too.
My s9y blog depends on them. :)
frodeste
Regular
Posts: 56
Joined: Thu Aug 04, 2005 9:16 pm
Location: Tønsberg, Norway
Contact:

Post 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 :)
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

Post 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...
I make s9y plugins, too.
My s9y blog depends on them. :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply