@@ -11,7 +11,7 @@ |
||
11 | 11 | function smartfaq_com_update($faq_id, $total_num) |
12 | 12 | { |
13 | 13 | $db = XoopsDatabaseFactory::getDatabaseConnection(); |
14 | - $sql = 'UPDATE ' . $db->prefix('smartfaq_faq') . ' SET comments = ' . $total_num . ' WHERE faqid = ' . $faq_id; |
|
14 | + $sql = 'UPDATE '.$db->prefix('smartfaq_faq').' SET comments = '.$total_num.' WHERE faqid = '.$faq_id; |
|
15 | 15 | $db->query($sql); |
16 | 16 | } |
17 | 17 |
@@ -116,13 +116,13 @@ |
||
116 | 116 | // Language constants |
117 | 117 | $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
118 | 118 | $xoopsTpl->assign(array( |
119 | - 'lang_on' => _MD_SF_ON, |
|
120 | - 'lang_postedby' => _MD_SF_POSTEDBY, |
|
121 | - 'lang_total' => $totalQnasOnPage, |
|
122 | - 'lang_faq' => _MD_SF_FAQ, |
|
123 | - 'lang_datesub' => _MD_SF_DATESUB, |
|
124 | - 'lang_hits' => _MD_SF_HITS |
|
125 | - )); |
|
119 | + 'lang_on' => _MD_SF_ON, |
|
120 | + 'lang_postedby' => _MD_SF_POSTEDBY, |
|
121 | + 'lang_total' => $totalQnasOnPage, |
|
122 | + 'lang_faq' => _MD_SF_FAQ, |
|
123 | + 'lang_datesub' => _MD_SF_DATESUB, |
|
124 | + 'lang_hits' => _MD_SF_HITS |
|
125 | + )); |
|
126 | 126 | |
127 | 127 | $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
128 | 128 | $xoopsTpl->assign('lang_mainhead', sprintf(_MD_SF_OPEN_WELCOME, $xoopsConfig['sitename'])); |
@@ -6,15 +6,15 @@ 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 | // At which record shall we start for the Categories |
14 | -$catstart = isset($_GET['catstart']) ? (int)$_GET['catstart'] : 0; |
|
14 | +$catstart = isset($_GET['catstart']) ? (int) $_GET['catstart'] : 0; |
|
15 | 15 | |
16 | 16 | // At which record shall we start for the FAQs |
17 | -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
|
17 | +$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; |
|
18 | 18 | |
19 | 19 | // Creating the category handler object |
20 | 20 | $categoryHandler = sf_gethandler('category'); |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | |
43 | 43 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_index.tpl'; |
44 | 44 | |
45 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
46 | -require_once __DIR__ . '/footer.php'; |
|
45 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
46 | +require_once __DIR__.'/footer.php'; |
|
47 | 47 | |
48 | 48 | //get all categories for future reference |
49 | 49 | $allcategories = $categoryHandler->getObjects(null, true); |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
66 | 66 | if (isset($last_qnaObj[$subcat_id])) { |
67 | 67 | $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
68 | - $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question(50) . '</a>'); |
|
68 | + $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question(50).'</a>'); |
|
69 | 69 | } |
70 | 70 | $subcat->setVar('faqcount', $totalQnas[$subcat_id]); |
71 | 71 | $categories[$cat_id]['subcats'][$subcat_id] = $subcat->toArray(null, true); |
72 | - $total += $totalQnas[$subcat_id]; |
|
72 | + $total += $totalQnas[$subcat_id]; |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | $memberHandler = xoops_getHandler('member'); |
104 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
104 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
105 | 105 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
106 | 106 | $faq = $faqsObj[$i]->toArray(null, $allcategories); |
107 | 107 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | } |
116 | 116 | // Language constants |
117 | -$moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
117 | +$moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
118 | 118 | $xoopsTpl->assign(array( |
119 | 119 | 'lang_on' => _MD_SF_ON, |
120 | 120 | 'lang_postedby' => _MD_SF_POSTEDBY, |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'lang_hits' => _MD_SF_HITS |
125 | 125 | )); |
126 | 126 | |
127 | -$moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
127 | +$moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
128 | 128 | $xoopsTpl->assign('lang_mainhead', sprintf(_MD_SF_OPEN_WELCOME, $xoopsConfig['sitename'])); |
129 | 129 | $xoopsTpl->assign('lang_mainintro', $myts->displayTarea($xoopsModuleConfig['openquestionintromsg'], 1)); |
130 | 130 | $xoopsTpl->assign('lang_total', _MD_SF_TOTAL_QUESTIONS); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $xoopsTpl->assign('lang_description', _MD_SF_DESCRIPTION); |
133 | 133 | $xoopsTpl->assign('lang_category', _MD_SF_CATEGORY); |
134 | 134 | $xoopsTpl->assign('sectionname', $moduleName); |
135 | -$xoopsTpl->assign('whereInSection', "<a href='index.php'>" . $moduleName . '</a> > ' . _MD_SF_OPEN_SECTION); |
|
135 | +$xoopsTpl->assign('whereInSection', "<a href='index.php'>".$moduleName.'</a> > '._MD_SF_OPEN_SECTION); |
|
136 | 136 | |
137 | 137 | $xoopsTpl->assign('displayFull', false); |
138 | 138 | $xoopsTpl->assign('displaylastfaqs', $xoopsModuleConfig['displaylastfaqs']); |
@@ -148,25 +148,25 @@ discard block |
||
148 | 148 | $xoopsTpl->assign('lang_category', _MD_SF_CATEGORY); |
149 | 149 | |
150 | 150 | // Category Navigation Bar |
151 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
151 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
152 | 152 | $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['catperpage'], $catstart, 'catstart', ''); |
153 | 153 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
154 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
154 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
155 | 155 | } else { |
156 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
156 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | // FAQ Navigation Bar |
160 | 160 | $pagenav = new XoopsPageNav($totalFaqs, $xoopsModuleConfig['indexperpage'], $start, 'start', ''); |
161 | 161 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
162 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
162 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
163 | 163 | } else { |
164 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
164 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | // Page Title Hack by marcan |
168 | 168 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
169 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category->getVar('name')); |
|
169 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category->getVar('name')); |
|
170 | 170 | // End Page Title Hack by marcan |
171 | 171 | |
172 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
172 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -15,12 +15,12 @@ |
||
15 | 15 | $xoopsTpl->assign('isAdmin', $isAdmin); |
16 | 16 | |
17 | 17 | $xoopsTpl->assign(array( |
18 | - 'lang_on' => _MD_SF_ON, |
|
19 | - 'lang_postedby' => _MD_SF_POSTEDBY, |
|
20 | - 'lang_faq' => _MD_SF_QUESTION, |
|
21 | - 'lang_datesub' => _MD_SF_DATESUB, |
|
22 | - 'lang_hits' => _MD_SF_HITS |
|
23 | - )); |
|
18 | + 'lang_on' => _MD_SF_ON, |
|
19 | + 'lang_postedby' => _MD_SF_POSTEDBY, |
|
20 | + 'lang_faq' => _MD_SF_QUESTION, |
|
21 | + 'lang_datesub' => _MD_SF_DATESUB, |
|
22 | + 'lang_hits' => _MD_SF_HITS |
|
23 | + )); |
|
24 | 24 | $xoopsTpl->assign('sectionname', $myts->displayTarea($xoopsModule->getVar('name'))); |
25 | 25 | |
26 | 26 | $xoopsTpl->assign('modulename', $xoopsModule->dirname()); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $uid = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
12 | 12 | $isAdmin = (sf_userIsAdmin() || sf_moderator()); |
13 | 13 | |
14 | -$xoopsTpl->assign('sf_adminpage', "<a href='" . XOOPS_URL . "/modules/smartfaq/admin/index.php'>" . _MD_SF_ADMIN_PAGE . '</a>'); |
|
14 | +$xoopsTpl->assign('sf_adminpage', "<a href='".XOOPS_URL."/modules/smartfaq/admin/index.php'>"._MD_SF_ADMIN_PAGE.'</a>'); |
|
15 | 15 | $xoopsTpl->assign('isAdmin', $isAdmin); |
16 | 16 | |
17 | 17 | $xoopsTpl->assign(array( |
@@ -34,4 +34,4 @@ discard block |
||
34 | 34 | |
35 | 35 | $xoopsTpl->assign('ref_smartfaq', 'SmartFAQ is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)'); |
36 | 36 | |
37 | -$xoopsTpl->assign('xoops_module_header', "<link rel='stylesheet' type='text/css' href='" . XOOPS_URL . "/modules/smartfaq/assets/css/smartfaq.css'>"); |
|
37 | +$xoopsTpl->assign('xoops_module_header', "<link rel='stylesheet' type='text/css' href='".XOOPS_URL."/modules/smartfaq/assets/css/smartfaq.css'>"); |
@@ -132,7 +132,7 @@ |
||
132 | 132 | define('_MD_SF_SPECIFIC_URL_SELECT', 'Specific URL...'); |
133 | 133 | define('_MD_SF_SENDSTORY', 'Send this Q&A to a friend'); |
134 | 134 | define('_MD_SF_SPECIFIC_URL', 'Specific URL'); |
135 | -define('_MD_SF_SPECIFIC_URL_DSC', "If you have set the 'Contextually link to this module' to <i>" . _MD_SF_SPECIFIC_URL_SELECT . "</i>, please specify the URL.<br>\n<b>Example :</b> modules/newbb"); |
|
135 | +define('_MD_SF_SPECIFIC_URL_DSC', "If you have set the 'Contextually link to this module' to <i>"._MD_SF_SPECIFIC_URL_SELECT."</i>, please specify the URL.<br>\n<b>Example :</b> modules/newbb"); |
|
136 | 136 | define('_MD_SF_SUB_INTRO', 'please fill this form to send your Q&A. The site administrator will review it and then publish it as soon as possible. Thank you in advance for your contribution.'); |
137 | 137 | define('_MD_SF_SUB_SNEWNAME', 'Submit a Q&A'); |
138 | 138 | define('_MD_SF_SUB_SMNAME', 'Submit a Q&A'); |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | define('_MD_SF_MAIL', 'Send Q&A'); |
76 | 76 | define('_MD_SF_MAINHEAD', 'Welcome to the'); |
77 | 77 | define('_MD_SF_MAININTRO', |
78 | - "In this area of the site, you will find the answers to the frequently asked questions. Each Q&A is placed in a category for easier finding. This is the section from where the random Q&As in the right column of the site come from. Should you not find the answer to a particular question, don't hesitate to <a href='" |
|
79 | - . XOOPS_URL |
|
80 | - . "/forms/askus/form.php'>Ask us a Question!</a>"); |
|
78 | + "In this area of the site, you will find the answers to the frequently asked questions. Each Q&A is placed in a category for easier finding. This is the section from where the random Q&As in the right column of the site come from. Should you not find the answer to a particular question, don't hesitate to <a href='" |
|
79 | + . XOOPS_URL |
|
80 | + . "/forms/askus/form.php'>Ask us a Question!</a>"); |
|
81 | 81 | define('_MD_SF_MAINNOSELECTCAT', 'You did not select a valid category'); |
82 | 82 | define('_MD_SF_MAINNOFAQS', 'There are no Q&As in this category'); |
83 | 83 | define('_MD_SF_MODERATION_MAIN_HEAD', 'Moderation section of '); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | define('_MD_SF_REQUEST', 'Request a new Q&A'); |
118 | 118 | define('_MD_SF_REQUEST_ERROR', 'An error occured. Your request was not sent.'); |
119 | 119 | define('_MD_SF_REQUEST_INTRO', |
120 | - 'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'); |
|
120 | + 'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'); |
|
121 | 121 | define('_MD_SF_REQUEST_RECEIVED_NEED_APPROVAL', 'Your request has been sent and will be published in the Open Questions section upon approval by a moderator.<br>Thank you for your contribution!'); |
122 | 122 | define('_MD_SF_REQUEST_RECEIVED_AND_PUBLISHED', 'Your request has been sent and automatically published in the Open Questions section. Thank you for your contribution!'); |
123 | 123 | define('_MD_SF_REQUESTED', 'Requested'); |
@@ -549,11 +549,11 @@ |
||
549 | 549 | $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
550 | 550 | xoops_cp_header(); |
551 | 551 | xoops_confirm(array( |
552 | - 'op' => 'del', |
|
553 | - 'faqid' => $faqObj->faqid(), |
|
554 | - 'confirm' => 1, |
|
555 | - 'name' => $faqObj->question() |
|
556 | - ), 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
552 | + 'op' => 'del', |
|
553 | + 'faqid' => $faqObj->faqid(), |
|
554 | + 'confirm' => 1, |
|
555 | + 'name' => $faqObj->question() |
|
556 | + ), 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
557 | 557 | xoops_cp_footer(); |
558 | 558 | } |
559 | 559 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/admin_header.php'; |
|
9 | +require_once __DIR__.'/admin_header.php'; |
|
10 | 10 | |
11 | 11 | // Creating the faq handler object |
12 | 12 | $faqHandler = sf_gethandler('faq'); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | // Where shall we start? |
29 | -$startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0; |
|
29 | +$startfaq = isset($_GET['startfaq']) ? (int) $_GET['startfaq'] : 0; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * @param bool $showmenu |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | { |
39 | 39 | global $answerHandler, $faqHandler, $categoryHandler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts; |
40 | 40 | |
41 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
41 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
42 | 42 | // If there is a parameter, and the id exists, retrieve data: we're editing a faq |
43 | 43 | if ($faqid != -1) { |
44 | 44 | // Creating the FAQ object |
@@ -140,9 +140,9 @@ discard block |
||
140 | 140 | |
141 | 141 | echo "<br>\n"; |
142 | 142 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
143 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . $collapsableBar_title . '</h3>'; |
|
143 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".$collapsableBar_title.'</h3>'; |
|
144 | 144 | echo "<div id='bottomtable'>"; |
145 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $collapsableBar_info . '</span>'; |
|
145 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$collapsableBar_info.'</span>'; |
|
146 | 146 | } else { |
147 | 147 | // there's no parameter, so we're adding a faq |
148 | 148 | $faqObj = $faqHandler->create(); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $button_caption = _AM_SF_CREATE; |
157 | 157 | |
158 | 158 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
159 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CREATESMARTFAQ . '</h3>'; |
|
159 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_CREATESMARTFAQ.'</h3>'; |
|
160 | 160 | echo "<div id='bottomtable'>"; |
161 | 161 | } |
162 | 162 | $sform = new XoopsThemeForm(_AM_SF_SMARTFAQ, 'op', xoops_getenv('PHP_SELF'), 'post', true); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | // ANSWER |
189 | 189 | if ($merge) { |
190 | - $theanswer = $originalAnswerObj->answer('e') . "\n\n" . sprintf(_AM_SF_NEW_CONTRIBUTION, sf_getLinkedUnameFromId($answerObj->uid(), $xoopsModuleConfig['userealname']), $answerObj->datesub(), $answerObj->answer('e')); |
|
190 | + $theanswer = $originalAnswerObj->answer('e')."\n\n".sprintf(_AM_SF_NEW_CONTRIBUTION, sf_getLinkedUnameFromId($answerObj->uid(), $xoopsModuleConfig['userealname']), $answerObj->datesub(), $answerObj->answer('e')); |
|
191 | 191 | } else { |
192 | 192 | $theanswer = $answerObj->answer('e'); |
193 | 193 | } |
@@ -236,14 +236,14 @@ discard block |
||
236 | 236 | $sform->addElement(new XoopsFormText(_AM_SF_SPECIFIC_URL, 'contextpage', 50, 60, $faqObj->contextpage()), false); |
237 | 237 | |
238 | 238 | // EXACT URL? |
239 | - $excaturl_radio = new XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
239 | + $excaturl_radio = new XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
240 | 240 | $sform->addElement($excaturl_radio); |
241 | 241 | // WEIGHT |
242 | 242 | $sform->addElement(new XoopsFormText(_AM_SF_WEIGHT, 'weight', 5, 5, $faqObj->weight()), true); |
243 | 243 | |
244 | 244 | // COMMENTS |
245 | 245 | // Code to allow comments |
246 | - $addcomments_radio = new XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
246 | + $addcomments_radio = new XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
247 | 247 | $sform->addElement($addcomments_radio); |
248 | 248 | |
249 | 249 | // PER ITEM PERMISSIONS |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | } |
258 | 258 | $sform->addElement($groups_checkbox); |
259 | 259 | |
260 | - $partial_view = new XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
260 | + $partial_view = new XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
261 | 261 | $sform->addElement($partial_view); |
262 | 262 | |
263 | 263 | // VARIOUS OPTIONS |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | // OFFLINE |
281 | 281 | if ($faqObj->status() == _SF_STATUS_OFFLINE) { |
282 | 282 | // Back OnLine |
283 | - $offline_radio = new XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
283 | + $offline_radio = new XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
284 | 284 | $sform->addElement($offline_radio); |
285 | 285 | } |
286 | 286 | |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | } |
355 | 355 | |
356 | 356 | xoops_cp_header(); |
357 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
357 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
358 | 358 | |
359 | 359 | editfaq(true, $faqid, $answerid, true); |
360 | 360 | break; |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | xoops_cp_header(); |
376 | 376 | |
377 | 377 | $adminObject->displayNavigation(basename(__FILE__)); |
378 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
378 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
379 | 379 | |
380 | 380 | editfaq(true, $faqid, $answerid); |
381 | 381 | break; |
@@ -383,9 +383,9 @@ discard block |
||
383 | 383 | case 'addfaq': |
384 | 384 | global $xoopsUser; |
385 | 385 | |
386 | - $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : -1; |
|
387 | - $requester_uid = isset($_POST['requester_uid']) ? (int)$_POST['requester_uid'] : 0; |
|
388 | - $answerer_uid = isset($_POST['answerer_uid']) ? (int)$_POST['answerer_uid'] : 0; |
|
386 | + $faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : -1; |
|
387 | + $requester_uid = isset($_POST['requester_uid']) ? (int) $_POST['requester_uid'] : 0; |
|
388 | + $answerer_uid = isset($_POST['answerer_uid']) ? (int) $_POST['answerer_uid'] : 0; |
|
389 | 389 | |
390 | 390 | // Creating the FAQ and answer objects |
391 | 391 | if ($faqid != -1) { |
@@ -406,23 +406,23 @@ discard block |
||
406 | 406 | } else { |
407 | 407 | $faqObj->setGroups_read(); |
408 | 408 | } |
409 | - $faqObj->setVar('categoryid', isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0); |
|
409 | + $faqObj->setVar('categoryid', isset($_POST['categoryid']) ? (int) $_POST['categoryid'] : 0); |
|
410 | 410 | $faqObj->setVar('question', $_POST['question']); |
411 | 411 | $faqObj->setVar('howdoi', $_POST['howdoi']); |
412 | 412 | $faqObj->setVar('diduno', $_POST['diduno']); |
413 | 413 | |
414 | - $faqObj->setVar('status', isset($_POST['status']) ? (int)$_POST['status'] : _SF_STATUS_ASKED); |
|
414 | + $faqObj->setVar('status', isset($_POST['status']) ? (int) $_POST['status'] : _SF_STATUS_ASKED); |
|
415 | 415 | |
416 | 416 | // If this SmartFAQ is offline and the user set this option to No |
417 | 417 | $offline = isset($_POST['offline']) ? $_POST['offline'] : 1; |
418 | 418 | if ((0 == $offline) && ($faqObj->status() == _SF_STATUS_OFFLINE)) { |
419 | 419 | $faqObj->setVar('status', _SF_STATUS_PUBLISHED); |
420 | 420 | } |
421 | - $faqObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : $faqObj->weight()); |
|
422 | - $faqObj->setVar('html', isset($_POST['html']) ? (int)$_POST['html'] : 0); |
|
423 | - $faqObj->setVar('smiley', isset($_POST['smiley']) ? (int)$_POST['smiley'] : 0); |
|
424 | - $faqObj->setVar('xcodes', isset($_POST['xcodes']) ? (int)$_POST['xcodes'] : 0); |
|
425 | - $faqObj->setVar('cancomment', isset($_POST['cancomment']) ? (int)$_POST['cancomment'] : 0); |
|
421 | + $faqObj->setVar('weight', isset($_POST['weight']) ? (int) $_POST['weight'] : $faqObj->weight()); |
|
422 | + $faqObj->setVar('html', isset($_POST['html']) ? (int) $_POST['html'] : 0); |
|
423 | + $faqObj->setVar('smiley', isset($_POST['smiley']) ? (int) $_POST['smiley'] : 0); |
|
424 | + $faqObj->setVar('xcodes', isset($_POST['xcodes']) ? (int) $_POST['xcodes'] : 0); |
|
425 | + $faqObj->setVar('cancomment', isset($_POST['cancomment']) ? (int) $_POST['cancomment'] : 0); |
|
426 | 426 | $faqObj->setVar('modulelink', $_POST['modulelink']); |
427 | 427 | $faqObj->setVar('contextpage', $_POST['contextpage']); |
428 | 428 | $faqObj->setVar('exacturl', $_POST['exacturl']); |
@@ -506,13 +506,13 @@ discard block |
||
506 | 506 | |
507 | 507 | // Storing the FAQ |
508 | 508 | if (!$faqObj->store()) { |
509 | - redirect_header('javascript:history.go(-1)', 3, $error_msg . sf_formatErrors($faqObj->getErrors())); |
|
509 | + redirect_header('javascript:history.go(-1)', 3, $error_msg.sf_formatErrors($faqObj->getErrors())); |
|
510 | 510 | } |
511 | 511 | |
512 | 512 | // Storing the answer |
513 | 513 | $answerObj->setVar('faqid', $faqObj->faqid()); |
514 | 514 | if (!$answerObj->store()) { |
515 | - redirect_header('javascript:history.go(-1)', 3, $error_msg . sf_formatErrors($answerObj->getErrors())); |
|
515 | + redirect_header('javascript:history.go(-1)', 3, $error_msg.sf_formatErrors($answerObj->getErrors())); |
|
516 | 516 | } |
517 | 517 | |
518 | 518 | // Send notifications |
@@ -529,8 +529,8 @@ discard block |
||
529 | 529 | $module_id = $xoopsModule->getVar('mid'); |
530 | 530 | $gpermHandler = xoops_getHandler('groupperm'); |
531 | 531 | |
532 | - $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : 0; |
|
533 | - $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : $faqid; |
|
532 | + $faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : 0; |
|
533 | + $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : $faqid; |
|
534 | 534 | |
535 | 535 | $faqObj = new sfFaq($faqid); |
536 | 536 | |
@@ -539,20 +539,20 @@ discard block |
||
539 | 539 | |
540 | 540 | if ($confirm) { |
541 | 541 | if (!$faqHandler->delete($faqObj)) { |
542 | - redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR . sf_formatErrors($faqObj->getErrors())); |
|
542 | + redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR.sf_formatErrors($faqObj->getErrors())); |
|
543 | 543 | } |
544 | 544 | |
545 | 545 | redirect_header('faq.php', 2, sprintf(_AM_SF_ARTISDELETED, $faqObj->question())); |
546 | 546 | } else { |
547 | 547 | // no confirm: show deletion condition |
548 | - $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
|
548 | + $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0; |
|
549 | 549 | xoops_cp_header(); |
550 | 550 | xoops_confirm(array( |
551 | 551 | 'op' => 'del', |
552 | 552 | 'faqid' => $faqObj->faqid(), |
553 | 553 | 'confirm' => 1, |
554 | 554 | 'name' => $faqObj->question() |
555 | - ), 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
555 | + ), 'faq.php', _AM_SF_DELETETHISARTICLE." <br>'".$faqObj->question()."'. <br> <br>", _AM_SF_DELETE); |
|
556 | 556 | xoops_cp_footer(); |
557 | 557 | } |
558 | 558 | |
@@ -566,10 +566,10 @@ discard block |
||
566 | 566 | |
567 | 567 | $adminObject->displayNavigation(basename(__FILE__)); |
568 | 568 | |
569 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
570 | - require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
569 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
570 | + require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
571 | 571 | |
572 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/displayfaqs.php'; |
|
572 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/displayfaqs.php'; |
|
573 | 573 | |
574 | 574 | $totalcategories = $categoryHandler->getCategoriesCount(-1); |
575 | 575 | if ($totalcategories > 0) { |
@@ -579,4 +579,4 @@ discard block |
||
579 | 579 | break; |
580 | 580 | } |
581 | 581 | |
582 | -require_once __DIR__ . '/admin_footer.php'; |
|
582 | +require_once __DIR__.'/admin_footer.php'; |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +include XOOPS_ROOT_PATH.'/include/notification_update.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_reply.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +require_once XOOPS_ROOT_PATH.'/include/comment_reply.php'; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | function b_faqs_recent_questions_show($options) |
13 | 13 | { |
14 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
14 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
15 | 15 | |
16 | 16 | $block = array(); |
17 | 17 | |
@@ -60,44 +60,44 @@ discard block |
||
60 | 60 | */ |
61 | 61 | function b_faqs_recent_questions_edit($options) |
62 | 62 | { |
63 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
63 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
64 | 64 | |
65 | 65 | $form = sf_createCategorySelect($options[0]); |
66 | 66 | |
67 | - $form .= ' <br>' . _MB_SF_ORDER . " <select name='options[]'>"; |
|
67 | + $form .= ' <br>'._MB_SF_ORDER." <select name='options[]'>"; |
|
68 | 68 | |
69 | 69 | $form .= "<option value='datesub'"; |
70 | 70 | if ($options[1] === 'datesub') { |
71 | 71 | $form .= ' selected'; |
72 | 72 | } |
73 | - $form .= '>' . _MB_SF_DATE . "</option>\n"; |
|
73 | + $form .= '>'._MB_SF_DATE."</option>\n"; |
|
74 | 74 | |
75 | 75 | $form .= "<option value='counter'"; |
76 | 76 | if ($options[1] === 'counter') { |
77 | 77 | $form .= ' selected'; |
78 | 78 | } |
79 | - $form .= '>' . _MB_SF_HITS . "</option>\n"; |
|
79 | + $form .= '>'._MB_SF_HITS."</option>\n"; |
|
80 | 80 | |
81 | 81 | $form .= "<option value='weight'"; |
82 | 82 | if ($options[1] === 'weight') { |
83 | 83 | $form .= ' selected'; |
84 | 84 | } |
85 | - $form .= '>' . _MB_SF_WEIGHT . "</option>\n"; |
|
85 | + $form .= '>'._MB_SF_WEIGHT."</option>\n"; |
|
86 | 86 | |
87 | 87 | $form .= "</select>\n"; |
88 | 88 | |
89 | - $form .= ' ' . _MB_SF_DISP . " <input type='text' name='options[]' value='" . $options[2] . "'> " . _MB_SF_QUESTIONS . ''; |
|
90 | - $form .= ' <br>' . _MB_SF_CHARS . " <input type='text' name='options[]' value='" . $options[3] . "'> " . _MB_SF_LENGTH . ''; |
|
89 | + $form .= ' '._MB_SF_DISP." <input type='text' name='options[]' value='".$options[2]."'> "._MB_SF_QUESTIONS.''; |
|
90 | + $form .= ' <br>'._MB_SF_CHARS." <input type='text' name='options[]' value='".$options[3]."'> "._MB_SF_LENGTH.''; |
|
91 | 91 | |
92 | - $form .= '<br>' . _MB_SF_SHOW_DATE . " <input type='radio' id='options[]' name='options[]' value='1'"; |
|
92 | + $form .= '<br>'._MB_SF_SHOW_DATE." <input type='radio' id='options[]' name='options[]' value='1'"; |
|
93 | 93 | if ($options[4] == 1) { |
94 | 94 | $form .= ' checked'; |
95 | 95 | } |
96 | - $form .= '> ' . _YES . "<input type='radio' id='options[]' name='options[]' value='0'"; |
|
96 | + $form .= '> '._YES."<input type='radio' id='options[]' name='options[]' value='0'"; |
|
97 | 97 | if ($options[4] == 0) { |
98 | 98 | $form .= ' checked'; |
99 | 99 | } |
100 | - $form .= '> ' . _NO . ''; |
|
100 | + $form .= '> '._NO.''; |
|
101 | 101 | |
102 | 102 | return $form; |
103 | 103 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | function b_faqs_recent_show($options) |
13 | 13 | { |
14 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
14 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
15 | 15 | $myts = MyTextSanitizer::getInstance(); |
16 | 16 | |
17 | 17 | $smartModule = sf_getModuleInfo(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | $memberHandler = xoops_getHandler('member'); |
55 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
55 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
56 | 56 | for ($i = 0, $iMax = count($faqsObj); $i < $iMax; ++$i) { |
57 | 57 | $faqs['categoryid'] = $faqsObj[$i]->categoryid(); |
58 | 58 | $faqs['question'] = $faqsObj[$i]->question($maxQuestionLength); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $block['lang_poster'] = _MB_SF_ANSWEREDBY; |
75 | 75 | $block['lang_date'] = _MB_SF_DATE; |
76 | 76 | $modulename = $myts->htmlSpecialChars($smartModule->getVar('name')); |
77 | - $block['lang_visitfaq'] = _MB_SF_VISITFAQ . ' ' . $modulename; |
|
77 | + $block['lang_visitfaq'] = _MB_SF_VISITFAQ.' '.$modulename; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | return $block; |
@@ -86,34 +86,34 @@ discard block |
||
86 | 86 | */ |
87 | 87 | function b_faqs_recent_edit($options) |
88 | 88 | { |
89 | - require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
89 | + require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
90 | 90 | |
91 | 91 | $form = sf_createCategorySelect($options[0]); |
92 | 92 | |
93 | - $form .= ' <br>' . _MB_SF_ORDER . " <select name='options[]'>"; |
|
93 | + $form .= ' <br>'._MB_SF_ORDER." <select name='options[]'>"; |
|
94 | 94 | |
95 | 95 | $form .= "<option value='datesub'"; |
96 | 96 | if ($options[1] === 'datesub') { |
97 | 97 | $form .= ' selected'; |
98 | 98 | } |
99 | - $form .= '>' . _MB_SF_DATE . "</option>\n"; |
|
99 | + $form .= '>'._MB_SF_DATE."</option>\n"; |
|
100 | 100 | |
101 | 101 | $form .= "<option value='counter'"; |
102 | 102 | if ($options[1] === 'counter') { |
103 | 103 | $form .= ' selected'; |
104 | 104 | } |
105 | - $form .= '>' . _MB_SF_HITS . "</option>\n"; |
|
105 | + $form .= '>'._MB_SF_HITS."</option>\n"; |
|
106 | 106 | |
107 | 107 | $form .= "<option value='weight'"; |
108 | 108 | if ($options[1] === 'weight') { |
109 | 109 | $form .= ' selected'; |
110 | 110 | } |
111 | - $form .= '>' . _MB_SF_WEIGHT . "</option>\n"; |
|
111 | + $form .= '>'._MB_SF_WEIGHT."</option>\n"; |
|
112 | 112 | |
113 | 113 | $form .= "</select>\n"; |
114 | 114 | |
115 | - $form .= ' ' . _MB_SF_DISP . " <input type='text' name='options[]' value='" . $options[2] . "'> " . _MB_SF_FAQS . ''; |
|
116 | - $form .= ' <br>' . _MB_SF_CHARS . " <input type='text' name='options[]' value='" . $options[3] . "'> " . _MB_SF_LENGTH . ''; |
|
115 | + $form .= ' '._MB_SF_DISP." <input type='text' name='options[]' value='".$options[2]."'> "._MB_SF_FAQS.''; |
|
116 | + $form .= ' <br>'._MB_SF_CHARS." <input type='text' name='options[]' value='".$options[3]."'> "._MB_SF_LENGTH.''; |
|
117 | 117 | |
118 | 118 | return $form; |
119 | 119 | } |