@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @author trabis <[email protected]> |
19 | 19 | */ |
20 | 20 | |
21 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
21 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
22 | 22 | |
23 | 23 | $xoops = Xoops::getInstance(); |
24 | 24 | $xoops->header(); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | 'caption' => 'Sub Cat', |
160 | 160 | 'name' => 'select_subcat', |
161 | 161 | 'size' => 5, |
162 | - 'value' => [2,4,6], |
|
162 | + 'value' => [2, 4, 6], |
|
163 | 163 | 'option' => [ |
164 | 164 | 1 => 'Sub 1', |
165 | 165 | 2 => 'Sub 2', |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author trabis <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $code = new Xoops\Form\Text('Code', 'code', 2, 25, '', 'Code...'); |
41 | 41 | $code->setDescription('Description code'); |
42 | 42 | $code->setPattern('^.{3,}$', 'You need at least 3 characters'); |
43 | -$code->setDatalist(array('list 1','list 2','list 3')); |
|
43 | +$code->setDatalist(array('list 1', 'list 2', 'list 3')); |
|
44 | 44 | $tab1->addElement($code, true); |
45 | 45 | |
46 | 46 | $password = new Xoops\Form\Password('Password', 'password', null, null, '', 'off', 'Enter Password'); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $checkbox->setDescription('Description Checkbox'); |
87 | 87 | $tab3->addElement($checkbox, true); |
88 | 88 | |
89 | -$label= new Xoops\Form\Label('Label', 'label', 'label'); |
|
89 | +$label = new Xoops\Form\Label('Label', 'label', 'label'); |
|
90 | 90 | $label->setDescription('Description Label'); |
91 | 91 | $tab3->addElement($label, true); |
92 | 92 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author trabis <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -28,5 +28,5 @@ discard block |
||
28 | 28 | See how Codex module hooks into the menus module just by using this codex/class/plugin/menus.php |
29 | 29 | "; |
30 | 30 | |
31 | -\Xoops\Utils::dumpFile(__DIR__ . '/class/plugin/menus.php'); |
|
31 | +\Xoops\Utils::dumpFile(__DIR__.'/class/plugin/menus.php'); |
|
32 | 32 | $xoops->footer(); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @author trabis <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @link http://xoops.org |
20 | 20 | */ |
21 | 21 | |
22 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
22 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
23 | 23 | |
24 | 24 | $xoops = Xoops::getInstance(); |
25 | 25 | $xoops->header(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // we can add any HTML attributes to the img tag |
52 | 52 | $attributes = ['class' => 'img-thumbnail', 'title' => Territory::getName($country)]; |
53 | 53 | $img = $xoops->service('countryflag')->getImgTag($country, $attributes)->getValue(); |
54 | -echo $img . '<br /><br />'; |
|
54 | +echo $img.'<br /><br />'; |
|
55 | 55 | |
56 | 56 | if (!$xoops->service('countryflag')->isAvailable()) { |
57 | 57 | echo 'Please install a countryflag provider to view this demonstration.'; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | use Xmf\Module\Helper\Permission; |
24 | 24 | use Xmf\Module\Helper\Session; |
25 | 25 | |
26 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
26 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
27 | 27 | |
28 | 28 | $xoops = Xoops::getInstance(); |
29 | 29 | $xoops->header(); |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | if ($sessionHelper) { |
35 | 35 | $var = $sessionHelper->get('fred'); |
36 | 36 | if ($var) { |
37 | - echo sprintf('Clearing session variable value of "%s"', $var) . '<br />'; |
|
37 | + echo sprintf('Clearing session variable value of "%s"', $var).'<br />'; |
|
38 | 38 | $sessionHelper->destroy(); |
39 | 39 | } else { |
40 | 40 | $var = date('Y-m-d H:i:s'); |
41 | - echo sprintf('Session variable not set. Setting as: %s', $var) . '<br />'; |
|
41 | + echo sprintf('Session variable not set. Setting as: %s', $var).'<br />'; |
|
42 | 42 | $sessionHelper->set('fred', $var); |
43 | 43 | } |
44 | 44 | } |
@@ -47,15 +47,15 @@ discard block |
||
47 | 47 | $permissionHelper = new Permission(); |
48 | 48 | if ($permissionHelper) { |
49 | 49 | // this is the name and item we are going to work with |
50 | - $permissionName='fred'; |
|
51 | - $permissionItemId=1; |
|
50 | + $permissionName = 'fred'; |
|
51 | + $permissionItemId = 1; |
|
52 | 52 | |
53 | 53 | // if this is a post operation get the input and save it |
54 | - if ('POST'===Request::getMethod()) { |
|
54 | + if ('POST' === Request::getMethod()) { |
|
55 | 55 | echo $xoops->alert('success', 'Permission updated'); |
56 | 56 | // save the data |
57 | - $name=$permissionHelper->defaultFieldName($permissionName, $permissionItemId); |
|
58 | - $groups=Request::getVar($name, array(), 'POST'); |
|
57 | + $name = $permissionHelper->defaultFieldName($permissionName, $permissionItemId); |
|
58 | + $groups = Request::getVar($name, array(), 'POST'); |
|
59 | 59 | $permissionHelper->savePermissionForItem($permissionName, $permissionItemId, $groups); |
60 | 60 | } |
61 | 61 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | if ($permissionHelper->checkPermission($permissionName, $permissionItemId)) { |
83 | 83 | echo "<p>You have the <strong>'$permissionName'</strong> permission for the 'codex' module.</p>"; |
84 | 84 | } else { |
85 | - echo "<p>You <em>DO NOT</em> have the <strong>'$permissionName'</strong> " . |
|
85 | + echo "<p>You <em>DO NOT</em> have the <strong>'$permissionName'</strong> ". |
|
86 | 86 | "permission for the 'codex' module.</p>"; |
87 | 87 | } |
88 | 88 | } |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | echo '<h2>Metagen</h2>'; |
91 | 91 | |
92 | 92 | //define a title and article to work with |
93 | -$keywords=''; |
|
94 | -$title="xmf - the XOOPS Module Framework"; |
|
95 | -$article =<<<EOT |
|
93 | +$keywords = ''; |
|
94 | +$title = "xmf - the XOOPS Module Framework"; |
|
95 | +$article = <<<EOT |
|
96 | 96 | xmf - XOOPS Module Framework |
97 | 97 | |
98 | 98 | XMF is Copyright © 2011-2018 The XOOPS Project |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | echo '<h4>Extracted Description</h4>'; |
123 | 123 | // get the intro of the article to use as the description |
124 | 124 | $description = Metagen::generateDescription($article, 50); |
125 | -echo '<p>' . $description . '</p>'; |
|
125 | +echo '<p>'.$description.'</p>'; |
|
126 | 126 | |
127 | 127 | echo '<h4>SEO Slug</h4>'; |
128 | 128 | // turn title into a slug |
129 | -echo '<p>' . Metagen::generateSeoTitle($title) . '</p>'; |
|
129 | +echo '<p>'.Metagen::generateSeoTitle($title).'</p>'; |
|
130 | 130 | |
131 | 131 | // highlight keywords in article |
132 | 132 | echo '<h4>Article with Top 25 Keywords Highlighted</h4>'; |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @author Mage Grégory (AKA Mage) |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @link http://xoops.org |
17 | 17 | */ |
18 | 18 | |
19 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
19 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
20 | 20 | |
21 | 21 | $xoops = Xoops::getInstance(); |
22 | 22 | $xoops->header(); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author Laurent JEN (aka DuGris) |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -31,5 +31,5 @@ discard block |
||
31 | 31 | </ul> |
32 | 32 | "; |
33 | 33 | |
34 | -\Xoops\Utils::dumpFile(__DIR__ . '/class/plugin/system.php'); |
|
34 | +\Xoops\Utils::dumpFile(__DIR__.'/class/plugin/system.php'); |
|
35 | 35 | $xoops->footer(); |