Changeset 17012


Ignore:
Timestamp:
Jul 25, 2012, 3:20:09 PM (8 years ago)
Author:
mistic100
Message:

-clean up table when a banner or a category is deleted
-force centered text on banner

Location:
extensions/header_manager
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/header_manager/admin/config.php

    r15854 r17012  
    4040    }
    4141   
     42    $query = '
     43DELETE FROM '.HEADER_MANAGER_TABLE.'
     44  WHERE image = "'.$_GET['delete_banner'].'"
     45;';
     46    pwg_query($query);
     47   
    4248    array_push($page['infos'], l10n('Banner deleted'));
    4349  }
  • extensions/header_manager/include/functions.inc.php

    r16687 r17012  
    112112}
    113113
     114/**
     115 * clean table when categroies are delete
     116 */
     117function header_manager_delete_categories($ids)
     118{
     119  $query = '
     120DELETE FROM '.HEADER_MANAGER_TABLE.'
     121  WHERE category_id IN('.implode(',', $ids).')
     122;';
     123  pwg_query($query);
     124}
     125
    114126?>
  • extensions/header_manager/include/header_manager.inc.php

    r16983 r17012  
    8787    $template->append('head_elements',
    8888'<style type="text/css">
    89 #theHeader div.banner { background:transparent url(\''.$banner['PATH'].'\') center center no-repeat;height:'.$banner['SIZE'][1].'px;line-height:'.($banner['SIZE'][1]-12).'px;font-size:2.5em;color:#fff;text-shadow:0 0 5px #000; }
     89#theHeader div.banner { background:transparent url(\''.$banner['PATH'].'\') center center no-repeat;height:'.$banner['SIZE'][1].'px;line-height:'.($banner['SIZE'][1]-12).'px;font-size:2.5em;color:#fff;text-shadow:0 0 5px #000;text-align:center; }
    9090</style>'
    9191      );
  • extensions/header_manager/main.inc.php

    r16937 r17012  
    3535    add_event_handler('tabsheet_before_select', 'header_manager_tab', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
    3636    add_event_handler('get_admin_plugin_menu_links', 'header_manager_admin_menu');
     37    add_event_handler('delete_categories', 'header_manager_delete_categories');
    3738  }
    3839}
Note: See TracChangeset for help on using the changeset viewer.