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

[plugin] disable user scripts individually

Quote Reply
[plugin] disable user scripts individually
I don't know how useful this will be for anyone else, but here it is anyway.

In the Links admin panel, there is an option to disable all the user CGI scripts. In my case, I wanted to disable everything but page.cgi, search.cgi, jump.cgi, and user.cgi. But there is no built in way to do this on a script by script basis.

I didn't want to delete the files, rename them, or change permissions. That would mean that if I ever wanted to use them, I'd have to re-upload, or revert the names or permissions.

The solution I came up with was to tie into the handle_* hook on each script. This works for everthing except for postback.cgi, which doesn't tie into the plugin system.

Once installed, all the scripts will be disabled (I'm not aware of any method to install a hook without it being enabled by default). To re-enable a script, uncheck its corresponding hook from the 'edit' page.

If there is any demand for it, I will revise the plugin to use regular plugin options instead of directly modifying the enable/disable hook section.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] [plugin] disable user scripts individually In reply to
Thank You