« 2005-04 | HomePage | 2005-07 »

2005.05.25

Javascript in your blog

As Lionel asked me for inserting javascript code in a blogSpirit blog, here is an exemple with the "add to bookmark feature".

Technical notes :
BlogSpirit blogs use Smarty technology which is a php template parser.
Smarty tags are like {tag}{/tag}, that's why javascript code may be misunderstood if they contain ths type of caracter. The solution is to use the following Smarty tags : {literal]{/literal} between your javascript code (works also for CSS code)

"Add to bookmarks"
I really disagree with this type of feature which work only with some versions of IE (not working on Gecko type browser : Firefox, Safari, Netscape...)
Create a new custom box and insert the following code :

<script type="text/javascript">
{literal}
function add_favoris() {
var site_name = "Technoblog !";
var site_url = "http://technoblogs.blogspirit.com";
if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {
window.external.AddFavorite(site_url,site_name );
} else {
alert("This d*feature works only with Internet Explorer 4+, perfom a Ctrl+D to add "+var site_name+" to your bookmarks.");
}
}
{/literal}
</script>
<a href="javascript:add_favoris();">Add to my bookmarks</a>


NB : this script only works with IE 4 or more (your IE should be OK), if you want to use this script, don't forget to replace 'site-name' and 'site_url' by your blog title and url.

NB2 : {literal}{/literal} tags are used to avoid the SYNTAX ERROR message when updating your template or custom box. If you still have this message or your blog don't display well, try to :
- check if your tag is closed with : {/literal}
- check if the 'literal' tags are just around some javascript or css code not html code

2005.05.24

Why my 3D photos album don't display some of my images ?

Currently, our 3D photos album module don't manage the .PNG and .GIF images. These formats are made for graphism (logo, stickers, animated images, ...) that's why your 3D album may not display some of your album images.

If you are using a software to export your photos, don't worry : most of these softwares export in .JPG or .JPEG format and you'll get a better quality with these ones as they are made for pictures.

Learn more on blogSpirit premium services (also know as blog à la carte)

2005.05.19

Translate your blog !

Ever wanted to translate your blog ?

This tool lets you translate any page of your blog in just one click, you can insert it into a new custom block in design header :

<form action="http://translate.google.com/translate" name="translate" id="translate">
<input type=hidden name=u value="" />
<input type=hidden name=langpair value="" />
<input type=hidden name=hl value="en"><input type=hidden name=c2coff value=1><input type=hidden name=ie value=UTF-8><input type=hidden name=oe value=UTF-8><input type=hidden name=prev value="/language_tools"></form>
<a href="javascript:document.translate.elements['langpair'].value = 'en|fr'; document.translate.elements['u'].value = document.URL; document.translate.submit();"><img style="margin-bottom: 5px;" src="http://myblog.blogspirit.com/images/french_flag.gif" alt="French" /></a>
<a href="javascript:document.translate.elements['langpair'].value = 'en|de'; document.translate.elements['u'].value = document.URL; document.translate.submit();"><img style="margin-bottom: 5px;" src="http://myblog.blogspirit.com/images/deutsh_flag.gif" alt="Deutsch" /></a>


You may find here all languages possible to translate from english with Google. Then update all parameters wrote in bolg in the smaple.

You can also translate your blog from another language, visit this page to know which languages are available then update all parameters with an underlined style.

2005.05.11

Special caracters appearing in my blog

Caracters [ à © ª è ] etc...
These caracters may also appear in your column content or in google results for your blog.

Don't panic ! This is just because of the new caracter encoding for blogSpirit. This lets any user writting in any language having a blog with special caracters from his language. (blogSpirit launched a chinese version)

This problem has been resolved for all blogs BUT if you have modified your HTML templates, the new encoding caracter may be absent on your blog.

So the best idea should be restoring all your templates (blogSpirit recommands this way) :
- get the differences by comparing your templates and blogSpirit default templates
- restore
- copy the differences

If you really don't want to update your templates, here is how to debug your blog using Advanced Configuration of Design (not recommanded by blogSpirit) :

Get the following code in <head> </head> tags :

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

And replace it by this code :

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

All the posts