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

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

fix possible warnings when activating
clean index.php

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