@@ -89,7 +89,7 @@ |
||
89 | 89 | $tableData = Yaml::load($filedata); |
90 | 90 | |
91 | 91 | $count = TableLoad::countRows($table); |
92 | - if ($count<1) { |
|
92 | + if ($count < 1) { |
|
93 | 93 | TableLoad::loadTableFromArray($table, $tableData); |
94 | 94 | } |
95 | 95 | return true; |
@@ -20,8 +20,8 @@ |
||
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | 22 | // Info module |
23 | -define("_MI_USERRANK_NAME","User ranks"); |
|
24 | -define("_MI_USERRANK_DESC","You can add ranks for your users."); |
|
23 | +define("_MI_USERRANK_NAME", "User ranks"); |
|
24 | +define("_MI_USERRANK_DESC", "You can add ranks for your users."); |
|
25 | 25 | // Menu |
26 | 26 | define("_USERRANK_MI_INDEX", "Home"); |
27 | 27 | define("_USERRANK_MI_USERRANK", "User Ranks"); |
@@ -19,29 +19,29 @@ |
||
19 | 19 | * @author Cointin Maxime (AKA Kraven30) |
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | -define("_AM_USERRANK_ACTION","Action"); |
|
23 | -define("_AM_USERRANK_ADD","Add a new rank"); |
|
24 | -define("_AM_USERRANK_DELETE","Delete rank"); |
|
25 | -define("_AM_USERRANK_EDIT","Edit rank"); |
|
26 | -define("_AM_USERRANK_IMAGE","Image"); |
|
27 | -define("_AM_USERRANK_IMAGE_PATH","Files exist in: %s"); |
|
28 | -define("_AM_USERRANK_LIST","List of ranks"); |
|
29 | -define("_AM_USERRANK_MAXPOST","Max. Posts"); |
|
30 | -define("_AM_USERRANK_MINPOST","Min. Posts"); |
|
31 | -define("_AM_USERRANK_OFF","Special rank"); |
|
32 | -define("_AM_USERRANK_ON","Does not special rank"); |
|
33 | -define("_AM_USERRANK_SAVE","User rank saved Successfully!"); |
|
34 | -define("_AM_USERRANK_SPECIAL","Special Ranks"); |
|
35 | -define("_AM_USERRANK_SPECIAL_CAN","(Special ranks can be assigned to users irrespective of the number of user posts)"); |
|
36 | -define("_AM_USERRANK_SUREDEL","Are you sure you want to delete this ranking?"); |
|
37 | -define("_AM_USERRANK_TITLE","Title"); |
|
38 | -define("_AM_USERRANK_UPLOAD","Upload"); |
|
39 | -define("_AM_USERRANK_ERROR_POST","You need a positive integer"); |
|
22 | +define("_AM_USERRANK_ACTION", "Action"); |
|
23 | +define("_AM_USERRANK_ADD", "Add a new rank"); |
|
24 | +define("_AM_USERRANK_DELETE", "Delete rank"); |
|
25 | +define("_AM_USERRANK_EDIT", "Edit rank"); |
|
26 | +define("_AM_USERRANK_IMAGE", "Image"); |
|
27 | +define("_AM_USERRANK_IMAGE_PATH", "Files exist in: %s"); |
|
28 | +define("_AM_USERRANK_LIST", "List of ranks"); |
|
29 | +define("_AM_USERRANK_MAXPOST", "Max. Posts"); |
|
30 | +define("_AM_USERRANK_MINPOST", "Min. Posts"); |
|
31 | +define("_AM_USERRANK_OFF", "Special rank"); |
|
32 | +define("_AM_USERRANK_ON", "Does not special rank"); |
|
33 | +define("_AM_USERRANK_SAVE", "User rank saved Successfully!"); |
|
34 | +define("_AM_USERRANK_SPECIAL", "Special Ranks"); |
|
35 | +define("_AM_USERRANK_SPECIAL_CAN", "(Special ranks can be assigned to users irrespective of the number of user posts)"); |
|
36 | +define("_AM_USERRANK_SUREDEL", "Are you sure you want to delete this ranking?"); |
|
37 | +define("_AM_USERRANK_TITLE", "Title"); |
|
38 | +define("_AM_USERRANK_UPLOAD", "Upload"); |
|
39 | +define("_AM_USERRANK_ERROR_POST", "You need a positive integer"); |
|
40 | 40 | |
41 | 41 | // Info |
42 | -define("_AM_USERRANK_NBTOTAL","There are %s ranks in our database"); |
|
43 | -define("_AM_USERRANK_NBSPECIAL","There are %s special rank"); |
|
42 | +define("_AM_USERRANK_NBTOTAL", "There are %s ranks in our database"); |
|
43 | +define("_AM_USERRANK_NBSPECIAL", "There are %s special rank"); |
|
44 | 44 | // Tips |
45 | -define("_AM_USERRANK_TIPS","<ul><li>Add, update or delete user rank</li></ul>"); |
|
46 | -define("_AM_USERRANK_TIPS_FORM1","<ul><li>Authorized mime types: %s</li>"); |
|
47 | -define("_AM_USERRANK_TIPS_FORM2","<li>Max uploaded files size: %s KB</li></ul>"); |
|
45 | +define("_AM_USERRANK_TIPS", "<ul><li>Add, update or delete user rank</li></ul>"); |
|
46 | +define("_AM_USERRANK_TIPS_FORM1", "<ul><li>Authorized mime types: %s</li>"); |
|
47 | +define("_AM_USERRANK_TIPS_FORM2", "<li>Max uploaded files size: %s KB</li></ul>"); |
@@ -54,9 +54,9 @@ |
||
54 | 54 | $imageselect_img = new Xoops\Form\Select($imgpath_img, 'rank_image', $blank_img); |
55 | 55 | $imageselect_img->addOption($blank_img, $blank_img); |
56 | 56 | \Xoops\Core\Lists\ImageFile::setOptionsArray($imageselect_img, $xoops->path('uploads/ranks')); |
57 | - $imageselect_img->setExtra("onchange='showImgSelected(\"xo-ranks-img\", \"rank_image\", \"ranks\", \"\", \"" . \XoopsBaseConfig::get('uploads-url') . "\")'"); |
|
57 | + $imageselect_img->setExtra("onchange='showImgSelected(\"xo-ranks-img\", \"rank_image\", \"ranks\", \"\", \"".\XoopsBaseConfig::get('uploads-url')."\")'"); |
|
58 | 58 | $imgtray_img->addElement($imageselect_img, false); |
59 | - $imgtray_img->addElement(new Xoops\Form\Label('', "<br /><img src='" . \XoopsBaseConfig::get('uploads-url') . "/ranks/" . $blank_img . "' name='image_img' id='xo-ranks-img' alt='' />")); |
|
59 | + $imgtray_img->addElement(new Xoops\Form\Label('', "<br /><img src='".\XoopsBaseConfig::get('uploads-url')."/ranks/".$blank_img."' name='image_img' id='xo-ranks-img' alt='' />")); |
|
60 | 60 | |
61 | 61 | $fileseltray_img = new Xoops\Form\ElementTray('<br />', '<br /><br />'); |
62 | 62 | $fileseltray_img->addElement(new Xoops\Form\File(_AM_USERRANK_UPLOAD, 'rank_image'), false); |
@@ -172,7 +172,7 @@ |
||
172 | 172 | // Delete file |
173 | 173 | $file = $obj->getVar('avatar_file'); |
174 | 174 | if ($file !== 'avatars/blank.gif') { |
175 | - $fullname = $xoops_upload_path . '/' . $file; |
|
175 | + $fullname = $xoops_upload_path . '/' . $file; |
|
176 | 176 | if (is_file($fullname)) { |
177 | 177 | chmod($fullname, 0777); |
178 | 178 | unlink($fullname); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @author Mage Grégory (AKA Mage) |
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | -include __DIR__ . '/header.php'; |
|
24 | +include __DIR__.'/header.php'; |
|
25 | 25 | |
26 | 26 | // Get main instance |
27 | 27 | $xoops = Xoops::getInstance(); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $xoops->redirect('avatar_custom.php', 3, implode('<br />', $xoops->security()->getErrors())); |
116 | 116 | } |
117 | 117 | $uploader_avatars_img = |
118 | - new XoopsMediaUploader($xoops_upload_path . '/avatars', $mimetypes, $upload_size, $width, $height); |
|
118 | + new XoopsMediaUploader($xoops_upload_path.'/avatars', $mimetypes, $upload_size, $width, $height); |
|
119 | 119 | // Get avatar id |
120 | 120 | $avatar_id = Request::getInt('avatar_id', 0); |
121 | 121 | if ($avatar_id > 0) { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $error_msg = ''; |
127 | 127 | $obj->setVars($_POST); |
128 | 128 | if (preg_match('/^\d+$/', $_POST["avatar_weight"]) == false) { |
129 | - $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER . '<br />'; |
|
129 | + $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER.'<br />'; |
|
130 | 130 | $obj->setVar("avatar_weight", 0); |
131 | 131 | } else { |
132 | 132 | $obj->setVar("avatar_weight", Request::getInt('avatar_weight', 0)); |
@@ -140,11 +140,11 @@ discard block |
||
140 | 140 | $obj->setVar('avatar_file', 'avatars/blank.gif'); |
141 | 141 | } else { |
142 | 142 | $obj->setVar('avatar_mimetype', $uploader_avatars_img->getMediaType()); |
143 | - $obj->setVar('avatar_file', 'avatars/' . $uploader_avatars_img->getSavedFileName()); |
|
143 | + $obj->setVar('avatar_file', 'avatars/'.$uploader_avatars_img->getSavedFileName()); |
|
144 | 144 | } |
145 | 145 | } else { |
146 | 146 | $file = Request::getString('avatar_file', 'blank.gif'); |
147 | - $obj->setVar('avatar_file', 'avatars/' . $file); |
|
147 | + $obj->setVar('avatar_file', 'avatars/'.$file); |
|
148 | 148 | } |
149 | 149 | if ($error_msg == '') { |
150 | 150 | if ($avatar_Handler->insert($obj)) { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | // Delete file |
173 | 173 | $file = $obj->getVar('avatar_file'); |
174 | 174 | if ($file !== 'avatars/blank.gif') { |
175 | - $fullname = $xoops_upload_path . '/' . $file; |
|
175 | + $fullname = $xoops_upload_path.'/'.$file; |
|
176 | 176 | if (is_file($fullname)) { |
177 | 177 | chmod($fullname, 0777); |
178 | 178 | unlink($fullname); |
@@ -194,10 +194,10 @@ discard block |
||
194 | 194 | if ($avatar_id > 0) { |
195 | 195 | // Define Stylesheet |
196 | 196 | $xoops->theme()->addStylesheet('modules/system/css/admin.css'); |
197 | - $msg = '<div class="spacer"><img src="' . $xoops_upload_url . '/' |
|
197 | + $msg = '<div class="spacer"><img src="'.$xoops_upload_url.'/' |
|
198 | 198 | . $obj->getVar('avatar_file', 's') |
199 | 199 | . '" alt="" /></div><div class="txtcenter bold">' |
200 | - . $obj->getVar('avatar_name', 's') . '</div>' |
|
200 | + . $obj->getVar('avatar_name', 's').'</div>' |
|
201 | 201 | . XoopsLocale::Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM; |
202 | 202 | // Display message |
203 | 203 | echo $xoops->confirm( |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10 | 10 | */ |
11 | 11 | |
12 | - use Xmf\Request; |
|
12 | + use Xmf\Request; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * avatars module |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | // Delete file |
180 | 180 | $file = $obj->getVar('avatar_file'); |
181 | 181 | if ($file !== 'avatars/blank.gif') { |
182 | - $fullname = $xoops_upload_path . '/' . $file; |
|
182 | + $fullname = $xoops_upload_path . '/' . $file; |
|
183 | 183 | if (is_file($fullname)) { |
184 | 184 | chmod($fullname, 0777); |
185 | 185 | unlink($fullname); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @author Mage Grégory (AKA Mage) |
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | -include __DIR__ . '/header.php'; |
|
24 | +include __DIR__.'/header.php'; |
|
25 | 25 | // Get main instance |
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | $helper = Avatars::getInstance(); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $xoops->redirect('avatar_system.php', 3, implode('<br />', $xoops->security()->getErrors())); |
123 | 123 | } |
124 | 124 | $uploader_avatars_img = |
125 | - new XoopsMediaUploader($xoops_upload_path . '/avatars', $mimetypes, $upload_size, $width, $height); |
|
125 | + new XoopsMediaUploader($xoops_upload_path.'/avatars', $mimetypes, $upload_size, $width, $height); |
|
126 | 126 | // Get avatar id |
127 | 127 | $avatar_id = Request::getInt('avatar_id', 0); |
128 | 128 | if ($avatar_id > 0) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $error_msg = ''; |
134 | 134 | $obj->setVars($_POST); |
135 | 135 | if (preg_match('/^\d+$/', $_POST["avatar_weight"]) == false) { |
136 | - $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER . '<br />'; |
|
136 | + $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER.'<br />'; |
|
137 | 137 | $obj->setVar("avatar_weight", 0); |
138 | 138 | } else { |
139 | 139 | $obj->setVar("avatar_weight", Request::getInt('avatar_weight', 0)); |
@@ -147,11 +147,11 @@ discard block |
||
147 | 147 | $obj->setVar('avatar_file', 'avatars/blank.gif'); |
148 | 148 | } else { |
149 | 149 | $obj->setVar('avatar_mimetype', $uploader_avatars_img->getMediaType()); |
150 | - $obj->setVar('avatar_file', 'avatars/' . $uploader_avatars_img->getSavedFileName()); |
|
150 | + $obj->setVar('avatar_file', 'avatars/'.$uploader_avatars_img->getSavedFileName()); |
|
151 | 151 | } |
152 | 152 | } else { |
153 | 153 | $file = Request::getString('avatar_file', 'blank.gif'); |
154 | - $obj->setVar('avatar_file', 'avatars/' . $file); |
|
154 | + $obj->setVar('avatar_file', 'avatars/'.$file); |
|
155 | 155 | } |
156 | 156 | if ($error_msg == '') { |
157 | 157 | if ($avatar_Handler->insert($obj)) { |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | // Delete file |
180 | 180 | $file = $obj->getVar('avatar_file'); |
181 | 181 | if ($file !== 'avatars/blank.gif') { |
182 | - $fullname = $xoops_upload_path . '/' . $file; |
|
182 | + $fullname = $xoops_upload_path.'/'.$file; |
|
183 | 183 | if (is_file($fullname)) { |
184 | 184 | chmod($fullname, 0777); |
185 | 185 | unlink($fullname); |
@@ -201,10 +201,10 @@ discard block |
||
201 | 201 | if ($avatar_id > 0) { |
202 | 202 | // Define Stylesheet |
203 | 203 | $xoops->theme()->addStylesheet('modules/system/css/admin.css'); |
204 | - $msg = '<div class="spacer"><img src="' . $xoops_upload_url . '/' |
|
204 | + $msg = '<div class="spacer"><img src="'.$xoops_upload_url.'/' |
|
205 | 205 | . $obj->getVar('avatar_file', 's') |
206 | 206 | . '" alt="" /></div><div class="txtcenter bold">' |
207 | - . $obj->getVar('avatar_name', 's') . '</div>' |
|
207 | + . $obj->getVar('avatar_name', 's').'</div>' |
|
208 | 208 | . XoopsLocale::Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM; |
209 | 209 | // Display message |
210 | 210 | echo $xoops->confirm( |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @author Mage Grégory (AKA Mage) |
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | -include __DIR__ . '/header.php'; |
|
22 | +include __DIR__.'/header.php'; |
|
23 | 23 | // Get avatars handler |
24 | 24 | $xoops = Xoops::getInstance(); |
25 | 25 | $helper = Avatars::getInstance(); |
@@ -51,20 +51,20 @@ discard block |
||
51 | 51 | // total avatars custom |
52 | 52 | $avatars_total_c = $avatars_notdisplay_c + $avatars_display_c; |
53 | 53 | // folder path |
54 | -$folder_path = \XoopsBaseConfig::get('root-path') . '/uploads/avatars'; |
|
54 | +$folder_path = \XoopsBaseConfig::get('root-path').'/uploads/avatars'; |
|
55 | 55 | |
56 | 56 | $admin_page = new \Xoops\Module\Admin(); |
57 | 57 | $admin_page->displayNavigation('index.php'); |
58 | 58 | |
59 | 59 | $admin_page->addInfoBox(AvatarsLocale::SYSTEM, 'avatar_system'); |
60 | 60 | $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_S, $avatars_total_s), 'avatar_system'); |
61 | -$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_S, '<span class="green">' . $avatars_display_s . '</span>'), 'avatar_system'); |
|
62 | -$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_S, '<span class="red">' . $avatars_notdisplay_s . '</span>'), 'avatar_system'); |
|
61 | +$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_S, '<span class="green">'.$avatars_display_s.'</span>'), 'avatar_system'); |
|
62 | +$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_S, '<span class="red">'.$avatars_notdisplay_s.'</span>'), 'avatar_system'); |
|
63 | 63 | |
64 | 64 | $admin_page->addInfoBox(AvatarsLocale::CUSTOM, 'avatar_custom'); |
65 | 65 | $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_C, $avatars_total_c), 'avatar_custom'); |
66 | -$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_C, '<span class="green">' . $avatars_display_c . '</span>'), 'avatar_custom'); |
|
67 | -$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_C, '<span class="red">' . $avatars_notdisplay_c . '</span>'), 'avatar_custom'); |
|
66 | +$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_C, '<span class="green">'.$avatars_display_c.'</span>'), 'avatar_custom'); |
|
67 | +$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_C, '<span class="red">'.$avatars_notdisplay_c.'</span>'), 'avatar_custom'); |
|
68 | 68 | |
69 | 69 | $admin_page->addConfigBoxLine($folder_path, 'folder'); |
70 | 70 | $admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod'); |
@@ -19,4 +19,4 @@ |
||
19 | 19 | * @author Mage Grégory (AKA Mage) |
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
22 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | // paypal |
44 | 44 | $modversion['paypal'] = array( |
45 | 45 | 'business' => '[email protected]', |
46 | - 'item_name' => 'Donation : ' . AvatarsLocale::MODULE_DESC, |
|
46 | + 'item_name' => 'Donation : '.AvatarsLocale::MODULE_DESC, |
|
47 | 47 | 'amount' => 0, |
48 | 48 | 'currency_code' => 'USD', |
49 | 49 | ); |