Changeset 3842


Ignore:
Timestamp:
09/13/09 13:30:09 (10 years ago)
Author:
vdigital
Message:

Add config values.
'ak_by_page' is operational. (bug 1162)
'ak_categories' is not active currently.

Location:
extensions/akBookStyle/trunk
Files:
7 edited

Legend:

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

    r3806 r3842  
    3535 
    3636if (!empty($_POST['submit'])) { 
     37  if (!empty($_POST['ak_categories']) && $_POST['ak_categories']!=$me->ak_categories) { 
     38    $me->ak_categories = $_POST['ak_categories']; 
     39    array_push($GLOBALS['page']['infos'], $lang['ak_categories_changed']); 
     40    $save_config = true; 
     41  } 
     42 
     43  if (!empty($_POST['ak_by_page']) && intval($_POST['ak_by_page'])!=$me->ak_by_page) { 
     44    $me->ak_by_page = intval($_POST['ak_by_page']); 
     45    array_push($GLOBALS['page']['infos'], $lang['ak_by_page_changed']); 
     46    $save_config = true; 
     47  } 
     48 
    3749  if (!empty($_POST['ak_by_line']) && intval($_POST['ak_by_line'])!=$me->ak_by_line) { 
    3850    $me->ak_by_line = intval($_POST['ak_by_line']); 
     
    6577$GLOBALS['template']->set_filenames(array('plugin_admin_content' => AK_PLUGIN_TEMPLATE . '/admin.tpl')); 
    6678$GLOBALS['template']->assign('AK_PLUGIN_CSS', AK_PLUGIN_CSS);  
     79$GLOBALS['template']->assign('AK_CATEGORIES', $me->ak_categories);  
     80$GLOBALS['template']->assign('AK_BY_PAGE', $me->ak_by_page);  
    6781$GLOBALS['template']->assign('AK_BY_LINE', $me->ak_by_line);  
    6882$GLOBALS['template']->assign('AK_THUMBNAIL_SIZE', $me->ak_thumbnail_size);  
  • extensions/akBookStyle/trunk/default_values.inc.php

    r3806 r3842  
    2424  die('Hacking attempt!'); 
    2525} 
    26  
     26$default_values['ak_categories'] = '<!--Book-->'; 
     27$default_values['ak_by_page'] = 10; 
    2728$default_values['ak_by_line'] = 2; 
    2829$default_values['ak_thumbnail_size'] = 100; 
  • extensions/akBookStyle/trunk/include/akContent.class.php

    r3838 r3842  
    3636  } 
    3737 
     38  public function user_force() { 
     39    $GLOBALS['user']['nb_image_page'] = $this->plugin_config->ak_by_page; 
     40  } 
     41 
    3842  public function loc_begin_index_thumbnails($images) { 
    39     global $template, $page; 
    40  
     43    global $template; 
    4144    $this->category_url = make_index_url(array('section' => 'category', 
    4245                 'category' => $GLOBALS['page']['category'], 
  • extensions/akBookStyle/trunk/language/en_UK/plugin.lang.php

    r3806 r3842  
    66 
    77$lang['ak_general_config'] = "Main configuration"; 
     8$lang['ak_categories'] = "Category name selection mask (<!--Book--> by default)"; 
     9$lang['ak_categories_changed'] = "Selection mask has been updated"; 
     10$lang['ak_by_page'] = "Number of thumbnails per page"; 
     11$lang['ak_by_page_changed'] = "Thumbnails per page has been updated"; 
     12 
    813$lang['ak_by_line'] = "Number of column"; 
    914$lang['ak_by_line_changed'] = "Number of column has been updated"; 
  • extensions/akBookStyle/trunk/language/fr_FR/plugin.lang.php

    r3811 r3842  
    66 
    77$lang['ak_general_config'] = "Configuration générale"; 
     8$lang['ak_categories'] = "Masque de sélection sur le nom des catégories (<!--Book--> par défaut)"; 
     9$lang['ak_categories_changed'] = "Le masque de sélection a été modifié."; 
     10$lang['ak_by_page'] = "Nombre des miniatures par page"; 
     11$lang['ak_by_page_changed'] = "Le nombre des miniatures par page a été modifié."; 
     12 
    813$lang['ak_by_line'] = "Nombre de colonnes"; 
    9 $lang['ak_by_line_changed'] = "Le nombre de colonne a été mis à jour"; 
    10 $lang['ak_thumbnail_size'] = "Taille des imagettes"; 
    11 $lang['ak_thumbnail_size_changed'] = "La taille des imagette a été mis à jour"; 
     14$lang['ak_by_line_changed'] = "Le nombre de colonne a été modifié"; 
     15$lang['ak_thumbnail_size'] = "Taille des miniatures"; 
     16$lang['ak_thumbnail_size_changed'] = "La taille des miniatures a été modifié."; 
    1217 
    1318$lang['ak_event_click'] = "clic"; 
  • extensions/akBookStyle/trunk/public.php

    r3813 r3842  
    3737                  2             
    3838                  ); 
     39add_event_handler('init',  
     40                  array($public_content, 'user_force') 
     41                  ); 
    3942?> 
  • extensions/akBookStyle/trunk/template/admin.tpl

    r3806 r3842  
    1414<fieldset> 
    1515  <legend>{'ak_general_config'|translate}</legend> 
     16  <p class="field"> 
     17    <label>{'ak_categories'|translate} 
     18      <input type="text" name="ak_categories" value="{$AK_CATEGORIES}">  
     19    </label> 
     20  </p> 
     21  <p class="field"> 
     22    <label>{'ak_by_page'|translate} 
     23      <input type="text" name="ak_by_page" value="{$AK_BY_PAGE}">  
     24    </label> 
     25  </p> 
    1626  <p class="field"> 
    1727    <label>{'ak_by_line'|translate} 
Note: See TracChangeset for help on using the changeset viewer.