@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @author trabis <[email protected]> |
26 | 26 | * @author Sina Asghari (AKA stranger) <[email protected]> |
27 | 27 | */ |
28 | -require_once __DIR__ . '/header.php'; |
|
28 | +require_once __DIR__.'/header.php'; |
|
29 | 29 | $xoops = Xoops::getInstance(); |
30 | 30 | $xoops->disableErrorReporting(); |
31 | 31 | |
@@ -73,6 +73,6 @@ discard block |
||
73 | 73 | $xoops->service('htmltopdf')->setKeywords($itemObj->getVar('meta_keywords')); |
74 | 74 | $xoops->service('htmltopdf')->setSubject($categoryObj->getVar('name')); |
75 | 75 | $xoops->service('htmltopdf')->addHtml($content); |
76 | -$name = $itemObj->getVar('short_url') . '.pdf'; |
|
76 | +$name = $itemObj->getVar('short_url').'.pdf'; |
|
77 | 77 | $xoops->service('htmltopdf')->outputPdfInline($name); |
78 | 78 | exit(); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @author Taiwen Jiang <[email protected]> |
25 | 25 | * @version $Id$ |
26 | 26 | */ |
27 | -require_once __DIR__ . '/header.php'; |
|
27 | +require_once __DIR__.'/header.php'; |
|
28 | 28 | $xoops = Xoops::getInstance(); |
29 | 29 | |
30 | 30 | $helper = Helper::getInstance(); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | //Checking general permissions |
35 | 35 | $xoopsConfigSearch = $xoops->getConfigs(); |
36 | 36 | if (empty($xoopsConfigSearch['enable_search'])) { |
37 | - $xoops->redirect(PUBLISHER_URL . '/index.php', 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
37 | + $xoops->redirect(PUBLISHER_URL.'/index.php', 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $groups = $xoops->getUserGroups(); |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | } |
94 | 94 | } |
95 | 95 | if (0 == count($queries)) { |
96 | - $xoops->redirect(PUBLISHER_URL . '/search.php', 2, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch['keyword_min'])); |
|
96 | + $xoops->redirect(PUBLISHER_URL.'/search.php', 2, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch['keyword_min'])); |
|
97 | 97 | exit(); |
98 | 98 | } |
99 | 99 | } else { |
100 | 100 | if (mb_strlen($query) < $xoopsConfigSearch['keyword_min']) { |
101 | - $xoops->redirect(PUBLISHER_URL . '/search.php', 2, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch['keyword_min'])); |
|
101 | + $xoops->redirect(PUBLISHER_URL.'/search.php', 2, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch['keyword_min'])); |
|
102 | 102 | exit(); |
103 | 103 | } |
104 | 104 | $queries = [$query]; |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | if (!empty($search_username)) { |
111 | 111 | $uname_required = true; |
112 | 112 | $search_username = $search_username; |
113 | - if (!$result = $xoopsDB->query('SELECT uid FROM ' . $xoopsDB->prefix('users') . ' WHERE uname LIKE ' . $xoopsDB->quoteString("%$search_username%"))) { |
|
114 | - $xoops->redirect(PUBLISHER_URL . '/search.php', 1, _CO_PUBLISHER_ERROR); |
|
113 | + if (!$result = $xoopsDB->query('SELECT uid FROM '.$xoopsDB->prefix('users').' WHERE uname LIKE '.$xoopsDB->quoteString("%$search_username%"))) { |
|
114 | + $xoops->redirect(PUBLISHER_URL.'/search.php', 1, _CO_PUBLISHER_ERROR); |
|
115 | 115 | exit(); |
116 | 116 | } |
117 | 117 | $uid = []; |
@@ -156,29 +156,29 @@ discard block |
||
156 | 156 | unset($next_search); |
157 | 157 | unset($items); |
158 | 158 | } |
159 | - $search_url = $helper->url('search.php?' . $paras); |
|
159 | + $search_url = $helper->url('search.php?'.$paras); |
|
160 | 160 | |
161 | 161 | if (count($results)) { |
162 | 162 | $next = $start + $limit; |
163 | 163 | $queries = implode(',', $queries); |
164 | - $search_url_next = $search_url . "&start={$next}"; |
|
165 | - $search_next = '<a href="' . htmlspecialchars($search_url_next) . '">' . XoopsLocale::NEXT . '</a>'; |
|
164 | + $search_url_next = $search_url."&start={$next}"; |
|
165 | + $search_next = '<a href="'.htmlspecialchars($search_url_next).'">'.XoopsLocale::NEXT.'</a>'; |
|
166 | 166 | $xoopsTpl->assign('search_next', $search_next); |
167 | 167 | } |
168 | 168 | if ($start > 0) { |
169 | 169 | $prev = $start - $limit; |
170 | - $search_url_prev = $search_url . "&start={$prev}"; |
|
171 | - $search_prev = '<a href="' . htmlspecialchars($search_url_prev) . '">' . XoopsLocale::PREVIOUS . '</a>'; |
|
170 | + $search_url_prev = $search_url."&start={$prev}"; |
|
171 | + $search_prev = '<a href="'.htmlspecialchars($search_url_prev).'">'.XoopsLocale::PREVIOUS.'</a>'; |
|
172 | 172 | $xoopsTpl->assign('search_prev', $search_prev); |
173 | 173 | } |
174 | 174 | |
175 | 175 | unset($results); |
176 | - $search_info = XoopsLocale::KEYWORDS . ': ' . $myts->htmlSpecialChars($term); |
|
176 | + $search_info = XoopsLocale::KEYWORDS.': '.$myts->htmlSpecialChars($term); |
|
177 | 177 | if ($uname_required) { |
178 | 178 | if ($search_info) { |
179 | 179 | $search_info .= '<br>'; |
180 | 180 | } |
181 | - $search_info .= _CO_PUBLISHER_UID . ': ' . $myts->htmlSpecialChars($search_username); |
|
181 | + $search_info .= _CO_PUBLISHER_UID.': '.$myts->htmlSpecialChars($search_username); |
|
182 | 182 | } |
183 | 183 | $xoopsTpl->assign('search_info', $search_info); |
184 | 184 | } |
@@ -189,17 +189,17 @@ discard block |
||
189 | 189 | if ('OR' === $andor) { |
190 | 190 | $type_select .= ' selected="selected"'; |
191 | 191 | } |
192 | -$type_select .= '>' . XoopsLocale::ANY_OR . '</option>'; |
|
192 | +$type_select .= '>'.XoopsLocale::ANY_OR.'</option>'; |
|
193 | 193 | $type_select .= '<option value="AND"'; |
194 | 194 | if ('AND' === $andor) { |
195 | 195 | $type_select .= ' selected="selected"'; |
196 | 196 | } |
197 | -$type_select .= '>' . XoopsLocale::ALL . '</option>'; |
|
197 | +$type_select .= '>'.XoopsLocale::ALL.'</option>'; |
|
198 | 198 | $type_select .= '<option value="EXACT"'; |
199 | 199 | if ('EXACT' === $andor) { |
200 | 200 | $type_select .= ' selected="selected"'; |
201 | 201 | } |
202 | -$type_select .= '>' . XoopsLocale::EXACT_MATCH . '</option>'; |
|
202 | +$type_select .= '>'.XoopsLocale::EXACT_MATCH.'</option>'; |
|
203 | 203 | $type_select .= '</select>'; |
204 | 204 | |
205 | 205 | /* category */ |
@@ -210,13 +210,13 @@ discard block |
||
210 | 210 | if (empty($category) || 0 == count($category)) { |
211 | 211 | $select_category .= 'selected="selected"'; |
212 | 212 | } |
213 | -$select_category .= '>' . XoopsLocale::ALL . '</option>'; |
|
213 | +$select_category .= '>'.XoopsLocale::ALL.'</option>'; |
|
214 | 214 | foreach ($categories as $id => $cat) { |
215 | - $select_category .= '<option value="' . $id . '"'; |
|
215 | + $select_category .= '<option value="'.$id.'"'; |
|
216 | 216 | if (in_array($id, $category)) { |
217 | 217 | $select_category .= 'selected="selected"'; |
218 | 218 | } |
219 | - $select_category .= '>' . $cat . '</option>'; |
|
219 | + $select_category .= '>'.$cat.'</option>'; |
|
220 | 220 | } |
221 | 221 | $select_category .= '</select>'; |
222 | 222 | |
@@ -226,32 +226,32 @@ discard block |
||
226 | 226 | if (in_array('title', $searchin)) { |
227 | 227 | $searchin_select .= ' checked'; |
228 | 228 | } |
229 | -$searchin_select .= '>' . _CO_PUBLISHER_TITLE . ' '; |
|
229 | +$searchin_select .= '>'._CO_PUBLISHER_TITLE.' '; |
|
230 | 230 | $searchin_select .= '<input type="checkbox" name="searchin[]" value="subtitle"'; |
231 | 231 | if (in_array('subtitle', $searchin)) { |
232 | 232 | $searchin_select .= ' checked'; |
233 | 233 | } |
234 | -$searchin_select .= '>' . _CO_PUBLISHER_SUBTITLE . ' '; |
|
234 | +$searchin_select .= '>'._CO_PUBLISHER_SUBTITLE.' '; |
|
235 | 235 | $searchin_select .= '<input type="checkbox" name="searchin[]" value="summary"'; |
236 | 236 | if (in_array('summary', $searchin)) { |
237 | 237 | $searchin_select .= ' checked'; |
238 | 238 | } |
239 | -$searchin_select .= '>' . _CO_PUBLISHER_SUMMARY . ' '; |
|
239 | +$searchin_select .= '>'._CO_PUBLISHER_SUMMARY.' '; |
|
240 | 240 | $searchin_select .= '<input type="checkbox" name="searchin[]" value="text"'; |
241 | 241 | if (in_array('body', $searchin)) { |
242 | 242 | $searchin_select .= ' checked'; |
243 | 243 | } |
244 | -$searchin_select .= '>' . _CO_PUBLISHER_BODY . ' '; |
|
244 | +$searchin_select .= '>'._CO_PUBLISHER_BODY.' '; |
|
245 | 245 | $searchin_select .= '<input type="checkbox" name="searchin[]" value="keywords"'; |
246 | 246 | if (in_array('meta_keywords', $searchin)) { |
247 | 247 | $searchin_select .= ' checked'; |
248 | 248 | } |
249 | -$searchin_select .= '>' . _CO_PUBLISHER_ITEM_META_KEYWORDS . ' '; |
|
249 | +$searchin_select .= '>'._CO_PUBLISHER_ITEM_META_KEYWORDS.' '; |
|
250 | 250 | $searchin_select .= '<input type="checkbox" name="searchin[]" value="all"'; |
251 | 251 | if (in_array('all', $searchin) || empty($searchin)) { |
252 | 252 | $searchin_select .= ' checked'; |
253 | 253 | } |
254 | -$searchin_select .= '>' . XoopsLocale::ALL . ' '; |
|
254 | +$searchin_select .= '>'.XoopsLocale::ALL.' '; |
|
255 | 255 | |
256 | 256 | /* sortby */ |
257 | 257 | $sortby_select = '<select name="sortby">'; |
@@ -259,22 +259,22 @@ discard block |
||
259 | 259 | if ('itemid' === $sortby || empty($sortby)) { |
260 | 260 | $sortby_select .= ' selected="selected"'; |
261 | 261 | } |
262 | -$sortby_select .= '>' . XoopsLocale::NONE . '</option>'; |
|
262 | +$sortby_select .= '>'.XoopsLocale::NONE.'</option>'; |
|
263 | 263 | $sortby_select .= '<option value="datesub"'; |
264 | 264 | if ('datesub' === $sortby) { |
265 | 265 | $sortby_select .= ' selected="selected"'; |
266 | 266 | } |
267 | -$sortby_select .= '>' . _CO_PUBLISHER_DATESUB . '</option>'; |
|
267 | +$sortby_select .= '>'._CO_PUBLISHER_DATESUB.'</option>'; |
|
268 | 268 | $sortby_select .= '<option value="title"'; |
269 | 269 | if ('title' === $sortby) { |
270 | 270 | $sortby_select .= ' selected="selected"'; |
271 | 271 | } |
272 | -$sortby_select .= '>' . _CO_PUBLISHER_TITLE . '</option>'; |
|
272 | +$sortby_select .= '>'._CO_PUBLISHER_TITLE.'</option>'; |
|
273 | 273 | $sortby_select .= '<option value="categoryid"'; |
274 | 274 | if ('categoryid' === $sortby) { |
275 | 275 | $sortby_select .= ' selected="selected"'; |
276 | 276 | } |
277 | -$sortby_select .= '>' . _CO_PUBLISHER_CATEGORY . '</option>'; |
|
277 | +$sortby_select .= '>'._CO_PUBLISHER_CATEGORY.'</option>'; |
|
278 | 278 | $sortby_select .= '</select>'; |
279 | 279 | |
280 | 280 | $xoopsTpl->assign('type_select', $type_select); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @author trabis <[email protected]> |
21 | 21 | * @version $Id$ |
22 | 22 | */ |
23 | -require_once __DIR__ . '/header.php'; |
|
23 | +require_once __DIR__.'/header.php'; |
|
24 | 24 | |
25 | 25 | $xoops = Xoops::getInstance(); |
26 | 26 | |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | //Checking permissions |
37 | 37 | if (!$helper->getConfig('perm_rating') |
38 | 38 | || !$gpermHandler->checkRight('global', _PUBLISHER_RATE, $groups, $module_id)) { |
39 | - $xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
39 | + $xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | if ($rating > 5 || $rating < 1) { |
43 | - $xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_BAD); |
|
43 | + $xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, _MD_PUBLISHER_VOTE_BAD); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $criteria = new Criteria('itemid', $itemid); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | if ($voted) { |
64 | - $xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_ALREADY); |
|
64 | + $xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, _MD_PUBLISHER_VOTE_ALREADY); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | $newRatingObj = $helper->getRatingHandler()->create(); |
@@ -78,4 +78,4 @@ discard block |
||
78 | 78 | $helper->getItemHandler()->updateAll('rating', number_format($current_rating / $count, 4), $criteria, true); |
79 | 79 | $helper->getItemHandler()->updateAll('votes', $count, $criteria, true); |
80 | 80 | |
81 | -$xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_THANKS); |
|
81 | +$xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, _MD_PUBLISHER_VOTE_THANKS); |
@@ -23,17 +23,17 @@ |
||
23 | 23 | * @author The SmartFactory <www.smartfactory.ca> |
24 | 24 | * @version $Id$ |
25 | 25 | */ |
26 | -require_once __DIR__ . '/include/common.php'; |
|
26 | +require_once __DIR__.'/include/common.php'; |
|
27 | 27 | |
28 | 28 | $helper = Helper::getInstance(); |
29 | 29 | |
30 | 30 | $xoops = Xoops::getInstance(); |
31 | -$xoops->theme()->addStylesheet(PUBLISHER_URL . '/css/publisher.css'); |
|
31 | +$xoops->theme()->addStylesheet(PUBLISHER_URL.'/css/publisher.css'); |
|
32 | 32 | |
33 | 33 | $xoopsTpl = $xoops->tpl(); |
34 | -$xoopsTpl->assign('xoops_module_header', '<link rel="alternate" type="application/rss+xml" title="' . $helper->getModule()->getVar('name') . '" href="' . $helper->url('backend.php') . '">' . @$xoopsTpl->getTemplateVars('xoops_module_header')); |
|
34 | +$xoopsTpl->assign('xoops_module_header', '<link rel="alternate" type="application/rss+xml" title="'.$helper->getModule()->getVar('name').'" href="'.$helper->url('backend.php').'">'.@$xoopsTpl->getTemplateVars('xoops_module_header')); |
|
35 | 35 | |
36 | -$xoopsTpl->assign('publisher_adminpage', "<a href='" . $helper->url('admin/index.php') . "'>" . _MD_PUBLISHER_ADMIN_PAGE . '</a>'); |
|
36 | +$xoopsTpl->assign('publisher_adminpage', "<a href='".$helper->url('admin/index.php')."'>"._MD_PUBLISHER_ADMIN_PAGE.'</a>'); |
|
37 | 37 | $xoopsTpl->assign('isAdmin', Publisher\Utils::IsUserAdmin()); |
38 | 38 | $xoopsTpl->assign('publisher_url', $helper->url()); |
39 | 39 | $xoopsTpl->assign('publisher_images_url', $helper->url('images')); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @author trabis <[email protected]> |
23 | 23 | * @author The SmartFactory <www.smartfactory.ca> |
24 | 24 | */ |
25 | -require_once __DIR__ . '/header.php'; |
|
25 | +require_once __DIR__.'/header.php'; |
|
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | $xoops->disableErrorReporting(); |
28 | 28 | |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | |
59 | 59 | $mainImage = $itemObj->getMainImage(); |
60 | 60 | if ('' != $mainImage['image_path']) { |
61 | - $item['image'] = '<img src="' . $mainImage['image_path'] . '" alt="' . $myts->undoHtmlSpecialChars($mainImage['image_name']) . '">'; |
|
61 | + $item['image'] = '<img src="'.$mainImage['image_path'].'" alt="'.$myts->undoHtmlSpecialChars($mainImage['image_name']).'">'; |
|
62 | 62 | } |
63 | 63 | $xoopsTpl->assign('item', $item); |
64 | -$xoopsTpl->assign('printtitle', $xoops->getConfig('sitename') . ' - ' . Publisher\Utils::html2text($categoryObj->getCategoryPath()) . ' > ' . $myts->displayTarea($itemObj->title())); |
|
64 | +$xoopsTpl->assign('printtitle', $xoops->getConfig('sitename').' - '.Publisher\Utils::html2text($categoryObj->getCategoryPath()).' > '.$myts->displayTarea($itemObj->title())); |
|
65 | 65 | $xoopsTpl->assign('printlogourl', $helper->getConfig('print_logourl')); |
66 | 66 | $xoopsTpl->assign('printheader', $myts->displayTarea($helper->getConfig('print_header'), 1)); |
67 | 67 | $xoopsTpl->assign('lang_category', _CO_PUBLISHER_CATEGORY); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * @author The SmartFactory <www.smartfactory.ca> |
38 | 38 | * @version $Id$ |
39 | 39 | */ |
40 | -require_once \dirname(__DIR__) . '/include/common.php'; |
|
40 | +require_once \dirname(__DIR__).'/include/common.php'; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Class Item |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | public function wrappage($file_name): string |
204 | 204 | { |
205 | 205 | $content = ''; |
206 | - $page = Publisher\Utils::getUploadDir(true, 'content') . $file_name; |
|
206 | + $page = Publisher\Utils::getUploadDir(true, 'content').$file_name; |
|
207 | 207 | if (XoopsLoad::fileExists($page)) { |
208 | 208 | // this page uses smarty template |
209 | 209 | \ob_start(); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | if ($this->helper->getConfig('item_disp_blocks_summary')) { |
258 | 258 | $summary = $this->summary($maxLength, $format, $stripTags); |
259 | 259 | if ($summary) { |
260 | - $ret = $this->summary() . '<br><br>' . $ret; |
|
260 | + $ret = $this->summary().'<br><br>'.$ret; |
|
261 | 261 | } |
262 | 262 | } |
263 | 263 | if (!empty($stripTags)) { |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | |
389 | 389 | public function getCategoryImagePath(): string |
390 | 390 | { |
391 | - return Publisher\Utils::getImageDir('category', false) . $this->category()->image(); |
|
391 | + return Publisher\Utils::getImageDir('category', false).$this->category()->image(); |
|
392 | 392 | } |
393 | 393 | |
394 | 394 | /** |
@@ -407,35 +407,35 @@ discard block |
||
407 | 407 | if (Publisher\Utils::IsUserAdmin() || Publisher\Utils::IsUserAuthor($this) || Publisher\Utils::IsUserModerator($this)) { |
408 | 408 | if ($this->helper->getConfig('perm_edit') || Publisher\Utils::IsUserModerator($this) || Publisher\Utils::IsUserAdmin()) { |
409 | 409 | // Edit button |
410 | - $adminLinks .= "<a href='" . \PUBLISHER_URL . '/submit.php?itemid=' . $this->getVar('itemid') . "'><img src='" . \PUBLISHER_URL . "/images/links/edit.gif'" . " title='" . _CO_PUBLISHER_EDIT . "' alt='" . _CO_PUBLISHER_EDIT . "'></a>"; |
|
410 | + $adminLinks .= "<a href='".\PUBLISHER_URL.'/submit.php?itemid='.$this->getVar('itemid')."'><img src='".\PUBLISHER_URL."/images/links/edit.gif'"." title='"._CO_PUBLISHER_EDIT."' alt='"._CO_PUBLISHER_EDIT."'></a>"; |
|
411 | 411 | $adminLinks .= ' '; |
412 | 412 | } |
413 | 413 | if ($this->helper->getConfig('perm_delete') || Publisher\Utils::IsUserModerator($this) || Publisher\Utils::IsUserAdmin()) { |
414 | 414 | // Delete button |
415 | - $adminLinks .= "<a href='" . \PUBLISHER_URL . '/submit.php?op=del&itemid=' . $this->getVar('itemid') . "'><img src='" . \PUBLISHER_URL . "/images/links/delete.png'" . " title='" . _CO_PUBLISHER_DELETE . "' alt='" . _CO_PUBLISHER_DELETE . "'></a>"; |
|
415 | + $adminLinks .= "<a href='".\PUBLISHER_URL.'/submit.php?op=del&itemid='.$this->getVar('itemid')."'><img src='".\PUBLISHER_URL."/images/links/delete.png'"." title='"._CO_PUBLISHER_DELETE."' alt='"._CO_PUBLISHER_DELETE."'></a>"; |
|
416 | 416 | $adminLinks .= ' '; |
417 | 417 | } |
418 | 418 | } |
419 | 419 | if ($this->helper->getConfig('perm_clone') || Publisher\Utils::IsUserModerator($this) || Publisher\Utils::IsUserAdmin()) { |
420 | 420 | // Duplicate button |
421 | - $adminLinks .= "<a href='" . \PUBLISHER_URL . '/submit.php?op=clone&itemid=' . $this->getVar('itemid') . "'><img src='" . \PUBLISHER_URL . "/images/links/clone.gif'" . " title='" . _CO_PUBLISHER_CLONE . "' alt='" . _CO_PUBLISHER_CLONE . "'></a>"; |
|
421 | + $adminLinks .= "<a href='".\PUBLISHER_URL.'/submit.php?op=clone&itemid='.$this->getVar('itemid')."'><img src='".\PUBLISHER_URL."/images/links/clone.gif'"." title='"._CO_PUBLISHER_CLONE."' alt='"._CO_PUBLISHER_CLONE."'></a>"; |
|
422 | 422 | $adminLinks .= ' '; |
423 | 423 | } |
424 | 424 | } |
425 | 425 | // PDF button |
426 | 426 | if ($xoops->service('htmltopdf')->isAvailable()) { |
427 | - $adminLinks .= "<a href='" . \PUBLISHER_URL . '/makepdf.php?itemid=' . $this->getVar('itemid') . "' rel='nofollow' target='_blank'><img src='" . \PUBLISHER_URL . "/images/links/pdf.gif' title='" . _CO_PUBLISHER_PDF . "' alt='" . _CO_PUBLISHER_PDF . "'></a>"; |
|
427 | + $adminLinks .= "<a href='".\PUBLISHER_URL.'/makepdf.php?itemid='.$this->getVar('itemid')."' rel='nofollow' target='_blank'><img src='".\PUBLISHER_URL."/images/links/pdf.gif' title='"._CO_PUBLISHER_PDF."' alt='"._CO_PUBLISHER_PDF."'></a>"; |
|
428 | 428 | $adminLinks .= ' '; |
429 | 429 | } |
430 | 430 | // Print button |
431 | - $adminLinks .= "<a href='" . Publisher\Utils::seoGenUrl('print', $this->getVar('itemid'), $this->getVar('short_url')) . "' rel='nofollow' target='_blank'><img src='" . \PUBLISHER_URL . "/images/links/print.gif' title='" . _CO_PUBLISHER_PRINT . "' alt='" . _CO_PUBLISHER_PRINT . "'></a>"; |
|
431 | + $adminLinks .= "<a href='".Publisher\Utils::seoGenUrl('print', $this->getVar('itemid'), $this->getVar('short_url'))."' rel='nofollow' target='_blank'><img src='".\PUBLISHER_URL."/images/links/print.gif' title='"._CO_PUBLISHER_PRINT."' alt='"._CO_PUBLISHER_PRINT."'></a>"; |
|
432 | 432 | $adminLinks .= ' '; |
433 | 433 | // Email button |
434 | 434 | if ($xoops->isActiveModule('tellafriend')) { |
435 | 435 | $subject = \sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename')); |
436 | 436 | $subject = $this->_convert_for_japanese($subject); |
437 | 437 | $maillink = Publisher\Utils::tellafriend($subject); |
438 | - $adminLinks .= '<a href="' . $maillink . '"><img src="' . \PUBLISHER_URL . '/images/links/friend.gif" title="' . _CO_PUBLISHER_MAIL . '" alt="' . _CO_PUBLISHER_MAIL . '"></a>'; |
|
438 | + $adminLinks .= '<a href="'.$maillink.'"><img src="'.\PUBLISHER_URL.'/images/links/friend.gif" title="'._CO_PUBLISHER_MAIL.'" alt="'._CO_PUBLISHER_MAIL.'"></a>'; |
|
439 | 439 | $adminLinks .= ' '; |
440 | 440 | } |
441 | 441 | |
@@ -454,19 +454,19 @@ discard block |
||
454 | 454 | $tags['MODULE_NAME'] = $this->helper->getModule()->getVar('name'); |
455 | 455 | $tags['ITEM_NAME'] = $this->title(); |
456 | 456 | $tags['CATEGORY_NAME'] = $this->getCategoryName(); |
457 | - $tags['CATEGORY_URL'] = \PUBLISHER_URL . '/category.php?categoryid=' . $this->getVar('categoryid'); |
|
457 | + $tags['CATEGORY_URL'] = \PUBLISHER_URL.'/category.php?categoryid='.$this->getVar('categoryid'); |
|
458 | 458 | $tags['ITEM_BODY'] = $this->body(); |
459 | 459 | $tags['DATESUB'] = $this->datesub(); |
460 | 460 | foreach ($notifications as $notification) { |
461 | 461 | switch ($notification) { |
462 | 462 | case \_PUBLISHER_NOT_ITEM_PUBLISHED: |
463 | - $tags['ITEM_URL'] = \PUBLISHER_URL . '/item.php?itemid=' . $this->getVar('itemid'); |
|
463 | + $tags['ITEM_URL'] = \PUBLISHER_URL.'/item.php?itemid='.$this->getVar('itemid'); |
|
464 | 464 | $notificationHandler->triggerEvent('global', 0, 'published', $tags, [], $this->helper->getModule()->getVar('mid')); |
465 | 465 | $notificationHandler->triggerEvent('category', $this->getVar('categoryid'), 'published', $tags, [], $this->helper->getModule()->getVar('mid')); |
466 | 466 | $notificationHandler->triggerEvent('item', $this->getVar('itemid'), 'approved', $tags, [], $this->helper->getModule()->getVar('mid')); |
467 | 467 | break; |
468 | 468 | case \_PUBLISHER_NOT_ITEM_SUBMITTED: |
469 | - $tags['WAITINGFILES_URL'] = \PUBLISHER_URL . '/admin/item.php?itemid=' . $this->getVar('itemid'); |
|
469 | + $tags['WAITINGFILES_URL'] = \PUBLISHER_URL.'/admin/item.php?itemid='.$this->getVar('itemid'); |
|
470 | 470 | $notificationHandler->triggerEvent('global', 0, 'submitted', $tags, [], $this->helper->getModule()->getVar('mid')); |
471 | 471 | $notificationHandler->triggerEvent('category', $this->getVar('categoryid'), 'submitted', $tags, [], $this->helper->getModule()->getVar('mid')); |
472 | 472 | break; |
@@ -500,10 +500,10 @@ discard block |
||
500 | 500 | public function getItemLink($class = false, $maxsize = 0): ?string |
501 | 501 | { |
502 | 502 | if ($class) { |
503 | - return '<a class=' . $class . ' href="' . $this->getItemUrl() . '">' . $this->title($maxsize) . '</a>'; |
|
503 | + return '<a class='.$class.' href="'.$this->getItemUrl().'">'.$this->title($maxsize).'</a>'; |
|
504 | 504 | } |
505 | 505 | |
506 | - return '<a href="' . $this->getItemUrl() . '">' . $this->title($maxsize) . '</a>'; |
|
506 | + return '<a href="'.$this->getItemUrl().'">'.$this->title($maxsize).'</a>'; |
|
507 | 507 | } |
508 | 508 | |
509 | 509 | public function getWhoAndWhen(): string |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | $imageObjs = []; |
584 | 584 | if (\count($images_ids) > 0) { |
585 | 585 | $imageHandler = Images::getInstance()->getHandlerImages(); |
586 | - $criteria = new CriteriaCompo(new Criteria('image_id', '(' . \implode(',', $images_ids) . ')', 'IN')); |
|
586 | + $criteria = new CriteriaCompo(new Criteria('image_id', '('.\implode(',', $images_ids).')', 'IN')); |
|
587 | 587 | $imageObjs = $imageHandler->getObjects($criteria, true); |
588 | 588 | unset($criteria); |
589 | 589 | } |
@@ -698,12 +698,12 @@ discard block |
||
698 | 698 | if (\is_object($images['main'])) { |
699 | 699 | /* @var \ImagesImage $image */ |
700 | 700 | $image = $images['main']; |
701 | - $dimensions = \getimagesize(XoopsBaseConfig::get('root-path') . '/uploads/' . $image->getVar('image_name')); |
|
701 | + $dimensions = \getimagesize(XoopsBaseConfig::get('root-path').'/uploads/'.$image->getVar('image_name')); |
|
702 | 702 | $item['image_width'] = $dimensions[0]; |
703 | 703 | $item['image_height'] = $dimensions[1]; |
704 | - $item['image_path'] = XoopsBaseConfig::get('url') . '/uploads/' . $image->getVar('image_name'); |
|
704 | + $item['image_path'] = XoopsBaseConfig::get('url').'/uploads/'.$image->getVar('image_name'); |
|
705 | 705 | // pass this on since some consumers build custom thumbnails |
706 | - $item['image_vpath'] = 'uploads/' . $image->getVar('image_name'); |
|
706 | + $item['image_vpath'] = 'uploads/'.$image->getVar('image_name'); |
|
707 | 707 | $item['image_thumb'] = Xoops::getInstance()->service('thumbnail')->getImgUrl($item['image_vpath'], 0, 180)->getValue(); |
708 | 708 | $item['image_name'] = $image->getVar('image_nicename'); |
709 | 709 | } |
@@ -722,11 +722,11 @@ discard block |
||
722 | 722 | $i = 0; |
723 | 723 | /* @var \ImagesImage $image */ |
724 | 724 | foreach ($images['others'] as $image) { |
725 | - $dimensions = \getimagesize(XoopsBaseConfig::get('root-path') . '/uploads/' . $image->getVar('image_name')); |
|
725 | + $dimensions = \getimagesize(XoopsBaseConfig::get('root-path').'/uploads/'.$image->getVar('image_name')); |
|
726 | 726 | $item['images'][$i]['width'] = $dimensions[0]; |
727 | 727 | $item['images'][$i]['height'] = $dimensions[1]; |
728 | - $item['images'][$i]['path'] = XoopsBaseConfig::get('url') . '/uploads/' . $image->getVar('image_name'); |
|
729 | - $item['images'][$i]['thumb'] = $thumbService->getImgUrl('uploads/' . $image->getVar('image_name'), 240, 0)->getValue(); |
|
728 | + $item['images'][$i]['path'] = XoopsBaseConfig::get('url').'/uploads/'.$image->getVar('image_name'); |
|
729 | + $item['images'][$i]['thumb'] = $thumbService->getImgUrl('uploads/'.$image->getVar('image_name'), 240, 0)->getValue(); |
|
730 | 730 | $item['images'][$i]['name'] = $image->getVar('image_nicename'); |
731 | 731 | ++$i; |
732 | 732 | } |
@@ -744,9 +744,9 @@ discard block |
||
744 | 744 | { |
745 | 745 | $color = $this->helper->getConfig('format_highlight_color'); |
746 | 746 | if (0 !== \mb_strpos($color, '#')) { |
747 | - $color = '#' . $color; |
|
747 | + $color = '#'.$color; |
|
748 | 748 | } |
749 | - $pre = '<span style="font-weight: bolder; background-color: ' . $color . ';">'; |
|
749 | + $pre = '<span style="font-weight: bolder; background-color: '.$color.';">'; |
|
750 | 750 | $post = '</span>'; |
751 | 751 | |
752 | 752 | return Highlighter::apply($keywords, $content, $pre, $post); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @author trabis <[email protected]> |
44 | 44 | * @version $Id$ |
45 | 45 | */ |
46 | -require_once \dirname(\dirname(__DIR__)) . '/include/common.php'; |
|
46 | +require_once \dirname(\dirname(__DIR__)).'/include/common.php'; |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * Class CategoryForm |
@@ -129,10 +129,10 @@ discard block |
||
129 | 129 | // IMAGE |
130 | 130 | $image_select = new Select('', 'image', $obj->image()); |
131 | 131 | ImageFile::setOptionsArray($image_select, Publisher\Utils::getImageDir('category')); |
132 | - $image_select->setExtra("onchange='showImgSelected(\"image3\", \"image\", \"" . 'uploads/' . \PUBLISHER_DIRNAME . '/images/category/' . '", "", "' . XoopsBaseConfig::get('url') . "\")'"); |
|
132 | + $image_select->setExtra("onchange='showImgSelected(\"image3\", \"image\", \"".'uploads/'.\PUBLISHER_DIRNAME.'/images/category/'.'", "", "'.XoopsBaseConfig::get('url')."\")'"); |
|
133 | 133 | $image_tray = new ElementTray(_AM_PUBLISHER_IMAGE, ' '); |
134 | 134 | $image_tray->addElement($image_select); |
135 | - $image_tray->addElement(new Label('', "<br><br><img src='" . Publisher\Utils::getImageDir('category', false) . $obj->image() . "' name='image3' id='image3' alt=''>")); |
|
135 | + $image_tray->addElement(new Label('', "<br><br><img src='".Publisher\Utils::getImageDir('category', false).$obj->image()."' name='image3' id='image3' alt=''>")); |
|
136 | 136 | $image_tray->setDescription(_AM_PUBLISHER_IMAGE_DSC); |
137 | 137 | $this->addElement($image_tray); |
138 | 138 | |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | } else { |
200 | 200 | $subname = ''; |
201 | 201 | } |
202 | - $cat_tray->addElement(new Text('', 'scname[' . $i . ']', 50, 255, $subname)); |
|
202 | + $cat_tray->addElement(new Text('', 'scname['.$i.']', 50, 255, $subname)); |
|
203 | 203 | } |
204 | 204 | $t = new Text('', 'nb_subcats', 3, 2); |
205 | 205 | $l = new Label('', \sprintf(_AM_PUBLISHER_ADD_OPT, $t->render())); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | use XoopsModules\Publisher; |
35 | 35 | use XoopsModules\Publisher\Helper; |
36 | 36 | |
37 | -require_once \dirname(\dirname(__DIR__)) . '/include/common.php'; |
|
37 | +require_once \dirname(\dirname(__DIR__)).'/include/common.php'; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Class FileForm |
@@ -591,12 +591,12 @@ |
||
591 | 591 | $imagesTab->addElement($image_select3); |
592 | 592 | |
593 | 593 | $imgTag = new Img([ |
594 | - 'src' => $xoops->url('uploads/' . $imageforpath), |
|
595 | - 'width' => 500, |
|
596 | - 'name' => 'image_display', |
|
597 | - 'id' => 'image_display', |
|
598 | - 'alt' => '', |
|
599 | - ]); |
|
594 | + 'src' => $xoops->url('uploads/' . $imageforpath), |
|
595 | + 'width' => 500, |
|
596 | + 'name' => 'image_display', |
|
597 | + 'id' => 'image_display', |
|
598 | + 'alt' => '', |
|
599 | + ]); |
|
600 | 600 | $image_preview = new Label(_CO_PUBLISHER_IMAGE_PREVIEW, $imgTag->render()); |
601 | 601 | $imagesTab->addElement($image_preview); |
602 | 602 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | use XoopsModules\Publisher; |
41 | 41 | use XoopsModules\Publisher\Helper; |
42 | 42 | |
43 | -require_once \dirname(\dirname(__DIR__)) . '/include/common.php'; |
|
43 | +require_once \dirname(\dirname(__DIR__)).'/include/common.php'; |
|
44 | 44 | |
45 | 45 | $helper = Helper::getInstance(); |
46 | 46 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $wrap_pages = XoopsLists::getHtmlListAsArray(Publisher\Utils::getUploadDir(true, 'content')); |
207 | 207 | $available_wrap_pages_text = []; |
208 | 208 | foreach ($wrap_pages as $page) { |
209 | - $available_wrap_pages_text[] = "<span onclick='publisherPageWrap(\"body\", \"[pagewrap=$page] \");'" . " onmouseover='style.cursor=\"pointer\"'>$page</span>"; |
|
209 | + $available_wrap_pages_text[] = "<span onclick='publisherPageWrap(\"body\", \"[pagewrap=$page] \");'"." onmouseover='style.cursor=\"pointer\"'>$page</span>"; |
|
210 | 210 | } |
211 | 211 | $available_wrap_pages = new Label(_CO_PUBLISHER_AVAILABLE_PAGE_WRAP, \implode(', ', $available_wrap_pages_text)); |
212 | 212 | $available_wrap_pages->setDescription(_CO_PUBLISHER_AVAILABLE_PAGE_WRAP_DSC); |
@@ -397,28 +397,28 @@ discard block |
||
397 | 397 | $table .= "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
398 | 398 | $table .= '<tr>'; |
399 | 399 | $table .= "<td width='50' class='bg3' align='center'><strong>ID</strong></td>"; |
400 | - $table .= "<td width='150' class='bg3' align='left'><strong>" . _AM_PUBLISHER_FILENAME . '</strong></td>'; |
|
401 | - $table .= "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_DESCRIPTION . '</strong></td>'; |
|
402 | - $table .= "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_HITS . '</strong></td>'; |
|
403 | - $table .= "<td width='100' class='bg3' align='center'><strong>" . _AM_PUBLISHER_UPLOADED_DATE . '</strong></td>'; |
|
404 | - $table .= "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>'; |
|
400 | + $table .= "<td width='150' class='bg3' align='left'><strong>"._AM_PUBLISHER_FILENAME.'</strong></td>'; |
|
401 | + $table .= "<td class='bg3' align='left'><strong>"._AM_PUBLISHER_DESCRIPTION.'</strong></td>'; |
|
402 | + $table .= "<td width='60' class='bg3' align='center'><strong>"._AM_PUBLISHER_HITS.'</strong></td>'; |
|
403 | + $table .= "<td width='100' class='bg3' align='center'><strong>"._AM_PUBLISHER_UPLOADED_DATE.'</strong></td>'; |
|
404 | + $table .= "<td width='60' class='bg3' align='center'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>'; |
|
405 | 405 | $table .= '</tr>'; |
406 | 406 | |
407 | 407 | /* @var Publisher\File $fileObj */ |
408 | 408 | foreach ($filesObj as $fileObj) { |
409 | - $modify = "<a href='file.php?op=mod&fileid=" . $fileObj->getVar('fileid') . "'><img src='" . \PUBLISHER_URL . "/images/links/edit.gif' title='" . _CO_PUBLISHER_EDITFILE . "' alt='" . _CO_PUBLISHER_EDITFILE . "'></a>"; |
|
410 | - $delete = "<a href='file.php?op=del&fileid=" . $fileObj->getVar('fileid') . "'><img src='" . \PUBLISHER_URL . "/images/links/delete.png' title='" . _CO_PUBLISHER_DELETEFILE . "' alt='" . _CO_PUBLISHER_DELETEFILE . "'></a>"; |
|
409 | + $modify = "<a href='file.php?op=mod&fileid=".$fileObj->getVar('fileid')."'><img src='".\PUBLISHER_URL."/images/links/edit.gif' title='"._CO_PUBLISHER_EDITFILE."' alt='"._CO_PUBLISHER_EDITFILE."'></a>"; |
|
410 | + $delete = "<a href='file.php?op=del&fileid=".$fileObj->getVar('fileid')."'><img src='".\PUBLISHER_URL."/images/links/delete.png' title='"._CO_PUBLISHER_DELETEFILE."' alt='"._CO_PUBLISHER_DELETEFILE."'></a>"; |
|
411 | 411 | if (0 == $fileObj->getVar('status')) { |
412 | - $notVisible = "<img src='" . \PUBLISHER_URL . "/images/no.gif'>"; |
|
412 | + $notVisible = "<img src='".\PUBLISHER_URL."/images/no.gif'>"; |
|
413 | 413 | } else { |
414 | 414 | $notVisible = ''; |
415 | 415 | } |
416 | 416 | $table .= '<tr>'; |
417 | - $table .= "<td class='head' align='center'>" . $fileObj->getVar('fileid') . '</td>'; |
|
418 | - $table .= "<td class='odd' align='left'>" . $notVisible . $fileObj->getFileLink() . '</td>'; |
|
419 | - $table .= "<td class='even' align='left'>" . $fileObj->getVar('description') . '</td>'; |
|
420 | - $table .= "<td class='even' align='center'>" . $fileObj->getVar('counter') . ''; |
|
421 | - $table .= "<td class='even' align='center'>" . $fileObj->datesub() . '</td>'; |
|
417 | + $table .= "<td class='head' align='center'>".$fileObj->getVar('fileid').'</td>'; |
|
418 | + $table .= "<td class='odd' align='left'>".$notVisible.$fileObj->getFileLink().'</td>'; |
|
419 | + $table .= "<td class='even' align='left'>".$fileObj->getVar('description').'</td>'; |
|
420 | + $table .= "<td class='even' align='center'>".$fileObj->getVar('counter').''; |
|
421 | + $table .= "<td class='even' align='center'>".$fileObj->datesub().'</td>'; |
|
422 | 422 | $table .= "<td class='even' align='center'> {$modify} {$delete} </td>"; |
423 | 423 | $table .= '</tr>'; |
424 | 424 | } |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | |
463 | 463 | $imageObjs = []; |
464 | 464 | if (!empty($catids)) { |
465 | - $criteria = new CriteriaCompo(new Criteria('imgcat_id', '(' . \implode(',', $catids) . ')', 'IN')); |
|
465 | + $criteria = new CriteriaCompo(new Criteria('imgcat_id', '('.\implode(',', $catids).')', 'IN')); |
|
466 | 466 | $criteria->add(new Criteria('image_display', 1)); |
467 | 467 | $criteria->setSort('image_nicename'); |
468 | 468 | $criteria->setOrder('ASC'); |
@@ -478,38 +478,38 @@ discard block |
||
478 | 478 | |
479 | 479 | $image_select = new Select('', 'image_notused', '', 5); |
480 | 480 | $image_select->addOptionArray($image_array); |
481 | - $image_select->set('onchange', 'showImgSelected("image_display", "image_notused", "uploads/", "", "' . XoopsBaseConfig::get('url') . '")'); |
|
481 | + $image_select->set('onchange', 'showImgSelected("image_display", "image_notused", "uploads/", "", "'.XoopsBaseConfig::get('url').'")'); |
|
482 | 482 | unset($image_array); |
483 | 483 | |
484 | 484 | $image_select2 = new Select('', 'image_item', '', 5, true); |
485 | 485 | $image_select2->addOptionArray($objimage_array); |
486 | - $image_select2->set('onchange', 'publisher_updateSelectOption("image_item", "image_featured"), ' . 'showImgSelected("image_display", "image_item", "uploads/", "", "' . XoopsBaseConfig::get('url') . '");'); |
|
486 | + $image_select2->set('onchange', 'publisher_updateSelectOption("image_item", "image_featured"), '.'showImgSelected("image_display", "image_item", "uploads/", "", "'.XoopsBaseConfig::get('url').'");'); |
|
487 | 487 | |
488 | 488 | $buttonadd = new Button('', 'buttonadd', _CO_PUBLISHER_ADD); |
489 | - $buttonadd->set('onclick', 'publisher_appendSelectOption("image_notused", "image_item"), ' . 'publisher_updateSelectOption("image_item", "image_featured");'); |
|
489 | + $buttonadd->set('onclick', 'publisher_appendSelectOption("image_notused", "image_item"), '.'publisher_updateSelectOption("image_item", "image_featured");'); |
|
490 | 490 | |
491 | 491 | $buttonremove = new Button('', 'buttonremove', _CO_PUBLISHER_REMOVE); |
492 | - $buttonremove->set('onclick', 'publisher_appendSelectOption("image_item", "image_notused"), ' . 'publisher_updateSelectOption("image_item", "image_featured");'); |
|
492 | + $buttonremove->set('onclick', 'publisher_appendSelectOption("image_item", "image_notused"), '.'publisher_updateSelectOption("image_item", "image_featured");'); |
|
493 | 493 | |
494 | 494 | $opentable = new Label('', '<table><tr><td>'); |
495 | 495 | $addcol = new Label('', '</td><td>'); |
496 | 496 | $addbreak = new Label('', '<br>'); |
497 | 497 | $closetable = new Label('', '</td></tr></table>'); |
498 | 498 | |
499 | - $xoops->theme()->addScript(\PUBLISHER_URL . '/js/ajaxupload.3.9.js'); |
|
499 | + $xoops->theme()->addScript(\PUBLISHER_URL.'/js/ajaxupload.3.9.js'); |
|
500 | 500 | //todo, find replacement for error class |
501 | 501 | $js_data = new Label('', ' |
502 | 502 | <script type= "text/javascript">/*<![CDATA[*/ |
503 | 503 | $(document).ready(function(){ |
504 | 504 | var button = $("#publisher_upload_button"), interval; |
505 | 505 | new AjaxUpload(button,{ |
506 | - action: "' . \PUBLISHER_URL . '/include/ajax_upload.php", // I disabled uploads in this example for security reasons |
|
506 | + action: "' . \PUBLISHER_URL.'/include/ajax_upload.php", // I disabled uploads in this example for security reasons |
|
507 | 507 | responseType: "text/html", |
508 | 508 | name: "publisher_upload_file", |
509 | 509 | onSubmit : function(file, ext){ |
510 | 510 | // change button text, when user selects file |
511 | 511 | $("#publisher_upload_message").html(" "); |
512 | - button.html("<img src=\'' . \PUBLISHER_URL . '/images/loadingbar.gif\'>"); this.setData({ |
|
512 | + button.html("<img src=\'' . \PUBLISHER_URL.'/images/loadingbar.gif\'>"); this.setData({ |
|
513 | 513 | "image_nicename": $("#image_nicename").val(), |
514 | 514 | "imgcat_id" : $("#imgcat_id").val() |
515 | 515 | }); |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | }, 200); |
521 | 521 | }, |
522 | 522 | onComplete: function(file, response){ |
523 | - button.text("' . _CO_PUBLISHER_IMAGE_UPLOAD_NEW . '"); |
|
523 | + button.text("' . _CO_PUBLISHER_IMAGE_UPLOAD_NEW.'"); |
|
524 | 524 | window.clearInterval(interval); |
525 | 525 | // enable upload button |
526 | 526 | this.enable(); |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | if (result[0] == "success") { |
530 | 530 | $("#image_item").append("<option value=\'" + result[1] + "\' selected=\'selected\'>" + result[2] + "</option>"); |
531 | 531 | publisher_updateSelectOption(\'image_item\', \'image_featured\'); |
532 | - showImgSelected(\'image_display\', \'image_item\', \'uploads/\', \'\', \'' . XoopsBaseConfig::get('url') . '\') |
|
532 | + showImgSelected(\'image_display\', \'image_item\', \'uploads/\', \'\', \'' . XoopsBaseConfig::get('url').'\') |
|
533 | 533 | } else { |
534 | 534 | $("#publisher_upload_message").html("<div class=\'errorMsg\'>" + result[1] + "</div>"); |
535 | 535 | } |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | /*]]>*/</script> |
540 | 540 | '); |
541 | 541 | $messages = new Label('', "<div id='publisher_upload_message'></div>"); |
542 | - $button = new Label('', "<div id='publisher_upload_button'>" . _CO_PUBLISHER_IMAGE_UPLOAD_NEW . '</div>'); |
|
542 | + $button = new Label('', "<div id='publisher_upload_button'>"._CO_PUBLISHER_IMAGE_UPLOAD_NEW.'</div>'); |
|
543 | 543 | $nicename = new Text('', 'image_nicename', 30, 30, \_CO_PUBLISHER_IMAGE_NICENAME); |
544 | 544 | |
545 | 545 | $catlist = $imgcatHandler->getListByPermission($group, 'imgcat_read', 1); |
@@ -586,12 +586,12 @@ discard block |
||
586 | 586 | |
587 | 587 | $image_select3 = new Select(_CO_PUBLISHER_IMAGE_ITEM, 'image_featured', $imagename, 1); |
588 | 588 | $image_select3->addOptionArray($objimage_array); |
589 | - $image_select3->set('onchange', 'showImgSelected("image_display", "image_featured", "uploads/", "", "' . XoopsBaseConfig::get('url') . '");'); |
|
589 | + $image_select3->set('onchange', 'showImgSelected("image_display", "image_featured", "uploads/", "", "'.XoopsBaseConfig::get('url').'");'); |
|
590 | 590 | $image_select3->setDescription(_CO_PUBLISHER_IMAGE_ITEM_DSC); |
591 | 591 | $imagesTab->addElement($image_select3); |
592 | 592 | |
593 | 593 | $imgTag = new Img([ |
594 | - 'src' => $xoops->url('uploads/' . $imageforpath), |
|
594 | + 'src' => $xoops->url('uploads/'.$imageforpath), |
|
595 | 595 | 'width' => 500, |
596 | 596 | 'name' => 'image_display', |
597 | 597 | 'id' => 'image_display', |