Ignore:
Timestamp:
Jan 28, 2012, 6:45:06 PM (12 years ago)
Author:
Zaphod
Message:

version 2.1.0

Location:
extensions/stripped/admin
Files:
4 edited

Legend:

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

    r12547 r12960  
    11<?php
    2 
    3 // Need upgrade?
    42
    53global $conf;
    64
     5// Need upgrade?
    76if (!isset($conf['stripped']))
    87  include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php');
     8
     9$stripped = unserialize( $conf['stripped'] );
     10
     11// Need upgrade from v1.x?
     12if (!isset($stripped['themeStyle'])) {
     13        include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php');
     14        $stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped );
     15}
     16
     17// Need upgrade from v2.x?
     18if (!isset($stripped['paramVersion'])) {
     19        include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php');
     20        $stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped );
     21}
    922
    1023load_language('theme.lang', PHPWG_THEMES_PATH.'stripped/');
     
    1427if(isset($_POST['submit_stripped']))
    1528{
     29        $config['paramVersion']='2.1';
     30
    1631        $config['themeStyle']=$_POST['f_themeStyle'];
    1732        $config['hideMenu']=isset($_POST['f_hideMenu']);
    1833        $config['animatedMenu']=isset($_POST['f_animatedMenu']);
    1934        $config['noLowercase']=!isset($_POST['f_forceLowercase']);
     35        $config['albumType']=$_POST['f_albumType'];
     36        $config['albumFrame']=isset($_POST['f_albumFrame']);
    2037        $config['thumbFrame']=isset($_POST['f_thumbFrame']);
    2138        $config['showThumbLegend']=isset($_POST['f_showThumbLegend']);
  • extensions/stripped/admin/admin.tpl

    r12547 r12960  
    2727                                        <span class="property">{'Force text to lowercase'|@translate}</span>&nbsp;
    2828                                        <input type="checkbox" name="f_forceLowercase" {if !($options.noLowercase)}checked{/if}>
     29                                </label></li>
     30                                <li><label>
     31                                        <span class="property">{'Album list layout'|@translate}</span>&nbsp;
     32                                        <select name="f_albumType" style="min-width:150px;">
     33                                                <option value="small" {if ($options.albumType=="small")}selected{/if}>{'5 albums per row (no album description)'|@translate}</option>
     34                                                <option value="3perline" {if ($options.albumType=="3perline")}selected{/if}>{'3 albums per row (description below thumbnail)'|@translate}</option>
     35                                                <option value="2perline" {if ($options.albumType=="2perline")}selected{/if}>{'2 albums per row (description beside thumbnail)'|@translate}</option>
     36                                                <option value="1perline" {if ($options.albumType=="1perline")}selected{/if}>{'1 album per row (description beside thumbnail)'|@translate}</option>
     37                                        </select>
     38                                </label></li>
     39                                <li><label>
     40                                        <span class="property">{'Display frame around albums'|@translate}</span>&nbsp;
     41                                        <input type="checkbox" name="f_albumFrame" {if $options.albumFrame}checked{/if}>
    2942                                </label></li>
    3043                                <li><label>
  • extensions/stripped/admin/maintain.inc.php

    r12547 r12960  
    88  {
    99    $config = array(
     10        'paramVersion'                                  => '2.1',
     11       
    1012        'themeStyle'                                    => 'black',
    1113        'hideMenu'                                              => true,
    1214        'animatedMenu'                                  => true,
    1315        'noLowercase'                                   => false,
     16        'albumType'                                             => 'small',
     17        'albumFrame'                                    => true,
    1418        'thumbFrame'                                    => true,
    1519        'showThumbLegend'                               => false,
  • extensions/stripped/admin/upgrade.inc.php

    r12547 r12960  
    88{
    99    $config = array(
     10        'paramVersion'                                  => '2.1',
     11       
    1012        'themeStyle'                                    => 'black',
    1113        'hideMenu'                                              => true,
    1214        'animatedMenu'                                  => true,
    1315        'noLowercase'                                   => false,
     16        'albumType'                                             => 'small',
     17        'albumFrame'                                    => true,
    1418        'thumbFrame'                                    => true,
    1519        'showThumbLegend'                               => false,
     
    6569                conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
    6670       
     71        } else {
     72                if (isset($stripped['themeStyle']) & (!isset($stripped['paramVersion']))) {
     73
     74                        $config = $stripped;
     75                        $config['paramVersion']='2.1';
     76                        $config['albumType']='small';
     77                        $config['albumFrame']=$config['thumbFrame'];
     78                         
     79                        conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
     80               
     81                }
     82
    6783        }
    68 }
    6984
     85        }
    7086?>
Note: See TracChangeset for help on using the changeset viewer.