Customizing SMF > SMF Coding Discussion

SMF settings in JavaScript file

<< < (3/3)

Matthew K.:
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.

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! :)


[0] Message Index

[*] Previous page

Go to full version