Link plugin request

Creating and modifying plugins.
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

link list

Post by d_cee »

Hi Matt

I'm back again with a new request :-)

Would it be possible to configure the plugin so that it would allow multiple link lists? I'm thinking of using it with the sidebar hider so that only the links relevant to the page or category displayed would be shown.


thanks

Dave
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Not easily...

The problem is the backend event plugin and the tables it uses. Basically, the plugin would either have to use multiple tables (with unique table names) or the plugin would have to be rewritten to track multiple instances in one table. Either method is quite a lot of work to do (especially when you consider that people can add and remove plugins easily... you risk dropping tables accidently, or leaving tables which are no longer used, etc).

You might try editing the serendipity_plugin_linklist.php file and removing:

Code: Select all

        $propbag->add('stackable',     false);
(Or set it to true.)

And then try loading multiple instances of the sidebar plugin. To do this though you will have to enter the data using the XML textbox (since switching to the database backend will make all of them read the same data).

I haven't tried to do this in a long time (there was a request a while ago where I suggested this), so I don't know how the plugin will respond. But it might work. Unfortunately, I'm not sure it will help because serendipity will still name each instance "serendipitySideBarItem container_serendipity_plugin_linklist" (and I don't know how the sidebar hider works).
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi Matt

thanks for your speedy reply.
I'd hoped it would be as simple as having differently named xml files. :-(
However I'll try your suggestion tonight and let you know the results.

cheers

Dave
Post Reply