Changeset 3802


Ignore:
Timestamp:
08/29/09 21:23:43 (10 years ago)
Author:
vdigital
Message:

Admin new parameters (Not functional)

Location:
extensions/akBookStyle/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/akBookStyle/trunk/admin.php

    r3792 r3802  
    3737  } 
    3838 
    39   if (!empty($_POST['ak_thumbnail_size']) && intval($_POST['ak_thumbnail_size'])!=$me->ak_thumbnail_size) { 
    40     $me->ak_thumbnail_size = intval($_POST['ak_thumbnail_size']); 
     39  if (!empty($_POST['ak_thumbnail_size']) && $_POST['ak_thumbnail_size']!=$me->ak_thumbnail_size) { 
     40    $me->ak_thumbnail_size = (int) $_POST['ak_thumbnail_size']; 
    4141    array_push($GLOBALS['page']['infos'], $lang['ak_thumbnail_size_changed']); 
     42    $save_config = true; 
     43  } 
     44 
     45  if (!empty($_POST['ak_show_over']) && $_POST['ak_show_over']!=$me->ak_show_over) { 
     46    $me->ak_show_over = ($_POST['ak_show_over']=='true')?'true':'false'; 
     47    array_push($GLOBALS['page']['infos'], $lang['ak_show_over_changed']); 
     48    $save_config = true; 
     49  } 
     50 
     51  if (!empty($_POST['ak_thumbnails_loc']) && $_POST['ak_thumbnails_loc']!=$me->ak_thumbnails_loc) { 
     52    $me->ak_thumbnails_loc = (in_array($_POST['ak_thumbnails_loc'],array('top','left','bottom','right')))?$_POST['ak_thumbnails_loc']:'left'; 
     53    array_push($GLOBALS['page']['infos'], $lang['ak_thumbnails_loc_changed']); 
    4254    $save_config = true; 
    4355  } 
     
    4759  } 
    4860} 
    49  
    5061$GLOBALS['template']->set_filenames(array('plugin_admin_content' => AK_PLUGIN_TEMPLATE . '/admin.tpl')); 
    5162$GLOBALS['template']->assign('AK_PLUGIN_CSS', AK_PLUGIN_CSS);  
    5263$GLOBALS['template']->assign('AK_BY_LINE', $me->ak_by_line);  
    5364$GLOBALS['template']->assign('AK_THUMBNAIL_SIZE', $me->ak_thumbnail_size);  
     65$GLOBALS['template']->assign('AK_SHOW_OVER', $me->ak_show_over);  
     66$GLOBALS['template']->assign('AK_THUMBNAILS_LOC', $me->ak_thumbnails_loc);  
    5467$GLOBALS['template']->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 
    5568?> 
  • extensions/akBookStyle/trunk/css/ak_admin_style.css

    r3791 r3802  
    44} 
    55 
    6 fieldset p {  
    7   text-align: left; 
     6fieldset p.field {  
     7  text-align: center; 
    88} 
     9 
     10fieldset p.field  input[type="radio"], fieldset p.field  input[type="checkbox"] { 
     11  margin:0 3px 0 15px; 
     12} 
  • extensions/akBookStyle/trunk/default_values.inc.php

    r3792 r3802  
    2727$default_values['ak_by_line'] = 2; 
    2828$default_values['ak_thumbnail_size'] = 100; 
     29$default_values['ak_show_over'] = 'true'; 
     30$default_values['ak_thumbnails_loc'] = 'left'; 
    2931?> 
  • extensions/akBookStyle/trunk/include/akConfig.class.php

    r3791 r3802  
    8484 
    8585    foreach ($default_values as $key => $value) { 
    86       if (empty($this->config[$key])) { 
     86      if (!isset($this->config[$key]) or empty($this->config[$key])) { 
    8787        $this->config[$key] = $value; 
    8888      } 
  • extensions/akBookStyle/trunk/language/en_UK/plugin.lang.php

    r3792 r3802  
    1010$lang['ak_thumbnail_size'] = "Thumbnail size"; 
    1111$lang['ak_by_line_changed'] = "Thumbnail size has been updated"; 
     12 
     13$lang['ak_show_over'] = "Over mode"; 
     14$lang['ak_show_over_changed'] = "Over mode has been changed"; 
     15$lang['ak_thumbnails_loc'] = "Thumbnails location"; 
     16$lang['ak_thumbnails_loc_changed'] = "Thumbnails location has been changed"; 
     17$lang['Top'] = "Top"; 
     18$lang['Left'] = "Left"; 
     19$lang['Bottom'] = "Bottom"; 
     20$lang['Right'] = "Right"; 
     21 
    1222?> 
  • extensions/akBookStyle/trunk/language/fr_FR/plugin.lang.php

    r3792 r3802  
    1010$lang['ak_thumbnail_size'] = "Taille des imagettes"; 
    1111$lang['ak_by_line_changed'] = "La taille des imagette a été mis à jour"; 
     12 
     13 
     14$lang['ak_show_over'] = "Mode survol"; 
     15$lang['ak_show_over_changed'] = "Mode survol modifié."; 
     16$lang['ak_thumbnails_loc'] = "Position des miniatures"; 
     17$lang['ak_thumbnails_loc_changed'] = "Position des miniatures modifiée."; 
     18$lang['Top'] = "Top"; 
     19$lang['Left'] = "Left"; 
     20$lang['Bottom'] = "Bottom"; 
     21$lang['Right'] = "Right"; 
    1222?> 
  • extensions/akBookStyle/trunk/template/admin.tpl

    r3792 r3802  
    2424    </label> 
    2525  </p> 
     26  <p class="field"> 
     27    <label>{'ak_show_over'|@translate} 
     28   {html_radios name='ak_show_over' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$AK_SHOW_OVER} 
     29    </label> 
     30  </p> 
     31  <p class="field"> 
     32    <label>{'ak_thumbnails_loc'|@translate} 
     33   {html_radios name='ak_thumbnails_loc' values='top,left,bottom,right'|@explode output='Top,Left,Bottom,Right'|@explode|translate selected=$AK_THUMBNAILS_LOC} 
     34    </label> 
     35  </p> 
    2636</fieldset> 
    2737 
Note: See TracChangeset for help on using the changeset viewer.