예제 #1
0
 function getOptionsSupported()
 {
     global $_zp_gallery;
     $options = array(gettext('Minimum items') => array('key' => 'bxslider_minitems', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => gettext("The minimum number of slides to be shown. Slides will be sized down if carousel becomes smaller than the original size."), 'order' => 1), gettext('Maximum items') => array('key' => 'bxslider_maxitems', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => gettext("The maximum number of slides to be shown. Slides will be sized up if carousel becomes larger than the original size."), 'order' => 2), gettext('Width') => array('key' => 'bxslider_width', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => gettext("Width of the thumb. Note that the CSS might need to be adjusted."), 'order' => 3), gettext('Height') => array('key' => 'bxslider_height', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => gettext("Height of the thumb. Note that the CSS might need to be adjusted."), 'order' => 4), gettext('Crop width') => array('key' => 'bxslider_cropw', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => "", 'order' => 5), gettext('Crop height') => array('key' => 'bxslider_croph', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => "", 'order' => 6), gettext('Speed') => array('key' => 'bxslider_speed', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => gettext("The speed in miliseconds the slides advance when clicked.)"), 'order' => 7), gettext('Full image link') => array('key' => 'bxslider_fullimagelink', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext("If checked the thumbs link to the full image instead of the image page."), 'order' => 8), gettext('Mode') => array('key' => 'bxslider_mode', 'type' => OPTION_TYPE_SELECTOR, 'selections' => array(gettext('Horizontal') => "horizontal", gettext('Vertical') => "vertical", gettext('Fade') => "fade"), 'desc' => gettext("The mode of the thumb nav. Note this might require theme changes."), 'order' => 9));
     foreach (getThemeFiles(array('404.php', 'themeoptions.php', 'theme_description.php', 'functions.php', 'password.php', 'sidebar.php', 'register.php', 'contact.php')) as $theme => $scripts) {
         $list = array();
         foreach ($scripts as $script) {
             $list[$script] = 'bxslider_' . $theme . '_' . stripSuffix($script);
         }
         $options[$theme] = array('key' => 'bxslider_' . $theme . '_scripts', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'checkboxes' => $list, 'desc' => gettext('The scripts for which BxSlider is enabled. {If themes require it they might set this, otherwise you need to do it manually!}'));
     }
     return $options;
 }
예제 #2
0
 function getOptionsSupported()
 {
     global $_zp_gallery;
     $options = array(gettext('Thumbs number') => array('key' => 'jcarousel_scroll', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => gettext("The number of thumbs to scroll by. Note that the CSS might need to be adjusted.")), gettext('width') => array('key' => 'jcarousel_width', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => gettext("Width of the carousel. Note that the CSS might need to be adjusted.")), gettext('height') => array('key' => 'jcarousel_height', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => gettext("Height of the carousel. Note that the CSS might need to be adjusted.")), gettext('Crop width') => array('key' => 'jcarousel_cropw', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => ""), gettext('Crop height') => array('key' => 'jcarousel_croph', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => ""), gettext('Full image link') => array('key' => 'jcarousel_fullimagelink', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext("If checked the thumbs link to the full image instead of the image page.")), gettext('Vertical') => array('key' => 'jcarousel_vertical', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext("If checked the carousel will flow vertically instead of the default horizontal. Changing this may require theme changes!")));
     foreach (getThemeFiles(array('404.php', 'themeoptions.php', 'theme_description.php', 'functions.php', 'password.php', 'sidebar.php', 'register.php', 'contact.php')) as $theme => $scripts) {
         $list = array();
         foreach ($scripts as $script) {
             $list[$script] = 'jcarousel_' . $theme . '_' . stripSuffix($script);
         }
         $options[$theme] = array('key' => 'jcarousel_' . $theme . '_scripts', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'checkboxes' => $list, 'desc' => gettext('The scripts for which jCarousel is enabled. {If themes require it they might set this, otherwise you need to do it manually!}'));
     }
     return $options;
 }
예제 #3
0
 function getOptionsSupported()
 {
     global $_zp_gallery;
     $themes = getPluginFiles('colorbox_js/themes/*.*');
     $list = array('Custom (theme based)' => 'custom');
     foreach ($themes as $theme) {
         $theme = stripSuffix(basename($theme));
         $list[ucfirst($theme)] = $theme;
     }
     $opts = array(gettext('Colorbox theme') => array('key' => 'colorbox_theme', 'type' => OPTION_TYPE_SELECTOR, 'order' => 0, 'selections' => $list, 'desc' => gettext("The Colorbox script comes with 5 example themes you can select here. If you select <em>custom (within theme)</em> you need to place a folder <em>colorbox_js</em> containing a <em>colorbox.css</em> file and a folder <em>images</em> within the current theme to override to use a custom Colorbox theme.")));
     $c = 1;
     foreach (getThemeFiles(array('404.php', 'themeoptions.php', 'theme_description.php')) as $theme => $scripts) {
         $list = array();
         foreach ($scripts as $script) {
             $list[$script] = 'colorbox_' . $theme . '_' . stripSuffix($script);
         }
         $opts[$theme] = array('key' => 'colorbox_' . $theme . '_scripts', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'order' => $c++, 'checkboxes' => $list, 'desc' => gettext('The scripts for which Colorbox is enabled. {Should have been set by the themes!}'));
     }
     return $opts;
 }
예제 #4
0
파일: slideshow.php 프로젝트: rb26/zenphoto
 function getOptionsSupported()
 {
     $options = array(gettext('Mode') => array('key' => 'slideshow_mode', 'type' => OPTION_TYPE_SELECTOR, 'order' => 0, 'selections' => array(gettext("jQuery Cycle") => "jQuery", gettext("jQuery Colorbox") => "colorbox"), 'desc' => gettext('<em>jQuery Cycle</em> for slideshow using the jQuery Cycle plugin<br /><em>jQuery Colorbox</em> for slideshow using Colorbox (Colorbox plugin required).<br />NOTE: The jQuery Colorbox mode is attached to the link the printSlideShowLink() function prints and can neither be called directly nor used on the slideshow.php theme page.')), gettext('Speed') => array('key' => 'slideshow_speed', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1, 'desc' => gettext("Speed of the transition in milliseconds.")));
     foreach (getThemeFiles(array('404.php', 'themeoptions.php', 'theme_description.php', 'slideshow.php', 'functions.php', 'password.php', 'sidebar.php', 'register.php', 'contact.php')) as $theme => $scripts) {
         $list = array();
         foreach ($scripts as $script) {
             $list[$script] = 'slideshow_' . $theme . '_' . stripSuffix($script);
         }
         $opts[$theme] = array('key' => 'slideshow_' . $theme . '_scripts', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'checkboxes' => $list, 'desc' => gettext('The scripts for which the slideshow is enabled. {Should have been set by the themes!}'));
     }
     $options = array_merge($options, $opts);
     switch (getOption('slideshow_mode')) {
         case 'jQuery':
             $options = array_merge($options, array(gettext('Slide width') => array('key' => 'slideshow_width', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 5, 'desc' => gettext("Width of the images in the slideshow.")), gettext('Slide height') => array('key' => 'slideshow_height', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 6, 'desc' => gettext("Height of the images in the slideshow.")), gettext('Cycle Effect') => array('key' => 'slideshow_effect', 'type' => OPTION_TYPE_SELECTOR, 'order' => 2, 'selections' => array(gettext('fade') => "fade", gettext('shuffle') => "shuffle", gettext('zoom') => "zoom", gettext('slide X') => "slideX", gettext('slide Y') => "slideY", gettext('scroll up') => "scrollUp", gettext('scroll down') => "scrollDown", gettext('scroll left') => "scrollLeft", gettext('scroll right') => "scrollRight"), 'desc' => gettext("The cycle slide effect to be used.")), gettext('Timeout') => array('key' => 'slideshow_timeout', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 3, 'desc' => gettext("Milliseconds between slide transitions (0 to disable auto advance.)")), gettext('Description') => array('key' => 'slideshow_showdesc', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 4, 'desc' => gettext("Check if you want to show the image’s description below the slideshow."))));
             break;
         case 'colorbox':
             $options = array_merge($options, array(gettext('Colorbox transition') => array('key' => 'slideshow_colorbox_transition', 'type' => OPTION_TYPE_SELECTOR, 'order' => 2, 'selections' => array(gettext('elastic') => "elastic", gettext('fade') => "fade", gettext('none') => "none"), 'desc' => gettext("The Colorbox transition slide effect to be used.")), gettext('Colorbox image type') => array('key' => 'slideshow_colorbox_imagetype', 'type' => OPTION_TYPE_SELECTOR, 'order' => 3, 'selections' => array(gettext('full image') => "fullimage", gettext('sized image') => "sizedimage"), 'desc' => gettext("The image type you wish to use for the Colorbox. If you choose “sized image” the slideshow width value will be used for the longest side of the image.")), gettext('Colorbox image title') => array('key' => 'slideshow_colorbox_imagetitle', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 4, 'desc' => gettext("If the image title should be shown at the bottom of the Colorbox."))));
             if (getOption('slideshow_colorbox_imagetype') == 'sizedimage') {
                 $options = array_merge($options, array(gettext('Slide width') => array('key' => 'slideshow_width', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 3.5, 'desc' => gettext("Width of the images in the slideshow."))));
             }
             break;
     }
     return $options;
 }
예제 #5
0
 function getOptionsSupported()
 {
     /*		 * *********************
      * 	slideshow options
      * ********************* */
     $options = array(gettext('Slideshow: Mode') => array('key' => 'cycle-slideshow_mode', 'type' => OPTION_TYPE_SELECTOR, 'order' => 0, 'selections' => array(gettext("jQuery Cycle") => "cycle", gettext("jQuery Colorbox") => "colorbox"), 'desc' => gettext('<em>jQuery Cycle</em> for slideshow using the jQuery Cycle2 plugin<br /><em>jQuery Colorbox</em> for slideshow using Colorbox (Colorbox plugin required).<br />NOTE: The jQuery Colorbox mode is attached to the link the printSlideShowLink() function prints and can neither be called directly nor used on the slideshow.php theme page.')), gettext('Slideshow: Speed') => array('key' => 'cycle-slideshow_speed', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1, 'desc' => gettext("Speed of the transition in milliseconds.")));
     switch (getOption('cycle-slideshow_mode')) {
         case 'cycle':
             $options = array_merge($options, array(gettext('Slideshow: Slide width') => array('key' => 'cycle-slideshow_width', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 5, 'desc' => gettext("Width of the images in the slideshow.")), gettext('Slideshow: Slide height') => array('key' => 'cycle-slideshow_height', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 6, 'desc' => gettext("Height of the images in the slideshow.")), gettext('Slideshow: Effect') => array('key' => 'cycle-slideshow_effect', 'type' => OPTION_TYPE_SELECTOR, 'order' => 2, 'selections' => array(gettext('none') => "none", gettext('fade') => "fade", gettext('fadeOut') => "fadeOut", gettext('shuffle') => "shuffle", gettext('Scroll horizontal') => "scrollHorz", gettext('Scroll vertical') => "scrollVert", gettext('Flip horizontal') => "flipHorz", gettext('Flip vertical') => "flipVert", gettext('Tile slide') => "tileSlide", gettext('Tile blind') => "tileBlind"), 'desc' => gettext("The cycle slide effect to be used. Flip transitions are only supported on browsers that support CSS3 3D transforms. (IE10+, current Chrome, Firefox, Opera and Safari.)")), gettext('Slideshow: Tile Effect - Extra') => array('key' => 'cycle-slideshow_tileeffect', 'type' => OPTION_TYPE_SELECTOR, 'order' => 3, 'selections' => array(gettext('Horziontal') => "tileVert", gettext('Vertical') => "tileHorz"), 'desc' => gettext("If one of the tile effects is selected, this is its orientation.")), gettext('Slideshow: Timeout') => array('key' => 'cycle-slideshow_timeout', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 4, 'desc' => gettext("Milliseconds between slide transitions (0 to disable auto advance.)")), gettext('Slideshow: Description') => array('key' => 'cycle-slideshow_showdesc', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 7, 'desc' => gettext("Check if you want to show the image’s description below the slideshow.")), gettext('Slideshow: Swipe gestures') => array('key' => 'cycle-slideshow_swipe', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 8, 'desc' => gettext("Check if you want to enable touch screen swipe gestures.")), gettext('Slideshow: Pause on hover') => array('key' => 'cycle-slideshow_pausehover', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 9, 'desc' => gettext("Check if you want the slidesshow to pause on hover."))));
             break;
         case 'colorbox':
             $options = array_merge($options, array(gettext('Colorbox: Transition') => array('key' => 'cycle-slideshow_colorbox_transition', 'type' => OPTION_TYPE_SELECTOR, 'order' => 2, 'selections' => array(gettext('elastic') => "elastic", gettext('fade') => "fade", gettext('none') => "none"), 'desc' => gettext("The Colorbox transition slide effect to be used.")), gettext('Colorbox: Image type') => array('key' => 'cycle-slideshow_colorbox_imagetype', 'type' => OPTION_TYPE_SELECTOR, 'order' => 3, 'selections' => array(gettext('full image') => "fullimage", gettext("sized image") => "sizedimage"), 'desc' => gettext("The image type you wish to use for the Colorbox. If you choose “sized image” the slideshow width value will be used for the longest side of the image.")), gettext('Colorbox: Image title') => array('key' => 'cycle-slideshow_colorbox_imagetitle', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 4, 'desc' => gettext("If the image title should be shown at the bottom of the Colorbox."))));
             if (getOption('cycle-slideshow_colorbox_imagetype') == 'sizedimage') {
                 $options = array_merge($options, array(gettext('Colorbox: Slide width') => array('key' => 'cycle-slideshow_width', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 3.5, 'desc' => gettext("Width of the images in the slideshow."))));
             }
             break;
     }
     foreach (getThemeFiles(array('404.php', 'themeoptions.php', 'theme_description.php', 'slideshow.php', 'functions.php', 'password.php', 'sidebar.php', 'register.php', 'contact.php')) as $theme => $scripts) {
         $list = array();
         foreach ($scripts as $script) {
             $list[$script] = 'cycle_' . $theme . '_' . stripSuffix($script);
         }
         $options2[$theme] = array('key' => 'cycle_' . $theme . '_scripts', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'checkboxes' => $list, 'desc' => gettext('The scripts for which the cycle2 plugin is enabled. {If themes require it they might set this, otherwise you need to do it manually!}'));
     }
     $options = array_merge($options, $options2);
     return $options;
 }
예제 #6
0
function getThemeFiles($dir)
{
    $files = array();
    if ($handle = opendir($dir)) {
        while (false !== ($file = readdir($handle))) {
            if ($file != "." && $file != "..") {
                if (is_dir($dir . '/' . $file)) {
                    $dir2 = $dir . '/' . $file;
                    $files[] = getThemeFiles($dir2);
                } else {
                    // We only care about php and css files
                    if (substr($file, -4) == ".php" || substr($file, -4) == ".css") {
                        $files[] = str_replace(YiiBase::getPathOfAlias('webroot.themes') . '/' . Yii::app()->theme->name . "/", "", $dir) . '/' . $file . "," . md5_file($dir . '/' . $file);
                    }
                }
            }
        }
        closedir($handle);
    }
    return array_flat($files);
}