Changeset 10826 for extensions/hr_os


Ignore:
Timestamp:
05/09/11 17:08:05 (9 years ago)
Author:
flop25
Message:

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

Location:
extensions/hr_os
Files:
29 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/hr_os/local_head.tpl

    r9280 r10826  
    22        <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie5-ie6.css"> 
    33<![endif]--> 
     4{if isset($display_hr_os_banner) and (!$display_hr_os_banner)} 
     5<style type="text/css"> 
     6#{$BODY_ID}{literal} #theHeader { {/literal} 
     7          background: url("{$ROOT_URL}themes/hr_os/img/header.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/themeconf.inc.php

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