Build a sidebar plugin to for external links in page content

Discussion corner for Developers of Serendipity.
Post Reply
goya
Posts: 4
Joined: Mon Mar 05, 2007 9:57 am
Location: Hong Kong

Build a sidebar plugin to for external links in page content

Post by goya »

I am trying to build a siderbar plugin to display some external links in page content area.

As I am new to PHP, can anyone give me some advices on the steps and which files I need to modify. Thank you.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Build a sidebar plugin to for external links in page con

Post by garvinhicking »

Hi!
goya wrote:I am trying to build a siderbar plugin to display some external links in page content area.
You can't do that with a sidebar plugin. A sidebar plugins displays content in the SIDEBAR area, not the page content area.

Only event plugins can do that, like the staticpage event plugin.
As I am new to PHP, can anyone give me some advices on the steps and which files I need to modify. Thank you.
To write plugins, you best look at the API at http://www.s9y.org/43.html, http://www.s9y.org/78.html and http://www.s9y.org/116.html - and then look at existing plugins to take them as working examples.

Depending on what exactly you want to do, it might be best done with simply editing your template's index.tpl file, where you can also place custom content. Or you could use the serendipity_event_pagenugget (HTML Page Nugget) plugin to position content on the header/footer of your blog.

Best 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