Blogsome is one of free blog host I like the most. One of the reason is how easy to modified the blogsome template. Blogsome uses Smarty PHP template system. A well known templating system in PHP galaxy. Smarty becomes very popular because the ease of use and the awesome caching system.
I am not going to explain about Smarty. I just want to share one important thing you should know when inserting JavaScript in Blogsome. One thing when inserting JavaScript in Blogsome that lead to error saying your blog has “Smarty error syntax” is you forget to by pass (or escape) the template delimiter of Smarty: “{” and “}”.
JavaScript uses lot of “{” and “}” as its function, loop and conditional delimiter. You must not use this character in Blogsome template except if you want to put a Smarty syntax. How to escape these two Smarty template delimiters are by using one of these methods:
- Replace charater “{” using {ldelim} and “}” using {rdelim}.
- Use {literal} … {/literal} to escape blocks of text.
For example, to produce following text:
function loading()
{
// JavaScript syntax goes here.
}
you should use:
function loading()
{ldelim}
// JavaScript syntax goes here.
{rdelim}
or use the {literal} block as follow:
{literal}
function loading()
{
// JavaScript syntax goes here.
}
{/literal}
Every time you want to ouput “{” or “}” in your Blogsome, you should use {ldelim} {rdelim} or {literal} {/literal}.



whew! kinda tricky huh..
but well, i don’t use blogsome anyway.. :p