Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Plugin Suggestion: Edit Log

Here is the list of edits for this post
Plugin Suggestion
I'm overstretched to implement this so I'm throwing it out for anyone else who wants to try it. If anything when finished, it would give you an even more flexible links SQL installation. So here goes.

In a nutshell, this plugins would allow arbitrary link record in the Links table can be 'linked" to another record in another table. This is cool because you can have many different types of records in any of your categories and depending on what a link has been associated with, will be displayed differently. It would also allow for future flexibilty by using a somewhat write once, use many approach.

In the Links table, you'll need at least two columns: Table, TargetID. These pair of values points to another arbitrary table, which has at an integer autoincrement primary key. The rest of the columns in this imaginary table is totally up to the user.

So here is where the wacky stuff happens. In the templates such as links.html or detailed_links.html, you'd have a new function call. This call would generate the html for the display of the extra information this other table carries. Something like <%Plugins::MyPlugin::generate_associated_content%> would suffice.

You'll also have to create an admin interface that will allow you to associate template files to tables, so the generator knows what template files to pump the data through. As well, you'll have to subclass all the new tables to change data manip screens so that they'll have all the Links fields and specific table fields and properly handle interactions with both tables.

I'm not sure how searching should work, but hey, this is not my plugin. Wink

Anyways, just an idea

Last edited by:

Aki: Jul 17, 2002, 2:21 AM

Edit Log: