Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Plugin Question

Quote Reply
Plugin Question

in the flat file version (and i think in DBman sql 1.x as well), if you want to hook a complete new function into the main loop you just add in db.cgi

sub main {
# Main Menu. Check to see what the user requested, then, if he has permission for that
# request, do it. Otherwise send the user off to an unauthorized request page.
if ($in{'add_form'}) { if ($per_add) { &html_add_form; } else { &html_unauth; } }

# added for new_func
elsif ($in{'new_func'}) { if ($per_view) { &new_func; } else { &html_unauth; } }

What would mimic this in a plugin? (including the authorisation part)

In the XML sample an existing function (search_results) is altered. I think I understand this concept.

In the "static pages" plugin the hook is put in front (PRE) of "home" and gets triggerd using a do=home in the query string (db.cgi?do=home&page=page.html). Is this the way to do it? How ist authorisation handled?



Subject Author Views Date
Thread Plugin Question ktt 2635 Nov 11, 2001, 1:00 AM
Thread Re: [ktt] Plugin Question
jean 2492 Nov 12, 2001, 2:37 PM
Post Re: [jean] Plugin Question
ktt 2479 Nov 12, 2001, 9:01 PM
Thread Re: [jean] Plugin Question
ktt 2446 Nov 15, 2001, 12:14 AM
Post Re: [ktt] Plugin Question
jean 2440 Nov 15, 2001, 3:58 PM