Changeset 12321
- Timestamp:
- Oct 2, 2011, 10:12:02 PM (13 years ago)
- Location:
- extensions/stripped
- Files:
-
- 2 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/stripped/admin/admin.inc.php
r12153 r12321 17 17 $config['animatedMenu']=isset($_POST['f_animatedMenu']); 18 18 $config['animatedTabs']=isset($_POST['f_animatedTabs']); 19 $config['replaceActionIcons']=isset($_POST['f_replaceActionIcons']);20 19 $config['noLowercase']=!isset($_POST['f_forceLowercase']); 21 20 $config['showThumbLegend']=isset($_POST['f_showThumbLegend']); -
extensions/stripped/admin/admin.tpl
r12153 r12321 19 19 <span class="property">{'Animate tabs on picture page'|@translate}</span> 20 20 <input type="checkbox" name="f_animatedTabs" {if $options.animatedTabs}checked{/if}> 21 </label></li>22 <li><label>23 <span class="property">{'Replace all icons by ALT text'|@translate}</span> 24 <input type="checkbox" name="f_replaceActionIcons" {if $options.replaceActionIcons}checked{/if}>25 21 </label></li> 26 22 <li><label> -
extensions/stripped/admin/maintain.inc.php
r12153 r12321 11 11 'animatedMenu' => true, 12 12 'animatedTabs' => true, 13 'replaceActionIcons' => true,14 13 'noLowercase' => false, 15 14 'showThumbLegend' => false, -
extensions/stripped/admin/upgrade.inc.php
r12153 r12321 11 11 'animatedMenu' => true, 12 12 'animatedTabs' => true, 13 'replaceActionIcons' => true,14 13 'noLowercase' => false, 15 14 'showThumbLegend' => false, -
extensions/stripped/js/scripts-tcp.js
r9960 r12321 78 78 } 79 79 80 // display alt from ALL actions.81 if (options.replaceActionIcons) {82 var actionBlock=jQuery(".categoryActions");83 84 if (actionBlock.length != 0) {85 var actionIcons=actionBlock.find("img.button");86 if (actionIcons.length !=0) {87 actionIcons.each(function(index) {88 var alt_text = (jQuery(this).attr("alt"));89 jQuery(this).before(alt_text);90 jQuery(this).parents("li").css("width","auto");91 jQuery(this).remove();92 });93 }94 }95 }96 97 80 // gmaps icon 98 81 -
extensions/stripped/js/scripts-tpp.js
r11982 r12321 27 27 } 28 28 29 // display alt from ALL actions.30 if (options.replaceActionIcons) {31 var actionBlock=jQuery(".randomButtons");32 33 if (actionBlock.length != 0) {34 var actionIcons=actionBlock.find("img.button");35 if (actionIcons.length !=0) {36 actionIcons.each(function(index) {37 var alt_text = (jQuery(this).attr("alt"));38 jQuery(this).before(alt_text);39 jQuery(this).parents("li").css("width","auto");40 jQuery(this).remove();41 });42 }43 }44 }45 46 29 // gmaps icon 47 30 -
extensions/stripped/local_head.tpl
r12153 r12321 1 {php} 2 global $template, $stripped; 3 $template->assign( 'stripped', $stripped ); 4 {/php} 5 1 6 {if $load_css} 2 7 <!--[if lt IE 7]> … … 26 31 {/if} 27 32 28 {if ($BODY_ID=='theMapListPage')}29 {combine_script id='scripts-tml' load='header' require='jquery' path='themes/stripped/js/scripts-tml.js'}30 {/if}31 33 {if isset($stripped.imagePreload)} 32 34 {combine_script id='preload' load='header' require='jquery' path='themes/stripped/js/preload.js'} -
extensions/stripped/readme.txt
r12153 r12321 32 32 - new option: preload images (from 1 to 10 images) 33 33 - new option to choose HD display mode (fit to screen / 1:1) 34 - some minor layout change 34 - some minor layout changes 35 35 - bug correction 36 36 -
extensions/stripped/template/footer.tpl
r11833 r12321 33 33 34 34 {if isset($U_ADMIN)} 35 <a href="{$U_ADMIN}" title="{'available for administrators only'|@translate}" >{'Administration'|@translate}</a>35 <a href="{$U_ADMIN}" title="{'available for administrators only'|@translate}" class="uadmin">{'Administration'|@translate}</a> 36 36 {/if} 37 37 -
extensions/stripped/template/index.tpl
r12269 r12321 5 5 </div> 6 6 {if isset($U_EDIT) or isset($U_SLIDESHOW) or !empty($PLUGIN_INDEX_ACTIONS)} 7 <ul class="categoryActions"> 8 {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if} 9 {if isset($U_EDIT)} 10 <li><a href="{$U_EDIT}" title="{'edit'|@translate}">{'edit'|@translate}</a></li> 11 {/if} 12 {if isset($U_CADDIE) } 13 <li><a href="{$U_CADDIE}" title="{'add to caddie'|@translate}">{'caddie'|@translate}</a></li> 14 {/if} 15 {if isset($U_SLIDESHOW)} 16 <li><a href="{$U_SLIDESHOW}" title="{'slideshow'|@translate}" rel="nofollow">{'slideshow'|@translate}</a></li> 17 {/if} 18 </ul> 7 <div class="categoryActionsContainer"> 8 <ul class="categoryActions group1"> 9 {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if} 10 {if isset($U_SLIDESHOW)} 11 <li class="mainAction"><a href="{$U_SLIDESHOW}" title="{'slideshow'|@translate}" rel="nofollow">{'slideshow'|@translate}</a></li> 12 {/if} 13 {if isset($U_EDIT)} 14 <li class="mainAction"><a href="{$U_EDIT}" title="{'edit'|@translate}">{'edit'|@translate}</a></li> 15 {/if} 16 {if isset($U_CADDIE) } 17 <li class="mainAction"><a href="{$U_CADDIE}" title="{'add to caddie'|@translate}">{'caddie'|@translate}</a></li> 18 {/if} 19 </ul> 20 </div> 19 21 {/if} 20 22 {php} -
extensions/stripped/template/picture.tpl
r12153 r12321 24 24 </div> 25 25 <ul class="randomButtons"> 26 {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if} 26 <li id="imageToolBar"> 27 {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} 28 </li> 29 {strip}{if isset($U_SLIDESHOW_START) } 30 <li><a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow">{'slideshow'|@translate}</a></li> 31 {/if}{/strip} 32 {strip}{if isset($U_ADMIN) } 33 <li><a href="{$U_ADMIN}" title="{'Modify information'|@translate}">{'edit'|@translate}</a></li> 34 {/if}{/strip} 35 {strip}{if isset($U_CADDIE)} 36 <li><a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL}', {$current.id}); return false;" title="{'add to caddie'|@translate}" rel="nofollow">{'caddie'|@translate}</a></li> 37 {/if}{/strip} 27 38 {strip}{if isset($favorite) } 28 39 <li><a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}">{'Favorites'|@translate}</a></li> 40 {/if}{/strip} 41 {strip}{if !empty($U_SET_AS_REPRESENTATIVE) } 42 <li><a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}">{'representative'|@translate}</a></li> 29 43 {/if}{/strip} 30 44 {strip}{if isset($current.U_DOWNLOAD)} 31 45 <li><a href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}">{'download'|@translate}</a></li> 32 46 {/if}{/strip} 33 {strip}{if !empty($U_SET_AS_REPRESENTATIVE) } 34 <li><a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}">{'representative'|@translate}</a></li> 35 {/if}{/strip} 36 {strip}{if isset($U_ADMIN) } 37 <li><a href="{$U_ADMIN}" title="{'Modify information'|@translate}">{'edit'|@translate}</a></li> 38 {/if}{/strip} 39 {strip}{if isset($U_CADDIE)}{*caddie management BEGIN*} 40 41 {footer_script} 42 {literal}function addToCadie(aElement, rootUrl, id) 43 { 44 if (aElement.disabled) return; 45 aElement.disabled=true; 46 var y = new PwgWS(rootUrl); 47 48 y.callService( 49 "pwg.caddie.add", {image_id: id} , 50 { 51 onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, 52 onSuccess: function(result) { aElement.disabled = false; } 53 } 54 ); 55 }{/literal} 56 {/footer_script} 57 <li><a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL}', {$current.id}); return false;" title="{'add to caddie'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> 58 <span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'caddie'|@translate}</span> 59 </a></li> 60 {/if}{/strip}{*caddie management END*} 61 {strip}{if isset($U_SLIDESHOW_START) } 62 <li><a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow">{'slideshow'|@translate}</a></li> 63 {/if}{/strip} 64 <li id="imageToolBar"> 65 {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} 66 </li> 67 <!-- <li class="imageNumber">{$PHOTO}</li>--> 47 {strip}{if isset($PLUGIN_PICTURE_ACTIONS)} 48 <li class="plugin_buttons plugin_buttons_group1">{$PLUGIN_PICTURE_ACTIONS}</li> 49 {/if}{/strip} 50 {strip}{if isset($U_CADDIE)}{*caddie management BEGIN*} 51 {footer_script} 52 {literal} 53 function addToCadie(aElement, rootUrl, id) 54 { 55 if (aElement.disabled) return; 56 aElement.disabled=true; 57 var y = new PwgWS(rootUrl); 58 y.callService( 59 "pwg.caddie.add", {image_id: id} , 60 { 61 onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, 62 onSuccess: function(result) { aElement.disabled = false; } 63 } 64 ); 65 } 66 {/literal} 67 {/footer_script} 68 {/if}{/strip} 69 <li class="plugin_buttons plugin_buttons_group2">{*caddie management END*}</li> 70 </ul> 68 71 {php} 69 72 global $pwg_loaded_plugins; … … 71 74 {/php} 72 75 {if ($GMaps_loaded)}<div id="text_gmaps" style="display:none">{'GMap'|@translate}</div>{/if} 73 </ul>74 76 <div style="clear:both;"></div> 75 77 </div> <!-- imageHeaderBar --> … … 166 168 {/if} 167 169 {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) } 168 <li id="tabT _comments" class="tabTitle" title="{'Add a comment'|@translate}" name="comments">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</li>170 <li id="tabTcomments" class="tabTitle" title="{'Add a comment'|@translate}" name="comments">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</li> 169 171 {/if} 170 172 </ul> -
extensions/stripped/template/picture_content.tpl
r12153 r12321 1 1 {php} 2 global $pwg_loaded_plugins, $conf ;2 global $pwg_loaded_plugins, $conf, $stripped; 3 3 $this->assign('HDShadowbox_loaded', isset($pwg_loaded_plugins[ 'HDShadowbox' ])); 4 $config = unserialize( $conf['stripped'] ); 5 $this->assign( 'stripped', $config ); 4 $this->assign( 'stripped', $stripped ); 6 5 {/php} 7 6 {if isset($high)} -
extensions/stripped/template/thumbnails.tpl
r12153 r12321 1 1 {if !empty($thumbnails)} 2 2 {php} 3 global $pwg_loaded_plugins, $conf ;3 global $pwg_loaded_plugins, $conf, $stripped; 4 4 $this->assign('downloadMulti_loaded', isset($pwg_loaded_plugins[ 'download_multi' ])); 5 $config = unserialize( $conf['stripped'] ); 6 $this->assign( 'stripped', $config ); 5 $this->assign( 'stripped', $stripped ); 7 6 {/php} 8 7 <ul class="thumbList"> -
extensions/stripped/theme.css
r12153 r12321 193 193 float: left; 194 194 max-height: 16px; 195 } 196 197 #thePicturePage .titrePage img { 195 198 margin: 0 5px; 196 199 } 197 200 198 .titrePage .categoryActions {201 .titrePage .categoryActionsContainer { 199 202 float: right; 200 203 margin: 0; … … 206 209 } 207 210 211 .categoryActions { 212 display:inline; 213 padding:0; 214 } 215 208 216 .categoryActions li { 209 217 display: inline; … … 211 219 padding-left:7px; 212 220 float:left; 221 } 222 223 .categoryActions .pwg-icon{ 224 display:none; 225 } 226 227 .categoryActions li.mainAction { 228 float:right; 213 229 } 214 230 … … 699 715 } 700 716 717 #thePicturePage .pwg-button-text, 701 718 .randomButtons li { 702 719 display: inline; 703 720 vertical-align:top; 704 721 padding-left:7px; 705 float: left;722 float:right; 706 723 } 707 724 … … 1263 1280 1264 1281 #commentAdd input[type="text"], #commentAdd textarea { 1282 max-width:95%; 1265 1283 width: 95%; 1266 1284 font-size:100%; … … 1553 1571 } 1554 1572 1573 .categoryActions .selector { 1574 float:right; 1575 } 1576 1555 1577 .categoryActions .selector select { 1556 1578 position:relative; … … 1563 1585 padding:0 0 0 2px; 1564 1586 float:right; 1587 } 1588 1589 .categoryActions .menuf .flags { 1590 margin-top:0; 1565 1591 } 1566 1592 … … 1606 1632 } 1607 1633 1634 #theMapListPage .titrePage h2 { 1635 margin-left: 1em; 1636 } 1637 1608 1638 /* User Tags Plugin ---------------------------------------------------------------------------- */ 1609 1639 … … 1647 1677 } 1648 1678 1649 .stuffs_block .categoryActions img{1679 .stuffs_block .categoryActions { 1650 1680 display:none; 1651 1681 } -
extensions/stripped/themeconf.inc.php
r12153 r12321 12 12 // Need upgrade? 13 13 14 global $conf, $user ;14 global $conf, $user, $stripped; 15 15 16 16 if (!isset($conf['stripped'])) 17 17 include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php'); 18 19 $stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped ); 18 20 19 21 add_event_handler('loc_begin_page_header', 'set_config_values'); … … 21 23 function set_config_values() 22 24 { 23 global $conf, $template; 24 25 $config = unserialize( $conf['stripped'] ); 26 $template->assign( 'stripped', $config ); 25 global $template, $stripped; 26 $template->assign( 'stripped', $stripped ); 27 27 } 28 28 … … 56 56 } 57 57 58 $config = unserialize( $conf['stripped'] ); 58 if (isset($stripped['imagePreload']) && ($user['theme'] == 'stripped')) { 59 add_event_handler('loc_end_picture', 'assign_next_images_url'); 60 } 59 61 60 if (isset($config['imagePreload']) && ($user['theme'] == 'stripped')) { 61 add_event_handler('loc_end_picture', 'assign_next_images_url'); 62 function assign_next_images_url() 63 { 64 global $page, $template, $conf, $stripped; 62 65 63 function assign_next_images_url() 66 $nb_image =$stripped['imagePreloadNb']; 67 $nb_max = $page['last_rank'] - $page['current_rank']; 68 $nb_image = min ($nb_image, $nb_max); 69 70 if ($nb_image < 1) return; 71 72 for ($n = 1; $n <= $nb_image; $n++) { 73 $pagenext[$n] = $page['items'][ $page['current_rank'] + $n ]; 74 } 75 76 $picturenext = array(); 77 $idnext = array(); 78 79 for ($n = 1; $n <= $nb_image; $n++) { 80 array_push($idnext, $pagenext[$n]); 81 } 82 83 $query = ' 84 SELECT * 85 FROM '.IMAGES_TABLE.' 86 WHERE id IN ('.implode(',', $idnext).') 87 ;'; 88 89 $result = pwg_query($query); 90 91 while ($rownext = pwg_db_fetch_assoc($result)) 64 92 { 65 global $page, $template, $conf;66 67 $config = unserialize( $conf['stripped'] );68 69 $nb_image =$config['imagePreloadNb'];70 $nb_max = $page['last_rank'] - $page['current_rank'];71 $nb_image = min ($nb_image, $nb_max);72 73 if ($nb_image < 1) return;74 75 93 for ($n = 1; $n <= $nb_image; $n++) { 76 $pagenext[$n] = $page['items'][ $page['current_rank'] + $n ];94 if (isset($pagenext[$n]) and $rownext['id'] == $pagenext[$n]) {$in = $n;} 77 95 } 78 96 79 $picturenext = array();80 $ idnext = array();97 $picturenext[$in] = $rownext; 98 $picturenext[$in]['is_picture'] = false; 81 99 82 for ($n = 1; $n <= $nb_image; $n++) { 83 array_push($idnext, $pagenext[$n]); 100 if (in_array(get_extension($rownext['file']), $conf['picture_ext'])) 101 { 102 $picturenext[$in]['is_picture'] = true; 84 103 } 85 104 86 $query = ' 87 SELECT * 88 FROM '.IMAGES_TABLE.' 89 WHERE id IN ('.implode(',', $idnext).') 90 ;'; 105 $picturenext[$in]['image_url'] = get_image_url( $picturenext[$in] ); 106 } 91 107 92 $result = pwg_query($query); 93 94 while ($rownext = pwg_db_fetch_assoc($result)) 95 { 96 for ($n = 1; $n <= $nb_image; $n++) { 97 if (isset($pagenext[$n]) and $rownext['id'] == $pagenext[$n]) {$in = $n;} 98 } 99 100 $picturenext[$in] = $rownext; 101 $picturenext[$in]['is_picture'] = false; 102 103 if (in_array(get_extension($rownext['file']), $conf['picture_ext'])) 104 { 105 $picturenext[$in]['is_picture'] = true; 106 } 107 108 $picturenext[$in]['image_url'] = get_image_url( $picturenext[$in] ); 109 } 110 111 for ($n = 1; $n <= $nb_image; $n++) { 112 if (isset($picturenext[$n]['image_url'])) { $image_next[$n] = $picturenext[$n]['image_url']; } 113 } 114 115 $template->assign('U_IMGNEXT', $image_next ); 116 108 for ($n = 1; $n <= $nb_image; $n++) { 109 if (isset($picturenext[$n]['image_url'])) { $image_next[$n] = $picturenext[$n]['image_url']; } 117 110 } 111 112 $template->assign('U_IMGNEXT', $image_next ); 118 113 119 114 } 120 115 116 121 117 ?>
Note: See TracChangeset
for help on using the changeset viewer.