@@ -26,9 +26,9 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | Smartfaq\Utility::collapsableBar('toptable', 'toptableicon'); |
| 28 | 28 | |
| 29 | -echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . $faqs_title . '</h3>'; |
|
| 29 | +echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".$faqs_title.'</h3>'; |
|
| 30 | 30 | echo "<div id='toptable'>"; |
| 31 | -echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $faqs_info . '</span>'; |
|
| 31 | +echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$faqs_info.'</span>'; |
|
| 32 | 32 | |
| 33 | 33 | // Get the total number of published FAQs |
| 34 | 34 | $totalfaqs = $faqHandler->getFaqsCount($sel_cat, [Constants::SF_STATUS_PUBLISHED, Constants::SF_STATUS_NEW_ANSWER]); |
@@ -39,22 +39,22 @@ discard block |
||
| 39 | 39 | $allCats = $categoryHandler->getObjects(null, true); |
| 40 | 40 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 41 | 41 | echo '<tr>'; |
| 42 | -echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . '</b></td>'; |
|
| 43 | -echo "<th width='20%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
| 44 | -echo "<th class='bg3' align='left'><b>" . _AM_SF_QUESTION . '</b></td>'; |
|
| 42 | +echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID.'</b></td>'; |
|
| 43 | +echo "<th width='20%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME.'</b></td>'; |
|
| 44 | +echo "<th class='bg3' align='left'><b>"._AM_SF_QUESTION.'</b></td>'; |
|
| 45 | 45 | |
| 46 | -echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>'; |
|
| 47 | -echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . '</b></td>'; |
|
| 46 | +echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>'; |
|
| 47 | +echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED.'</b></td>'; |
|
| 48 | 48 | |
| 49 | -echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
| 50 | -echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 49 | +echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
| 50 | +echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
| 51 | 51 | echo '</tr>'; |
| 52 | 52 | if ($totalfaqs > 0) { |
| 53 | 53 | global $pathIcon16, $smartModuleConfig; |
| 54 | 54 | foreach ($faqsObj as $iValue) { |
| 55 | 55 | $categoryObj = $allCats[$iValue->categoryid()]; |
| 56 | - $modify = "<a href='faq.php?op=mod&faqid=" . $iValue->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_EDITART . "'></a>"; |
|
| 57 | - $delete = "<a href='faq.php?op=del&faqid=" . $iValue->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
| 56 | + $modify = "<a href='faq.php?op=mod&faqid=".$iValue->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_EDITART."'></a>"; |
|
| 57 | + $delete = "<a href='faq.php?op=del&faqid=".$iValue->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
| 58 | 58 | |
| 59 | 59 | //adding name of the Question Submitter |
| 60 | 60 | $requester = Smartfaq\Utility::getLinkedUnameFromId($iValue->uid(), $smartModuleConfig['userealname']); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $criteria->add(new \Criteria('faqid', $iValue->faqid())); |
| 68 | 68 | $criteria->add(new \Criteria('status', true)); |
| 69 | 69 | |
| 70 | - $answerObjects =& $answerHandler->getObjects($criteria, true); |
|
| 70 | + $answerObjects = & $answerHandler->getObjects($criteria, true); |
|
| 71 | 71 | |
| 72 | 72 | foreach (array_keys($answerObjects) as $j) { |
| 73 | 73 | $answerObj = $answerObjects[$j]; |
@@ -82,26 +82,26 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | echo '<tr>'; |
| 85 | - echo "<td class='head' align='center'>" . $iValue->faqid() . '</td>'; |
|
| 86 | - echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>'; |
|
| 87 | - echo "<td class='even' align='left'><a href='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/faq.php?faqid=' . $iValue->faqid() . "'>" . $iValue->question(100) . '</a></td>'; |
|
| 85 | + echo "<td class='head' align='center'>".$iValue->faqid().'</td>'; |
|
| 86 | + echo "<td class='even' align='left'>".$categoryObj->name().'</td>'; |
|
| 87 | + echo "<td class='even' align='left'><a href='".XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/faq.php?faqid='.$iValue->faqid()."'>".$iValue->question(100).'</a></td>'; |
|
| 88 | 88 | |
| 89 | - echo "<td class='even' align='center'>" . $requester . '</td>'; |
|
| 90 | - echo "<td class='even' align='center'>" . $answerSubmitter . '</td>'; |
|
| 89 | + echo "<td class='even' align='center'>".$requester.'</td>'; |
|
| 90 | + echo "<td class='even' align='center'>".$answerSubmitter.'</td>'; |
|
| 91 | 91 | |
| 92 | - echo "<td class='even' align='center'>" . $iValue->datesub('s') . '</td>'; |
|
| 92 | + echo "<td class='even' align='center'>".$iValue->datesub('s').'</td>'; |
|
| 93 | 93 | echo "<td class='even' align='center'> $modify $delete </td>"; |
| 94 | 94 | echo '</tr>'; |
| 95 | 95 | } |
| 96 | 96 | } else { |
| 97 | 97 | $faqid = -1; |
| 98 | 98 | echo '<tr>'; |
| 99 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOFAQS . '</td>'; |
|
| 99 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOFAQS.'</td>'; |
|
| 100 | 100 | echo '</tr>'; |
| 101 | 101 | } |
| 102 | 102 | echo "</table>\n"; |
| 103 | 103 | echo "<br>\n"; |
| 104 | 104 | |
| 105 | 105 | $pagenav = new \XoopsPageNav($totalfaqs, $xoopsModuleConfig['perpage'], $startfaq, 'startfaq', $pagenav_extra_args); |
| 106 | -echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
| 106 | +echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
| 107 | 107 | echo '</div>'; |
@@ -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 | |
@@ -20,10 +20,10 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | use XoopsModules\Smartfaq; |
| 22 | 22 | |
| 23 | -include __DIR__ . '/../preloads/autoloader.php'; |
|
| 23 | +include __DIR__.'/../preloads/autoloader.php'; |
|
| 24 | 24 | |
| 25 | 25 | $moduleDirName = basename(dirname(__DIR__)); |
| 26 | -$moduleDirNameUpper = strtoupper($moduleDirName); //$capsDirName |
|
| 26 | +$moduleDirNameUpper = strtoupper($moduleDirName); //$capsDirName |
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | /** @var \XoopsDatabase $db */ |
@@ -40,20 +40,20 @@ discard block |
||
| 40 | 40 | //$categoryHandler = new Smartfaq\CategoryHandler($db); |
| 41 | 41 | //$downloadHandler = new Smartfaq\DownloadHandler($db); |
| 42 | 42 | |
| 43 | -if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) { |
|
| 44 | - define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__))); |
|
| 45 | - define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/'); |
|
| 46 | - define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/'); |
|
| 47 | - define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/'); |
|
| 48 | - define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/'); |
|
| 49 | - define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images'); |
|
| 50 | - define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/'); |
|
| 51 | - define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/'); |
|
| 52 | - define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php'); |
|
| 53 | - define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png'); |
|
| 54 | - define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
| 55 | - define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
| 56 | - define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1); |
|
| 43 | +if (!defined($moduleDirNameUpper.'_CONSTANTS_DEFINED')) { |
|
| 44 | + define($moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__))); |
|
| 45 | + define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/'); |
|
| 46 | + define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/'); |
|
| 47 | + define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.$moduleDirName.'/'); |
|
| 48 | + define($moduleDirNameUpper.'_IMAGE_URL', constant($moduleDirNameUpper.'_URL').'/assets/images/'); |
|
| 49 | + define($moduleDirNameUpper.'_IMAGE_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/assets/images'); |
|
| 50 | + define($moduleDirNameUpper.'_ADMIN_URL', constant($moduleDirNameUpper.'_URL').'/admin/'); |
|
| 51 | + define($moduleDirNameUpper.'_ADMIN_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/admin/'); |
|
| 52 | + define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php'); |
|
| 53 | + define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', constant($moduleDirNameUpper.'_URL').'/assets/images/logoModule.png'); |
|
| 54 | + define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
| 55 | + define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
| 56 | + define($moduleDirNameUpper.'_CONSTANTS_DEFINED', 1); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | |
@@ -63,15 +63,15 @@ discard block |
||
| 63 | 63 | //$pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
| 64 | 64 | |
| 65 | 65 | $icons = [ |
| 66 | - 'edit' => "<img src='" . $pathIcon16 . "/edit.png' alt=" . _EDIT . "' align='middle'>", |
|
| 67 | - 'delete' => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>", |
|
| 68 | - 'clone' => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>", |
|
| 69 | - 'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>", |
|
| 70 | - 'print' => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>", |
|
| 71 | - 'pdf' => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>", |
|
| 72 | - 'add' => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>", |
|
| 73 | - '0' => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>", |
|
| 74 | - '1' => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>", |
|
| 66 | + 'edit' => "<img src='".$pathIcon16."/edit.png' alt="._EDIT."' align='middle'>", |
|
| 67 | + 'delete' => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>", |
|
| 68 | + 'clone' => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>", |
|
| 69 | + 'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>", |
|
| 70 | + 'print' => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>", |
|
| 71 | + 'pdf' => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>", |
|
| 72 | + 'add' => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>", |
|
| 73 | + '0' => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>", |
|
| 74 | + '1' => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>", |
|
| 75 | 75 | ]; |
| 76 | 76 | |
| 77 | 77 | $debug = false; |
@@ -84,12 +84,12 @@ discard block |
||
| 84 | 84 | $GLOBALS['xoopsTpl'] = new \XoopsTpl(); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | -$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL . '/modules/' . $moduleDirName); |
|
| 87 | +$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL.'/modules/'.$moduleDirName); |
|
| 88 | 88 | // Local icons path |
| 89 | 89 | if (is_object($helper->getModule())) { |
| 90 | 90 | $pathModIcon16 = $helper->getModule()->getInfo('modicons16'); |
| 91 | 91 | $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
| 92 | 92 | |
| 93 | - $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16); |
|
| 93 | + $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL.'/modules/'.$moduleDirName.'/'.$pathModIcon16); |
|
| 94 | 94 | $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32); |
| 95 | 95 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * Licence: GNU |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -include __DIR__ . '/../../mainfile.php'; |
|
| 9 | +include __DIR__.'/../../mainfile.php'; |
|
| 10 | 10 | |
| 11 | 11 | //require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
| 12 | 12 | //require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php'; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $faqHandler = \XoopsModules\Smartfaq\Helper::getInstance()->getHandler('Faq'); |
| 39 | 39 | |
| 40 | 40 | // creating the FAQ objects that belong to the selected category |
| 41 | - $faqsObj = $faqHandler->getFaqs($limit, 0, Constants::SF_STATUS_OPENED, $categoryid, $sort); |
|
| 41 | + $faqsObj = $faqHandler->getFaqs($limit, 0, Constants::SF_STATUS_OPENED, $categoryid, $sort); |
|
| 42 | 42 | |
| 43 | 43 | if ($faqsObj) { |
| 44 | 44 | foreach ($faqsObj as $iValue) { |
@@ -72,40 +72,40 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $form = Smartfaq\Utility::createCategorySelect($options[0]); |
| 74 | 74 | |
| 75 | - $form .= ' <br>' . _MB_SF_ORDER . " <select name='options[]'>"; |
|
| 75 | + $form .= ' <br>'._MB_SF_ORDER." <select name='options[]'>"; |
|
| 76 | 76 | |
| 77 | 77 | $form .= "<option value='datesub'"; |
| 78 | 78 | if ('datesub' === $options[1]) { |
| 79 | 79 | $form .= ' selected'; |
| 80 | 80 | } |
| 81 | - $form .= '>' . _MB_SF_DATE . "</option>\n"; |
|
| 81 | + $form .= '>'._MB_SF_DATE."</option>\n"; |
|
| 82 | 82 | |
| 83 | 83 | $form .= "<option value='counter'"; |
| 84 | 84 | if ('counter' === $options[1]) { |
| 85 | 85 | $form .= ' selected'; |
| 86 | 86 | } |
| 87 | - $form .= '>' . _MB_SF_HITS . "</option>\n"; |
|
| 87 | + $form .= '>'._MB_SF_HITS."</option>\n"; |
|
| 88 | 88 | |
| 89 | 89 | $form .= "<option value='weight'"; |
| 90 | 90 | if ('weight' === $options[1]) { |
| 91 | 91 | $form .= ' selected'; |
| 92 | 92 | } |
| 93 | - $form .= '>' . _MB_SF_WEIGHT . "</option>\n"; |
|
| 93 | + $form .= '>'._MB_SF_WEIGHT."</option>\n"; |
|
| 94 | 94 | |
| 95 | 95 | $form .= "</select>\n"; |
| 96 | 96 | |
| 97 | - $form .= ' ' . _MB_SF_DISP . " <input type='text' name='options[]' value='" . $options[2] . "'> " . _MB_SF_QUESTIONS . ''; |
|
| 98 | - $form .= ' <br>' . _MB_SF_CHARS . " <input type='text' name='options[]' value='" . $options[3] . "'> " . _MB_SF_LENGTH . ''; |
|
| 97 | + $form .= ' '._MB_SF_DISP." <input type='text' name='options[]' value='".$options[2]."'> "._MB_SF_QUESTIONS.''; |
|
| 98 | + $form .= ' <br>'._MB_SF_CHARS." <input type='text' name='options[]' value='".$options[3]."'> "._MB_SF_LENGTH.''; |
|
| 99 | 99 | |
| 100 | - $form .= '<br>' . _MB_SF_SHOW_DATE . " <input type='radio' id='options[]' name='options[]' value='1'"; |
|
| 100 | + $form .= '<br>'._MB_SF_SHOW_DATE." <input type='radio' id='options[]' name='options[]' value='1'"; |
|
| 101 | 101 | if (1 == $options[4]) { |
| 102 | 102 | $form .= ' checked'; |
| 103 | 103 | } |
| 104 | - $form .= '> ' . _YES . "<input type='radio' id='options[]' name='options[]' value='0'"; |
|
| 104 | + $form .= '> '._YES."<input type='radio' id='options[]' name='options[]' value='0'"; |
|
| 105 | 105 | if (0 == $options[4]) { |
| 106 | 106 | $form .= ' checked'; |
| 107 | 107 | } |
| 108 | - $form .= '> ' . _NO . ''; |
|
| 108 | + $form .= '> '._NO.''; |
|
| 109 | 109 | |
| 110 | 110 | return $form; |
| 111 | 111 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | /** @var \XoopsModules\Smartfaq\FaqHandler $faqHandler */ |
| 37 | 37 | $faqHandler = \XoopsModules\Smartfaq\Helper::getInstance()->getHandler('Faq'); |
| 38 | 38 | // creating the FAQ objects that belong to the selected category |
| 39 | - $faqsObj = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort); |
|
| 39 | + $faqsObj = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort); |
|
| 40 | 40 | |
| 41 | 41 | if ($faqsObj) { |
| 42 | 42 | foreach ($faqsObj as $iValue) { |
@@ -69,40 +69,40 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | $form = Smartfaq\Utility::createCategorySelect($options[0]); |
| 71 | 71 | |
| 72 | - $form .= ' <br>' . _MB_SF_ORDER . " <select name='options[]'>"; |
|
| 72 | + $form .= ' <br>'._MB_SF_ORDER." <select name='options[]'>"; |
|
| 73 | 73 | |
| 74 | 74 | $form .= "<option value='datesub'"; |
| 75 | 75 | if ('datesub' === $options[1]) { |
| 76 | 76 | $form .= ' selected'; |
| 77 | 77 | } |
| 78 | - $form .= '>' . _MB_SF_DATE . "</option>\n"; |
|
| 78 | + $form .= '>'._MB_SF_DATE."</option>\n"; |
|
| 79 | 79 | |
| 80 | 80 | $form .= "<option value='counter'"; |
| 81 | 81 | if ('counter' === $options[1]) { |
| 82 | 82 | $form .= ' selected'; |
| 83 | 83 | } |
| 84 | - $form .= '>' . _MB_SF_HITS . "</option>\n"; |
|
| 84 | + $form .= '>'._MB_SF_HITS."</option>\n"; |
|
| 85 | 85 | |
| 86 | 86 | $form .= "<option value='weight'"; |
| 87 | 87 | if ('weight' === $options[1]) { |
| 88 | 88 | $form .= ' selected'; |
| 89 | 89 | } |
| 90 | - $form .= '>' . _MB_SF_WEIGHT . "</option>\n"; |
|
| 90 | + $form .= '>'._MB_SF_WEIGHT."</option>\n"; |
|
| 91 | 91 | |
| 92 | 92 | $form .= "</select>\n"; |
| 93 | 93 | |
| 94 | - $form .= ' ' . _MB_SF_DISP . " <input type='text' name='options[]' value='" . $options[2] . "'> " . _MB_SF_FAQS . ''; |
|
| 95 | - $form .= ' <br>' . _MB_SF_CHARS . " <input type='text' name='options[]' value='" . $options[3] . "'> " . _MB_SF_LENGTH . ''; |
|
| 94 | + $form .= ' '._MB_SF_DISP." <input type='text' name='options[]' value='".$options[2]."'> "._MB_SF_FAQS.''; |
|
| 95 | + $form .= ' <br>'._MB_SF_CHARS." <input type='text' name='options[]' value='".$options[3]."'> "._MB_SF_LENGTH.''; |
|
| 96 | 96 | |
| 97 | - $form .= '<br>' . _MB_SF_SHOW_DATE . " <input type='radio' id='options[]' name='options[]' value='1'"; |
|
| 97 | + $form .= '<br>'._MB_SF_SHOW_DATE." <input type='radio' id='options[]' name='options[]' value='1'"; |
|
| 98 | 98 | if (1 == $options[4]) { |
| 99 | 99 | $form .= ' checked'; |
| 100 | 100 | } |
| 101 | - $form .= '> ' . _YES . "<input type='radio' id='options[]' name='options[]' value='0'"; |
|
| 101 | + $form .= '> '._YES."<input type='radio' id='options[]' name='options[]' value='0'"; |
|
| 102 | 102 | if (0 == $options[4]) { |
| 103 | 103 | $form .= ' checked'; |
| 104 | 104 | } |
| 105 | - $form .= '> ' . _NO . ''; |
|
| 105 | + $form .= '> '._NO.''; |
|
| 106 | 106 | |
| 107 | 107 | return $form; |
| 108 | 108 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | /** @var \XoopsModules\Smartfaq\FaqHandler $faqHandler */ |
| 35 | 35 | $faqHandler = \XoopsModules\Smartfaq\Helper::getInstance()->getHandler('Faq'); |
| 36 | 36 | // creating the FAQ objects that belong to the selected category |
| 37 | - $faqsObj = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort); |
|
| 37 | + $faqsObj = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort); |
|
| 38 | 38 | |
| 39 | 39 | if ($faqsObj) { |
| 40 | 40 | foreach ($faqsObj as $iValue) { |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | $form = Smartfaq\Utility::createCategorySelect($options[0]); |
| 62 | 62 | |
| 63 | - $form .= ' <br>' . _MB_SF_DISP . " <input type='text' name='options[]' value='" . $options[1] . "'> " . _MB_SF_FAQS . ''; |
|
| 64 | - $form .= ' <br>' . _MB_SF_CHARS . " <input type='text' name='options[]' value='" . $options[2] . "'> " . _MB_SF_LENGTH . ''; |
|
| 63 | + $form .= ' <br>'._MB_SF_DISP." <input type='text' name='options[]' value='".$options[1]."'> "._MB_SF_FAQS.''; |
|
| 64 | + $form .= ' <br>'._MB_SF_CHARS." <input type='text' name='options[]' value='".$options[2]."'> "._MB_SF_LENGTH.''; |
|
| 65 | 65 | |
| 66 | 66 | return $form; |
| 67 | 67 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $memberHandler = xoops_getHandler('member'); |
| 65 | - $users = $memberHandler->getUsers(new \Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
| 65 | + $users = $memberHandler->getUsers(new \Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
| 66 | 66 | foreach ($faqsObj as $iValue) { |
| 67 | 67 | $faqs['categoryid'] = $iValue->categoryid(); |
| 68 | 68 | $faqs['question'] = $iValue->question($maxQuestionLength); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $block['lang_poster'] = _MB_SF_ANSWEREDBY; |
| 85 | 85 | $block['lang_date'] = _MB_SF_DATE; |
| 86 | 86 | $modulename = $myts->htmlSpecialChars($smartModule->getVar('name')); |
| 87 | - $block['lang_visitfaq'] = _MB_SF_VISITFAQ . ' ' . $modulename; |
|
| 87 | + $block['lang_visitfaq'] = _MB_SF_VISITFAQ.' '.$modulename; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | return $block; |
@@ -100,30 +100,30 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | $form = Smartfaq\Utility::createCategorySelect($options[0]); |
| 102 | 102 | |
| 103 | - $form .= ' <br>' . _MB_SF_ORDER . " <select name='options[]'>"; |
|
| 103 | + $form .= ' <br>'._MB_SF_ORDER." <select name='options[]'>"; |
|
| 104 | 104 | |
| 105 | 105 | $form .= "<option value='datesub'"; |
| 106 | 106 | if ('datesub' === $options[1]) { |
| 107 | 107 | $form .= ' selected'; |
| 108 | 108 | } |
| 109 | - $form .= '>' . _MB_SF_DATE . "</option>\n"; |
|
| 109 | + $form .= '>'._MB_SF_DATE."</option>\n"; |
|
| 110 | 110 | |
| 111 | 111 | $form .= "<option value='counter'"; |
| 112 | 112 | if ('counter' === $options[1]) { |
| 113 | 113 | $form .= ' selected'; |
| 114 | 114 | } |
| 115 | - $form .= '>' . _MB_SF_HITS . "</option>\n"; |
|
| 115 | + $form .= '>'._MB_SF_HITS."</option>\n"; |
|
| 116 | 116 | |
| 117 | 117 | $form .= "<option value='weight'"; |
| 118 | 118 | if ('weight' === $options[1]) { |
| 119 | 119 | $form .= ' selected'; |
| 120 | 120 | } |
| 121 | - $form .= '>' . _MB_SF_WEIGHT . "</option>\n"; |
|
| 121 | + $form .= '>'._MB_SF_WEIGHT."</option>\n"; |
|
| 122 | 122 | |
| 123 | 123 | $form .= "</select>\n"; |
| 124 | 124 | |
| 125 | - $form .= ' ' . _MB_SF_DISP . " <input type='text' name='options[]' value='" . $options[2] . "'> " . _MB_SF_FAQS . ''; |
|
| 126 | - $form .= ' <br>' . _MB_SF_CHARS . " <input type='text' name='options[]' value='" . $options[3] . "'> " . _MB_SF_LENGTH . ''; |
|
| 125 | + $form .= ' '._MB_SF_DISP." <input type='text' name='options[]' value='".$options[2]."'> "._MB_SF_FAQS.''; |
|
| 126 | + $form .= ' <br>'._MB_SF_CHARS." <input type='text' name='options[]' value='".$options[3]."'> "._MB_SF_LENGTH.''; |
|
| 127 | 127 | |
| 128 | 128 | return $form; |
| 129 | 129 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $faqHandler = \XoopsModules\Smartfaq\Helper::getInstance()->getHandler('Faq'); |
| 29 | 29 | |
| 30 | 30 | // creating the FAQ objects that belong to the selected category |
| 31 | - $faqsObj = $faqHandler->getContextualFaqs($limit); |
|
| 31 | + $faqsObj = $faqHandler->getContextualFaqs($limit); |
|
| 32 | 32 | |
| 33 | 33 | if ($faqsObj) { |
| 34 | 34 | foreach ($faqsObj as $iValue) { |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | function b_faqs_context_edit($options) |
| 50 | 50 | { |
| 51 | - $form = '' . _MB_SF_DISP . ' '; |
|
| 52 | - $form .= "<input type='text' name='options[]' value='" . $options[0] . "'> " . _MB_SF_FAQS . ''; |
|
| 51 | + $form = ''._MB_SF_DISP.' '; |
|
| 52 | + $form .= "<input type='text' name='options[]' value='".$options[0]."'> "._MB_SF_FAQS.''; |
|
| 53 | 53 | |
| 54 | 54 | return $form; |
| 55 | 55 | } |