Changeset 10825 for extensions/hr_os_xl


Ignore:
Timestamp:
May 9, 2011, 5:05:57 PM (13 years ago)
Author:
flop25
Message:

adding an admin page for the header based on P@t's work

Location:
extensions/hr_os_xl
Files:
29 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/hr_os_xl/local_head.tpl

    r9281 r10825  
    22        <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie5-ie6.css">
    33<![endif]-->
     4{if isset($display_hr_os_xl_banner) and (!$display_hr_os_xl_banner)}
     5<style type="text/css">
     6#{$BODY_ID}{literal} #theHeader { {/literal}
     7          background: url("{$ROOT_URL}themes/hr_os_xl/img/header_b.jpg") no-repeat scroll center top transparent;{literal}
     8    height: 20px;
     9    margin: 0 auto;
     10}{/literal}
     11#{$BODY_ID}{literal} #theHeader * {
     12        display:none;
     13}{/literal}
     14</style>
     15{/if}
  • extensions/hr_os_xl/themeconf.inc.php

    r9670 r10825  
    2424}
    2525
     26// thx to P@t
     27add_event_handler('loc_begin_page_header', 'set_hr_os_xl_header');
     28
     29function set_hr_os_xl_header()
     30{
     31  global $page, $conf, $template;
     32
     33  $config = unserialize($conf['hr_os_xl']);
     34
     35  if (isset($page['body_id']) and $page['body_id'] == 'theCategoryPage')
     36  {
     37    $header = isset($page['category']) ? $config['categories'] : $config['home'];
     38  }
     39  elseif (isset($page['body_id']) and $page['body_id'] == 'thePicturePage')
     40  {
     41    $header = $config['picture'];
     42  }
     43  else
     44  {
     45    $header = $config['other'];
     46  }
     47
     48  $template->assign('display_hr_os_xl_banner', $header);
     49}
    2650// thx to Vdigital and his plugin spreadmenus
    2751if ( !function_exists( 'add_menu_on_public_pages' ) ) {
Note: See TracChangeset for help on using the changeset viewer.