The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
toggle admin option from frontend
i have got this working using
Code:
build_options(); but i have a major issue, when i toggle it, i get a fatal user error i cant solve. im not changing any other options so idk what would cause this. im trying to create a simple toggle for turning a plugin on or off from the front end.product attached in 2nd post it looks a little like this. the toggle: HTML Code:
<if condition="$vboptions[setting_name] == 1"> <a href="#" onclick="setting_off()">ON</a> <else /> <a href="#" onclick="setting_on()">OFF</a> </if> Code:
function setting_off(){ $.ajax({ type: "GET", url: "?do=settingoff" }); } function setting_on(){ $.ajax({ type: "GET", url: "?do=settingon" }); } PHP Code:
the href just switches this yet i actually have to come here and hit save before it really applies. any ideas how to avoid that process so my href takes care of all of that important addition! when i hit save here it seems to be affecting something else also and i have to breakout the tools.php to fix it Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|