Changeset 12321


Ignore:
Timestamp:
Oct 2, 2011, 10:12:02 PM (13 years ago)
Author:
Zaphod
Message:

version 1.5.0 update

Location:
extensions/stripped
Files:
2 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped/admin/admin.inc.php

    r12153 r12321  
    1717        $config['animatedMenu']=isset($_POST['f_animatedMenu']);
    1818        $config['animatedTabs']=isset($_POST['f_animatedTabs']);
    19         $config['replaceActionIcons']=isset($_POST['f_replaceActionIcons']);
    2019        $config['noLowercase']=!isset($_POST['f_forceLowercase']);
    2120        $config['showThumbLegend']=isset($_POST['f_showThumbLegend']);
  • extensions/stripped/admin/admin.tpl

    r12153 r12321  
    1919                                        <span class="property">{'Animate tabs on picture page'|@translate}</span>&nbsp;
    2020                                        <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>&nbsp;
    24                                         <input type="checkbox" name="f_replaceActionIcons" {if $options.replaceActionIcons}checked{/if}>
    2521                                </label></li>
    2622                                <li><label>
  • extensions/stripped/admin/maintain.inc.php

    r12153 r12321  
    1111        'animatedMenu'                                  => true,
    1212        'animatedTabs'                                  => true,
    13         'replaceActionIcons'                    => true,
    1413        'noLowercase'                                   => false,
    1514        'showThumbLegend'                               => false,
  • extensions/stripped/admin/upgrade.inc.php

    r12153 r12321  
    1111        'animatedMenu'                                  => true,
    1212        'animatedTabs'                                  => true,
    13         'replaceActionIcons'                    => true,
    1413        'noLowercase'                                   => false,
    1514        'showThumbLegend'                               => false,
  • extensions/stripped/js/scripts-tcp.js

    r9960 r12321  
    7878        }
    7979       
    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        
    9780        // gmaps icon
    9881       
  • extensions/stripped/js/scripts-tpp.js

    r11982 r12321  
    2727        }
    2828       
    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 
    4629        // gmaps icon
    4730       
  • extensions/stripped/local_head.tpl

    r12153 r12321  
     1{php}
     2        global $template, $stripped;
     3        $template->assign( 'stripped', $stripped );
     4{/php}
     5
    16{if $load_css}
    27        <!--[if lt IE 7]>
     
    2631        {/if}
    2732
    28         {if ($BODY_ID=='theMapListPage')}
    29                 {combine_script id='scripts-tml' load='header' require='jquery' path='themes/stripped/js/scripts-tml.js'}
    30         {/if}
    3133        {if isset($stripped.imagePreload)}
    3234                {combine_script id='preload' load='header' require='jquery' path='themes/stripped/js/preload.js'}
  • extensions/stripped/readme.txt

    r12153 r12321  
    3232- new option: preload images (from 1 to 10 images)
    3333- new option to choose HD display mode (fit to screen / 1:1)
    34 - some minor layout change
     34- some minor layout changes
    3535- bug correction
    3636
  • extensions/stripped/template/footer.tpl

    r11833 r12321  
    3333
    3434                {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>
    3636                {/if}
    3737
  • extensions/stripped/template/index.tpl

    r12269 r12321  
    55        </div>
    66        {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>
    1921        {/if}
    2022        {php}
  • extensions/stripped/template/picture.tpl

    r12153 r12321  
    2424        </div>
    2525    <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}
    2738                {strip}{if isset($favorite) }
    2839                        <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>
    2943        {/if}{/strip}
    3044                {strip}{if isset($current.U_DOWNLOAD)}
    3145                        <li><a href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}">{'download'|@translate}</a></li>
    3246                {/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>
    6871                {php}
    6972                        global $pwg_loaded_plugins;
     
    7174                {/php}
    7275                {if ($GMaps_loaded)}<div id="text_gmaps" style="display:none">{'GMap'|@translate}</div>{/if}
    73     </ul>
    7476        <div style="clear:both;"></div>
    7577</div> <!-- imageHeaderBar -->
     
    166168                                {/if}
    167169                                {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>
    169171                                {/if}
    170172                        </ul>
  • extensions/stripped/template/picture_content.tpl

    r12153 r12321  
    11{php}
    2         global $pwg_loaded_plugins, $conf;
     2        global $pwg_loaded_plugins, $conf, $stripped;
    33        $this->assign('HDShadowbox_loaded', isset($pwg_loaded_plugins[ 'HDShadowbox' ]));
    4         $config = unserialize( $conf['stripped'] );
    5         $this->assign( 'stripped', $config );
     4        $this->assign( 'stripped', $stripped );
    65{/php}
    76{if isset($high)}
  • extensions/stripped/template/thumbnails.tpl

    r12153 r12321  
    11{if !empty($thumbnails)}
    22{php}
    3         global $pwg_loaded_plugins, $conf;
     3        global $pwg_loaded_plugins, $conf, $stripped;
    44        $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 );
    76{/php}
    87<ul class="thumbList">
  • extensions/stripped/theme.css

    r12153 r12321  
    193193  float: left;
    194194  max-height: 16px;
     195}
     196
     197#thePicturePage .titrePage img {
    195198  margin: 0 5px;
    196199}
    197200
    198 .titrePage .categoryActions {
     201.titrePage .categoryActionsContainer {
    199202  float: right;
    200203  margin: 0;
     
    206209}
    207210
     211.categoryActions {
     212        display:inline;
     213        padding:0;
     214}
     215
    208216.categoryActions li {
    209217  display: inline;
     
    211219  padding-left:7px;
    212220  float:left;
     221}
     222
     223.categoryActions .pwg-icon{
     224        display:none;
     225}
     226
     227.categoryActions li.mainAction {
     228        float:right;
    213229}
    214230
     
    699715}
    700716
     717#thePicturePage .pwg-button-text,
    701718.randomButtons li {
    702719        display: inline;
    703720        vertical-align:top;
    704721        padding-left:7px;
    705         float:left;
     722        float:right;
    706723}
    707724
     
    12631280
    12641281#commentAdd input[type="text"], #commentAdd textarea {
     1282        max-width:95%;
    12651283        width: 95%;
    12661284        font-size:100%;
     
    15531571}
    15541572
     1573.categoryActions .selector {
     1574        float:right;
     1575}
     1576
    15551577.categoryActions .selector select {
    15561578        position:relative;
     
    15631585        padding:0 0 0 2px;
    15641586        float:right;
     1587}
     1588
     1589.categoryActions .menuf .flags {
     1590        margin-top:0;
    15651591}
    15661592
     
    16061632}
    16071633
     1634#theMapListPage .titrePage h2 {
     1635        margin-left: 1em;
     1636}
     1637
    16081638/* User Tags Plugin ---------------------------------------------------------------------------- */
    16091639
     
    16471677}
    16481678
    1649 .stuffs_block .categoryActions  img {
     1679.stuffs_block .categoryActions  {
    16501680        display:none;
    16511681}
  • extensions/stripped/themeconf.inc.php

    r12153 r12321  
    1212// Need upgrade?
    1313
    14 global $conf, $user;
     14global $conf, $user, $stripped;
    1515
    1616if (!isset($conf['stripped']))
    1717  include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php');
     18
     19$stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped );
    1820
    1921add_event_handler('loc_begin_page_header', 'set_config_values');
     
    2123function set_config_values()
    2224{
    23         global $conf, $template;
    24 
    25         $config = unserialize( $conf['stripped'] );
    26         $template->assign( 'stripped', $config );
     25        global $template, $stripped;
     26        $template->assign( 'stripped', $stripped );
    2727}
    2828       
     
    5656}
    5757
    58 $config = unserialize( $conf['stripped'] );
     58if (isset($stripped['imagePreload']) && ($user['theme'] == 'stripped')) {
     59        add_event_handler('loc_end_picture', 'assign_next_images_url');
     60}
    5961
    60 if (isset($config['imagePreload']) && ($user['theme'] == 'stripped')) {
    61         add_event_handler('loc_end_picture', 'assign_next_images_url');
     62function assign_next_images_url()
     63{
     64        global $page, $template, $conf, $stripped;
    6265
    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))
    6492        {
    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 
    7593                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;}
    7795                }
    7896
    79                 $picturenext = array();
    80                 $idnext = array();
     97                $picturenext[$in] = $rownext;
     98                $picturenext[$in]['is_picture'] = false;
    8199
    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;
    84103                }
    85104
    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        }
    91107
    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']; }
    117110        }
     111 
     112  $template->assign('U_IMGNEXT', $image_next );
    118113
    119114}
    120115
     116
    121117?>
Note: See TracChangeset for help on using the changeset viewer.