Gossamer Forum
Quote Reply
plugin help
Hi,

I'm trying to make it so an admin can add data to a new table in the "database view" editor.

I'm able to create the proper form element using the form_link plugin. However I can't for the life of me seem to access the submitted form values in either form_link "POST" and display_link "PRE" or "POST". Any suggestions? This is killing me...

Thanks,
mike
Quote Reply
Re: [Swaylock] plugin help In reply to
$IN->param('field_name')

? Unsure

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Swaylock] plugin help In reply to
Not sure if I understand what you're trying to do - if you just want to add a custom table which you have created to the admin->database page you just need to go edit the template db_nav.html (its in the admin templates) and underneath

<option>Reviews</option>

add in <option>Name of Your Table</option>

Then you should have all the add/modify/delete options available.

Obviously you need to have a def file for the new table in the defs directory.
Quote Reply
Re: [afinlr] plugin help In reply to
Thankyou both for your replies.

Let me give you some context so my reply makes more sense. I've added a table that allows the user to classify a link as existing in one or more industries. So I have a table, "industries" that has like 20 entries. I also have a table called IndustryLinks that behaves essentially the same as the CatLkinks relational table. It stores IndustryID/LinkID. (my system is set up for multi category select).

So my goal has been to make the admin database view act for the industries the same way it does for the categorys -- that is provide a multi select list to the admin that they can add/mod the industries for a particular link. I can get the form element to show up just fine -- but for some reason, upon submit, the cgi processing seems to pare off the relational database table values. This I'm sure of because if you dump the @arg values at the plugin hook display_link PRE or POST the CatLinks.CategoryID and IndustryLink.IndustryID values are gone.

I think the paring takes place in the sub common_param that the admin script passes all of the params through.

Andy,good idea -- but if only you were correct!

Afinlr, your idea would work -- but I'm still looking for a way to allow the admin to do everything in one form. They can choose multiple cats at one time, so why not other custom fields?

I think Alex needs to build one or two more hooks in the admin system between form_link and display_link to that there's a way to process customization to the admin form. I'm just learning about the plugin system so I don't think I can/want to do it right now.

Thanks.
Mike
Quote Reply
Re: [Swaylock] plugin help In reply to
Much clearer. I would also like to know how you do this - so if you ever figure it out let me know!