Putting a script under the blog description

Creating and modifying plugins.
Post Reply
nutsmuggler
Regular
Posts: 16
Joined: Thu Nov 04, 2004 1:05 pm

Putting a script under the blog description

Post by nutsmuggler »

I am not sure we are going to implement this as a plugin.
Still.
A friend of mine is building a php "quote of the day" script; it is base don a new table in the mysql db.
Now, we'd like to put the quote in the header, under the blog description.
Here's our weblog:
http://lnx.cnomania.it/serendipity
I guess we should modify the header, and the template skin.
Which is the easier and less obtrusive way to implement this php script into serendipity?
Cheers,
Davide
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Putting a script under the blog description

Post by garvinhicking »

There are two ways to approach this. The first is to just rewrite the $serendipity['blogDescription'] field with a plugin listening to the frontend_configure hook.

The second way is just like you mentioned to edit the layout.php or index.tpl file (depending on s9y version) to just insert the functionality.

Both of those ways are alright to go :)

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/
nutsmuggler
Regular
Posts: 16
Joined: Thu Nov 04, 2004 1:05 pm

Post by nutsmuggler »

I'm using s9y 0.7...
Sorry, Garvin, which is the exact name of the layout file, and where is it located? I've tried to modify the layout.inc.php file, but I've seen no changes...
Rembrandt
Regular
Posts: 71
Joined: Mon Dec 20, 2004 5:10 pm
Location: Germany
Contact:

Post by Rembrandt »

Hi!

I'm very interested in such a plugin (for s9y-cvs), too!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Depending on your plugin you need to modify templates/TEMPLATENAME/layout.php. If no layout.php file exists in your templatedirectory, use templates/default/layout.php...
# 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