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

Revision 14526, 1.1 KB checked in by mistic100, 8 years ago (diff)

update for 2.4

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