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

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

update plugin_install() function
clean index.php

File size: 1.2 KB
RevLine 
[3304]1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4function plugin_install()
5{
[15735]6  $new_smiliessupport =  array(
7    'folder'       => 'crystal',
8    'cols'         => '6',
9    'representant' => 'smile.png',
10  );
11 
12  conf_update_param('smiliessupport', serialize($new_smiliessupport));
[14526]13}
14
15function plugin_activate()
16{
[10986]17  global $conf;
[14526]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));
[10986]37  }
[3304]38}
39
40function plugin_uninstall()
41{
[14526]42  pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="smiliessupport" LIMIT 1;');
[3304]43}
[9683]44
45?>
Note: See TracBrowser for help on using the repository browser.