source: extensions/TweetThis/maintain.inc.php @ 20400

Last change on this file since 20400 was 15993, checked in by mistic100, 12 years ago

fix possible warnings when activating
clean index.php

File size: 758 bytes
Line 
1<?php
2function plugin_install()
3{
4  $tweet_conf = array(
5    'size' => 'small',
6    'position' => 'toolbar',
7    'count' => true,
8    'via' => null,
9    );
10     
11  conf_update_param('TweetThis', serialize($tweet_conf));
12}
13
14function plugin_activate()
15{
16  global $conf;
17 
18  if (@unserialize($conf['TweetThis']) === false)
19  {
20    $tweet_conf = explode(',', $conf['TweetThis']);
21    $tweet_conf = array(
22      'size' => 'small',
23      'position' => $tweet_conf[1],
24      'count' => $tweet_conf[1]=='horizontal' || $tweet_conf[1]=='vertical',
25      'via' => null,
26      );
27     
28    conf_update_param('TweetThis', serialize($tweet_conf));
29  }
30}
31
32function plugin_uninstall()
33{
34  pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param="TweetThis" LIMIT 1;');
35}
36
37?>
Note: See TracBrowser for help on using the repository browser.