plugins/EnaniumBackgrounds.php
changeset 3 f0a844799a0c
parent 2 178d22e361d6
equal deleted inserted replaced
2:178d22e361d6 3:f0a844799a0c
    14 $plugins->attachHook('enanium_main_header', 'enanium_paint_bg_controls();');
    14 $plugins->attachHook('enanium_main_header', 'enanium_paint_bg_controls();');
    15 $plugins->attachHook('compile_template', 'enanium_add_headers();');
    15 $plugins->attachHook('compile_template', 'enanium_add_headers();');
    16 $plugins->attachHook('acl_rule_init', '$this->addAdminNode("adm_cat_appearance", "enaniumbg_acppage", "EnaniumConfig", scriptPath . "/plugins/enaniumbg/icons/garden.png");');
    16 $plugins->attachHook('acl_rule_init', '$this->addAdminNode("adm_cat_appearance", "enaniumbg_acppage", "EnaniumConfig", scriptPath . "/plugins/enaniumbg/icons/garden.png");');
    17 
    17 
    18 $ebg_system_images = array('default', 'aqua', 'blinds', 'dune', 'freshflower', 'garden', 'greenmeadow', 'ladybird', 'raindrops', 'storm', 'twowings', 'wood', 'yellowflower');
    18 $ebg_system_images = array('default', 'aqua', 'blinds', 'dune', 'freshflower', 'garden', 'greenmeadow', 'ladybird', 'raindrops', 'storm', 'twowings', 'wood', 'yellowflower');
    19 $ebg_images = array();
    19 $ebg_images = array('default');
    20 
    20 
    21 $ebg_outsiders = array();
    21 $ebg_outsiders = array();
    22 if ( $dr = @opendir(ENANO_ROOT . '/plugins/enaniumbg') )
    22 if ( $dr = @opendir(ENANO_ROOT . '/plugins/enaniumbg') )
    23 {
    23 {
    24   while ( $dh = @readdir($dr) )
    24   while ( $dh = @readdir($dr) )
   145   global $lang;
   145   global $lang;
   146   
   146   
   147   if ( isset($_POST['enanium_bg']) )
   147   if ( isset($_POST['enanium_bg']) )
   148   {
   148   {
   149     $bg = $_POST['enanium_bg'];
   149     $bg = $_POST['enanium_bg'];
   150     if ( file_exists(ENANO_ROOT . "/plugins/enaniumbg/$bg.jpg") )
   150     if ( file_exists(ENANO_ROOT . "/plugins/enaniumbg/$bg.jpg") || $bg === 'default' )
   151       setConfig('enanium_bg', $bg);
   151       setConfig('enanium_bg', $bg);
   152     
   152     
   153     $val = isset($_POST['show_switcher']) ? '1' : '0';
   153     $val = isset($_POST['show_switcher']) ? '1' : '0';
   154     setConfig('enanium_show_switcher', $val);
   154     setConfig('enanium_show_switcher', $val);
   155     
   155