-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbullets_setup.php
74 lines (58 loc) · 1.37 KB
/
bullets_setup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Custom install/uninstall/update routines for bullets plugin
**
*/
if(!class_exists("bullets_setup"))
{
class bullets_setup
{
function install_pre($var)
{
// print_a($var);
// echo "custom install 'pre' function<br /><br />";
}
/**
* For inserting default database content during install after table has been created by the bullets_sql.php file.
*/
function install_post($var)
{
$ret = e107::getXml(true)->e107Import(e_PLUGIN."bullets/xml/install.xml");
if(!empty($ret['success']))
{
e107::getMessage()->addSuccess("Default slides imported.");
}
if(!empty($ret['failed']))
{
e107::getMessage()->addError("Failed to import default slides.");
}
}
function uninstall_options()
{
/*$listoptions = array(0=>'option 1',1=>'option 2');
$options = array();
$options['mypref'] = array(
'label' => 'Custom Uninstall Label',
'preview' => 'Preview Area',
'helpText' => 'Custom Help Text',
'itemList' => $listoptions,
'itemDefault' => 1
);
return $options;*/
}
function uninstall_post($var)
{
// print_a($var);
}
function upgrade_post($var)
{
// $sql = e107::getDb();
}
}
}