1 (edited by nakome 2012-09-11 22:51:20)

Topic: Background slideshow

Use

<?php Backstretch::show('one photo', 'two photo', 'three photo', 'duration or photo', 'fade '); ?>

Example <?php Backstretch::show('slide/1.jpg', 'slide/2.jpg', 'slide/3.jpg', '3000', '750'); ?>

The folder is in the directory uploads

Preview for a few days
Download

More documentation here
jquery required
smile

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

Re: Background slideshow

Nice Plugin!

Monstra Loves You! Give some love back!

Re: Background slideshow

thanks smile

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

Re: Background slideshow

well, the plugin has done good job, i love it!

5 (edited by partizzzzzan 2013-06-30 17:20:20)

Re: Background slideshow

Hi!

add to file backstretch.plugin.php

class Backstretch {
            public static function show($bgone = '', $bgtwo = '', $bgthree = '', $duration = '', $fade = ''){
                echo ('<script src="'.Option::get('siteurl').'plugins/backstretch/assets/jquery.backstretch.js"></script>');
                echo ('<script>
                        // Duration is the amount of time in between slides,
                        // and fade is value that determines how quickly the next image will fade in
                    var b = jQuery.noConflict();
                          b(function() {
                            b.backstretch([
                                "'.Option::get('siteurl').'public/uploads/'.$bgone.'",
                                "'.Option::get('siteurl').'public/uploads/'.$bgtwo.'",
                                "'.Option::get('siteurl').'public/uploads/'.$bgthree.'"
                            ], {duration: '.$duration.', fade: '.$fade.'});
                        });
                        </script>');
            }
// ADD FUNCTION FOR BASIC MODE        
            public static function show_one($bgone = ''){
                echo ('<script src="'.Option::get('siteurl').'plugins/backstretch/assets/jquery.backstretch.js"></script>');
                echo ('<script>
                    var a = jQuery.noConflict();
                          a(function() {
                            a.backstretch(["'.Option::get('siteurl').'public/uploads/'.$bgone.'"]);
                        });
                        </script>');
            }            
        }

does not work (code1)

          public static function show_one($bgone = ''){
                echo ('<script src="'.Option::get('siteurl').'plugins/backstretch/assets/jquery.backstretch.js"></script>');
                echo ('<script>
                    var a = jQuery.noConflict();
                          a(function() {
                            a.backstretch(["'.Option::get('siteurl').'public/uploads/'.$bgone.'"]);
                        });
                        </script>');
          }

but work this code2

            public static function show_one($bgone = ''){
                echo ('<script src="'.Option::get('siteurl').'plugins/backstretch/assets/jquery.backstretch.js"></script>');
                echo ('<script>
                        jQuery.backstretch(["'.Option::get('siteurl').'public/uploads/'.$bgone.'"]);
                       </script>');
            }        

why does not work code1?

Re: Background slideshow

jQuery.noConflict() gives more problems than without  him sad
Better to use $. backstretch or jQuery, backstretch.

Starting to hate jQuery

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

Re: Background slideshow

Hi Nakome! New Version

I completed the your plugin. Now add the function display one image file.

<?php Backstretch::show_one('name_file'); ?>

In addition, no longer need to specify the file name, you need to specify the folder where they are.

<?php Backstretch::show('folder', '3000', '750'); ?>

Download: http://yadi.sk/d/hhSMAm8L6cO_A