Changeset 28586 for extensions
- Timestamp:
- Jun 1, 2014, 9:38:49 PM (10 years ago)
- Location:
- extensions/Slimi
- Files:
-
- 2 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Slimi/admin/admin.inc.php
r18812 r28586 9 9 'bd_slimi' => '#4F4F4F', 10 10 'title_slimi' => '#4F4F4F', 11 11 'carousel_speed' => '3' 12 12 ); 13 13 … … 27 27 'bd_slimi' => $_POST['bd_slimi'], 28 28 'title_slimi' => $_POST['title_slimi'], 29 'carousel_speed' => $_POST['carousel_speed'], 29 30 30 31 ); … … 46 47 'selected_bd_slimi' => $params['bd_slimi'], 47 48 'selected_title_slimi' => $params['title_slimi'], 49 'selected_carousel_speed' => $params['carousel_speed'], 48 50 )); 49 51 -
extensions/Slimi/admin/admin.tpl
r20565 r28586 1 {html_head} 2 <script type="text/javascript" src="themes/Slimi/admin/js/farbtastic.js" ></script> 3 <script type="text/javascript" src="themes/default/js/ui/minified/jquery.ui.slider.min.js"></script> 4 <script src="themes/Slimi/admin/js/jquery.screwdefaultbuttonsV2.min.js" type="text/javascript"></script> 1 {combine_script id='slider' load='footer' require='jquery' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'} 2 {combine_script id='button' load='footer' require='jquery' path='themes/default/js/ui/minified/jquery.ui.button.min.js'} 3 {combine_script id='farbtastic' load='footer' require='jquery' path='themes/Slimi/admin/js/farbtastic.js'} 4 {combine_css path="themes/Slim/admin/jquery.ui.button.custom.css" order=-10} 5 {combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css" order=-10} 6 {combine_css path="themes/Slimi/admin/theme.css" order=-10} 5 7 6 <link rel="stylesheet" href="themes/Slimi/admin/theme.css" /> 7 <script type="text/javascript"> 8 {literal} 9 $(function(){ 10 11 $('input:radio').screwDefaultButtons({ 12 image: 'url("themes/Slimi/admin/images/radioSmall_Blue.png")', 13 width: 35, 14 height: 35 8 9 {footer_script}{literal} 10 (function($) { 11 $(document).ready(function() { 12 $('#option').buttonset(); 13 14 var f = $.farbtastic('#picker'); 15 var p = $('#picker').css('opacity', 1); 16 var selected; 17 $('.colorwell') 18 .each(function () { f.linkTo(this); $(this).css('opacity', 1); }) 19 .focus(function() { 20 if (selected) { 21 $(selected).css('opacity', 1).removeClass('colorwell-selected'); 22 } 23 f.linkTo(this); 24 p.css('opacity', 1); 25 $(selected = this).css('opacity', 1).addClass('colorwell-selected'); 15 26 }); 16 27 $(function() { 28 $('#slider-range-max').slider({ 29 range: "max", 30 min: 1, 31 max: 20, 32 value: {/literal}{$selected_carousel_speed}{literal}, 33 slide: function( event, ui ) { 34 $('#carspeed').val( ui.value ); 35 } 36 }); 37 $('#carspeed').val( $('#slider-range-max').slider('value')); 38 }); 17 39 }); 18 {/literal} 19 </script> 20 21 {/html_head} 22 40 })(jQuery); 41 {/literal}{/footer_script} 23 42 24 43 … … 30 49 <fieldset> 31 50 <legend>{'Open picture'|@translate}</legend> 51 <div class="opt"> 32 52 <div id="option"> 33 <tr><td align="right">Lightbox</td><td class="check"><input type="radio" name="lytebox_slimi" value="1" {if $selected_lytebox_slimi=='1'}checked="checked"{/if} ></td></tr> 34 35 <tr><td align="right">{'Picture page'|@translate}</td><td class="check"><input type="radio" name="lytebox_slimi" value="2" {if $selected_lytebox_slimi=='2'}checked="checked"{/if} ></td></tr> 36 53 54 <input type="radio" id="radio1" name="lytebox_slimi" value="1" {if $selected_lytebox_slimi=='1'}checked="checked"{/if}><label for="radio1">Lightbox</label> 55 <input type="radio" id="radio2" name="lytebox_slimi" value="2" {if $selected_lytebox_slimi=='2'}checked="checked"{/if}><label for="radio2">{'Picture page'|@translate}</label> 37 56 </div> 57 </div> 58 <br> 38 59 </fieldset> 39 40 41 60 42 61 … … 49 68 <p><input type="submit" name="default" value="{'Default'|@translate}" ></p> 50 69 </div> 70 <div id="picker"></div> 71 </fieldset> 51 72 52 <div id="picker"></div> 53 54 73 <fieldset> 74 <legend>{'Carousel'|@translate}</legend> 75 <div id="car_speed" class="option" style="margin-top:20px"> 76 <p> 77 <label for="carspeed">Carousel speed</label> 78 <input type="text" id="carspeed" style="border:0; color:#f6931f; font-weight:bold;" name="carousel_speed" value={$selected_carousel_speed}> 79 </p> 80 <br> 81 <div id="slider-range-max"></div> 82 83 </div> 84 </fieldset> 55 85 56 </fieldset>57 {footer_script}{literal}58 $(document).ready(function() {59 var f = $.farbtastic('#picker');60 var p = $('#picker').css('opacity', 1);61 var selected;62 $('.colorwell')63 .each(function () { f.linkTo(this); $(this).css('opacity', 1); })64 .focus(function() {65 if (selected) {66 $(selected).css('opacity', 1).removeClass('colorwell-selected');67 }68 f.linkTo(this);69 p.css('opacity', 1);70 $(selected = this).css('opacity', 1).addClass('colorwell-selected');71 });72 });73 74 {/literal}{/footer_script}75 86 <p><input type="submit" name="submit" value="{'Submit'|@translate}" > 76 87 </form> -
extensions/Slimi/admin/maintain.inc.php
r18812 r28586 12 12 'bd_slimi' => '#4F4F4F', 13 13 'title_slimi' => '#4F4F4F', 14 'carousel_speed' => '3' 14 15 ); 15 16 -
extensions/Slimi/admin/theme.css
r18915 r28586 1 .ui-slider{color:#383838;border-radius:8px 8px 8px 8px;position:relative;text-align:left;width:450px;background:none;border:none}2 .ui-slider .ui-slider-handle{border: 1px solid #D7DEF0;background:url("images/bouton_slide.png") repeat-x scroll 50% 50% transparent;font-weight:bold;color:#4C3000;position:absolute;z-index:2;cursor:default;height:28px;width:446px}3 .ui-slider .ui-slider-range{position:absolute;z-index:1;background:none}4 .ui-slider-horizontal{height:30px}5 .ui-slider-horizontal .ui-slider-handle{border-radius:8px}6 .ui-slider-horizontal .ui-slider-range{top:0;height:100%}7 .ui-slider-horizontal .ui-slider-range-min{left:0}8 .ui-slider-horizontal .ui-slider-range-max{right:0}9 .switcher input{display:none}10 .switcher {border:2px inset #EFEFEF;border-radius:8px;background:#EDEDED;height:30px;width:900px;color:#000;position:relative;margin-bottom:40px}11 .opt{float:left;border-right:1px solid #FFF;width:449px;height:30px;text-align:center;font-size:20px}12 1 INPUT[type="text"]{border:2px inset #EFEFEF;border-radius:8px;background:#EDEDED;height:30px;width:100px;color:#000;margin-bottom:10px} 13 2 INPUT[type="text"]:active{border:2px inset #8f8f8f} -
extensions/Slimi/local_head.tpl
r25998 r28586 1 {combine_script id='menu' load='header' require='jquery' path='themes/Slim/js/menu.js'} 2 {combine_script id='hoverIntent' load='header' require='jquery' path='themes/Slim/js/jquery.hoverIntent.js'} 3 {combine_script id='columnizer' load='header' require='jquery' path='themes/Slim/js/jquery.columnizer.js'} 4 5 {if (($Slimi.lytebox_slimi)==1)} 6 {combine_script id='lytebox' load='header' require='jquery' path='themes/Slim/js/lytebox.js'} 7 {/if} 8 1 {combine_script id='menu' load='header' require='jquery' path='themes/slim/js/menu.js'} 2 {combine_script id='hoverIntent' load='header' require='jquery' path='themes/slim/js/jquery.hoverIntent.js'} 3 {combine_script id='columnizer' load='header' require='jquery' path='themes/slim/js/jquery.columnizer.js'} -
extensions/Slimi/slimi.php
r25998 r28586 3 3 4 4 global $conf, $template; 5 $params = array_merge(unserialize($conf['Slimi']));5 $params = array_merge(unserialize($conf['Slimi'])); 6 6 $template->assign('Slimi', $params); 7 7 … … 13 13 #theHeader p, #theHeader h1{color:'.$params['title_slimi'].'} 14 14 </style> 15 ');15 '); 16 16 ?> -
extensions/Slimi/template/index.tpl
r25998 r28586 142 142 {/if} 143 143 144 {if !empty($CONTENT)}{$CONTENT}{/if} 144 145 145 146 146 147 {if !empty($THUMBNAILS)} 147 148 {$THUMBNAILS} 148 {footer_script}{literal}149 $('.jcarousel')150 .jcarousel({151 wrap: 'circular'152 })153 .jcarouselAutoscroll({154 autostart: false155 });156 157 $('.jcarousel-control-prev')158 .on('jcarouselcontrol:active', function() {159 $(this).removeClass('inactive');160 })161 .on('jcarouselcontrol:inactive', function() {162 $(this).addClass('inactive');163 })164 .jcarouselControl({165 target: '-=1'166 });167 168 $('.jcarousel-control-next')169 .on('jcarouselcontrol:active', function() {170 $(this).removeClass('inactive');171 })172 .on('jcarouselcontrol:inactive', function() {173 $(this).addClass('inactive');174 })175 .jcarouselControl({176 target: '+=1'177 });178 {/literal}{/footer_script}179 149 {/if} 180 150 181 151 {if empty($THUMBNAILS)} 182 152 {if !empty($CATEGORIES)}{$CATEGORIES} 183 {footer_script}{literal}184 $('.jcarousel')185 .jcarousel({186 wrap: 'circular'187 })188 .jcarouselAutoscroll({189 interval: 3000,190 target: '+=1',191 autostart: true192 });193 194 $('.jcarousel-control-prev')195 .on('jcarouselcontrol:active', function() {196 $(this).removeClass('inactive');197 })198 .on('jcarouselcontrol:inactive', function() {199 $(this).addClass('inactive');200 })201 .jcarouselControl({202 target: '-=1'203 });204 205 $('.jcarousel-control-next')206 .on('jcarouselcontrol:active', function() {207 $(this).removeClass('inactive');208 })209 .on('jcarouselcontrol:inactive', function() {210 $(this).addClass('inactive');211 })212 .jcarouselControl({213 target: '+=1'214 });215 216 $('.jcarousel')217 .on('mouseenter', function(){218 $(this).jcarouselAutoscroll('stop')219 })220 .on('mouseleave', function(){221 $(this).jcarouselAutoscroll('start')222 });223 {/literal}{/footer_script}224 225 153 {/if} 226 154 {/if} -
extensions/Slimi/template/mainpage_categories.tpl
r25998 r28586 1 {define_derivative name='carousel' width='300' height='300' min_width='300'} 2 <div id="carousel"> 3 <div id="wrap"> 4 <div class="jcarousel"> 5 <ul> 6 {foreach from=$category_thumbnails item=cat} 7 <li> 8 <div class="illustration"> 9 <a href="{$cat.URL}"> 10 <img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()}"/> 1 {define_derivative name='carousel' width='300' height='350' min_width='350'} 2 3 {footer_script}{literal} 4 (function($) { 5 $(document).ready(function(){ 6 7 var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)), 8 start; 9 10 if (isTouch==true){ 11 start=""; 12 }else{ 13 start="onStart"; 14 }; 15 16 $("div.carousel").smoothDivScroll({ 17 autoScrollingMode: start, 18 touchScrolling: true, 19 autoScrollingStep: {/literal}{$Slimi.carousel_speed}{literal}, 20 manualContinuousScrolling: true, 21 mousewheelScrolling: "allDirections", 22 23 }); 24 25 $("div.carousel").bind("mouseover", function() { 26 $(this).smoothDivScroll("stopAutoScrolling"); 27 }).bind("mouseout", function() { 28 $(this).smoothDivScroll("startAutoScrolling"); 29 }); 30 31 32 }); 33 })(jQuery); 34 {/literal}{/footer_script} 35 36 37 <div class="carousel"> 38 {foreach from=$category_thumbnails item=cat} 39 <div class="illustration"> 40 <a href="{$cat.URL}"> 41 <img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()-22}"/> 42 11 43 <div class="CatMPdescription"> 12 44 <h3> … … 16 48 {/if} 17 49 </h3> 18 50 <div class="Nb_images"> 19 51 {if isset($cat.INFO_DATES) } 20 52 <p class="dates">{$cat.INFO_DATES}</p> 21 53 {/if} 22 <p class="Nb_images">{$cat.CAPTION_NB_IMAGES}</p>54 <p >{$cat.CAPTION_NB_IMAGES}</p> 23 55 {if not empty($cat.DESCRIPTION)} 24 56 <p>{$cat.DESCRIPTION}</p> 25 57 {/if} 58 </div> 26 59 </div> 27 60 </a> 28 </div> 29 </li> 30 {/foreach} 31 </ul> 61 </div> 62 {/foreach} 32 63 </div> 33 </div>34 <a href="#" class="jcarousel-control-prev">‹</a>35 <a href="#" class="jcarousel-control-next">›</a>36 </div> -
extensions/Slimi/template/thumbnails.tpl
r25998 r28586 1 {define_derivative name='carousel' width='300' height='3 00' min_width='300'}1 {define_derivative name='carousel' width='300' height='350' min_width='350'} 2 2 {php} 3 3 global $page, $template; 4 4 $template->assign('cat_name', $page['category']['name']); 5 5 6 {/php} 7 {footer_script}{literal} 8 (function($) { 9 $(document).ready(function(){ 10 11 var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)), 12 start; 13 14 if (isTouch==true){ 15 start=""; 16 }else{ 17 start="onStart"; 18 }; 19 20 $("div.carousel").smoothDivScroll({ 21 autoScrollingMode: start, 22 touchScrolling: true, 23 autoScrollingStep: {/literal}{$Slimi.carousel_speed}{literal}, 24 manualContinuousScrolling: true, 25 mousewheelScrolling: "allDirections", 26 27 }); 28 29 $("div.carousel").bind("mouseover", function() { 30 $(this).smoothDivScroll("stopAutoScrolling"); 31 }).bind("mouseout", function() { 32 $(this).smoothDivScroll("startAutoScrolling"); 33 }); 34 35 36 }); 37 })(jQuery); 38 {/literal}{/footer_script} 6 39 40 {if (($Slimi.lytebox_slimi)==1)} 41 {footer_script}{literal} 42 (function($) { 43 $(document).ready(function(){ 44 $('.fancybox').fancybox({ 45 helpers : { 46 title : { 47 type : 'over' 48 }, 49 }, 50 afterLoad: function() { 51 $("div.carousel").smoothDivScroll("stopAutoScrolling"); 52 }, 53 afterClose: function() { 54 $("div.carousel").smoothDivScroll("startAutoScrolling"); 55 } 56 }); 57 58 }); 59 })(jQuery); 60 {/literal}{/footer_script} 61 {/if} 7 62 8 <div id="carousel"> 9 <div id="wrap"> 10 <div class="jcarousel"> 11 <ul> 12 {if !empty($category_thumbnails)} 13 14 {foreach from=$category_thumbnails item=cat} 15 16 17 <li> 18 <div class="illustration"> 19 <a href="{$cat.URL}"> 20 <img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()}"/> 21 </a> 22 </div> 23 24 63 <div class="carousel"> 64 {if !empty($category_thumbnails)} 65 {foreach from=$category_thumbnails item=cat} 66 <div class="illustration"> 67 <a href="{$cat.URL}"> 68 <img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()-22}"/> 69 25 70 <div class="CatMPdescription"> 26 71 <h3> 27 <a href="{$cat.URL}">{$cat.NAME}</a>72 {$cat.NAME} 28 73 </h3> 29 74 <div> 30 {$cat.CAPTION_NB_IMAGES} 75 {$cat.CAPTION_NB_IMAGES} 76 </div> 31 77 </div> 78 </a> 32 79 </div> 33 </li> 34 {/foreach}{/if} 35 36 37 {foreach from=$thumbnails item=thumbnail} 38 {assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)} 39 <li> 40 <div class="illustration"> 41 <a href="{if ($Slimi.lytebox_slimi)==1}{$thumbnail.path}" class="lytebox" rev="slide:true group:name showNavigation:true navType:1 slideInterval:6000"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}"> 42 <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()}"/> 43 80 {/foreach} 81 {/if} 82 {foreach from=$thumbnails item=thumbnail} 83 {assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)} 84 <div class="illustration"> 85 <a href="{if (($Slimi.lytebox_slimi)==1)}{$thumbnail.path}" class="fancybox" data-fancybox-group="gallery"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}"> 86 <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()-22}"/> 44 87 {if $SHOW_THUMBNAIL_CAPTION } 45 88 <div class="CatMPdescription"> 46 89 <H3> 47 90 {$thumbnail.NAME} 48 49 91 {if !empty($thumbnail.icon_ts)} 50 92 <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)"> … … 52 94 </h3> 53 95 {if isset($thumbnail.NB_COMMENTS) or isset($thumbnail.NB_HITS)} 54 <div>96 <div> 55 97 {if isset($thumbnail.NB_COMMENTS)} 56 98 <p class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> 57 {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}99 {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)} 58 100 </p> 59 101 {/if} 60 102 {if isset($thumbnail.NB_HITS)} 61 103 <p class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits"> 62 {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}104 {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)} 63 105 </p> 64 106 {/if} 65 </div>107 </div> 66 108 {/if} 67 109 </div> 68 110 {/if} 69 </a> 70 </div> 71 </li> 72 {/foreach} 73 </ul> 111 </a> 112 </div> 113 {/foreach} 114 </div> 74 115 75 </div>76 </div>77 <a href="#" class="jcarousel-control-prev">‹</a>78 <a href="#" class="jcarousel-control-next">›</a>79 </div> -
extensions/Slimi/theme.css
r25998 r28586 12 12 #theHeader H1{font-family:none} 13 13 #theHeader p{margin:20px 0;font-family:none} 14 #content{margin:0 }15 #infoBlock,#imageHeaderBar{border-radius:0;padding:0 60px;height:30px;line-height:30px }14 #content{margin:0;width:100%} 15 #infoBlock,#imageHeaderBar{border-radius:0;padding:0 60px;height:30px;line-height:30px;margin:30px 0;border-bottom:1px solid} 16 16 #fullTagCloud,#piwigoAbout,.content .notification{width:80%;background:#4f4f4f;min-height:400px;margin:0;padding:20px 10%} 17 #comments{background:#4f4f4f;width: 100%}17 #comments{background:#4f4f4f;width:95%} 18 18 .commentElement{border-radius:0;border:none;color:#c2c2c2} 19 19 .switchBox{z-index:1001} … … 28 28 .CatMPdescription img{border:none;float:right} 29 29 .CatMPdescription:hover{text-align:left;position:absolute;top:0;left:0;opacity:0.65;-moz-transition:bottom 1s ease 0s, width 1s ease 0s, opacity 1s ease 0s;height:100%;width:100%;background:#000;z-index:100} 30 .CatMPdescription h3,.CatMPdescription p{margin-left:10px} 30 .CatMPdescription .Nb_images{position:relative;bottom:auto;left:auto;background:none;overflow:auto;color:#c2c2c2;opacity:1;-moz-transition:bottom 1s ease 0s, width 1s ease 0s, opacity 1s ease 0s;border-radius:0px;border:0;padding:0;margin:0} 31 .CatMPdescription h3,.CatMPdescription p,{margin-left:10px} 31 32 32 33 … … 62 63 63 64 /*=========================================carousel======================================================*/ 64 #wrap{position:relative;margin:0;padding:50px 0px 40px;border:none;border-radius:0;background:transparent;box-shadow:none} 65 .jcarousel-control-prev{left:40px;z-index:1000} 66 .jcarousel-control-next{right:40px;z-index:1000} 65 div.carousel {background: none repeat scroll 0 0 rgba(0, 0, 0, 0.25);border:1px solid rgba(0, 0, 0, 0.5);border-radius:0px;box-shadow:none;height:330px} 66 67 /*=========================================picture page====================================================*/ 68 a.trigger {left:0} 69 .panel{left:0} -
extensions/Slimi/themeconf.inc.php
r25998 r28586 37 37 } 38 38 39 add_event_handler('loc_end_page_header', 'load_Slimi' ); 39 40 add_event_handler('init', 'load_Slimi' ); 40 41 function load_Slimi() 41 42 { 42 43 include('slimi.php'); 43 } 44 44 } 45 45 ?>
Note: See TracChangeset
for help on using the changeset viewer.