PDA

View Full Version : Help - Plugin Option in Admincp


TheSupportForum
11-03-2012, 04:44 PM
Hi All

i was wondering if there was a way in a vboption
where you can change a plugins hook location from

Hook Location : global_start
to
Hook Location : register_start

so if they selected Global the plugin hook will change to global_start and if they selected Register it will change to register_start

So the custom variable would be something like

select:piped
plugin_global__start|Global
plugin_register__start|Registration Only

I know this is a long shot but hoping this is possible

cellarius
11-03-2012, 04:55 PM
No, there is not, and what would it be good for? What could you achieve that is not equally possible by running it on global_start and then controlling what happens on seperate pages using a simple if-condition?

TheSupportForum
11-03-2012, 05:27 PM
No, there is not, and what would it be good for? What could you achieve that is not equally possible by running it on global_start and then controlling what happens on seperate pages using a simple if-condition?

i have a plugin that is required to run at global_start
but optional for register_start

both act in the same way accept that

a) global_start will stop visitors if condition is true

b ) register_start will block people registering iF condition is true

so rather than a user changing the hook location in plugins manually
i was wondering if it can be done in an admincp vboption within the product i have created

cellarius
11-03-2012, 05:33 PM
As I told you - you can simply achieve that using if conditions, no need to change plugin hooks. Use THIS_SCRIPT checks to either run it or don't, just as you need.