MyBB Community Forums

Full Version: Accessing the settings through Javascript
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there an easy way written in the MyBB javascript code to access the board's settings?
Currently I use the php function my_setcookie() to insert a setting into a cookie and then the javascript function Cookie.get() to read it. Honestly I find this a quite annoying method. Luckily I only need to read 1 or 2 settings.
mybb does it by including javascript in every page that sets some vars

there is no generic way to get all the settings, not every setting should be accessible in javascript anyway
(2009-05-10, 09:27 AM)frostschutz Wrote: [ -> ]mybb does it by including javascript in every page that sets some vars

there is no generic way to get all the settings, not every setting should be accessible in javascript anyway

Right Big Grin
I can't believe I didn't think of that. The javascript code I'm using is written as a string in php, so I can simply add the variables like that. damn, so stupid XD