Changeset 17734


Ignore:
Timestamp:
09/04/12 11:32:44 (7 years ago)
Author:
mistic100
Message:

new option to completely remove banner on photo pages

Location:
extensions/header_manager
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/header_manager/admin/config.php

    r17012 r17734  
    1515  if ($_POST['display'] == 'with_text') 
    1616  { 
    17     conf_update_param('page_banner', $_POST['conf_page_banner']); 
    1817    $conf['page_banner'] = $_POST['conf_page_banner']; 
     18    conf_update_param('page_banner', $conf['page_banner']); 
    1919  } 
    2020   
    21   $conf['header_manager']['image'] = $_POST['image']; 
    22   $conf['header_manager']['display'] = $_POST['display']; 
     21  $conf['header_manager'] = array( 
     22    'width' => $conf['header_manager']['width'], 
     23    'height' => $conf['header_manager']['height'], 
     24    'image' => $_POST['image'], 
     25    'display' => $_POST['display'], 
     26    'banner_on_picture' => isset($_POST['banner_on_picture']), 
     27    ); 
    2328  conf_update_param('header_manager', serialize($conf['header_manager'])); 
    2429   
     
    6570  'BANNER_IMAGE' => $conf['header_manager']['image'], 
    6671  'BANNER_DISPLAY' => $conf['header_manager']['display'], 
     72  'BANNER_ON_PICTURE' => $conf['header_manager']['banner_on_picture'] 
    6773  )); 
    6874 
  • extensions/header_manager/admin/template/config.tpl

    r17644 r17734  
    2929      <i>{'Put <b>%header_manager%</b> where you want to display the image.'|@translate}</i> 
    3030    </div> 
     31     
     32    <label><input style="margin-top:20px;" type="checkbox" name="banner_on_picture" value="true" {if $BANNER_ON_PICTURE}checked="checked"{/if}> <b>{'Display banner on photo page'|@translate}</b></label> 
    3133  </fieldset> 
    3234   
  • extensions/header_manager/include/header_manager.inc.php

    r17644 r17734  
    88{ 
    99  global $conf, $user, $template, $page; 
     10   
     11  if ( script_basename() == 'picture' and !$conf['header_manager']['banner_on_picture'] ) 
     12  { 
     13    return null; 
     14  } 
    1015   
    1116  // search banner for a specific category 
  • extensions/header_manager/include/install.inc.php

    r17659 r17734  
    1313      'height' => 150, 
    1414      'image' => 'random', 
    15       'display' => 'image_only' 
     15      'display' => 'image_only', 
     16      'banner_on_picture' => true, 
    1617      )); 
    1718     
    1819    conf_update_param('header_manager', $header_manager_default_config); 
    1920    $conf['header_manager'] = $header_manager_default_config; 
     21  } 
     22  else 
     23  { 
     24    $new_conf = unserialize($conf['header_manager']); 
     25    if (!isset($new_conf['banner_on_picture'])) 
     26    { 
     27      $new_conf['banner_on_picture'] = true; 
     28      $conf['header_manager'] = serialize($new_conf); 
     29      conf_update_param('header_manager', $conf['header_manager']); 
     30    } 
    2031  } 
    2132 
  • extensions/header_manager/language/en_UK/plugin.lang.php

    r16937 r17734  
    3030$lang['No banner added yet'] = 'No banner added yet'; 
    3131$lang['Add a banner'] = 'Add a banner'; 
     32$lang['Display banner on photo page'] = 'Display banner on photo page'; 
    3233 
    3334$lang['Default banner'] = 'Default banner'; 
  • extensions/header_manager/language/fr_FR/plugin.lang.php

    r16937 r17734  
    3030$lang['No banner added yet'] = 'Aucune bannière ajoutée'; 
    3131$lang['Add a banner'] = 'Ajouter une bannière'; 
     32$lang['Display banner on photo page'] = 'Afficher la bannière sur la page des photos'; 
    3233 
    3334$lang['Default banner'] = 'Bannière par défaut'; 
  • extensions/header_manager/main.inc.php

    r17655 r17734  
    1616define('HEADER_MANAGER_DIR',     PWG_LOCAL_DIR . 'banners/'); 
    1717define('HEADER_MANAGER_TABLE',   $prefixeTable . 'category_banner'); 
    18 define('HEADER_MANAGER_VERSION', '1.0.3'); 
     18define('HEADER_MANAGER_VERSION', '1.0.4'); 
    1919 
    2020 
Note: See TracChangeset for help on using the changeset viewer.