22 IMAGES?!?! Who's gonna see that? Some "standard" is up to 5 images, but even 7 can go through. But 22? Really? Let's say there's a 5 seconds delay between the slides - who's gonna be staring at your slideshow for almost 2 minutes? Think about it...
I like to use Nivo Slider and I integrate it to all of the sites I build. It's quite simple and very powerful. Plus, it's free.
1. Download it to your computer. Rename jquery.nivo.slider.pack.js to jscript_jquery.nivo.slider.pack.js and copy that file to includes/modules/pages/index/
If my memory serves me right, you're using Estorenow which already comes with jQuery so you're OK. (anyone else reading this - make sure you're utilizing jQuery with your template. if you're not, add jscript_jquery.js to your includes/templates/YOUR_TEMPLATE/jscript/ directory)
2. Create a new stylesheet in your includes/templates/estorenow/css/ and make sure it's called index_home.css (this will make that stylesheet load ONLY on main page). Copy all code from nivo-slider.css AND any of the themes you like. If you're lazy, use the file I attached which uses the default theme.
3. Find the 3 images used by nivo (nivo-slider/themes/default) and upload the images to your includes/templates/estorenow/images/
4. add the following code to your includes/templates/estorenow/common/html_header.php just before the ending </head> tag
so it looks something like this:Code:<script type="text/javascript"> $(window).load(function() { $('#slider').nivoSlider(); }); </script>
5. go to "admin -> tools -> define pages editor -> define_main_page.php" and make sure you're using Plain Text editor. Add the following code there:Code:// DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->'; ?> <script type="text/javascript"> $(window).load(function() { $('#slider').nivoSlider(); }); </script> </head> <?php // NOTE: Blank line following is intended: ?>
6. edit the images source and save your page. If your source is "images/your_image.jpg" make sure you upload the image to your images directory (not template's images)Code:<div class="slider-wrapper theme-default"> <div id="slider" class="nivoSlider"> <img src="images/toystory.jpg" alt="" /> <a href="http://dev7studios.com"><img src="images/up.jpg" alt="" /></a> <img src="images/walle.jpg" alt="" /> <img src="images/nemo.jpg" alt="" /> </div> </div>
This is it. Your slider should now appear on the main page. Some CSS tweaks might be required, most likely about slider width. You can duplicate the <img src... /> line for each of your images. Also, as the second demo image shows, you can make each image a link by wrapping it inside <a> tags. There are some additional settings (ie. delay, transition effect etc) that can be done with Nivo, check it out on their site.
Have fun!![]()


Reply With Quote
