Repository navigation
Expand file tree
/
Copy pathmod_opensim_installerscript.php
More file actions
89 lines (80 loc) · 2.8 KB
/
Copy pathmod_opensim_installerscript.php
File metadata and controls
89 lines (80 loc) · 2.8 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
* @module OpenSim jSonStats (mod_opensim_jsonstats)
* @copyright Copyright (C) djphil 2017, Inc. All rights reserved.
* @license GNU General Public License version 2 or later.
* @creative CC-BY-NC-SA 4.0
**/
// no direct access
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
class mod_opensim_jsonstatsInstallerScript {
/**
* Constructor
*
* @param JAdapterInstance $adapter The object responsible for running this script
*/
public function __constructor(JAdapterInstance $adapter) {
}
/**
* Called before any type of action
*
* @param string $route Which action is happening (install|uninstall|discover_install)
* @param JAdapterInstance $adapter The object responsible for running this script
*
* @return boolean True on success
*/
public function preflight($route, JAdapterInstance $adapter) {
return TRUE;
}
/**
* Called after any type of action
*
* @param string $route Which action is happening (install|uninstall|discover_install)
* @param JAdapterInstance $adapter The object responsible for running this script
*
* @return boolean True on success
*/
public function postflight($route, JAdapterInstance $adapter) {
$this->description();
return TRUE;
}
/**
* Called on installation
*
* @param JAdapterInstance $adapter The object responsible for running this script
*
* @return boolean True on success
*/
public function install(JAdapterInstance $adapter) {
$this->description();
return TRUE;
}
/**
* Called on update
*
* @param JAdapterInstance $adapter The object responsible for running this script
*
* @return boolean True on success
*/
public function update(JAdapterInstance $adapter) {
// $this->description();
return TRUE;
}
/**
* Called on uninstallation
*
* @param JAdapterInstance $adapter The object responsible for running this script
*/
public function uninstall(JAdapterInstance $adapter) {
return TRUE;
}
public function description() {
$github = "https://github.com/djphil/mod_opensim_jsonstats";
$github = "<a class='btn btn-success btn-mini' target='_blank' href=".$github."><i class='icon-download'></i> GITHUB</a>\n";
echo "<p>".JText::_('MOD_OPENSIM_INSTALLER_SCRIPT')."</p>\n";
echo "<p>".JText::_('MOD_OPENSIM_JSONSTATS_GITHUB_URL_DESC')." ".$github."</p>\n";
echo "<p><img src='".JUri::base(false)."../modules/mod_opensim_jsonstats/assets/images/creative_80x15.png' alt='jopensim' height='15' width='80'></p>\n";
// echo "<p>Additionnal information ...</p>\n";
}
}
?>