Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Global on/off switch for website functionality
I would like to build an “on/off switch” for a client’s website. When the switch is on, let’s say a JavaScript effect is enabled, like an occasional snowflake falling from the top of the screen. “Off” disables that JavaScript.
What would be a good way to build something like this into the admin interface?
Offline
Re: Global on/off switch for website functionality
You could use adi_variables to set a variable used in forms or pages to acctivate this feature.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Global on/off switch for website functionality
Wow, I tried that and it really worked well. Thanks for the tip! I’ve got snow falling from my own website now, and I can’t remember why I ever hated this sort of thing. Maybe it will come to me.
I do wish I could use a checkbox rather than having the client type “on” or “1” or whatever, but I guess that’s OK.
Is there a plugin that I can use to customize the name of the tab (change “variables” to “controls” or something), or is that best done with JS?
Last edited by maruchan (2010-11-09 00:39:58)
Offline
Re: Global on/off switch for website functionality
I would use js to change the textbox to a on/off switch. Maybe something like this?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Global on/off switch for website functionality
Great idea. Thank you.
Offline