source: extensions/SmiliesSupport/maintain.inc.php @ 21603

Last change on this file since 21603 was 15735, checked in by mistic100, 12 years ago

update plugin_install() function
clean index.php

File size: 1.2 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4function plugin_install()
5{
6  $new_smiliessupport =  array(
7    'folder'       => 'crystal',
8    'cols'         => '6',
9    'representant' => 'smile.png',
10  );
11 
12  conf_update_param('smiliessupport', serialize($new_smiliessupport));
13}
14
15function plugin_activate()
16{
17  global $conf;
18 
19  if (strpos($conf['smiliessupport'],',') !== false)
20  {
21    $conf_smiliessupport = explode(',', $conf['smiliessupport']);
22   
23    switch ($conf_smiliessupport[0])
24    {
25      case 'plugins/SmiliesSupport/smilies': $conf_smiliessupport[0] = 'ipb'; break;
26      case 'plugins/SmiliesSupport/smilies_2': $conf_smiliessupport[0] = 'sylvia'; break;
27      default: $conf_smiliessupport[0] = 'crystal'; break;
28    }
29   
30    $new_smiliessupport =  array(
31      'folder'       => $conf_smiliessupport[0],
32      'cols'         => $conf_smiliessupport[1],
33      'representant' => $conf_smiliessupport[2],
34    );
35   
36    conf_update_param('smiliessupport', serialize($new_smiliessupport));
37  }
38}
39
40function plugin_uninstall()
41{
42  pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="smiliessupport" LIMIT 1;');
43}
44
45?>
Note: See TracBrowser for help on using the repository browser.