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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.