Customizing SMF > SMF Coding Discussion

SMF settings in JavaScript file

<< < (3/3)

Labradoodle-360:
Nope. JavaScriptEscape(); is an SMF originated PHP function that escapes all PHP string variables with the appropriate escaped versions to be thrown into JavaScript.

json_encode(); and json_decode(); convert PHP arrays to JavaScript or vise versa in the case of json_decode.

phantomm:
Thanks, I'll try to figure it out ;)

Marcus Forsberg:
Hey there,

Have you managed to solve this? It's extremely simple using MrPhil's method. Just have a look at the top of index.template.php where SMF adds a couple of variables for JS to use. If you need no more help, please do mark this topic solved! :)

Navigation

[0] Message Index

[*] Previous page

Go to full version