source: extensions/header_manager/maintain.inc.php @ 15907

Last change on this file since 15907 was 15854, checked in by mistic100, 12 years ago

initial release

File size: 815 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4define('HEADER_MANAGER_DIR', PWG_LOCAL_DIR . 'banners/');
5
6define(
7  'header_manager_default_config', 
8  serialize(array(
9    'width' => 1000,
10    'height' => 150,
11    'image' => 'random',
12    'display' => 'image_only'
13    ))
14  );
15 
16
17function plugin_install() 
18{
19  conf_update_param('header_manager', header_manager_default_config);
20  mkdir(HEADER_MANAGER_DIR, 0755);
21}
22
23function plugin_activate()
24{
25  global $conf;
26
27  if (empty($conf['header_manager']))
28  {
29    conf_update_param('header_manager', header_manager_default_config);
30  }
31  if (!file_exists(HEADER_MANAGER_DIR)) 
32  {
33    mkdir(HEADER_MANAGER_DIR, 0755);
34  }
35}
36
37function plugin_uninstall() 
38{
39  pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "header_manager" LIMIT 1;');
40}
41
42?>
Note: See TracBrowser for help on using the repository browser.