The slide show of featured posts which appears in my sidebar was among the most talked about feature of my recent redesign. This slide show is powered by JonDesign's SmoothGallery: a combination of JavaScript and Mootools which creates a cross-fading gallery of images which link to these posts.
In this article, I'll explain the simplest methods of using SmoothGallery to create your own slide show of featured posts which you can display in your blog sidebar.
SmoothGallery offers many different styles of gallery, but unfortunately not all options function properly in Blogger powered blogs.
So in this tutorial I will explain two different styles of SmoothGallery slide shows which I know can be used in Blogger blogs and have tested in different browsers:
- A timed slide show (similar to the one featured in the sidebar)
- A manual slide show, where your visitors can skip through each slide using arrow buttons
The initial installation for these slide shows is essentially the same; you can configure the different options for display after installation as I shall explain later in this tutorial.
Requirements (read this first!)
You need to ensure you have access to a hosting account where you may upload images, JavaScript and CSS files. Most free file hosting services allow you to upload these file types, including Google Pages and the hosts listed on this page.
You will also need several images which are all exactly the same size. For the purpose of this tutorial I would recommend these images to be 200x100 pixels in size which would fit neatly in most Blogger sidebars. If you prefer to use images of different dimensions, you will need to change the size of the gallery in your style section, as I shall explain later in this tutorial.
If you are able to meet these requirements, read on to see how easy it is to install your own SmoothGallery slide show!
How to install your SmoothGallery Slide show
First of all, you need to download the files needed to make the slide show function. For your convenience, I have included the files required to run this in Blogger blogs in a zip file which you can download below.
Download Blogger_SmoothGallery.zip
When you have downloaded these files, retain the same directory structure and upload these to your file host.
Next, go to Layout>Edit HTML in your Blogger dashboard and search for the closing </head> tag. Immediately before this line, paste the following section of code (substituting "your-file-host" for the URL where your Blogger SmoothGallery files are hosted:
<script src='http://your-file-host.com/Blogger-SmoothGallery/scripts/jd.gallery.js' type='text/javascript'/>
<link href='http://your-file-host.com/Blogger-SmoothGallery/css/jd.gallery.css' media='screen' rel='stylesheet' type='text/css'/>
Then search for the closing </b:skin> tag on your template. Immediately before this line, add the following section of code:
#myGallery{
width: 200px !important;
height: 100px !important;
overflow: hidden;
}
Adding your slide show to your blog sidebar
In your blog's HTML code, find the DIV where your sidebar wrapper begins. The code will look something like this:
<div id='sidebar-wrapper'>
Immedietly beneath this line, paste the following section of code:
<script type='text/javascript'>
function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true,
showArrows: false,
showCarousel: false
});
}
window.addEvent('domready', startGallery);
</script>
Adding your images and links to the gallery
For the next part of the installation, you will need to use your images and the relevant links to your popular/featured posts.
Remember that your images should all be the same size!
Upload all of the images you would like to use to your file host and note down the URLs.
This last step is a little bit tricky, so be sure to double check the code you are replacing and ensure you don't accidentally delete any tags!
- Copy all of the code below and paste into a simple text editor (eg: Notepad or Notepad ++).
- Replace all image URLs with those of your own images.
- Replace all link URLs with the links to your posts.
- Replace the titles (between the
<h3>and</h3>tags) with the titles of your posts. - Replace the descriptions (between the
<h3>and<h3>tags) with a brief description of your posts, preferably a short one-liner.
<div class='imageElement'>
<a class='open' href='http://your-post-url.blogspot.com'/>
<img class='full' src='http://imagehost.com/your-image1.jpg' />
<h3>Post Title 1</h3>
<p>Description of post 1</p>
</div>
<div class='imageElement'>
<a class='open' href='http://your-post-url.blogspot.com'/>
<img class='full' src='http://imagehost.com/your-image2.jpg' />
<h3>Post Title 2</h3>
<p>Description of post 2</p>
</div>
<div class='imageElement'>
<a class='open' href='http://your-post-url.blogspot.com'/>
<img class='full' src='http://imagehost.com/your-image3.jpg' />
<h3>Post Title 3</h3>
<p>Description of post 3</p>
</div>
</div>
Once you have made all these edits (and checked that you haven't accidentally deleted any tags!), copy this entire modified section of code to your clipboard and paste this below the final </script> tag which you recently added in your sidebar.
Now, preview your template. If all has gone well, you should see your slide show appear in the sidebar. This initial installation will add a timed slide show where your images will change every three seconds.
Once you are sure you have installed this slide show correctly, you can proceed to save your template.
Change the "timed" slide show to a manual one
If you would prefer your readers to choose when the next slide will come into effect, you need only make two small changes to the script for your SmoothGallery installation.
Find these lines in your template code:
timed: true, showArrows: false,And change the values to their opposites, like this:
timed: false, showArrows: true,All other values need to remain the same!
Now when you preview your template, you will see semi-transparent arrows in your slide show which become opaque when your mouse hovers over them. Clicking on these arrows will take you to the next slide in the show.
Changing the dimensions of the slide show
If you would prefer your slide show to be a different size than 200x100 pixels, you will need to change all of the images you use to this same size.
Then find this section of code in the <b:skin> section of your blog template:
#myGallery{And change the dimensions highlighted in bold red to the new dimensions of your images.
width: 200px !important;
height: 100px !important;
overflow: hidden;
}
Credits
The original SmoothGallery scripts was developed by JonDesign and Mootools. Both the original scripts and those featured here are provided under the GNU General Public license.
Final Thoughts
Here at Blogger Buster, I use SmoothGallery to create a slide show of featured posts in my sidebar, but you could just as easily use this to create a stylish gallery of your photos with captions, or an animation of products in your blog.
I hope you have found this tutorial to be useful to you (despite being a little complicated!) and would love to see how you use this in your own Blogger powered blogs.



39 Comments:
This is the tutorial I've been waiting for. Heehee. Thanks always, Amanda! :)
Amanda, this is great! I got it working on the first try. Quick question though, how do I get the gallery to align center in my side bar?
Thanks Amanda
lori to center the slideshow add "<center>" to the beggining of the code in the last step and add "</center>" to the end of it.
For Angel: I thought of Flair in the City while writing this one up. In JonDesign's site there is a link which demonstrates SmoothGallery on a Paris fashion blog and it looks wonderful when used as a showcase for design!
For Lori: I would have recommended exactly as Ricardo has suggested. This is how I centered the widget in my own template.
Thanks Ricardo :)
Hi Amanda. I'm a blogger newbie so please excuse my dumb question. I have tried to do this several times but only get my images scrolling with the titles yet always without any of the arrows & lightbulb graphics. I uploaded all the files you supplied to file hosts like Google Pages & HotlinkFiles but I'm confused as to what you mean about retaining the same directory structure as Google Pages doesn't let you have subfolders so I'm not sure how I link to all the other image files. Any help would be appreciated - thanks, Jim
Hi Amanda - I solved the problem I was having (in post above). It was caused by using hotlinkfiles - that file host doesn't allow folder names of less than 4 letter - hence 'CSS' and 'IMG' folder names can't be used. When I switched file hosting to FileAve.com all worked fine. Many thanks - Jim
For Jim,
I'm glad you managed to get this working for you! Thank you for letting me know about this :)
Love this feature very much. Anyway, can this be added to the blog post? How?
Thx in advance
Hi,
I am trying to get it to work, but haven't succeeded yet. I guess it is because I cannot make folder structure in googlepages.Or some other reason.
now on jondesigns there is a 'gallery sets' feature, which suits my blog the best, but is there a way to implement it to unique post body? I mean that each post should have its own gallery...
Thanks.
For Open Door to Everyone,
I haven't tried using this in a blog post yet, but I will update as soon as I can tell for sure if this will work or nor. Blogger sometimes does strange things when adding script and HTML code to posts (even when editing in Edit HTML mode)!
For Almakos:
I wasn't aware of the lack of file structuring in Google Pages, so I apologize for any confusion with this!
Jim suggested a great free file host which does work: FileAve.com
He installed the scripts sucessfully using this host, so you may prefer to try this instead.
The Gallery Sets you mentioned are very awkward to use in Blogger blogs as they are dependant on PHP code which we cannot use within our templates.
The only possibility would be to host this elsewhere and attempt to display within an Iframe, though this can have many complications, and is not something I would recommend unless you are pretty capable with PHP and HTML markup!
Hope the FileAve.com solution may be a better solution for you :)
Best wishes and thanks for your comments,
Amanda
Hi Amanda,
I love this idea, I got it to work on the first shot on my test blog, and then again on my actual blog.
http://www.jeannettejayhawksfootball.blogspot.com
I do have 1 question though, how or where do I increase the font size of the float up, title and info overlay that comes up from the bottom?
Thanks
i've been trying to get this to work but when i try to save my layout I keep getting this message:
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Open quote is expected for attribute "{1}" associated with an element type "href".
ny idea what that means and how i can fix it.
Thanks
Works like a charm both of my blog
http://gadgetvideo.blogspot.com/
http://muzicvideo.blogspot.com/
Thanks for the tutorial ^^
Thanks a million! Not being able to do this with blogger is one of the reasons I was actually thinking about moving to wordpress... It's exactly what I wanted. It really does enhance Lenzism.com for my readers. Thanks again.
Anyway of putting it on the top of the main contain through widget where it actually show on the front page, but not on the single post?
Also note that some template have 2 side bars which are small, so there will be also useful if you can point out how to unsplit those sidebars to put on the top of them.
Thanks in advance
Opp! Big trouble here. I don't know why the script keeps changing to this though how many times I tried to change back: it change ' to '
Any solution then?
PS: I notice it works in Layout > Page Element. But not on the view page.
I have done everything correctly . I've checked and double checked but when I preview it before saving my layout, I get 3 individual photos with the heading and description underneath. Not in a slideshow format. Just 3 photos one under the other with the text in between/underneath each photo.
Can someone help me? I'm totally lost. I went to File Ave, but I don't see anyway to upload Smooth Gallery software so that it stays in the file folders. Is that what I'm supposed to do for the first step? Upload the Smooth Gallery software to File Ave? Every Single folder and every single file in them? How do I do it without having to do each file individually? Thanks in advance.
This took me awhile but I finally got it to work. I had to tweak a few things to get it to work, but I now have an awesome little post slideshow on my blog. Thanks for all the hard work on your tutorials.
Great work!
I've been looking for this for a long time. It really works well.
Thanks Amanda :)
If you want to look at my site, here is the link:
http://www.cihanozdemir.com
Hi Amanda, thx 4 sharing ^_^
btw, i have a question,
i can't find div id='sidebar-wrapper'> in my template code. i'm using "transparancey" as the template. if you have more free time please take a look at my "test"-blog http://jempolkebo.blogspot.com/ and maybe someone can tell me what's wrong, since i'm so poor when it comes to progamming or whatsoever T_T
Thank you again Amanda. I decided that I likeded this feature but didn't see it anywhere for Blogger. And what pops into my mind? Blogger Buster! It was easy to use and gave me what I needed.
I do have a question though, can the timing be changed?
http://blacktennispros.blogspot.com
amanda..i managed to install it but it seems that in the slideshow, i cant see the description, only the title is appeared,,can you help me to customize it further? it is http://www.efzec.com , i placed it on the top right at the sidebar. plus, when i am in page Layout > page element,,the widget is also there..
it work perfectly on my blog:
http://gigisehatbadansehat.blogspot.com
but, as you see...when i move cursor to the picture, there is a "false" sign...
how do i change it to another word, like "open this"?
It's work on my blog. and just say... so thank you for you Amanda.
Hi Amanada thanks for this i just took the principle of it and make post with thumbnail on post and when click image pop up like galley example see the test post please http://blog.anuradha.me/
Hi Amanda.... It works well on my blog.. I was wondering to get this 'revolution template' model. so much thanks. Hope you can help me with these as well...
Is there any way to make 'target' new page when clicking on image... and add a header like 'featured contents' just before or within slides....
www.islamxplored.com
siddique
Fantastic.
Just love it.
See the result http://goospoos.blogspot.com
I want to put in on top of my posts not on my sidebar. how do i do this?
This is great!
But I have and error message: The entity name must immediately follow the '&' in the entity reference.
Can you help!
why i'm not doing it .
help me , someone ! I made everything that's here but it's no work..
Wow, thank you so much! This tutorial was so easy to do, and I was able to understand and apply it to our MamaBuzz site. Thanks so much!
very nice and features very good but taking time to load
I've tried it, and works.. ^^
But i wodering how to change or edit the fade caption box? (the one that show about title & description of the post) I want to change the box height and the font..
thanks..
Hi i used you Gallery post and it work.! check the site www.BloggerWatch.org
But the Gallery is to small and it cannot emphasize the picture how do i change the size of the gallery?
hi.. Amanda i try Fileave.com where you can host the file but it is not working anymore can give some site where i can host the file? please reply for this question
Does this still work?
Hello,
I added this to my blog and it works great...
But I was wondering can I make slides go random??
pls help.
you can see the example on my blog and its work with mahusay template, just cek it out test
Post a Comment