@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_TRUST_PATH')) { |
|
4 | - die('set XOOPS_TRUST_PATH into mainfile.php') ; |
|
3 | +if (!defined('XOOPS_TRUST_PATH')) { |
|
4 | + die('set XOOPS_TRUST_PATH into mainfile.php'); |
|
5 | 5 | } |
6 | 6 | |
7 | -$mydirname = basename(dirname(__DIR__)) ; |
|
8 | -$mydirpath = dirname(__DIR__) ; |
|
7 | +$mydirname = basename(dirname(__DIR__)); |
|
8 | +$mydirpath = dirname(__DIR__); |
|
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | -$mytrustdirname = 'altsys' ; |
|
10 | +$mytrustdirname = 'altsys'; |
|
11 | 11 | |
12 | -require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/blocks.php' ; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/blocks.php'; |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_TRUST_PATH')) { |
|
4 | - die('set XOOPS_TRUST_PATH into mainfile.php') ; |
|
3 | +if (!defined('XOOPS_TRUST_PATH')) { |
|
4 | + die('set XOOPS_TRUST_PATH into mainfile.php'); |
|
5 | 5 | } |
6 | 6 | |
7 | -$mydirname = basename(dirname(__DIR__)) ; |
|
8 | -$mydirpath = dirname(__DIR__) ; |
|
7 | +$mydirname = basename(dirname(__DIR__)); |
|
8 | +$mydirpath = dirname(__DIR__); |
|
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | -$mytrustdirname = 'altsys' ; |
|
10 | +$mytrustdirname = 'altsys'; |
|
11 | 11 | |
12 | -require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onupdate.php' ; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onupdate.php'; |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_TRUST_PATH')) { |
|
4 | - die('set XOOPS_TRUST_PATH into mainfile.php') ; |
|
3 | +if (!defined('XOOPS_TRUST_PATH')) { |
|
4 | + die('set XOOPS_TRUST_PATH into mainfile.php'); |
|
5 | 5 | } |
6 | 6 | |
7 | -$mydirname = basename(dirname(__DIR__)) ; |
|
8 | -$mydirpath = dirname(__DIR__) ; |
|
7 | +$mydirname = basename(dirname(__DIR__)); |
|
8 | +$mydirpath = dirname(__DIR__); |
|
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | -$mytrustdirname = 'altsys' ; |
|
10 | +$mytrustdirname = 'altsys'; |
|
11 | 11 | |
12 | -require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/oninstall.php' ; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/oninstall.php'; |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_TRUST_PATH')) { |
|
4 | - die('set XOOPS_TRUST_PATH into mainfile.php') ; |
|
3 | +if (!defined('XOOPS_TRUST_PATH')) { |
|
4 | + die('set XOOPS_TRUST_PATH into mainfile.php'); |
|
5 | 5 | } |
6 | 6 | |
7 | -$mydirname = basename(dirname(__DIR__)) ; |
|
8 | -$mydirpath = dirname(__DIR__) ; |
|
7 | +$mydirname = basename(dirname(__DIR__)); |
|
8 | +$mydirpath = dirname(__DIR__); |
|
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | -$mytrustdirname = 'altsys' ; |
|
10 | +$mytrustdirname = 'altsys'; |
|
11 | 11 | |
12 | -require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onuninstall.php' ; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onuninstall.php'; |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_TRUST_PATH')) { |
|
4 | - die('set XOOPS_TRUST_PATH into mainfile.php') ; |
|
3 | +if (!defined('XOOPS_TRUST_PATH')) { |
|
4 | + die('set XOOPS_TRUST_PATH into mainfile.php'); |
|
5 | 5 | } |
6 | 6 | |
7 | -$mydirname = basename(dirname(__DIR__)) ; |
|
8 | -$mydirpath = dirname(__DIR__) ; |
|
7 | +$mydirname = basename(dirname(__DIR__)); |
|
8 | +$mydirpath = dirname(__DIR__); |
|
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | -$mytrustdirname = 'altsys' ; |
|
10 | +$mytrustdirname = 'altsys'; |
|
11 | 11 | |
12 | -require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/include/Legacy_AltsysAdminRenderSystem.class.php' ; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/include/Legacy_AltsysAdminRenderSystem.class.php'; |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_TRUST_PATH')) { |
|
4 | - die('set XOOPS_TRUST_PATH into mainfile.php') ; |
|
3 | +if (!defined('XOOPS_TRUST_PATH')) { |
|
4 | + die('set XOOPS_TRUST_PATH into mainfile.php'); |
|
5 | 5 | } |
6 | 6 | |
7 | -$mydirname = basename(dirname(__DIR__)) ; |
|
8 | -$mydirpath = dirname(__DIR__) ; |
|
7 | +$mydirname = basename(dirname(__DIR__)); |
|
8 | +$mydirpath = dirname(__DIR__); |
|
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | -$mytrustdirname = 'altsys' ; |
|
10 | +$mytrustdirname = 'altsys'; |
|
11 | 11 | |
12 | -require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/preload.php' ; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/preload.php'; |
@@ -5,9 +5,9 @@ discard block |
||
5 | 5 | //$langman->read( 'modinfo.php' , 'altsys' , 'altsys' ) ; |
6 | 6 | |
7 | 7 | if (file_exists(__DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php')) { |
8 | - include_once __DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php' ; |
|
8 | + include_once __DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php'; |
|
9 | 9 | } elseif (file_exists(__DIR__.'/language/english/modinfo.php')) { |
10 | - include_once __DIR__.'/language/english/modinfo.php' ; |
|
10 | + include_once __DIR__.'/language/english/modinfo.php'; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | $controllers = array( |
@@ -20,4 +20,4 @@ discard block |
||
20 | 20 | 'mytplsform', |
21 | 21 | 'put_templates', |
22 | 22 | 'mylangadmin' |
23 | -) ; |
|
23 | +); |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__.'/MyBlocksAdmin.class.php' ; |
|
3 | +require_once __DIR__.'/MyBlocksAdmin.class.php'; |
|
4 | 4 | |
5 | 5 | class MyBlocksAdminForX20S extends MyBlocksAdmin |
6 | 6 | { |
7 | 7 | |
8 | - public $block_positions = array() ; |
|
8 | + public $block_positions = array(); |
|
9 | 9 | |
10 | 10 | public function MyBlocksAadminForX20S() |
11 | 11 | { |
@@ -14,20 +14,20 @@ discard block |
||
14 | 14 | |
15 | 15 | public function construct() |
16 | 16 | { |
17 | - parent::construct() ; |
|
17 | + parent::construct(); |
|
18 | 18 | |
19 | - @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php' ; |
|
19 | + @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php'; |
|
20 | 20 | $this->block_positions = array( |
21 | - -1 => _NONE , |
|
22 | - 0 => _AM_SBLEFT , |
|
23 | - 1 => _AM_SBRIGHT , |
|
24 | - 3 => _AM_CBLEFT , |
|
25 | - 4 => _AM_CBRIGHT , |
|
26 | - 5 => _AM_CBCENTER , |
|
27 | - 7 => _AM_CBBOTTOMLEFT , |
|
28 | - 8 => _AM_CBBOTTOMRIGHT , |
|
21 | + -1 => _NONE, |
|
22 | + 0 => _AM_SBLEFT, |
|
23 | + 1 => _AM_SBRIGHT, |
|
24 | + 3 => _AM_CBLEFT, |
|
25 | + 4 => _AM_CBRIGHT, |
|
26 | + 5 => _AM_CBCENTER, |
|
27 | + 7 => _AM_CBBOTTOMLEFT, |
|
28 | + 8 => _AM_CBBOTTOMRIGHT, |
|
29 | 29 | 9 => _AM_CBBOTTOM |
30 | - ) ; |
|
30 | + ); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | //HACK by domifara for php5.3+ |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | static $instance; |
38 | 38 | if (!isset($instance)) { |
39 | 39 | $instance = new MyBlocksAdminForX20S(); |
40 | - $instance->construct() ; |
|
40 | + $instance->construct(); |
|
41 | 41 | } |
42 | 42 | return $instance; |
43 | 43 | } |
@@ -50,19 +50,19 @@ discard block |
||
50 | 50 | return " |
51 | 51 | <table style='width:80px;'> |
52 | 52 | <tr> |
53 | - <td rowspan='2'>".$this->renderRadio4BlockPosition(0, $block_data) . '</td> |
|
54 | - <td>' . $this->renderRadio4BlockPosition(3, $block_data) . '</td> |
|
55 | - <td>' . $this->renderRadio4BlockPosition(5, $block_data) . '</td> |
|
56 | - <td>' . $this->renderRadio4BlockPosition(4, $block_data) . "</td> |
|
57 | - <td rowspan='2'>".$this->renderRadio4BlockPosition(1, $block_data) . '</td> |
|
53 | + <td rowspan='2'>".$this->renderRadio4BlockPosition(0, $block_data).'</td> |
|
54 | + <td>' . $this->renderRadio4BlockPosition(3, $block_data).'</td> |
|
55 | + <td>' . $this->renderRadio4BlockPosition(5, $block_data).'</td> |
|
56 | + <td>' . $this->renderRadio4BlockPosition(4, $block_data)."</td> |
|
57 | + <td rowspan='2'>".$this->renderRadio4BlockPosition(1, $block_data).'</td> |
|
58 | 58 | </tr> |
59 | 59 | <tr> |
60 | - <td>' . $this->renderRadio4BlockPosition(7, $block_data) . '</td> |
|
61 | - <td>' . $this->renderRadio4BlockPosition(9, $block_data) . '</td> |
|
62 | - <td>' . $this->renderRadio4BlockPosition(8, $block_data) . "</td> |
|
60 | + <td>' . $this->renderRadio4BlockPosition(7, $block_data).'</td> |
|
61 | + <td>' . $this->renderRadio4BlockPosition(9, $block_data).'</td> |
|
62 | + <td>' . $this->renderRadio4BlockPosition(8, $block_data)."</td> |
|
63 | 63 | </tr> |
64 | 64 | <tr> |
65 | - <td colspan='5'>".$this->renderRadio4BlockPosition(-1, $block_data)._NONE . '</td> |
|
65 | + <td colspan='5'>".$this->renderRadio4BlockPosition(-1, $block_data)._NONE.'</td> |
|
66 | 66 | </tr> |
67 | 67 | </table>'; |
68 | 68 | } |
@@ -73,18 +73,18 @@ discard block |
||
73 | 73 | { |
74 | 74 | $bid = (int)$block_data['bid']; |
75 | 75 | $visible = (int)$block_data['visible']; |
76 | - $current_side = $visible ? (int)$block_data['side'] : -1 ; |
|
76 | + $current_side = $visible ? (int)$block_data['side'] : -1; |
|
77 | 77 | |
78 | - $label4disp = htmlspecialchars($this->block_positions[ $target_side ], ENT_QUOTES) ; |
|
78 | + $label4disp = htmlspecialchars($this->block_positions[$target_side], ENT_QUOTES); |
|
79 | 79 | |
80 | 80 | if ($current_side == $target_side) { |
81 | - $checked = "checked='checked'" ; |
|
81 | + $checked = "checked='checked'"; |
|
82 | 82 | $divstyle = $target_side == -1 ? 'disabled' : 'selected'; |
83 | 83 | } else { |
84 | 84 | $checked = ''; |
85 | 85 | $divstyle = 'unselected'; |
86 | 86 | } |
87 | 87 | |
88 | - return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>" ; |
|
88 | + return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>"; |
|
89 | 89 | } |
90 | 90 | } |
@@ -91,6 +91,9 @@ |
||
91 | 91 | |
92 | 92 | |
93 | 93 | // private |
94 | +/** |
|
95 | + * @param integer $target_side |
|
96 | + */ |
|
94 | 97 | public function renderRadio4BlockPosition($target_side, $block_data) |
95 | 98 | { |
96 | 99 | $bid = (int)$block_data['bid']; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__.'/MyBlocksAdmin.class.php' ; |
|
3 | +require_once __DIR__.'/MyBlocksAdmin.class.php'; |
|
4 | 4 | |
5 | 5 | class MyBlocksAdminForX22 extends MyBlocksAdmin |
6 | 6 | { |
@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | |
13 | 13 | public function construct() |
14 | 14 | { |
15 | - parent::construct() ; |
|
15 | + parent::construct(); |
|
16 | 16 | |
17 | - @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php' ; |
|
17 | + @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php'; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | //HACK by domifara for php5.3+ |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | static $instance; |
25 | 25 | if (!isset($instance)) { |
26 | 26 | $instance = new MyBlocksAdminForX22(); |
27 | - $instance->construct() ; |
|
27 | + $instance->construct(); |
|
28 | 28 | } |
29 | 29 | return $instance; |
30 | 30 | } |