December 14, 2009

Blogger pack

To make life easier I modified two js scripts to work with Blogger, the __Emoticon.js and the lightbox.js. The __Emoticon.js is a cool script for adding emoticons(smileys) to your blog. I modified it to make all the links open  in a new window and all the pictures open n in a lightbox when you click on them. These thing were already happening on my blog but I always had to edit the html :(

But now everything is done by my blogger_pack :D

You can use these files only by including them on your blog or downloading and modifying them.


This is how you can do this (if you dowload the files to another server change the links - http://www.kibadvertising.ro):

You need to put these right after "<head>" in the template file:

<script src='http://www.kibadvertising.ro/blogger_pack/js/prototype.js' type='text/javascript'/>
<script src='http://www.kibadvertising.ro/blogger_pack/js/scriptaculous.js?load=effects,builder' type='text/javascript'/>
<script src='http://www.kibadvertising.ro/blogger_pack/lightbox.js' type='text/javascript'/>
<link href='http://www.kibadvertising.ro/blogger_pack/css/lightbox.css' media='screen' rel='stylesheet' type='text/css'/>

Your template file should end like this (if you have a custom template and you have changed the class names please use those):

</body>
<script type='text/javascript'> 
addSmileyById("comments-block");
addSmileyByClass("post hentry");
</script> 
</html>


To download my blogger pack click here. Enjoy :)

No comments:

Post a Comment