Ignore:
Timestamp:
Nov 1, 2010, 3:16:26 PM (13 years ago)
Author:
patdenice
Message:

Main block can be hidden according to user status or user group.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PWG_Stuffs/include/class.inc.php

    r7402 r7540  
    5454    else return;
    5555
     56    if (!$page['is_homepage'])
     57    {
     58      $query .= ' OR id = 0';
     59    }
     60
    5661    $query .= '
    5762ORDER BY pos ASC;';
     
    7378      {
    7479                $this->pos = 'end';
    75         if (!empty($module['datas'])
    76           and $datas = unserialize($module['datas'])
    77           and $datas['hide'])
    78         {
    79           add_event_handler('loc_end_index', 'hide_main_block');
    80         }
    8180                continue;
    8281        }
     
    103102      $block['TEMPLATE'] = 'stuffs_'.strtolower($module['type']).'.tpl';
    104103        $this->set_tpl_block($block, $module);
     104    }
     105    if ($this->pos == 'begin')
     106    {
     107      add_event_handler('loc_end_index', 'hide_main_block');
    105108    }
    106109  }
Note: See TracChangeset for help on using the changeset viewer.