@@ -5,13 +5,13 @@ discard block |
||
5 | 5 | * Author: The SmartFactory <www.smartfactory.ca> |
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | -require_once __DIR__ . '/header.php'; |
|
8 | +require_once __DIR__.'/header.php'; |
|
9 | 9 | |
10 | 10 | // At which record shall we start for the Categories |
11 | -$catstart = isset($_GET['catstart']) ? (int)$_GET['catstart'] : 0; |
|
11 | +$catstart = isset($_GET['catstart']) ? (int) $_GET['catstart'] : 0; |
|
12 | 12 | |
13 | 13 | // At which record shall we start for the FAQ |
14 | -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
|
14 | +$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; |
|
15 | 15 | |
16 | 16 | // Creating the category handler object |
17 | 17 | $categoryHandler = sf_gethandler('category'); |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | |
37 | 37 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_index.tpl'; |
38 | 38 | |
39 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
40 | -require_once __DIR__ . '/footer.php'; |
|
39 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
40 | +require_once __DIR__.'/footer.php'; |
|
41 | 41 | |
42 | 42 | // Creating the categories objects |
43 | 43 | $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['catperpage'], $catstart); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // Get the last smartfaq in each category |
61 | 61 | $last_qnaObj = $faqHandler->getLastPublishedByCat(); |
62 | 62 | } |
63 | -$lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize']; |
|
63 | +$lastfaqsize = (int) $xoopsModuleConfig['lastfaqsize']; |
|
64 | 64 | $categories = array(); |
65 | 65 | foreach ($categoriesObj as $cat_id => $category) { |
66 | 66 | $total = 0; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
71 | 71 | if (isset($last_qnaObj[$subcat_id])) { |
72 | 72 | $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
73 | - $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>'); |
|
73 | + $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>'); |
|
74 | 74 | } |
75 | 75 | $subcat->setVar('faqcount', $totalQnas[$subcat_id]); |
76 | 76 | if ($xoopsModuleConfig['displaysubcatonindex']) { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | if ($total > 0) { |
89 | 89 | if (isset($last_qnaObj[$cat_id])) { |
90 | 90 | $category->setVar('last_faqid', $last_qnaObj[$cat_id]->getVar('faqid')); |
91 | - $category->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$cat_id]->getVar('faqid') . "'>" . $last_qnaObj[$cat_id]->question($lastfaqsize) . '</a>'); |
|
91 | + $category->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$cat_id]->getVar('faqid')."'>".$last_qnaObj[$cat_id]->question($lastfaqsize).'</a>'); |
|
92 | 92 | } |
93 | 93 | $category->setVar('faqcount', $total); |
94 | 94 | if (!isset($categories[$cat_id])) { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | $memberHandler = xoops_getHandler('member'); |
129 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
129 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
130 | 130 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
131 | 131 | $faq = $faqsObj[$i]->toArray(null, $allcategories); |
132 | 132 | |
@@ -152,14 +152,14 @@ discard block |
||
152 | 152 | } |
153 | 153 | |
154 | 154 | // Language constants |
155 | -$moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
155 | +$moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
156 | 156 | $xoopsTpl->assign('whereInSection', $moduleName); |
157 | 157 | $xoopsTpl->assign('displaysubcatonindex', $xoopsModuleConfig['displaysubcatonindex']); |
158 | 158 | $xoopsTpl->assign('displaylastfaqs', $xoopsModuleConfig['displaylastfaqs']); |
159 | 159 | $xoopsTpl->assign('display_categoryname', true); |
160 | 160 | $xoopsTpl->assign('displayFull', $xoopsModuleConfig['displaytype'] === 'full'); |
161 | 161 | |
162 | -$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD . ' ' . $moduleName); |
|
162 | +$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD.' '.$moduleName); |
|
163 | 163 | $xoopsTpl->assign('lang_mainintro', $myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1)); |
164 | 164 | $xoopsTpl->assign('lang_total', _MD_SF_TOTAL_SMARTFAQS); |
165 | 165 | $xoopsTpl->assign('lang_home', _MD_SF_HOME); |
@@ -178,20 +178,20 @@ discard block |
||
178 | 178 | $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS); |
179 | 179 | |
180 | 180 | // Category Navigation Bar |
181 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
181 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
182 | 182 | $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['catperpage'], $catstart, 'catstart', ''); |
183 | 183 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
184 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
184 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
185 | 185 | } else { |
186 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
186 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | // FAQ Navigation Bar |
190 | 190 | $pagenav = new XoopsPageNav($totalFaqs, $xoopsModuleConfig['indexperpage'], $start, 'start', ''); |
191 | 191 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
192 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
192 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
193 | 193 | } else { |
194 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
194 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | // Page Title Hack by marcan |
@@ -199,4 +199,4 @@ discard block |
||
199 | 199 | $xoopsTpl->assign('xoops_pagetitle', $module_name); |
200 | 200 | // End Page Title Hack by marcan |
201 | 201 | |
202 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
202 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -require_once XOOPS_ROOT_PATH . '/include/comment_new.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +require_once XOOPS_ROOT_PATH.'/include/comment_new.php'; |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | -$faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
|
11 | +$faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0; |
|
12 | 12 | |
13 | 13 | if ($faqid == 0) { |
14 | 14 | redirect_header('javascript:history.go(-1)', 1, _MD_SF_NOFAQSELECTED); |
@@ -43,23 +43,23 @@ discard block |
||
43 | 43 | |
44 | 44 | echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n"; |
45 | 45 | echo "<html>\n<head>\n"; |
46 | -echo '<title>' . _MD_SF_FAQCOMEFROM . ' ' . $xoopsConfig['sitename'] . "</title>\n"; |
|
47 | -echo "<meta http-equiv='Content-Type' content='text/html; charset=" . _CHARSET . "'>\n"; |
|
48 | -echo "<meta name='AUTHOR' content='" . $xoopsConfig['sitename'] . "'>\n"; |
|
49 | -echo "<meta name='COPYRIGHT' content='Copyright (c) 2001 by " . $xoopsConfig['sitename'] . "'>\n"; |
|
50 | -echo "<meta name='DESCRIPTION' content='" . $xoopsConfig['slogan'] . "'>\n"; |
|
51 | -echo "<meta name='GENERATOR' content='" . XOOPS_VERSION . "'>\n\n\n"; |
|
46 | +echo '<title>'._MD_SF_FAQCOMEFROM.' '.$xoopsConfig['sitename']."</title>\n"; |
|
47 | +echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."'>\n"; |
|
48 | +echo "<meta name='AUTHOR' content='".$xoopsConfig['sitename']."'>\n"; |
|
49 | +echo "<meta name='COPYRIGHT' content='Copyright (c) 2001 by ".$xoopsConfig['sitename']."'>\n"; |
|
50 | +echo "<meta name='DESCRIPTION' content='".$xoopsConfig['slogan']."'>\n"; |
|
51 | +echo "<meta name='GENERATOR' content='".XOOPS_VERSION."'>\n\n\n"; |
|
52 | 52 | |
53 | 53 | echo "<body bgcolor='#ffffff' text='#000000' onload='window.print()'> |
54 | 54 | <div style='width: 650px; border: 1px solid #000; padding: 20px;'> |
55 | - <div style='text-align: center; display: block; margin: 0 0 6px 0;'><img src='" . XOOPS_URL . "/modules/smartfaq/assets/images/logo_module.png' border='0' alt=''><h2 style='margin: 0;'>" . $faqObj->question() . "</h2></div> |
|
56 | - <div align='center'>" . $who_where . "</div> |
|
55 | + <div style='text-align: center; display: block; margin: 0 0 6px 0;'><img src='" . XOOPS_URL."/modules/smartfaq/assets/images/logo_module.png' border='0' alt=''><h2 style='margin: 0;'>".$faqObj->question()."</h2></div> |
|
56 | + <div align='center'>" . $who_where."</div> |
|
57 | 57 | <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div> |
58 | 58 | <div></div> |
59 | - <b><p>" . $faqObj->question() . '</p></b> |
|
60 | - <p>' . $answerObj->answer() . "</p> |
|
59 | + <b><p>" . $faqObj->question().'</p></b> |
|
60 | + <p>' . $answerObj->answer()."</p> |
|
61 | 61 | <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div> |
62 | - <p>" . $comeFrom . '</p> |
|
62 | + <p>" . $comeFrom.'</p> |
|
63 | 63 | </div> |
64 | 64 | <br>'; |
65 | 65 |
@@ -274,7 +274,7 @@ |
||
274 | 274 | define('_AM_SF_STATUS_EXP', "Status<span style='font-size: xx-small; font-weight: normal; display: block;'>Select the status of the Q&A.</span>"); |
275 | 275 | define('_AM_SF_SUBMISSIONSMNGMT', 'Submitted Q&A'); |
276 | 276 | define('_AM_SF_SPECIFIC_URL_SELECT', 'Specific URL...'); |
277 | -define('_AM_SF_SPECIFIC_URL', "Specific URL</span><span style='font-size: xx-small; font-weight: normal; display: block;'>If you have set the 'Contextually link to<br>this module' to <i>" . _AM_SF_SPECIFIC_URL_SELECT . "</i>, please<br>specify the URL.<br>\n<b>Example :</b> modules/newbb</span>"); |
|
277 | +define('_AM_SF_SPECIFIC_URL', "Specific URL</span><span style='font-size: xx-small; font-weight: normal; display: block;'>If you have set the 'Contextually link to<br>this module' to <i>"._AM_SF_SPECIFIC_URL_SELECT."</i>, please<br>specify the URL.<br>\n<b>Example :</b> modules/newbb</span>"); |
|
278 | 278 | define('_AM_SF_SUBMISSION_MODERATE', "Moderate this Q&A's submission"); |
279 | 279 | define('_AM_SF_SUBMITTED', 'Submitted'); |
280 | 280 | define('_AM_SF_SUBMITTED_EXP', '<b>Submitted Q&A</b> : Q&A that have been submitted by users. Once approved, they will be displayed in the Q&A section.'); |
@@ -385,7 +385,7 @@ |
||
385 | 385 | |
386 | 386 | //Help |
387 | 387 | define('_MI_SF_DIRNAME', basename(dirname(dirname(__DIR__)))); |
388 | -define('_MI_SF_HELP_HEADER', __DIR__ . '/help/helpheader.tpl'); |
|
388 | +define('_MI_SF_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
389 | 389 | define('_MI_SF_BACK_2_ADMIN', 'Back to Administration of '); |
390 | 390 | define('_MI_SF_OVERVIEW', 'Overview'); |
391 | 391 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | 11 | global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
12 | 12 | |
@@ -83,12 +83,12 @@ discard block |
||
83 | 83 | global $xoopsUser, $myts; |
84 | 84 | |
85 | 85 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
86 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
87 | - require_once __DIR__ . '/footer.php'; |
|
86 | + require_once XOOPS_ROOT_PATH.'/header.php'; |
|
87 | + require_once __DIR__.'/footer.php'; |
|
88 | 88 | |
89 | 89 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
90 | 90 | |
91 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
91 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
92 | 92 | $faq = $faqObj->toArray(null, $categoryObj, false); |
93 | 93 | $faq['categoryPath'] = $categoryObj->getCategoryPath(true); |
94 | 94 | $faq['answer'] = $answerObj->answer(); |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | $xoopsTpl->assign('lang_submit', _MD_SF_SUB_SNEWNAME); |
102 | 102 | |
103 | 103 | $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUB_SNEWNAME, ucwords($xoopsModule->name()))); |
104 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUB_INTRO); |
|
104 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, "._MD_SF_SUB_INTRO); |
|
105 | 105 | |
106 | - require_once __DIR__ . '/include/submit.inc.php'; |
|
106 | + require_once __DIR__.'/include/submit.inc.php'; |
|
107 | 107 | |
108 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
108 | + require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
109 | 109 | |
110 | 110 | exit(); |
111 | 111 | break; |
@@ -169,14 +169,14 @@ discard block |
||
169 | 169 | $attachments_tmp = unserialize(base64_decode($_POST['attachments_tmp'])); |
170 | 170 | if (isset($_POST['delete_tmp']) && count($_POST['delete_tmp'])) { |
171 | 171 | foreach ($_POST['delete_tmp'] as $key) { |
172 | - unlink(XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachments_tmp[$key][0]); |
|
172 | + unlink(XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attachments_tmp[$key][0]); |
|
173 | 173 | unset($attachments_tmp[$key]); |
174 | 174 | } |
175 | 175 | } |
176 | 176 | } |
177 | 177 | if (count($attachments_tmp)) { |
178 | 178 | foreach ($attachments_tmp as $key => $attach) { |
179 | - if (rename(XOOPS_CACHE_PATH . '/' . $attachments_tmp[$key][0], XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachments_tmp[$key][0])) { |
|
179 | + if (rename(XOOPS_CACHE_PATH.'/'.$attachments_tmp[$key][0], XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attachments_tmp[$key][0])) { |
|
180 | 180 | $post_obj->setAttachment($attach[0], $attach[1], $attach[2]); |
181 | 181 | } |
182 | 182 | } |
@@ -185,11 +185,11 @@ discard block |
||
185 | 185 | |
186 | 186 | if (isset($_FILES['userfile']['name']) && $_FILES['userfile']['name'] != '' |
187 | 187 | && $topicHandler->getPermission($forum_obj, $topic_status, 'attach')) { |
188 | - require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/class/uploader.php'; |
|
188 | + require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/class/uploader.php'; |
|
189 | 189 | $maxfilesize = $forum_obj->getVar('attach_maxkb') * 1024; |
190 | 190 | $uploaddir = XOOPS_CACHE_PATH; |
191 | 191 | |
192 | - $uploader = new sfUploader($uploaddir, $newAnswerObj->getVar('attach_ext'), (int)$maxfilesize, (int)$xoopsModuleConfig['max_img_width'], (int)$xoopsModuleConfig['max_img_height']); |
|
192 | + $uploader = new sfUploader($uploaddir, $newAnswerObj->getVar('attach_ext'), (int) $maxfilesize, (int) $xoopsModuleConfig['max_img_width'], (int) $xoopsModuleConfig['max_img_height']); |
|
193 | 193 | |
194 | 194 | if ($_FILES['userfile']['error'] > 0) { |
195 | 195 | switch ($_FILES['userfile']['error']) { |
@@ -207,19 +207,19 @@ discard block |
||
207 | 207 | $uploader->setCheckMediaTypeByExt(); |
208 | 208 | |
209 | 209 | if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { |
210 | - $prefix = is_object($xoopsUser) ? (string)$xoopsUser->uid() . '_' : 'newbb_'; |
|
210 | + $prefix = is_object($xoopsUser) ? (string) $xoopsUser->uid().'_' : 'newbb_'; |
|
211 | 211 | $uploader->setPrefix($prefix); |
212 | 212 | if (!$uploader->upload()) { |
213 | - $error_message[] = $error_upload =& $uploader->getErrors(); |
|
213 | + $error_message[] = $error_upload = & $uploader->getErrors(); |
|
214 | 214 | } else { |
215 | 215 | if (is_file($uploader->getSavedDestination())) { |
216 | - if (rename(XOOPS_CACHE_PATH . '/' . $uploader->getSavedFileName(), XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $uploader->getSavedFileName())) { |
|
216 | + if (rename(XOOPS_CACHE_PATH.'/'.$uploader->getSavedFileName(), XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$uploader->getSavedFileName())) { |
|
217 | 217 | $post_obj->setAttachment($uploader->getSavedFileName(), $uploader->getMediaName(), $uploader->getMediaType()); |
218 | 218 | } |
219 | 219 | } |
220 | 220 | } |
221 | 221 | } else { |
222 | - $error_message[] = $error_upload =& $uploader->getErrors(); |
|
222 | + $error_message[] = $error_upload = & $uploader->getErrors(); |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | } |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | } else { |
253 | 253 | // Subscribe the user to On Published notification, if requested |
254 | 254 | if ($notifypub == 1) { |
255 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
255 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
256 | 256 | $notificationHandler = xoops_getHandler('notification'); |
257 | 257 | $notificationHandler->subscribe('faq', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
258 | 258 | } |
@@ -275,20 +275,20 @@ discard block |
||
275 | 275 | $categoryObj = $categoryHandler->create(); |
276 | 276 | |
277 | 277 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.html'; |
278 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
279 | - require_once __DIR__ . '/footer.php'; |
|
278 | + require_once XOOPS_ROOT_PATH.'/header.php'; |
|
279 | + require_once __DIR__.'/footer.php'; |
|
280 | 280 | |
281 | 281 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
282 | 282 | $notifypub = 1; |
283 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
283 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
284 | 284 | $xoopsTpl->assign('whereInSection', $moduleName); |
285 | 285 | $xoopsTpl->assign('lang_submit', _MD_SF_SUB_SNEWNAME); |
286 | 286 | |
287 | 287 | $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUB_SNEWNAME, ucwords($xoopsModule->name()))); |
288 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUB_INTRO); |
|
288 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, "._MD_SF_SUB_INTRO); |
|
289 | 289 | |
290 | - require_once __DIR__ . '/include/submit.inc.php'; |
|
290 | + require_once __DIR__.'/include/submit.inc.php'; |
|
291 | 291 | |
292 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
292 | + require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
293 | 293 | break; |
294 | 294 | } |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/header.php'; |
|
10 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
11 | 11 | |
12 | 12 | global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
13 | 13 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | // Storing the FAQ object in the database |
78 | 78 | if (!$newFaqObj->store()) { |
79 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors())); |
|
79 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR.sf_formatErrors($newFaqObj->getErrors())); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | // Get the cateopry object related to that FAQ |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } else { |
92 | 92 | // Subscribe the user to On Published notification, if requested |
93 | 93 | if ($notifypub == 1) { |
94 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
94 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
95 | 95 | $notificationHandler = xoops_getHandler('notification'); |
96 | 96 | $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
97 | 97 | } |
@@ -111,27 +111,27 @@ discard block |
||
111 | 111 | global $xoopsUser, $myts; |
112 | 112 | |
113 | 113 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
114 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
115 | - require_once __DIR__ . '/footer.php'; |
|
114 | + require_once XOOPS_ROOT_PATH.'/header.php'; |
|
115 | + require_once __DIR__.'/footer.php'; |
|
116 | 116 | |
117 | 117 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
118 | 118 | |
119 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
119 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
120 | 120 | $xoopsTpl->assign('whereInSection', $moduleName); |
121 | 121 | $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
122 | 122 | |
123 | 123 | $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
124 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
124 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, ".$myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
125 | 125 | |
126 | - require_once __DIR__ . '/include/request.inc.php'; |
|
126 | + require_once __DIR__.'/include/request.inc.php'; |
|
127 | 127 | |
128 | 128 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
129 | 129 | |
130 | 130 | $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
131 | 131 | |
132 | - require_once __DIR__ . '/include/request.inc.php'; |
|
132 | + require_once __DIR__.'/include/request.inc.php'; |
|
133 | 133 | |
134 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
134 | + require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
135 | 135 | |
136 | 136 | break; |
137 | 137 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -require_once XOOPS_ROOT_PATH . '/include/comment_delete.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +require_once XOOPS_ROOT_PATH.'/include/comment_delete.php'; |
@@ -6,16 +6,16 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | 11 | global $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
12 | 12 | |
13 | 13 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_category.tpl'; |
14 | 14 | |
15 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
16 | -require_once __DIR__ . '/footer.php'; |
|
15 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
16 | +require_once __DIR__.'/footer.php'; |
|
17 | 17 | |
18 | -$categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
18 | +$categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0; |
|
19 | 19 | |
20 | 20 | // Creating the category object for the selected category |
21 | 21 | $categoryObj = new sfCategory($categoryid); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $categoryHandler = sf_gethandler('category'); |
35 | 35 | |
36 | 36 | // At which record shall we start |
37 | -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
|
37 | +$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; |
|
38 | 38 | |
39 | 39 | // Creating the faq handler object |
40 | 40 | $faqHandler = sf_gethandler('faq'); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $last_qnaObj = $faqHandler->getLastPublishedByCat(array(_SF_STATUS_OPENED)); |
59 | 59 | if (isset($last_qnaObj[$categoryid])) { |
60 | 60 | $categoryObj->setVar('last_faqid', $last_qnaObj[$categoryid]->getVar('faqid')); |
61 | - $categoryObj->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$categoryid]->getVar('faqid') . "'>" . $last_qnaObj[$categoryid]->question(50) . '</a>'); |
|
61 | + $categoryObj->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$categoryid]->getVar('faqid')."'>".$last_qnaObj[$categoryid]->question(50).'</a>'); |
|
62 | 62 | } |
63 | 63 | // Populating the smarty variables with informations related to the selected category |
64 | 64 | $category = $categoryObj->toArray(null, true); |
@@ -77,16 +77,16 @@ discard block |
||
77 | 77 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
78 | 78 | if (isset($last_qnaObj[$subcat_id])) { |
79 | 79 | $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
80 | - $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question(50) . '</a>'); |
|
80 | + $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question(50).'</a>'); |
|
81 | 81 | } |
82 | 82 | $subcat->setVar('faqcount', $totalQnas[$subcat_id]); |
83 | 83 | $subcats[$subcat_id] = $subcat->toArray(null, true); |
84 | - $catQnasWithSub += $subcats[$subcat_id]['total']; |
|
84 | + $catQnasWithSub += $subcats[$subcat_id]['total']; |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | $xoopsTpl->assign('subcats', $subcats); |
88 | 88 | } |
89 | -$category['total'] = $catQnasWithSub + $totalQnas[$categoryid]; |
|
89 | +$category['total'] = $catQnasWithSub+$totalQnas[$categoryid]; |
|
90 | 90 | if ($faqsObj) { |
91 | 91 | $userids = array(); |
92 | 92 | foreach ($faqsObj as $key => $thisfaq) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | $memberHandler = xoops_getHandler('member'); |
98 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
98 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
99 | 99 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
100 | 100 | $faq = $faqsObj[$i]->toArray(null, $allcategories); |
101 | 101 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | } |
108 | 108 | } |
109 | 109 | // Language constants |
110 | -$xoopsTpl->assign('whereInSection', $myts->htmlSpecialChars($xoopsModule->getVar('name')) . " > <a href='open_index.php'>" . _MD_SF_OPEN_SECTION . '</a>'); |
|
110 | +$xoopsTpl->assign('whereInSection', $myts->htmlSpecialChars($xoopsModule->getVar('name'))." > <a href='open_index.php'>"._MD_SF_OPEN_SECTION.'</a>'); |
|
111 | 111 | $xoopsTpl->assign('modulename', $xoopsModule->dirname()); |
112 | 112 | |
113 | 113 | $xoopsTpl->assign('displaylastfaqs', true); |
@@ -124,19 +124,19 @@ discard block |
||
124 | 124 | $xoopsTpl->assign('lang_category', _MD_SF_CATEGORY); |
125 | 125 | |
126 | 126 | // The Navigation Bar |
127 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
128 | -$pagenav = new XoopsPageNav($totalQnas[$categoryid], $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid')); |
|
127 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
128 | +$pagenav = new XoopsPageNav($totalQnas[$categoryid], $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid')); |
|
129 | 129 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
130 | - $category['navbar'] = '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'; |
|
130 | + $category['navbar'] = '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'; |
|
131 | 131 | } else { |
132 | - $category['navbar'] = '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
132 | + $category['navbar'] = '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | $xoopsTpl->assign('category', $category); |
136 | 136 | |
137 | 137 | // Page Title Hack by marcan |
138 | 138 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
139 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category['name']); |
|
139 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category['name']); |
|
140 | 140 | // End Page Title Hack by marcan |
141 | 141 | |
142 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
142 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |