Page 1 of 1
Serendipity Plugin API
Posted: Mon Oct 02, 2006 5:46 pm
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?
Posted: Mon Oct 02, 2006 7:35 pm
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.
Posted: Mon Oct 02, 2006 10:06 pm
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
Seagull Framework.
Posted: Mon Oct 02, 2006 11:47 pm
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/
Posted: Tue Oct 03, 2006 3:06 pm
by judebert
Thanks for straightening me out, Garvin. I'll try to find the text on the homepage and enhance it.