Serendipity Plugin API

Discussion corner for Developers of Serendipity.
Post Reply
JohnnyC
Regular
Posts: 10
Joined: Sun Oct 01, 2006 5:46 am

Serendipity Plugin API

Post by JohnnyC »

I am embeding Serendiptiy in another php project. There are some notes on that projects' knowledgebase saying that the following code snippet may be used to create sidebars:

Code: Select all

<?php
serendipity_plugin_api::generate_plugins('left','div');
serendipity_plugin_api::generate_plugins('right','div');
?>
However, they neglect to say which file to include so that the serendipity_plugin_api class is available. Also, I have been looking over the technical documents on the Serendipity website, and I don't see any reference to this kind of thing. Does anyone have any suggestions?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Actually, all of Serendipity needs to be started, so we can initialize the plugins -- especially sidebar plugins. I'd say your best bet is to include index.php, but buffer the output and not print it. Then you can generate the sidebars separately wherever you want.

If nobody is going to visit the Serendipity blog, you could even cut the template down to the bare minimums, not even generating sidebars or calling entries.tpl.
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Actually for including the s9y framework it should suffice to include the "serendipity_config.inc.php" file. Make sure to chdir() to the s9y directory first so that all relative paths can resolve properly. After that you can chdir() back to your original directory...

Could you tell us which PHP project you are referring to?

HTH,
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/
JohnnyC
Regular
Posts: 10
Joined: Sun Oct 01, 2006 5:46 am

Seagull Framework.

Post by JohnnyC »

Thanks garvinhicking, I'll give that a try. The PHP project that I'm referring to is the Seagull Framework Project. http://www.seagullproject.org/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Thanks for straightening me out, Garvin. I'll try to find the text on the homepage and enhance it.
Judebert
---
Website | Wishlist | PayPal
Post Reply