@@ -118,7 +118,7 @@ |
||
| 118 | 118 | * |
| 119 | 119 | * @param string sort order ('id', order', or 'title') - default: id |
| 120 | 120 | * |
| 121 | - * @return mixed XoopsfaqCategory | false on failure |
|
| 121 | + * @return boolean XoopsfaqCategory | false on failure |
|
| 122 | 122 | */ |
| 123 | 123 | public function getObj($sort = 'id') |
| 124 | 124 | { |
@@ -169,32 +169,32 @@ |
||
| 169 | 169 | $buttons = array('edit', 'delete'); |
| 170 | 170 | |
| 171 | 171 | $ret = '<table class="outer width100 bnone pad3 marg5">' |
| 172 | - . ' <thead>' |
|
| 173 | - . ' <tr class="xoopsCenter">' |
|
| 174 | - . ' <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ORDER . '</th>' |
|
| 175 | - . ' <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ID . '</th>' |
|
| 176 | - . ' <th class="txtleft">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>' |
|
| 177 | - . ' <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>' |
|
| 178 | - . ' </tr>' |
|
| 179 | - . ' </thead>' |
|
| 180 | - . ' <tbody>'; |
|
| 172 | + . ' <thead>' |
|
| 173 | + . ' <tr class="xoopsCenter">' |
|
| 174 | + . ' <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ORDER . '</th>' |
|
| 175 | + . ' <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ID . '</th>' |
|
| 176 | + . ' <th class="txtleft">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>' |
|
| 177 | + . ' <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>' |
|
| 178 | + . ' </tr>' |
|
| 179 | + . ' </thead>' |
|
| 180 | + . ' <tbody>'; |
|
| 181 | 181 | if ($objects['count'] > 0) { |
| 182 | 182 | foreach ($objects['list'] as $object) { |
| 183 | 183 | $ret .= ' <tr class="xoopsCenter">' |
| 184 | - . ' <td class="even txtcenter">' . $object->getVar('category_order') . '</td>' |
|
| 185 | - . ' <td class="even txtcenter">' . $object->getVar('category_id') . '</td>' |
|
| 186 | - . ' <td class="even txtleft">' . $object->getVar('category_title') . '</td>' |
|
| 187 | - . ' <td class="even txtcenter">'; |
|
| 184 | + . ' <td class="even txtcenter">' . $object->getVar('category_order') . '</td>' |
|
| 185 | + . ' <td class="even txtcenter">' . $object->getVar('category_id') . '</td>' |
|
| 186 | + . ' <td class="even txtleft">' . $object->getVar('category_title') . '</td>' |
|
| 187 | + . ' <td class="even txtcenter">'; |
|
| 188 | 188 | $ret .= XoopsfaqUtility::renderIconLinks($buttons, 'category_id', $object->getVar('category_id')); |
| 189 | 189 | $ret .= ' </td>' |
| 190 | - . ' </tr>'; |
|
| 190 | + . ' </tr>'; |
|
| 191 | 191 | } |
| 192 | 192 | } else { |
| 193 | 193 | $ret .= ' <tr class="txtcenter"><td colspan="4" class="even">' . _AM_XOOPSFAQ_NOLISTING . '</td></tr>'; |
| 194 | 194 | } |
| 195 | 195 | $ret .= ' </tbody>' |
| 196 | 196 | // . ' <tfoot><tr class="txtcenter"><td colspan="4" class="head"> </td></tr></tfoot>' |
| 197 | - . '</table>'; |
|
| 197 | + . '</table>'; |
|
| 198 | 198 | return $ret; |
| 199 | 199 | } |
| 200 | 200 | |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | * |
| 241 | 241 | * @param CriteriaElement|string sort order ('id', 'cid', 'title', 'publish', or 'weight') default: 'id' |
| 242 | 242 | * |
| 243 | - * @return mixed XoopsfaqContents object | false on failure |
|
| 243 | + * @return boolean XoopsfaqContents object | false on failure |
|
| 244 | 244 | */ |
| 245 | 245 | public function getObj($sort = 'id') |
| 246 | 246 | { |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | /** |
| 265 | 265 | * XoopsfaqContentsHandler::getPublished() |
| 266 | 266 | * |
| 267 | - * @return mixed array of XoopsfaqContent objects | false on failure |
|
| 267 | + * @return boolean array of XoopsfaqContent objects | false on failure |
|
| 268 | 268 | */ |
| 269 | 269 | public function getPublished($id = '') |
| 270 | 270 | { |
@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | class XoopsfaqContents extends XoopsObject |
| 32 | 32 | { |
| 33 | - /** |
|
| 34 | - * @var string contains this modules directory name |
|
| 35 | - */ |
|
| 33 | + /** |
|
| 34 | + * @var string contains this modules directory name |
|
| 35 | + */ |
|
| 36 | 36 | protected $dirname; |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -131,11 +131,11 @@ discard block |
||
| 131 | 131 | if (class_exists('XoopsFormEditor')) { |
| 132 | 132 | // $editorConfigs = array('editor' => $GLOBALS['xoopsConfig']['general_editor'], |
| 133 | 133 | $editorConfigs = array('editor' => $xfHelper->getConfig('use_wysiwyg', 'dhtmltextarea'), |
| 134 | - 'rows' => 25, |
|
| 135 | - 'cols' => '100%', |
|
| 134 | + 'rows' => 25, |
|
| 135 | + 'cols' => '100%', |
|
| 136 | 136 | 'width' => '100%', |
| 137 | - 'height' => '600px', |
|
| 138 | - 'name' => 'contents_contents', |
|
| 137 | + 'height' => '600px', |
|
| 138 | + 'name' => 'contents_contents', |
|
| 139 | 139 | 'value' => $this->getVar('contents_contents', 'e') |
| 140 | 140 | ); |
| 141 | 141 | $contents_contents = new XoopsFormEditor('', 'contents_contents', $editorConfigs); |
@@ -328,18 +328,18 @@ discard block |
||
| 328 | 328 | $buttons = array('edit', 'delete'); |
| 329 | 329 | |
| 330 | 330 | $ret = '<table class="outer width100 bnone pad3 marg5">' |
| 331 | - . ' <thead>' |
|
| 332 | - . ' <tr class="center">' |
|
| 333 | - . ' <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_ID . '</th>' |
|
| 334 | - . ' <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_ACTIVE . '</th>' |
|
| 335 | - . ' <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_WEIGHT . '</th>' |
|
| 336 | - . ' <th class="left">' . _AM_XOOPSFAQ_CONTENTS_TITLE . '</th>' |
|
| 337 | - . ' <th class="left">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>' |
|
| 338 | - . ' <th>' . _AM_XOOPSFAQ_CONTENTS_PUBLISH . '</th>' |
|
| 339 | - . ' <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>' |
|
| 340 | - . ' </tr>' |
|
| 341 | - . ' </thead>' |
|
| 342 | - . ' <tbody>'; |
|
| 331 | + . ' <thead>' |
|
| 332 | + . ' <tr class="center">' |
|
| 333 | + . ' <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_ID . '</th>' |
|
| 334 | + . ' <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_ACTIVE . '</th>' |
|
| 335 | + . ' <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_WEIGHT . '</th>' |
|
| 336 | + . ' <th class="left">' . _AM_XOOPSFAQ_CONTENTS_TITLE . '</th>' |
|
| 337 | + . ' <th class="left">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>' |
|
| 338 | + . ' <th>' . _AM_XOOPSFAQ_CONTENTS_PUBLISH . '</th>' |
|
| 339 | + . ' <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>' |
|
| 340 | + . ' </tr>' |
|
| 341 | + . ' </thead>' |
|
| 342 | + . ' <tbody>'; |
|
| 343 | 343 | if ($objects['count'] > 0) { |
| 344 | 344 | $tdClass = 0; |
| 345 | 345 | foreach ($objects['list'] as $object) { |
@@ -349,23 +349,23 @@ discard block |
||
| 349 | 349 | ++$tdClass; |
| 350 | 350 | $dispClass = ($tdClass % 1) ? 'even' : 'odd'; |
| 351 | 351 | $ret .= ' <tr class="center middle">' |
| 352 | - . ' <td class="' . $dispClass . '">' . $object->getVar('contents_id') . '</td>' |
|
| 353 | - . ' <td class="' . $dispClass . '">' . $object->getActiveIcon() . '</td>' |
|
| 354 | - . ' <td class="' . $dispClass . '">' . $object->getVar('contents_weight') . '</td>' |
|
| 355 | - . ' <td class="' . $dispClass . ' left">' . $thisContentTitle . '</td>' |
|
| 356 | - . ' <td class="' . $dispClass . ' left">' . $thisCatTitle . '</td>' |
|
| 357 | - . ' <td class="' . $dispClass . '">' . $object->getPublished(_SHORTDATESTRING) . '</td>' |
|
| 358 | - . ' <td class="' . $dispClass . '">'; |
|
| 352 | + . ' <td class="' . $dispClass . '">' . $object->getVar('contents_id') . '</td>' |
|
| 353 | + . ' <td class="' . $dispClass . '">' . $object->getActiveIcon() . '</td>' |
|
| 354 | + . ' <td class="' . $dispClass . '">' . $object->getVar('contents_weight') . '</td>' |
|
| 355 | + . ' <td class="' . $dispClass . ' left">' . $thisContentTitle . '</td>' |
|
| 356 | + . ' <td class="' . $dispClass . ' left">' . $thisCatTitle . '</td>' |
|
| 357 | + . ' <td class="' . $dispClass . '">' . $object->getPublished(_SHORTDATESTRING) . '</td>' |
|
| 358 | + . ' <td class="' . $dispClass . '">'; |
|
| 359 | 359 | $ret .= XoopsfaqUtility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id')) |
| 360 | - . '</td>' |
|
| 361 | - . ' </tr>'; |
|
| 360 | + . '</td>' |
|
| 361 | + . ' </tr>'; |
|
| 362 | 362 | } |
| 363 | 363 | } else { |
| 364 | 364 | $ret .= ' <tr class="center"><td colspan="7" class="even">' . _AM_XOOPSFAQ_NOLISTING . '</td></tr>'; |
| 365 | 365 | } |
| 366 | 366 | $ret .= ' </tbody>' |
| 367 | 367 | // . ' <tr class="center"><td colspan="7" class="foot"> </td></tr>' |
| 368 | - . '</table>'; |
|
| 368 | + . '</table>'; |
|
| 369 | 369 | return $ret; |
| 370 | 370 | } |
| 371 | 371 | |
@@ -95,14 +95,14 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php'); |
| 97 | 97 | |
| 98 | - $caption = ($this->isNew()) ? _AM_XOOPSFAQ_CREATE_NEW: sprintf(_AM_XOOPSFAQ_MODIFY_ITEM, $this->getVar('contents_title')); |
|
| 98 | + $caption = ($this->isNew()) ? _AM_XOOPSFAQ_CREATE_NEW : sprintf(_AM_XOOPSFAQ_MODIFY_ITEM, $this->getVar('contents_title')); |
|
| 99 | 99 | $form = new XoopsThemeForm($caption, 'content', $_SERVER['REQUEST_URI'], 'post', true); |
| 100 | 100 | // $form->addElement(new XoopsFormHiddenToken()); |
| 101 | 101 | $form->addElement(new xoopsFormHidden('op', 'save')); |
| 102 | 102 | $form->addElement(new xoopsFormHidden('contents_id', $this->getVar('contents_id', 'e'))); |
| 103 | 103 | |
| 104 | 104 | // Active |
| 105 | - $contents_active = new XoopsFormRadioYN(_AM_XOOPSFAQ_E_CONTENTS_ACTIVE, 'contents_active', $this->getVar('contents_active', 'e'), ' ' . _YES . '', ' ' . _NO . '' ); |
|
| 105 | + $contents_active = new XoopsFormRadioYN(_AM_XOOPSFAQ_E_CONTENTS_ACTIVE, 'contents_active', $this->getVar('contents_active', 'e'), ' ' . _YES . '', ' ' . _NO . ''); |
|
| 106 | 106 | $contents_active->setDescription(_AM_XOOPSFAQ_E_CONTENTS_ACTIVE_DESC); |
| 107 | 107 | $form->addElement($contents_active, false); |
| 108 | 108 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $form->addElement($contents_weight, false); |
| 128 | 128 | |
| 129 | 129 | // Editor |
| 130 | - $options_tray = new XoopsFormElementTray(_AM_XOOPSFAQ_E_CONTENTS_CONTENT, '<br>'); |
|
| 130 | + $options_tray = new XoopsFormElementTray(_AM_XOOPSFAQ_E_CONTENTS_CONTENT, '<br>'); |
|
| 131 | 131 | if (class_exists('XoopsFormEditor')) { |
| 132 | 132 | // $editorConfigs = array('editor' => $GLOBALS['xoopsConfig']['general_editor'], |
| 133 | 133 | $editorConfigs = array('editor' => $xfHelper->getConfig('use_wysiwyg', 'dhtmltextarea'), |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $criteria->setStart(0); |
| 255 | 255 | $criteria->setLimit(0); |
| 256 | 256 | } else { |
| 257 | - $obj['list'] = $this->getObjects($sort, false); |
|
| 257 | + $obj['list'] = $this->getObjects($sort, false); |
|
| 258 | 258 | } |
| 259 | 259 | $obj['list'] = $this->getObjects($criteria, false); |
| 260 | 260 | $obj['count'] = (false !== $obj['list']) ? count($obj['list']) : 0; |
@@ -268,8 +268,8 @@ |
||
| 268 | 268 | /** |
| 269 | 269 | * Render the icon links |
| 270 | 270 | * |
| 271 | - * @param array $icon_array contains operation=>icon_name as key=>value |
|
| 272 | - * @param mixed $param HTML parameter |
|
| 271 | + * @param string[] $icon_array contains operation=>icon_name as key=>value |
|
| 272 | + * @param string $param HTML parameter |
|
| 273 | 273 | * @param mixed $value HTML parameter value to set |
| 274 | 274 | * @param mixed $extra are any additional HTML attributes desired for the <a> tag |
| 275 | 275 | * |
@@ -22,12 +22,12 @@ discard block |
||
| 22 | 22 | * @since:: File available since version 4.10 |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * XoopsfaqUtility |
|
| 27 | - * |
|
| 28 | - * Static utility class to provide common functionality |
|
| 29 | - * |
|
| 30 | - */ |
|
| 25 | + /** |
|
| 26 | + * XoopsfaqUtility |
|
| 27 | + * |
|
| 28 | + * Static utility class to provide common functionality |
|
| 29 | + * |
|
| 30 | + */ |
|
| 31 | 31 | class XoopsfaqUtility |
| 32 | 32 | { |
| 33 | 33 | /** |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | // Open the source directory to read in files |
| 172 | 172 | $iterator = new DirectoryIterator($src); |
| 173 | - foreach ($iterator as $fObj) { |
|
| 173 | + foreach ($iterator as $fObj) { |
|
| 174 | 174 | if ($fObj->isFile()) { |
| 175 | 175 | $filename = $fObj->getPathname(); |
| 176 | 176 | $fObj = null; // clear this iterator object to close the file |
@@ -295,9 +295,9 @@ discard block |
||
| 295 | 295 | } |
| 296 | 296 | $title = constant (htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName))); |
| 297 | 297 | $img = '<img src="' . Xmf\Module\Admin::iconUrl($iconName . '.' . $iconExt, '16') . '"' |
| 298 | - . ' title ="' . $title . '"' |
|
| 299 | - . ' alt = "' . $title . '"' |
|
| 300 | - . ' class="bnone middle">'; |
|
| 298 | + . ' title ="' . $title . '"' |
|
| 299 | + . ' alt = "' . $title . '"' |
|
| 300 | + . ' class="bnone middle">'; |
|
| 301 | 301 | $ret .= '<a href="' . $url . '"' . $extra . '>' . $img . '</a>'; |
| 302 | 302 | } |
| 303 | 303 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | self::rrmdir($fObj->getPathname()); |
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 185 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 186 | 186 | return rmdir($src); // remove the directory & return results |
| 187 | 187 | } |
| 188 | 188 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | self::rmove($fObj->getPathname(), $dest . '/' . $fObj->getFilename()); |
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 224 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 225 | 225 | return rmdir($src); // remove the directory & return results |
| 226 | 226 | } |
| 227 | 227 | |
@@ -255,11 +255,11 @@ discard block |
||
| 255 | 255 | |
| 256 | 256 | // Open the source directory to read in files |
| 257 | 257 | $iterator = new DirectoryIterator($src); |
| 258 | - foreach($iterator as $fObj) { |
|
| 259 | - if($fObj->isFile()) { |
|
| 258 | + foreach ($iterator as $fObj) { |
|
| 259 | + if ($fObj->isFile()) { |
|
| 260 | 260 | copy($fObj->getPathname(), $dest . '/' . $fObj->getFilename()); |
| 261 | - } else if(!$fObj->isDot() && $fObj->isDir()) { |
|
| 262 | - self::rcopy($fObj->getPathname(), $dest . '/' . $fObj-getFilename()); |
|
| 261 | + } else if (!$fObj->isDot() && $fObj->isDir()) { |
|
| 262 | + self::rcopy($fObj->getPathname(), $dest . '/' . $fObj - getFilename()); |
|
| 263 | 263 | } |
| 264 | 264 | } |
| 265 | 265 | return true; |
@@ -281,19 +281,19 @@ discard block |
||
| 281 | 281 | xoops_loadLanguage('admin', $moduleDirName); |
| 282 | 282 | $ret = ''; |
| 283 | 283 | if (null !== $value) { |
| 284 | - foreach($icon_array as $_op => $icon) { |
|
| 284 | + foreach ($icon_array as $_op => $icon) { |
|
| 285 | 285 | if (false === strpos($icon, '.')) { |
| 286 | 286 | $iconName = $icon; |
| 287 | 287 | $iconExt = 'png'; |
| 288 | 288 | } else { |
| 289 | - $iconName = substr($icon, 0, strlen($icon)-strrchr($icon, '.')); |
|
| 289 | + $iconName = substr($icon, 0, strlen($icon) - strrchr($icon, '.')); |
|
| 290 | 290 | $iconExt = substr(strrchr($icon, '.'), 1); |
| 291 | 291 | } |
| 292 | 292 | $url = (!is_numeric($_op)) ? $_op . '?' . $param . '=' . $value : xoops_getenv('PHP_SELF') . '?op=' . $iconName . '&' . $param . '=' . $value; |
| 293 | 293 | if (null !== $extra) { |
| 294 | 294 | $url .= ' ' . $extra; |
| 295 | 295 | } |
| 296 | - $title = constant (htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName))); |
|
| 296 | + $title = constant(htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName))); |
|
| 297 | 297 | $img = '<img src="' . Xmf\Module\Admin::iconUrl($iconName . '.' . $iconExt, '16') . '"' |
| 298 | 298 | . ' title ="' . $title . '"' |
| 299 | 299 | . ' alt = "' . $title . '"' |
@@ -21,9 +21,7 @@ |
||
| 21 | 21 | * @since File available since version 1.25 |
| 22 | 22 | */ |
| 23 | 23 | //use Xmf\Debug; |
| 24 | -use Xmf\Database\Tables; |
|
| 25 | 24 | use Xmf\Module\Helper; |
| 26 | -use Xmf\Request; |
|
| 27 | 25 | |
| 28 | 26 | /** |
| 29 | 27 | * @internal {Make sure you PROTECT THIS FILE} |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | || !($GLOBALS['xoopsUser'] instanceof XoopsUser) |
| 34 | 34 | || !($GLOBALS['xoopsUser']->isAdmin())) |
| 35 | 35 | { |
| 36 | - exit("Restricted access" . PHP_EOL); |
|
| 36 | + exit("Restricted access" . PHP_EOL); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | // been relocated to ./assets |
| 94 | 94 | //---------------------------------------------------------------- |
| 95 | 95 | $old_directories = array($xfHelper->path('css/'), |
| 96 | - $xfHelper->path('js/'), |
|
| 97 | - $xfHelper->path('images/') |
|
| 96 | + $xfHelper->path('js/'), |
|
| 97 | + $xfHelper->path('images/') |
|
| 98 | 98 | ); |
| 99 | 99 | foreach ($old_directories as $old_dir) { |
| 100 | 100 | $dirInfo = new SplFileInfo($old_dir); |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | $oldFiles = array($xfHelper->path('include/functions.php'), |
| 131 | 131 | $xsHelper->path('class/utilities.php') |
| 132 | 132 | ); |
| 133 | - foreach($oldFiles as $file) { |
|
| 133 | + foreach ($oldFiles as $file) { |
|
| 134 | 134 | if (is_file($file)) { |
| 135 | 135 | if (false === ($delOk = unlink($file))) { |
| 136 | 136 | $module->setErrors(sprintf(_AM_XOOPSFAQ_ERROR_BAD_REMOVE, $file)); |
@@ -27,8 +27,8 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | define('_MI_XOOPSFAQ_NAME', 'XOOPS FAQ'); |
| 29 | 29 | define('_MI_XOOPSFAQ_DESC', 'This module is used to create Frequently Asked Questions (FAQs). You can use it to ' |
| 30 | - . 'provide information on your website for your users. The module if very simple, but ' |
|
| 31 | - . 'flexible enough to use for other purposes as well.' |
|
| 30 | + . 'provide information on your website for your users. The module if very simple, but ' |
|
| 31 | + . 'flexible enough to use for other purposes as well.' |
|
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -80,13 +80,13 @@ discard block |
||
| 80 | 80 | $catObj = $xfCatHandler->get($xpFaqObj->getVar('contents_cid')); |
| 81 | 81 | $cid = $catObj->getVar('category_id'); |
| 82 | 82 | $block = array( 'title' => _MB_XOOPSFAQ_RANDOM_TITLE, |
| 83 | - 'faq' => $faq, |
|
| 84 | - 'faqans' => $faqAns, |
|
| 85 | - 'morelink' => $xfHelper->url('index.php?cat_id=' . $cid . '#q' . $xpFaqObj->getVar('contents_id')), |
|
| 86 | - 'linktxt' => _MB_XOOPSFAQ_SEE_MORE, |
|
| 87 | - 'catlink' => $xfHelper->url('index.php?cat_id=' . $cid), |
|
| 88 | - 'cattxt' => $catObj->getVar('category_title') |
|
| 89 | - ); |
|
| 83 | + 'faq' => $faq, |
|
| 84 | + 'faqans' => $faqAns, |
|
| 85 | + 'morelink' => $xfHelper->url('index.php?cat_id=' . $cid . '#q' . $xpFaqObj->getVar('contents_id')), |
|
| 86 | + 'linktxt' => _MB_XOOPSFAQ_SEE_MORE, |
|
| 87 | + 'catlink' => $xfHelper->url('index.php?cat_id=' . $cid), |
|
| 88 | + 'cattxt' => $catObj->getVar('category_title') |
|
| 89 | + ); |
|
| 90 | 90 | unset($xpFaqObj, $catObj); |
| 91 | 91 | } |
| 92 | 92 | return $block; |
@@ -117,9 +117,9 @@ discard block |
||
| 117 | 117 | $selectCat = $formSelect->render(); |
| 118 | 118 | |
| 119 | 119 | $form = '<div class="line140">' |
| 120 | - . _MB_XOOPSFAQ_CHARS . ' ' |
|
| 121 | - . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right"> ' |
|
| 122 | - . _MB_XOOPSFAQ_LENGTH . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . ' ' . $selectCat |
|
| 123 | - . '</div>'; |
|
| 120 | + . _MB_XOOPSFAQ_CHARS . ' ' |
|
| 121 | + . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right"> ' |
|
| 122 | + . _MB_XOOPSFAQ_LENGTH . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . ' ' . $selectCat |
|
| 123 | + . '</div>'; |
|
| 124 | 124 | return $form; |
| 125 | 125 | } |
@@ -74,12 +74,12 @@ discard block |
||
| 74 | 74 | $xpFaqObj = $xpFaqObjArray[$faqNum]; |
| 75 | 75 | $faq = $myts->displayTarea($xpFaqObj->getVar('contents_title')); |
| 76 | 76 | $txtAns = strip_tags($xpFaqObj->getVar('contents_contents')); // get rid of html for block |
| 77 | - $faqAns = $myts->displayTarea(xoops_substr($txtAns, 0, $options[0]), 0, 0 ,0 ,0 ,0); |
|
| 77 | + $faqAns = $myts->displayTarea(xoops_substr($txtAns, 0, $options[0]), 0, 0, 0, 0, 0); |
|
| 78 | 78 | |
| 79 | 79 | $xfCatHandler = $xfHelper->getHandler('category'); |
| 80 | 80 | $catObj = $xfCatHandler->get($xpFaqObj->getVar('contents_cid')); |
| 81 | 81 | $cid = $catObj->getVar('category_id'); |
| 82 | - $block = array( 'title' => _MB_XOOPSFAQ_RANDOM_TITLE, |
|
| 82 | + $block = array('title' => _MB_XOOPSFAQ_RANDOM_TITLE, |
|
| 83 | 83 | 'faq' => $faq, |
| 84 | 84 | 'faqans' => $faqAns, |
| 85 | 85 | 'morelink' => $xfHelper->url('index.php?cat_id=' . $cid . '#q' . $xpFaqObj->getVar('contents_id')), |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $formSelect->addOptionArray($optionArray); |
| 115 | 115 | $selOptions = (false === strpos($options[1], ',')) ? $options[1] : explode(',', $options[1]); |
| 116 | 116 | $formSelect->setValue($selOptions); |
| 117 | - $selectCat = $formSelect->render(); |
|
| 117 | + $selectCat = $formSelect->render(); |
|
| 118 | 118 | |
| 119 | 119 | $form = '<div class="line140">' |
| 120 | 120 | . _MB_XOOPSFAQ_CHARS . ' ' |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | $block['title'] = _MB_XOOPSFAQ_CATTITLE; |
| 83 | 83 | foreach ($catObjArray as $cId => $catObj) { |
| 84 | 84 | $block['cat'][] = array('title' => $myts->displayTarea($catObj->getVar('category_title')), |
| 85 | - 'link' => $xfHelper->url('index.php?cat_id=' . $cId), |
|
| 85 | + 'link' => $xfHelper->url('index.php?cat_id=' . $cId), |
|
| 86 | 86 | ); |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | ); |
| 93 | 93 | } |
| 94 | 94 | $block['faq'][] = array('title' => $faqTitle, |
| 95 | - 'ans' => $faqAns, |
|
| 95 | + 'ans' => $faqAns, |
|
| 96 | 96 | 'published' => $faqObj->getPublished(_SHORTDATESTRING) |
| 97 | 97 | ); |
| 98 | 98 | } |
@@ -131,15 +131,15 @@ discard block |
||
| 131 | 131 | $nchck = !empty($ychck) ? '' : ' checked'; |
| 132 | 132 | |
| 133 | 133 | $form = '<div class="line140">' |
| 134 | - . _MB_XOOPSFAQ_NUM_FAQS . ' ' |
|
| 135 | - . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right"><br>' |
|
| 136 | - . _MB_XOOPSFAQ_CHARS . ' <input type="number" name="options[1]" value="' . $options[1] . '" style="width: 5em;" min="0" class="right"> ' |
|
| 137 | - . _MB_XOOPSFAQ_LENGTH . '<br>' . _MB_XOOPSFAQ_SHOW_DATE . ' ' |
|
| 138 | - . '<label for="r0">' . _NO . '</label>' |
|
| 139 | - . '<input type="radio" name="options[2]" id="r0" value="0"' . $nchck . '> ' |
|
| 140 | - . '<label for="r1">' . _YES . '</label>' |
|
| 141 | - . '<input type="radio" name="options[2]" id="r1" value="1"' . $ychck |
|
| 142 | - . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . ' ' . $selectCat |
|
| 143 | - . '</div>'; |
|
| 134 | + . _MB_XOOPSFAQ_NUM_FAQS . ' ' |
|
| 135 | + . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right"><br>' |
|
| 136 | + . _MB_XOOPSFAQ_CHARS . ' <input type="number" name="options[1]" value="' . $options[1] . '" style="width: 5em;" min="0" class="right"> ' |
|
| 137 | + . _MB_XOOPSFAQ_LENGTH . '<br>' . _MB_XOOPSFAQ_SHOW_DATE . ' ' |
|
| 138 | + . '<label for="r0">' . _NO . '</label>' |
|
| 139 | + . '<input type="radio" name="options[2]" id="r0" value="0"' . $nchck . '> ' |
|
| 140 | + . '<label for="r1">' . _YES . '</label>' |
|
| 141 | + . '<input type="radio" name="options[2]" id="r1" value="1"' . $ychck |
|
| 142 | + . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . ' ' . $selectCat |
|
| 143 | + . '</div>'; |
|
| 144 | 144 | return $form; |
| 145 | 145 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $faqTitle = $myts->displayTarea($faqObj->getVar('contents_title')); |
| 82 | 82 | if (!empty($options[1])) { |
| 83 | 83 | $txtAns = strip_tags($faqObj->getVar('contents_contents')); // get rid of html for block |
| 84 | - $faqAns = $myts->displayTarea(xoops_substr($txtAns, 0, $options[1]), 0, 0 ,0 ,0 ,0); |
|
| 84 | + $faqAns = $myts->displayTarea(xoops_substr($txtAns, 0, $options[1]), 0, 0, 0, 0, 0); |
|
| 85 | 85 | } else { |
| 86 | 86 | $faqAns = $myts->displayTarea($faqObj->getVar('contents_contents'), |
| 87 | 87 | (int)$faqObj->getVar('dohtml'), |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $formSelect->addOptionArray($optionArray); |
| 126 | 126 | $selOptions = (false === strpos($options[3], ',')) ? $options[3] : explode(',', $options[3]); |
| 127 | 127 | $formSelect->setValue($selOptions); |
| 128 | - $selectCat = $formSelect->render(); |
|
| 128 | + $selectCat = $formSelect->render(); |
|
| 129 | 129 | |
| 130 | 130 | $ychck = (isset($options[2]) && ($options[2] > 0)) ? ' checked' : ''; |
| 131 | 131 | $nchck = !empty($ychck) ? '' : ' checked'; |
@@ -66,8 +66,8 @@ |
||
| 66 | 66 | $bodyWords = ''; |
| 67 | 67 | foreach ($contentsObj['list'] as $obj) { |
| 68 | 68 | $question = array('id' => $obj->getVar('contents_id'), |
| 69 | - 'title' => $obj->getVar('contents_title'), |
|
| 70 | - 'answer' => $obj->getVar('contents_contents') |
|
| 69 | + 'title' => $obj->getVar('contents_title'), |
|
| 70 | + 'answer' => $obj->getVar('contents_contents') |
|
| 71 | 71 | ); |
| 72 | 72 | $GLOBALS['xoopsTpl']->append('questions', $question); |
| 73 | 73 | $bodyWords .= ' ' . $obj->getVar('contents_title') . ' ' . $obj->getVar('contents_contents'); |