If you don’t want to read the instructions here and there or you read them but still don’t know how to use the plugin, just watch these videos. The only premise is that you’ve successfully installed and activated the plugin.
I made these videos in the hope that they will give you a quick start. If you’ve got any further questions: just ask.
This video shows you how to integrate a SmoothGallery into your theme by implementing the insertSmoothGallery function. I’m using one of the conditional tags: you can read more about them here.
In this video I demonstrate how to implement a carousel with SmoothGallery: I’m fixing Matt’s page. All that’s left to do is to add an option saying carousel=true to the custom field smoothgallery. Furthermore you’ll have to insert img tags with the class set to thumbnail.
In this short video I present a new feature: if you attach images to a post or page the markup for the gallery will be generated automatically for you. All you have to do is to copy and paste it somewhere inside your post or page.
The plugin comes with a widget that displays a gallery in your sidebar. This way it’s very easy to insert a gallery because you don’t need to know how to write PHP code. Since the widget renders the gallery inside an iFrame you can add as many galleries as you want.
All you have to do is to implement the function insertSmoothGallery in the file config.php; you can find that file under wp-content/plugins/smoothgallery. Depending on your implementation the plugin makes sure that the CSS and JavaScript will be included inside your page.
Let’s say you want a timed gallery on the page with the id 4711 somewhere in your theme that’s 400×80 pixels. Open the file config.php and implement the insertSmoothGallery function like this:
function insertSmoothGallery(){# add all the conditional tags you're using to the arrayif(assert_functions_exist(array('is_page'))===false)returnfalse;
if(is_page('4711')){returnarray('width'=>400,'height'=>80,'timed'=>'true');
}returnfalse;
}
Once you’ve done that put the HTML markup for the gallery somewhere inside your theme and you’re all set. No matter how you implement the function don’t remove the call to assert_functions_exist.
As you can see, I used the conditional tagis_page. These come in handy if you’d like to display the gallery on some specific pages only - if you don’t want that but a gallery on each and every page just remove the if statement and the corresponding curly brackets.
Just add another sidebar…
Instead of implementing the clumsy insertSmoothGallery function you can simply add another sidebar to your theme if you like that better. Think of it as a placeholder for widgets. It doesn’t necessarily have to be a vertical bar on the side - some horizontal thing in your header or footer is okay too.
So, maybe you want to have a look at the Widgets API and learn how to add another sidebar to your theme. Check out register_sidebar and dynamic_sidebar in particular; the page about the second function tells you how to manage Multiple Sidebars in your theme.