@@ -5,13 +5,13 @@ discard block |
||
5 | 5 | * Author: The SmartFactory <www.smartfactory.ca> |
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | -include_once __DIR__ . '/header.php'; |
|
8 | +include_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'); |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | |
38 | 38 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_index.tpl'; |
39 | 39 | |
40 | -include_once XOOPS_ROOT_PATH . '/header.php'; |
|
41 | -include_once __DIR__ . '/footer.php'; |
|
40 | +include_once XOOPS_ROOT_PATH.'/header.php'; |
|
41 | +include_once __DIR__.'/footer.php'; |
|
42 | 42 | |
43 | 43 | // Creating the categories objects |
44 | 44 | $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['catperpage'], $catstart); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | // Get the last smartfaq in each category |
62 | 62 | $last_qnaObj = $faqHandler->getLastPublishedByCat(); |
63 | 63 | } |
64 | -$lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize']; |
|
64 | +$lastfaqsize = (int) $xoopsModuleConfig['lastfaqsize']; |
|
65 | 65 | $categories = array(); |
66 | 66 | foreach ($categoriesObj as $cat_id => $category) { |
67 | 67 | $total = 0; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
72 | 72 | if (isset($last_qnaObj[$subcat_id])) { |
73 | 73 | $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
74 | - $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>'); |
|
74 | + $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>'); |
|
75 | 75 | } |
76 | 76 | $subcat->setVar('faqcount', $totalQnas[$subcat_id]); |
77 | 77 | if ($xoopsModuleConfig['displaysubcatonindex']) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if ($total > 0) { |
90 | 90 | if (isset($last_qnaObj[$cat_id])) { |
91 | 91 | $category->setVar('last_faqid', $last_qnaObj[$cat_id]->getVar('faqid')); |
92 | - $category->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$cat_id]->getVar('faqid') . "'>" . $last_qnaObj[$cat_id]->question($lastfaqsize) . '</a>'); |
|
92 | + $category->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$cat_id]->getVar('faqid')."'>".$last_qnaObj[$cat_id]->question($lastfaqsize).'</a>'); |
|
93 | 93 | } |
94 | 94 | $category->setVar('faqcount', $total); |
95 | 95 | if (!isset($categories[$cat_id])) { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | $memberHandler = xoops_getHandler('member'); |
130 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
130 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
131 | 131 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
132 | 132 | $faq = $faqsObj[$i]->toArray(null, $allcategories); |
133 | 133 | |
@@ -153,14 +153,14 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | // Language constants |
156 | -$moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
156 | +$moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
157 | 157 | $xoopsTpl->assign('whereInSection', $moduleName); |
158 | 158 | $xoopsTpl->assign('displaysubcatonindex', $xoopsModuleConfig['displaysubcatonindex']); |
159 | 159 | $xoopsTpl->assign('displaylastfaqs', $xoopsModuleConfig['displaylastfaqs']); |
160 | 160 | $xoopsTpl->assign('display_categoryname', true); |
161 | 161 | $xoopsTpl->assign('displayFull', $xoopsModuleConfig['displaytype'] === 'full'); |
162 | 162 | |
163 | -$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD . ' ' . $moduleName); |
|
163 | +$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD.' '.$moduleName); |
|
164 | 164 | $xoopsTpl->assign('lang_mainintro', $myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1)); |
165 | 165 | $xoopsTpl->assign('lang_total', _MD_SF_TOTAL_SMARTFAQS); |
166 | 166 | $xoopsTpl->assign('lang_home', _MD_SF_HOME); |
@@ -179,20 +179,20 @@ discard block |
||
179 | 179 | $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS); |
180 | 180 | |
181 | 181 | // Category Navigation Bar |
182 | -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
182 | +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
183 | 183 | $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['catperpage'], $catstart, 'catstart', ''); |
184 | 184 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
185 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
185 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
186 | 186 | } else { |
187 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
187 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | // FAQ Navigation Bar |
191 | 191 | $pagenav = new XoopsPageNav($totalFaqs, $xoopsModuleConfig['indexperpage'], $start, 'start', ''); |
192 | 192 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
193 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
193 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
194 | 194 | } else { |
195 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
195 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | // Page Title Hack by marcan |
@@ -200,4 +200,4 @@ discard block |
||
200 | 200 | $xoopsTpl->assign('xoops_pagetitle', $module_name); |
201 | 201 | // End Page Title Hack by marcan |
202 | 202 | |
203 | -include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
203 | +include_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | define('_MI_SF_DISPLAYTYPE', "Q&A's display type:"); |
43 | 43 | define('_MI_SF_DISPLAYTYPEDSC', |
44 | - "If 'Summary View' is selected, only the Question, Date and Hits of each Q&A will be displayed in a selected category. If 'Full View' is selected, each Q&A will be entirely displayed in a selected category."); |
|
44 | + "If 'Summary View' is selected, only the Question, Date and Hits of each Q&A will be displayed in a selected category. If 'Full View' is selected, each Q&A will be entirely displayed in a selected category."); |
|
45 | 45 | define('_MI_SF_DISPLAYTYPE_SUMMARY', 'Summary View'); |
46 | 46 | define('_MI_SF_DISPLAYTYPE_FULL', 'Full View'); |
47 | 47 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | define('_MI_SF_ALLOWCOMMENTS', 'Control comments at the Q&A level:'); |
82 | 82 | define('_MI_SF_ALLOWCOMMENTSDSC', |
83 | - 'If you set this option to "Yes", you\'ll see comments only on those Q&A that have their comment checkbox marked. <br><br>Select "No" to have comments managed at the global level (look below under the tag "Comment rules".'); |
|
83 | + 'If you set this option to "Yes", you\'ll see comments only on those Q&A that have their comment checkbox marked. <br><br>Select "No" to have comments managed at the global level (look below under the tag "Comment rules".'); |
|
84 | 84 | |
85 | 85 | define('_MI_SF_ALLOWADMINHITS', 'Admin counter reads:'); |
86 | 86 | define('_MI_SF_ALLOWADMINHITSDSC', 'Allow admin hits for counter stats?'); |
@@ -112,28 +112,28 @@ discard block |
||
112 | 112 | define('_MI_SF_INDEXWELCOMEMSG', 'Index welcome message:'); |
113 | 113 | define('_MI_SF_INDEXWELCOMEMSGDSC', 'Welcome message to be displayed in the index page of the module.'); |
114 | 114 | define('_MI_SF_INDEXWELCOMEMSGDEF', |
115 | - 'In this area of our site, you will find the answers to the frequently asked questions, as well as answers to <b>How do I</b> and <b>Did you know</b> questions. Please feel free to post a comment on any Q&A.'); |
|
115 | + 'In this area of our site, you will find the answers to the frequently asked questions, as well as answers to <b>How do I</b> and <b>Did you know</b> questions. Please feel free to post a comment on any Q&A.'); |
|
116 | 116 | |
117 | 117 | define('_MI_SF_REQUESTINTROMSG', 'Request introduction message:'); |
118 | 118 | define('_MI_SF_REQUESTINTROMSGDSC', 'Introduction message to be displayed in the Request a Q&A page of the module.'); |
119 | 119 | define('_MI_SF_REQUESTINTROMSGDEF', |
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 | |
122 | 122 | define('_MI_SF_OPENINTROMSG', 'Open Questions section introduction message:'); |
123 | 123 | define('_MI_SF_OPENINTROMSGDSC', 'Introduction message to be displayed in the Open Questions section of the module.'); |
124 | 124 | define('_MI_SF_OPENINTROMSGDEF', |
125 | - 'Here is a list of Open Questions, that is, questions that have been submitted by users of this site but are still without answer. You can click on an open question if you want to help us with an answer.'); |
|
125 | + 'Here is a list of Open Questions, that is, questions that have been submitted by users of this site but are still without answer. You can click on an open question if you want to help us with an answer.'); |
|
126 | 126 | |
127 | 127 | define('_MI_SF_USEREALNAME', 'Use the Real Name of users'); |
128 | 128 | define('_MI_SF_USEREALNAMEDSC', 'When displaying a username, use the real name of that user if he has a set his real name.'); |
129 | 129 | |
130 | 130 | define('_MI_SF_HELP_PATH_SELECT', "Path of SmartFAQ's help files"); |
131 | 131 | define('_MI_SF_HELP_PATH_SELECT_DSC', |
132 | - "SELECT FROM where you would LIKE TO access SmartFAQ's help files. If you downloaded the 'SmartFAQ's Help Package' AND uploaded it IN 'modules/smartfaq/doc/', you can SELECT 'Inside the module'. Alternatively, you can access the module's help file directly from docs.xoops.org by chosing this in the selector. You can also select 'Custom Path' and specify yourself the path of the help files in the next config option 'Custom path of SmartFAQ's help files'"); |
|
132 | + "SELECT FROM where you would LIKE TO access SmartFAQ's help files. If you downloaded the 'SmartFAQ's Help Package' AND uploaded it IN 'modules/smartfaq/doc/', you can SELECT 'Inside the module'. Alternatively, you can access the module's help file directly from docs.xoops.org by chosing this in the selector. You can also select 'Custom Path' and specify yourself the path of the help files in the next config option 'Custom path of SmartFAQ's help files'"); |
|
133 | 133 | |
134 | 134 | define('_MI_SF_HELP_PATH_CUSTOM', "Custom path of SmartFAQ's help files"); |
135 | 135 | define('_MI_SF_HELP_PATH_CUSTOM_DSC', |
136 | - "If you selected 'Custom path' in the previous option 'Path of SmartFAQ's help files', please specify the URL of SmartFAQ's help files, in that format : http://www.yoursite.com/doc"); |
|
136 | + "If you selected 'Custom path' in the previous option 'Path of SmartFAQ's help files', please specify the URL of SmartFAQ's help files, in that format : http://www.yoursite.com/doc"); |
|
137 | 137 | |
138 | 138 | define('_MI_SF_HELP_INSIDE', 'Inside the module'); |
139 | 139 | define('_MI_SF_HELP_CUSTOM', 'Custom Path'); |
@@ -336,10 +336,10 @@ discard block |
||
336 | 336 | |
337 | 337 | define('_MI_SF_EDITOR', 'Editor to use (admin):'); |
338 | 338 | define('_MI_SF_EDITORCHOICE', |
339 | - "Select the editor to use for admin side. If you have a 'simple' install (e.g you use only XOOPS core editor class, provided in the standard xoops core package), then you can just select DHTML and Compact"); |
|
339 | + "Select the editor to use for admin side. If you have a 'simple' install (e.g you use only XOOPS core editor class, provided in the standard xoops core package), then you can just select DHTML and Compact"); |
|
340 | 340 | define('_MI_SF_EDITORUSER', 'Editor to use (user):'); |
341 | 341 | define('_MI_SF_EDITORCHOICEUSER', |
342 | - "Select the editor to use for user side. If you have a 'simple' install (e.g you use only XOOPS core editor class, provided in the standard xoops core package), then you can just select DHTML and Compact"); |
|
342 | + "Select the editor to use for user side. If you have a 'simple' install (e.g you use only XOOPS core editor class, provided in the standard xoops core package), then you can just select DHTML and Compact"); |
|
343 | 343 | |
344 | 344 | //1.11 RC2 |
345 | 345 | |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | |
354 | 354 | define('_MI_SF_DIR_ATTACHMENT', 'Attachments physical path.'); |
355 | 355 | define('_MI_SF_DIR_ATTACHMENT_DESC', |
356 | - "Physical path only needs to be set from your xoops root and not before, for example you may have attachments uploaded to www.yoururl.com/uploads/newbb the path entered would then be '/uploads/newbb' never include a trailing slash '/' the thumbnails path becomes '/uploads/newbb/thumbs'"); |
|
356 | + "Physical path only needs to be set from your xoops root and not before, for example you may have attachments uploaded to www.yoururl.com/uploads/newbb the path entered would then be '/uploads/newbb' never include a trailing slash '/' the thumbnails path becomes '/uploads/newbb/thumbs'"); |
|
357 | 357 | define('_MI_SF_PATH_MAGICK', 'Path for ImageMagick'); |
358 | 358 | define('_MI_SF_PATH_MAGICK_DESC', "Usually it is '/usr/bin/X11'. Leave it BLANK if you do not have ImageMagicK installed or for autodetecting."); |
359 | 359 | define('_MI_SF_SUBFORUM_DISPLAY', 'Display Mode of subforums on index page'); |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | define('_MI_SF_IMAGELIB_DESC', 'Select which Image library to use for creating Thumbnails. Leave AUTO for automatic choice.'); |
370 | 370 | define('_MI_SF_MAX_IMG_WIDTH', 'Maximum Image Width'); |
371 | 371 | define('_MI_SF_MAX_IMG_WIDTH_DESC', |
372 | - 'Sets the maximum allowed <strong>Width</strong> size of an uploaded image otherwise thumbnail will be used. <br >Input 0 if you do not want to create thumbnails.'); |
|
372 | + 'Sets the maximum allowed <strong>Width</strong> size of an uploaded image otherwise thumbnail will be used. <br >Input 0 if you do not want to create thumbnails.'); |
|
373 | 373 | define('_MI_SF_MAX_IMG_HEIGHT', 'Maximum height of an image'); |
374 | 374 | define('_MI_SF_MAX_IMG_HEIGHT_DESC', 'Sets the maximum allowed height of an uploaded image.'); |
375 | 375 | define('_MI_SF_MAX_IMAGE_WIDTH', 'Maximum Image Width for creating thumbnail'); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | define('_MI_SF_MAX_IMAGE_SIZE_DESC', 'Indicate the maximum file size in KB'); |
382 | 382 | |
383 | 383 | define('_AM_SF_ALLOWED_EXTENSIONS', |
384 | - "Allowed Extensions:<span style='font-size: xx-small; font-weight: normal; display: block;'>'*' indicates no limititations.<br> Extensions delimited by '|'</span>"); |
|
384 | + "Allowed Extensions:<span style='font-size: xx-small; font-weight: normal; display: block;'>'*' indicates no limititations.<br> Extensions delimited by '|'</span>"); |
|
385 | 385 | |
386 | 386 | define('_MI_SF_USERATTACH_ENABLE', 'Display attachments only for registered users'); |
387 | 387 | define('_MI_SF_USERATTACH_ENABLE_DESC', 'shows attachments in the forum only after logging in.'); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | define('_SDU_MSG_NEWFIELD', 'Successfully added field %s'); |
20 | 20 | define('_SDU_MSG_NEWFIELD_ERR', 'Error adding field %s'); |
21 | 21 | define('_SDU_NEEDUPDATE', |
22 | - 'Your database is out-of-date. Please upgrade your database tables!<br><b>Note : The SmartFactory strongly recommends you to backup all SmartSection tables before running this upgrade script.</b><br>'); |
|
22 | + 'Your database is out-of-date. Please upgrade your database tables!<br><b>Note : The SmartFactory strongly recommends you to backup all SmartSection tables before running this upgrade script.</b><br>'); |
|
23 | 23 | define('_SDU_NOUPDATE', 'Your database is up-to-date. No updates are necessary.'); |
24 | 24 | define('_SDU_UPDATE_DB', 'Updating Database'); |
25 | 25 | define('_SDU_UPDATE_ERR', 'Errors updating to version %s'); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | define('_MD_SF_CONTEXTMODULELINK', 'Contextually linked to this module'); |
28 | 28 | define('_MD_SF_CONTEXTMODULELINK_FAQ', 'Contextually linked to this module'); |
29 | 29 | define('_MD_SF_CONTEXTMODULELINK_FAQ_DSC', |
30 | - "Select the module to which this Q&A will be linked. If the Contextual Q&A block is visible on that module, the 'How do I' statement of this Q&A will be displayed."); |
|
30 | + "Select the module to which this Q&A will be linked. If the Contextual Q&A block is visible on that module, the 'How do I' statement of this Q&A will be displayed."); |
|
31 | 31 | define('_MD_SF_CONTEXTPAGE', 'Contextually linked to this URL'); |
32 | 32 | define('_MD_SF_CONTEXTPAGEDEF', 'Contextual Page'); |
33 | 33 | define('_MD_SF_CONTEXTPAGEDEF_DSC', 'Page for which this Q&A gives explanation <b>Example :</b> modules/newbb'); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | define('_MD_SF_ERRORSAVINGDB', 'ERROR: Database has NOT been Updated due to an Error!'); |
54 | 54 | define('_MD_SF_EXACTURL', 'Exact URL?'); |
55 | 55 | define('_MD_SF_EXACTURL_DSC', |
56 | - "If set to 'Yes', the Q&A will only display in the'Specific URL set above'. If set to 'No', the Q&A will be displayed all pages that match a part of the root of the specific URL.ie modules/newbb/*.php"); |
|
56 | + "If set to 'Yes', the Q&A will only display in the'Specific URL set above'. If set to 'No', the Q&A will be displayed all pages that match a part of the root of the specific URL.ie modules/newbb/*.php"); |
|
57 | 57 | define('_MD_SF_FAQ_NEW_ANSWER_NEED_APPROBATION', 'Your answer was submitted successfully and will be reviewed by a moderator.'); |
58 | 58 | define('_MD_SF_FAQ_NEW_ANSWER_PUBLISHED', 'Your answer was submitted successfully and will be automatically published in the Q&A section, as a replacement of the original answer.'); |
59 | 59 | define('_MD_SF_FAQCOMEFROM', 'This Q&A was found on '); |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | define('_MD_SF_MAIL', 'Send Q&A'); |
78 | 78 | define('_MD_SF_MAINHEAD', 'Welcome to the'); |
79 | 79 | define('_MD_SF_MAININTRO', |
80 | - "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='" |
|
81 | - . XOOPS_URL |
|
82 | - . "/forms/askus/form.php'>Ask us a Question!</a>"); |
|
80 | + "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='" |
|
81 | + . XOOPS_URL |
|
82 | + . "/forms/askus/form.php'>Ask us a Question!</a>"); |
|
83 | 83 | define('_MD_SF_MAINNOSELECTCAT', 'You did not select a valid category'); |
84 | 84 | define('_MD_SF_MAINNOFAQS', 'There are no Q&As in this category'); |
85 | 85 | define('_MD_SF_MODERATION_MAIN_HEAD', 'Moderation section of '); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | define('_MD_SF_REQUEST', 'Request a new Q&A'); |
120 | 120 | define('_MD_SF_REQUEST_ERROR', 'An error occured. Your request was not sent.'); |
121 | 121 | define('_MD_SF_REQUEST_INTRO', |
122 | - '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!'); |
|
122 | + '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!'); |
|
123 | 123 | 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!'); |
124 | 124 | 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!'); |
125 | 125 | define('_MD_SF_REQUESTED', 'Requested'); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | define('_MD_SF_SUBMITANSWER', 'Submit answer'); |
141 | 141 | define('_MD_SF_SUBMITANSWERTO', 'Submit an answer to %s'); |
142 | 142 | define('_MD_SF_SUBMITANSWER_INTRO', |
143 | - 'please fill this form to submit an answer for this question. The site adminisrator will review it and then publish it as soon as possible. Thank you in advance for your contribution.'); |
|
143 | + 'please fill this form to submit an answer for this question. The site adminisrator will review it and then publish it as soon as possible. Thank you in advance for your contribution.'); |
|
144 | 144 | define('_MD_SF_SUBMITANSWERBUTTON', 'Submit the answer'); |
145 | 145 | define('_MD_SF_SUBMITAPPROVED', 'The answer you sent has been received. Since the auto-approve option is on, the answer has been accepted and the Q&A has been published.'); |
146 | 146 | define('_MD_SF_SUBMIT_FROM_ADMIN', 'Since you are an admin of the module, the Q&A was automatically published with all permissions.'); |
@@ -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'); |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | define('_AM_SF_ANSWERING', 'Answering'); |
28 | 28 | define('_AM_SF_ANSWERED', 'Answered'); |
29 | 29 | define('_AM_SF_ANSWERED_EXP', |
30 | - '<b>Answered questions</b> : Questions in the Open Questions section that have been answered by users. Once an answer has been approved for a question, this very question becomes a submitted Q&A and will require approval as well.'); |
|
30 | + '<b>Answered questions</b> : Questions in the Open Questions section that have been answered by users. Once an answer has been approved for a question, this very question becomes a submitted Q&A and will require approval as well.'); |
|
31 | 31 | define('_AM_SF_ANSWERED_MODERATE', 'Moderate the answer to this question'); |
32 | 32 | define('_AM_SF_ANSWERISDELETED', 'The answer has been deleted.'); |
33 | 33 | define('_AM_SF_ANSWERNOTFOUND', 'Error : No official answer was found'); |
34 | 34 | define('_AM_SF_APPROVE', 'Approve'); |
35 | 35 | define('_AM_SF_APPROVED', 'Approved answer'); |
36 | 36 | define('_AM_SF_APPROVED_INFO', |
37 | - 'The answer for this question has been approved. This question has now been promoted to the status of submitted Q&A and needs an approval to be published in the Q&A section.'); |
|
37 | + 'The answer for this question has been approved. This question has now been promoted to the status of submitted Q&A and needs an approval to be published in the Q&A section.'); |
|
38 | 38 | define('_AM_SF_APPROVED_MODERATE', "Moderate this Q&A's submission"); |
39 | 39 | define('_AM_SF_APPROVED_TITLE', 'Approved answer'); |
40 | 40 | define('_AM_SF_APPROVESUB', 'Approve submission'); |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | define('_AM_SF_ASKED', 'Asked'); |
52 | 52 | define('_AM_SF_ASKED_APPROVE_SUCCESS', 'The asked question was answered and the Q&A was published in the public section of the site.'); |
53 | 53 | define('_AM_SF_ASKED_EXP', |
54 | - '<b>Asked questions</b> : questions that have been asked by users. These questions have not yet been approved by a moderator. Once approved, the <i>Asked question</i> will become an <i>Open question<i> and be displayed in the <b>Open Questions</b> section.'); |
|
54 | + '<b>Asked questions</b> : questions that have been asked by users. These questions have not yet been approved by a moderator. Once approved, the <i>Asked question</i> will become an <i>Open question<i> and be displayed in the <b>Open Questions</b> section.'); |
|
55 | 55 | define('_AM_SF_ASKED_TITLE', 'Asked Question'); |
56 | 56 | define('_AM_SF_ASKED_TITLE_INFO', |
57 | - 'This is a question asked by a user. You can review the question and write the answer.<br>Uppon approval, the Q&A will be published in the public section of the site.'); |
|
57 | + 'This is a question asked by a user. You can review the question and write the answer.<br>Uppon approval, the Q&A will be published in the public section of the site.'); |
|
58 | 58 | define('_AM_SF_AUTHFAQ', 'Publish the submitted answer'); |
59 | 59 | define('_AM_SF_AUTHORIZE', 'Authorize'); |
60 | 60 | define('_AM_SF_BACK2IDX', 'Cancelled. Taking you back to the index'); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | define('_AM_SF_CATHEADER', 'Categories Management'); |
82 | 82 | define('_AM_SF_CONTEXTMODULELINK', 'Contextually linked to this module'); |
83 | 83 | define('_AM_SF_CONTEXTMODULELINK_FAQ', |
84 | - "Contextually linked to this module<span style='font-size: xx-small; font-weight: normal; display: block;'>Select the module to which this Q&A will be<br>linked. If the Contextual FAQ block is visible<br>on that module, the 'How do I' statement of<br>this Q&A will be displayed.</span>"); |
|
84 | + "Contextually linked to this module<span style='font-size: xx-small; font-weight: normal; display: block;'>Select the module to which this Q&A will be<br>linked. If the Contextual FAQ block is visible<br>on that module, the 'How do I' statement of<br>this Q&A will be displayed.</span>"); |
|
85 | 85 | define('_AM_SF_CONTEXTOPTIONS', 'Contextual options'); |
86 | 86 | define('_AM_SF_CONTEXTPAGE', 'Contextually linked to this URL'); |
87 | 87 | define('_AM_SF_CONTEXTURLLINK', 'Link to this URL'); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | define('_AM_SF_DELETE', 'Delete'); |
98 | 98 | define('_AM_SF_DELETEART', 'Delete Q&A'); |
99 | 99 | define('_AM_SF_DELETE_CAT_CONFIRM', |
100 | - 'Please note that by deleting a category, all the sub-categories and the Q&A of this category will be deleted as well, along with any comments that may have been posted related to these Q&A. Are you sure you wish to delete this category?'); |
|
100 | + 'Please note that by deleting a category, all the sub-categories and the Q&A of this category will be deleted as well, along with any comments that may have been posted related to these Q&A. Are you sure you wish to delete this category?'); |
|
101 | 101 | define('_AM_SF_DELETE_CAT_ERROR', 'An error occured while deleting this category.'); |
102 | 102 | define('_AM_SF_DELETECOL', 'Delete category'); |
103 | 103 | define('_AM_SF_DELETESUBM', 'Delete submission'); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | define('_AM_SF_ERROR_ANSWER_NOT_SAVED', 'An error occured. The answer was not saved in the database.'); |
124 | 124 | define('_AM_SF_ERROR_FAQ_NOT_SAVED', 'An error occured. The Q&A was not saved in the database.'); |
125 | 125 | define('_AM_SF_EXACTURL', |
126 | - "Exact URL?<span style='font-size: xx-small; font-weight: normal; display: block;'>If set to 'Yes', the Q&A will only display in the'Specific URL set above'. If set to 'No', the Q&A will be displayed in all pages that match a part of the root of the specific URL. ie; modules/newbb/*.php</span>"); |
|
126 | + "Exact URL?<span style='font-size: xx-small; font-weight: normal; display: block;'>If set to 'Yes', the Q&A will only display in the'Specific URL set above'. If set to 'No', the Q&A will be displayed in all pages that match a part of the root of the specific URL. ie; modules/newbb/*.php</span>"); |
|
127 | 127 | define('_AM_SF_FAQ_EDIT', 'Edit this Q&A'); |
128 | 128 | define('_AM_SF_FAQ_NEW_ANSWER_PUBLISHED', 'The original answer was replaced by this answer.'); |
129 | 129 | define('_AM_SF_FAQ_REVIEW', 'Edit this answer before approbation'); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | define('_AM_SF_HELP', 'Help'); |
136 | 136 | define('_AM_SF_HOWDOI', 'How do I...'); |
137 | 137 | define('_AM_SF_HOWDOI_FAQ', |
138 | - "How do I...<span style='font-size: xx-small; font-weight: normal; display: block;'>This will be used in the Contextual FAQ Block.<br>It should be a short version of the question.</span>"); |
|
138 | + "How do I...<span style='font-size: xx-small; font-weight: normal; display: block;'>This will be used in the Contextual FAQ Block.<br>It should be a short version of the question.</span>"); |
|
139 | 139 | define('_AM_SF_ID', 'Id'); |
140 | 140 | define('_AM_SF_IMPORT', 'Import'); |
141 | 141 | define('_AM_SF_IMPORT_ALL_QUESTIONS', 'All questions'); |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | define('_AM_SF_IMPORT_ONLY_VISIBLE', 'Only visible questions '); |
159 | 159 | define('_AM_SF_IMPORT_PARENT_CATEGORY', 'SmartFAQ Parent Category'); |
160 | 160 | define('_AM_SF_IMPORT_PERMISSIONS', |
161 | - "Permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see these imported Q&As.<br>this Q&A.</span>"); |
|
161 | + "Permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see these imported Q&As.<br>this Q&A.</span>"); |
|
162 | 162 | define('_AM_SF_IMPORT_RESULT', 'Here is the result of the import.'); |
163 | 163 | define('_AM_SF_IMPORT_SETTINGS', 'Import Settings'); |
164 | 164 | define('_AM_SF_IMPORT_SUCCESS', 'The Q&A set was successfully imported in the module.'); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | define('_AM_SF_MODART', 'Modify a Q&A'); |
178 | 178 | define('_AM_SF_MODCOL', 'Modify existing category'); |
179 | 179 | define('_AM_SF_MODERATORS_DEF', |
180 | - "Moderators<span style='font-size: xx-small; font-weight: normal; display: block;'>Users that will act as moderators for this<br>category. They will be able to add, edit,<br>approve and delete questions and Q&A<br>within this category.</span>"); |
|
180 | + "Moderators<span style='font-size: xx-small; font-weight: normal; display: block;'>Users that will act as moderators for this<br>category. They will be able to add, edit,<br>approve and delete questions and Q&A<br>within this category.</span>"); |
|
181 | 181 | define('_AM_SF_MODIFY', 'Modify'); |
182 | 182 | define('_AM_SF_MODIFYCOL', 'Modify category'); |
183 | 183 | define('_AM_SF_MODIFYTHISCOL', 'Modify this category?'); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | define('_AM_SF_OFFLINE_FIELD', "Offline<span style='font-size: xx-small; font-weight: normal; display: block;'>Select 'No' to put this Q&A back<br>on line in the Q&A section.</span>"); |
215 | 215 | define('_AM_SF_OFFLINEEDITING', 'Editing an offline Q&A'); |
216 | 216 | define('_AM_SF_OFFLINEEDITING_INFO', |
217 | - "You can edit this offline Q&A. Modifications will be saved for this item. However, if you would like to display this Q&A in the Q&A section, you will need to set the <b>Offline</b> field to 'No'."); |
|
217 | + "You can edit this offline Q&A. Modifications will be saved for this item. However, if you would like to display this Q&A in the Q&A section, you will need to set the <b>Offline</b> field to 'No'."); |
|
218 | 218 | define('_AM_SF_OPEN_QUESTION', 'Open Question'); |
219 | 219 | define('_AM_SF_OPEN_QUESTIONS', 'Open Questions'); |
220 | 220 | define('_AM_SF_OPENED', 'Opened'); |
@@ -222,21 +222,21 @@ discard block |
||
222 | 222 | define('_AM_SF_OPENED_TITLE', 'Published questions in the Open Questions section'); |
223 | 223 | define('_AM_SF_OPENED_DSC', 'Here is a list of all the published questions in the Open Questions section.'); |
224 | 224 | define('_AM_SF_OPENED_EXP', |
225 | - '<b>Opened questions</b> : Questions that have been asked by a user, and approved by a moderator. These questions are displayed in the <i>Open Questions</i> section of this module, waiting for user to answer them.'); |
|
225 | + '<b>Opened questions</b> : Questions that have been asked by a user, and approved by a moderator. These questions are displayed in the <i>Open Questions</i> section of this module, waiting for user to answer them.'); |
|
226 | 226 | define('_AM_SF_OPTIONS', 'Options'); |
227 | 227 | define('_AM_SF_OPTS', 'Preferences'); |
228 | 228 | define('_AM_SF_OPEN_QUESTION_ANSWERING', 'Answering an open question'); |
229 | 229 | define('_AM_SF_OPEN_QUESTION_ANSWERING_INFO', 'You are now answering an open question, which will become a Q&A and be published in the Q&A section. '); |
230 | 230 | define('_AM_SF_OPENED_ANSWERING_SUCCESS', 'The open question has been answered and published in the Q&A section!'); |
231 | 231 | define('_AM_SF_PARENT_CATEGORY_EXP', |
232 | - "Parent category<span style='font-size: xx-small; font-weight: normal; display: block;'>If you want this new category to be a sub-category, select a parent here. If it is to be a top level category, leave this blank.</span>"); |
|
232 | + "Parent category<span style='font-size: xx-small; font-weight: normal; display: block;'>If you want this new category to be a sub-category, select a parent here. If it is to be a top level category, leave this blank.</span>"); |
|
233 | 233 | define('_AM_SF_PERMISSIONS', 'Permissions'); |
234 | 234 | define('_AM_SF_PERMISSIONS_FAQ', "Permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see<br>this Q&A.</span>"); |
235 | 235 | define('_AM_SF_PERMISSIONS_QUESTION', "Permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see this Question.</span>"); |
236 | 236 | define('_AM_SF_PERMISSIONS_CAT_READ', |
237 | - "Read permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see<br>this Category, as well as any open questions<br>and Q&A inside that category.</span>"); |
|
237 | + "Read permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see<br>this Category, as well as any open questions<br>and Q&A inside that category.</span>"); |
|
238 | 238 | define('_AM_SF_PERMISSIONS_APPLY_ON_FAQS', |
239 | - "Apply read permissions on Q&A<span style='font-size: xx-small; font-weight: normal; display: block;'>Apply the above Read Permissions on all<br>Q&A within that category, overriding the<br>current permissions for all these Q&A.</span>"); |
|
239 | + "Apply read permissions on Q&A<span style='font-size: xx-small; font-weight: normal; display: block;'>Apply the above Read Permissions on all<br>Q&A within that category, overriding the<br>current permissions for all these Q&A.</span>"); |
|
240 | 240 | define('_AM_SF_PERMISSIONSADMIN', 'Permissions Management'); |
241 | 241 | define('_AM_SF_PERMISSIONSVIEWMAN', 'Permissions to view categories'); |
242 | 242 | define('_AM_SF_PERMISSIONSADMINMAN', 'Permissions to moderate categories'); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | define('_AM_SF_REQUEST_QUEUE', 'The question has been successfully added to the Open Questions section.'); |
273 | 273 | define('_AM_SF_REJECTED_QUESTION', 'Rejected question'); |
274 | 274 | define('_AM_SF_REJECTED_QUESTION_EXP', |
275 | - '<b>Rejected question</b> : Questions that have been asked by users but rejected by a moderator. Rejected questions are not displayes in the Open Questions section.'); |
|
275 | + '<b>Rejected question</b> : Questions that have been asked by users but rejected by a moderator. Rejected questions are not displayes in the Open Questions section.'); |
|
276 | 276 | define('_AM_SF_REJECTED_SMARTFAQ', 'Rejected Q&A'); |
277 | 277 | define('_AM_SF_REJECTED_SMARTFAQ_EXP', '<b>Rejected Q&A</b> : Q&As that have been submitted by user, but rejected by a moderator. Rejected Q&As are not displayed in the Q&A section.'); |
278 | 278 | define('_AM_SF_REQUESTED_BY', 'Question asked by : '); |
@@ -289,8 +289,8 @@ discard block |
||
289 | 289 | define('_AM_SF_SUBMISSIONSMNGMT', 'Submitted Q&A'); |
290 | 290 | define('_AM_SF_SPECIFIC_URL_SELECT', 'Specific URL...'); |
291 | 291 | 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>" |
292 | - . _AM_SF_SPECIFIC_URL_SELECT |
|
293 | - . "</i>, please<br>specify the URL.<br>\n<b>Example :</b> modules/newbb</span>"); |
|
292 | + . _AM_SF_SPECIFIC_URL_SELECT |
|
293 | + . "</i>, please<br>specify the URL.<br>\n<b>Example :</b> modules/newbb</span>"); |
|
294 | 294 | define('_AM_SF_SUBMISSION_MODERATE', "Moderate this Q&A's submission"); |
295 | 295 | define('_AM_SF_SUBMITTED', 'Submitted'); |
296 | 296 | 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.'); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | define('_AM_SF_SUBMITTED_ANSWER_ACCEPTED', 'The submitted answer has been approved.'); |
299 | 299 | define('_AM_SF_SUBMITTED_ANSWER_INFO', 'Here is a list of submitted answers for that question. Select one of them to be the official answer for that question.'); |
300 | 300 | define('_AM_SF_SUBMITTED_INFO', |
301 | - 'This Q&A has been submitted by a member. You can make some modifications if you like. Upon approval, this Q&A will be displayed in the Q&A section of this site.'); |
|
301 | + 'This Q&A has been submitted by a member. You can make some modifications if you like. Upon approval, this Q&A will be displayed in the Q&A section of this site.'); |
|
302 | 302 | define('_AM_SF_SUBMITTED_APPROVE_SUCCESS', 'The submitted Q&A has been published in the Q&A section.'); |
303 | 303 | define('_AM_SF_SUBMITTED_TITLE', 'Approving a submitted Q&A'); |
304 | 304 | define('_AM_SF_FAQ_DELETE_ERROR', 'An error occured while deleting this Q&A.'); |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -include_once XOOPS_ROOT_PATH . '/include/comment_delete.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +include_once XOOPS_ROOT_PATH.'/include/comment_delete.php'; |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -include_once XOOPS_ROOT_PATH . '/include/comment_new.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +include_once XOOPS_ROOT_PATH.'/include/comment_new.php'; |
@@ -45,94 +45,94 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | switch ($op) { |
48 | - case 'post': |
|
48 | + case 'post': |
|
49 | 49 | |
50 | - global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB; |
|
50 | + global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB; |
|
51 | 51 | |
52 | - $newFaqObj = $faqHandler->create(); |
|
52 | + $newFaqObj = $faqHandler->create(); |
|
53 | 53 | |
54 | - if (!$xoopsUser) { |
|
55 | - if ($xoopsModuleConfig['anonpost'] == 1) { |
|
56 | - $uid = 0; |
|
54 | + if (!$xoopsUser) { |
|
55 | + if ($xoopsModuleConfig['anonpost'] == 1) { |
|
56 | + $uid = 0; |
|
57 | + } else { |
|
58 | + redirect_header('index.php', 3, _NOPERM); |
|
59 | + } |
|
57 | 60 | } else { |
58 | - redirect_header('index.php', 3, _NOPERM); |
|
61 | + $uid = $xoopsUser->uid(); |
|
59 | 62 | } |
60 | - } else { |
|
61 | - $uid = $xoopsUser->uid(); |
|
62 | - } |
|
63 | - |
|
64 | - // Putting the values about the FAQ in the FAQ object |
|
65 | - $newFaqObj->setVar('categoryid', $_POST['categoryid']); |
|
66 | - $newFaqObj->setVar('uid', $uid); |
|
67 | - $newFaqObj->setVar('question', $_POST['question']); |
|
68 | - $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0; |
|
69 | - $newFaqObj->setVar('notifypub', $notifypub); |
|
70 | - |
|
71 | - // Setting the status of the FAQ |
|
72 | - if ($xoopsModuleConfig['autoapprove_request'] == 1) { |
|
73 | - $newFaqObj->setVar('status', _SF_STATUS_OPENED); |
|
74 | - } else { |
|
75 | - $newFaqObj->setVar('status', _SF_STATUS_ASKED); |
|
76 | - } |
|
77 | - |
|
78 | - // Storing the FAQ object in the database |
|
79 | - if (!$newFaqObj->store()) { |
|
80 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors())); |
|
81 | - } |
|
82 | - |
|
83 | - // Get the cateopry object related to that FAQ |
|
84 | - // If autoapprove_requested |
|
85 | - if ($xoopsModuleConfig['autoapprove_request'] == 1) { |
|
86 | - // We do not not subscribe user to notification on publish since we publish it right away |
|
87 | - |
|
88 | - // Send notifications |
|
89 | - $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_PUBLISHED)); |
|
90 | - |
|
91 | - $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED; |
|
92 | - } else { |
|
93 | - // Subscribe the user to On Published notification, if requested |
|
94 | - if ($notifypub == 1) { |
|
95 | - include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
96 | - $notificationHandler = xoops_getHandler('notification'); |
|
97 | - $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
63 | + |
|
64 | + // Putting the values about the FAQ in the FAQ object |
|
65 | + $newFaqObj->setVar('categoryid', $_POST['categoryid']); |
|
66 | + $newFaqObj->setVar('uid', $uid); |
|
67 | + $newFaqObj->setVar('question', $_POST['question']); |
|
68 | + $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0; |
|
69 | + $newFaqObj->setVar('notifypub', $notifypub); |
|
70 | + |
|
71 | + // Setting the status of the FAQ |
|
72 | + if ($xoopsModuleConfig['autoapprove_request'] == 1) { |
|
73 | + $newFaqObj->setVar('status', _SF_STATUS_OPENED); |
|
74 | + } else { |
|
75 | + $newFaqObj->setVar('status', _SF_STATUS_ASKED); |
|
76 | + } |
|
77 | + |
|
78 | + // Storing the FAQ object in the database |
|
79 | + if (!$newFaqObj->store()) { |
|
80 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors())); |
|
98 | 81 | } |
99 | - // Send notifications |
|
100 | - $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_SUBMITTED)); |
|
101 | 82 | |
102 | - $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL; |
|
103 | - } |
|
83 | + // Get the cateopry object related to that FAQ |
|
84 | + // If autoapprove_requested |
|
85 | + if ($xoopsModuleConfig['autoapprove_request'] == 1) { |
|
86 | + // We do not not subscribe user to notification on publish since we publish it right away |
|
87 | + |
|
88 | + // Send notifications |
|
89 | + $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_PUBLISHED)); |
|
90 | + |
|
91 | + $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED; |
|
92 | + } else { |
|
93 | + // Subscribe the user to On Published notification, if requested |
|
94 | + if ($notifypub == 1) { |
|
95 | + include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
96 | + $notificationHandler = xoops_getHandler('notification'); |
|
97 | + $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
98 | + } |
|
99 | + // Send notifications |
|
100 | + $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_SUBMITTED)); |
|
101 | + |
|
102 | + $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL; |
|
103 | + } |
|
104 | 104 | |
105 | - //redirect_header("javascript:history.go(-2)", 3, $redirect_msg); |
|
106 | - redirect_header('index.php', 2, $redirect_msg); |
|
107 | - break; |
|
105 | + //redirect_header("javascript:history.go(-2)", 3, $redirect_msg); |
|
106 | + redirect_header('index.php', 2, $redirect_msg); |
|
107 | + break; |
|
108 | 108 | |
109 | - case 'form': |
|
110 | - default: |
|
109 | + case 'form': |
|
110 | + default: |
|
111 | 111 | |
112 | - global $xoopsUser, $myts; |
|
112 | + global $xoopsUser, $myts; |
|
113 | 113 | |
114 | - $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
|
115 | - include_once XOOPS_ROOT_PATH . '/header.php'; |
|
116 | - include_once __DIR__ . '/footer.php'; |
|
114 | + $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
|
115 | + include_once XOOPS_ROOT_PATH . '/header.php'; |
|
116 | + include_once __DIR__ . '/footer.php'; |
|
117 | 117 | |
118 | - $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
118 | + $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
119 | 119 | |
120 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
121 | - $xoopsTpl->assign('whereInSection', $moduleName); |
|
122 | - $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
|
120 | + $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
121 | + $xoopsTpl->assign('whereInSection', $moduleName); |
|
122 | + $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
|
123 | 123 | |
124 | - $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
|
125 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
124 | + $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
|
125 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
126 | 126 | |
127 | - include_once __DIR__ . '/include/request.inc.php'; |
|
127 | + include_once __DIR__ . '/include/request.inc.php'; |
|
128 | 128 | |
129 | - $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
129 | + $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
130 | 130 | |
131 | - $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
|
131 | + $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
|
132 | 132 | |
133 | - include_once __DIR__ . '/include/request.inc.php'; |
|
133 | + include_once __DIR__ . '/include/request.inc.php'; |
|
134 | 134 | |
135 | - include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
135 | + include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
136 | 136 | |
137 | - break; |
|
137 | + break; |
|
138 | 138 | } |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include_once __DIR__ . '/header.php'; |
|
10 | -include_once XOOPS_ROOT_PATH . '/header.php'; |
|
9 | +include_once __DIR__.'/header.php'; |
|
10 | +include_once XOOPS_ROOT_PATH.'/header.php'; |
|
11 | 11 | |
12 | 12 | global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
13 | 13 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | // Storing the FAQ object in the database |
79 | 79 | if (!$newFaqObj->store()) { |
80 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors())); |
|
80 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR.sf_formatErrors($newFaqObj->getErrors())); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | // Get the cateopry object related to that FAQ |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } else { |
93 | 93 | // Subscribe the user to On Published notification, if requested |
94 | 94 | if ($notifypub == 1) { |
95 | - include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
95 | + include_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
96 | 96 | $notificationHandler = xoops_getHandler('notification'); |
97 | 97 | $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
98 | 98 | } |
@@ -112,27 +112,27 @@ discard block |
||
112 | 112 | global $xoopsUser, $myts; |
113 | 113 | |
114 | 114 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
115 | - include_once XOOPS_ROOT_PATH . '/header.php'; |
|
116 | - include_once __DIR__ . '/footer.php'; |
|
115 | + include_once XOOPS_ROOT_PATH.'/header.php'; |
|
116 | + include_once __DIR__.'/footer.php'; |
|
117 | 117 | |
118 | 118 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
119 | 119 | |
120 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
120 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
121 | 121 | $xoopsTpl->assign('whereInSection', $moduleName); |
122 | 122 | $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
123 | 123 | |
124 | 124 | $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
125 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
125 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, ".$myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
126 | 126 | |
127 | - include_once __DIR__ . '/include/request.inc.php'; |
|
127 | + include_once __DIR__.'/include/request.inc.php'; |
|
128 | 128 | |
129 | 129 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
130 | 130 | |
131 | 131 | $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
132 | 132 | |
133 | - include_once __DIR__ . '/include/request.inc.php'; |
|
133 | + include_once __DIR__.'/include/request.inc.php'; |
|
134 | 134 | |
135 | - include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
135 | + include_once XOOPS_ROOT_PATH.'/footer.php'; |
|
136 | 136 | |
137 | 137 | break; |
138 | 138 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -include_once XOOPS_ROOT_PATH . '/include/comment_post.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +include_once XOOPS_ROOT_PATH.'/include/comment_post.php'; |