Changeset 9964


Ignore:
Timestamp:
04/01/11 22:33:48 (9 years ago)
Author:
Zaphod
Message:

[extension] stripped - version 1.3.0

Location:
extensions/stripped
Files:
1 added
2 deleted
2 edited

Legend:

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

    r9134 r9964  
    33load_language('theme.lang', PHPWG_THEMES_PATH.'stripped/'); 
    44 
    5 include_once('conf.class.inc.php'); 
    6  
    7 $config = new Conf(); 
    8 $config->setFileName(PHPWG_ROOT_PATH."themes/stripped/conf/default.conf"); 
    9 $config->read(); 
    10 $config->setFileName(PHPWG_ROOT_PATH."local/themes/stripped/conf/local.conf"); 
    11 $config->read(false); 
    12   
    13 $template->assign('options', $config->getConf()); 
    14  
    15 $post=array(); 
     5$config= array (); 
    166 
    177if(isset($_POST['submit_stripped'])) 
    188{ 
    19         $post['hideMenu']=isset($_POST['f_hideMenu']); 
    20         $post['animatedMenu']=isset($_POST['f_animatedMenu']); 
    21         $post['animatedTabs']=isset($_POST['f_animatedTabs']); 
    22         $post['replaceActionIcons']=isset($_POST['f_replaceActionIcons']); 
    23         $post['showTitleOnBrowsePath']=isset($_POST['f_showTitleOnBrowsePath']); 
    24         $post['showDescriptionInsteadOfTitle']=isset($_POST['f_showDescriptionInsteadOfTitle']); 
    25         $post['infoTabAdminOnly']=isset($_POST['f_infoTabAdminOnly']); 
    26         $post['imageAutosize']=isset($_POST['f_imageAutosize']); 
    27         $post['imageAutosizeTitle']=isset($_POST['f_imageAutosizeTitle']); 
    28         if (isset($_POST['f_imageAutosizeMargin'])) { $post['imageAutosizeMargin']=intval($_REQUEST['f_imageAutosizeMargin']); } 
    29         if (isset($_POST['f_imageAutosizeMinHeight'])) { $post['imageAutosizeMinHeight']=intval($_REQUEST['f_imageAutosizeMinHeight']); } 
     9        $config['hideMenu']=isset($_POST['f_hideMenu']); 
     10        $config['animatedMenu']=isset($_POST['f_animatedMenu']); 
     11        $config['animatedTabs']=isset($_POST['f_animatedTabs']); 
     12        $config['replaceActionIcons']=isset($_POST['f_replaceActionIcons']); 
     13        $config['showTitleOnBrowsePath']=isset($_POST['f_showTitleOnBrowsePath']); 
     14        $config['showDescriptionInsteadOfTitle']=isset($_POST['f_showDescriptionInsteadOfTitle']); 
     15        $config['useNavigationArrows']=isset($_POST['f_useNavigationArrows']); 
     16        $config['infoTabAdminOnly']=isset($_POST['f_infoTabAdminOnly']); 
     17        $config['imageAutosize']=isset($_POST['f_imageAutosize']); 
     18        $config['imageAutosizeTitle']=isset($_POST['f_imageAutosizeTitle']); 
     19        if (isset($_POST['f_imageAutosizeMargin'])) { $config['imageAutosizeMargin']=intval($_REQUEST['f_imageAutosizeMargin']); } 
     20        if (isset($_POST['f_imageAutosizeMinHeight'])) { $config['imageAutosizeMinHeight']=intval($_REQUEST['f_imageAutosizeMinHeight']); } 
     21        $config['navThumbsFade']=150; 
     22        $config['marginContainer']=30; 
     23        $config['paddingContainer']=10; 
     24        $config['defaultZoomSize']='full'; 
     25        $config['highResClickMode']='zoom'; 
    3026 
    31         $config->setConf($post); 
    32         $config->write(); 
    33         $template->assign('options', $post); 
     27         
     28        $query = ' 
     29UPDATE '.CONFIG_TABLE.' 
     30SET value = "'.addslashes(serialize($config)).'" 
     31WHERE param = "stripped" 
     32;'; 
     33  pwg_query($query); 
    3434 
    35         array_push($page['infos'], l10n('stripped Configuration updated')); 
     35  array_push($page['infos'], l10n('Information data registered in database')); 
     36 
     37  load_conf_from_db(); 
    3638} 
    3739 
    38         $template->set_filenames(array( 
     40$template->set_filenames(array( 
    3941    'theme_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
    4042 
    41         $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content'); 
     43$template->assign('options', unserialize($conf['stripped'])); 
     44 
     45$template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content'); 
    4246   
    4347?> 
  • extensions/stripped/admin/admin.tpl

    r9134 r9964  
    3838                                </label></li> 
    3939                                <li><label> 
     40                                        <span class="property">{'Use arrows instead of navigation thumbnails'|@translate}</span>&nbsp; 
     41                                        <input type="checkbox" name="f_useNavigationArrows" {if $options.useNavigationArrows}checked{/if}> 
     42                                </label></li> 
     43                                <li><label> 
    4044                                        <span class="property">{'Show Information tab only to admins'|@translate}</span>&nbsp; 
    4145                                        <input type="checkbox" name="f_infoTabAdminOnly" {if $options.infoTabAdminOnly}checked{/if}> 
Note: See TracChangeset for help on using the changeset viewer.