Skip to content

Commit

Permalink
4.33 RC 13
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Sep 13, 2016
1 parent 96ac937 commit 7ebf794
Show file tree
Hide file tree
Showing 90 changed files with 1,479 additions and 765 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Forum module for [XOOPS CMS](http://xoops.org) for discussions

[![Tutorial Available](http://xoops.org/images/tutorial-available-blue.svg)](https://www.gitbook.com/book/xoops/xoops-newbb-module/) Tutorial: see [here](https://www.gitbook.com/book/xoops/xoops-newbb-module-tutorial/).
[![Tutorial Available](http://xoops.org/images/tutorial-available-blue.svg)](https://www.gitbook.com/book/xoops/xoops-newbb-module/) Tutorial: see [GitBook](https://www.gitbook.com/book/xoops/xoops-newbb-module-tutorial/).
To contribute to the Tutorial, [fork it on GitHub](https://github.com/XoopsDocs/newbb-tutorial)

[![Translations on Transifex](http://xoops.org/images/translations-transifex-blue.svg)](https://www.transifex.com/xoops)
Expand Down
9 changes: 7 additions & 2 deletions action.post.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,13 @@
foreach ($post_id as $post) {
$tags = array();
$tags['THREAD_NAME'] = $topic_list[$posts_obj[$post]->getVar('topic_id')];
$tags['THREAD_URL'] =
XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?topic_id=' . $posts_obj[$post]->getVar('topic_id') . '&forum=' . $posts_obj[$post]->getVar('forum_id');
$tags['THREAD_URL'] = XOOPS_URL
. '/modules/'
. $xoopsModule->getVar('dirname')
. '/viewtopic.php?topic_id='
. $posts_obj[$post]->getVar('topic_id')
. '&forum='
. $posts_obj[$post]->getVar('forum_id');
$tags['FORUM_NAME'] = $forum_list[$posts_obj[$post]->getVar('forum_id')];
$tags['FORUM_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewforum.php?forum=' . $posts_obj[$post]->getVar('forum_id');
$tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' . $post;
Expand Down
2 changes: 1 addition & 1 deletion admin/admin_forum_prune.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
//
//
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000-2016 XOOPS.org //
Expand Down
6 changes: 3 additions & 3 deletions admin/admin_header.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
//
//
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000-2016 XOOPS.org //
Expand Down Expand Up @@ -30,7 +30,7 @@
// ------------------------------------------------------------------------- //

//include $GLOBALS['xoops']->path('include/cp_header.php');
include('../../../include/cp_header.php');
include '../../../include/cp_header.php';
include_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php');
include_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/functions.user.php');
include_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/functions.render.php');
Expand All @@ -55,6 +55,6 @@
$xoopsModuleAdminPath = $GLOBALS['xoops']->path('www/' . $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin'));
require_once $xoopsModuleAdminPath . '/moduleadmin.php';

$indexAdmin = new ModuleAdmin();
$indexAdmin = new ModuleAdmin();

$myts = MyTextSanitizer::getInstance();
28 changes: 22 additions & 6 deletions admin/admin_permissions.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
//
//
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000-2016 XOOPS.org //
Expand Down Expand Up @@ -186,7 +186,7 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array()
}
$tree .= '" value="1"';
if (in_array($option['id'], $this->_value)) {
$tree .= ' checked="checked"';
$tree .= ' checked';
}
$tree .= ' />'
. $option['name']
Expand Down Expand Up @@ -257,7 +257,7 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array()
if ($ii % 5 == 0) {
$ret_ele .= '</tr><tr>';
}
$checked = in_array('forum_' . $perm, $selected) ? " checked='checked'" : '';
$checked = in_array('forum_' . $perm, $selected) ? ' checked' : '';
$option_id = $perm . '_' . $i;
$option_ids[] = $option_id;
$ret_ele .= '<td><input name="perms['
Expand Down Expand Up @@ -324,7 +324,11 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array()
$opform = new XoopsSimpleForm(_AM_NEWBB_PERM_ACTION, 'actionform', 'admin_permissions.php', 'get');
$op_select = new XoopsFormSelect('', 'action');
$op_select->setExtra('onchange="document.forms.actionform.submit()"');
$op_select->addOptionArray(array('no' => _SELECT, 'template' => _AM_NEWBB_PERM_TEMPLATE, 'apply' => _AM_NEWBB_PERM_TEMPLATEAPP));
$op_select->addOptionArray(array(
'no' => _SELECT,
'template' => _AM_NEWBB_PERM_TEMPLATE,
'apply' => _AM_NEWBB_PERM_TEMPLATEAPP
));
$opform->addElement($op_select);
$opform->display();

Expand Down Expand Up @@ -405,10 +409,22 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array()
$opform->display();

$op_options = array('category' => _AM_NEWBB_CAT_ACCESS);
$fm_options = array('category' => array('title' => _AM_NEWBB_CAT_ACCESS, 'item' => 'category_access', 'desc' => '', 'anonymous' => true));
$fm_options = array(
'category' => array(
'title' => _AM_NEWBB_CAT_ACCESS,
'item' => 'category_access',
'desc' => '',
'anonymous' => true
)
);
foreach ($perms as $perm) {
$op_options[$perm] = constant('_AM_NEWBB_CAN_' . strtoupper($perm));
$fm_options[$perm] = array('title' => constant('_AM_NEWBB_CAN_' . strtoupper($perm)), 'item' => 'forum_' . $perm, 'desc' => '', 'anonymous' => true);
$fm_options[$perm] = array(
'title' => constant('_AM_NEWBB_CAN_' . strtoupper($perm)),
'item' => 'forum_' . $perm,
'desc' => '',
'anonymous' => true
);
}

$op_keys = array_keys($op_options);
Expand Down
4 changes: 2 additions & 2 deletions admin/admin_report.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
//
//
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000-2016 XOOPS.org //
Expand Down Expand Up @@ -131,7 +131,7 @@
. "&amp;viewmode=thread\" target=\"checkreport\">"
. $myts->htmlSpecialChars($report['subject'])
. '</a>';
$checkbox = '<input type="checkbox" name="report_id[' . $report['report_id'] . ']" value="1" checked="checked" />';
$checkbox = '<input type="checkbox" name="report_id[' . $report['report_id'] . ']" value="1" checked />';
if ($item !== 'processed') {
$memo = '<input type="text" name="report_memo[' . $report['report_id'] . ']" maxlength="255" size="80" />';
} else {
Expand Down
16 changes: 14 additions & 2 deletions admin/admin_type_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,19 @@
* </ol>
*/
$op = XoopsRequest::getCmd('op', XoopsRequest::getCmd('op', '', 'POST'), 'GET');// !empty($_GET['op'])? $_GET['op'] : ( !empty($_POST['op']) ? $_POST['op'] : "" );
if (!in_array($op, array('save_type', 'delete', 'template', 'save_template', 'apply', 'save_apply', 'forum', 'edit_forum', 'save_forum', 'add'), true)) {
if (!in_array($op, array(
'save_type',
'delete',
'template',
'save_template',
'apply',
'save_apply',
'forum',
'edit_forum',
'save_forum',
'add'
), true)
) {
$op = '';
}

Expand Down Expand Up @@ -451,7 +463,7 @@
echo "<th align='left' class='bg3'>" . _AM_NEWBB_TYPE_DESCRIPTION . '</th>';
echo '</tr>';

$isColorpicker = require_once($GLOBALS['xoops']->path('class/xoopsform/formcolorpicker.php'));
$isColorpicker = require_once $GLOBALS['xoops']->path('class/xoopsform/formcolorpicker.php');

if ($op !== 'add') {
foreach ($types_obj as $key => $type_obj) {
Expand Down
6 changes: 3 additions & 3 deletions admin/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
//
//
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000-2016 XOOPS.org //
Expand Down Expand Up @@ -156,9 +156,9 @@ function newbb_getImageLibs()
xoops_cp_header();

echo '<fieldset>';
$imageLibs = newbb_getImageLibs();
$imageLibs = newbb_getImageLibs();
$moduleHandler = xoops_getHandler('module');
$reportHandler = xoops_getModuleHandler('report', 'newbb');
$reportHandler = xoops_getModuleHandler('report', 'newbb');

$isOK = false;
// START irmtfan add a poll_module config
Expand Down
File renamed without changes
64 changes: 32 additions & 32 deletions blocks/newbb_block.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
//
//
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000-2016 XOOPS.org //
Expand Down Expand Up @@ -676,7 +676,7 @@ function b_newbb_edit($options)
$form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>";
$form .= "<option value='time'";
if ($options[0] === 'time') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_TIME . '</option>';
$form .= '</select>';
Expand All @@ -685,15 +685,15 @@ function b_newbb_edit($options)
$form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>' . _MB_NEWBB_TIME_DESC . '</small>';
$form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'";
if (0 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'";
if (1 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'";
if (2 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_LITE;

Expand Down Expand Up @@ -735,27 +735,27 @@ function b_newbb_topic_edit($options)
$form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>";
$form .= "<option value='time'";
if ($options[0] === 'time') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_TIME . '</option>';
$form .= "<option value='views'";
if ($options[0] === 'views') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_VIEWS . '</option>';
$form .= "<option value='replies'";
if ($options[0] === 'replies') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_REPLIES . '</option>';
$form .= "<option value='digest'";
if ($options[0] === 'digest') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_DIGEST . '</option>';
$form .= "<option value='sticky'";
if ($options[0] === 'sticky') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_STICKY . '</option>';
$form .= '</select>';
Expand All @@ -764,15 +764,15 @@ function b_newbb_topic_edit($options)
$form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>' . _MB_NEWBB_TIME_DESC . '</small>';
$form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'";
if (0 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'";
if (1 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'";
if (2 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_LITE;

Expand Down Expand Up @@ -815,12 +815,12 @@ function b_newbb_post_edit($options)
$form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>";
$form .= "<option value='title'";
if ($options[0] === 'title') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_TITLE . '</option>';
$form .= "<option value='text'";
if ($options[0] === 'text') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_TEXT . '</option>';
$form .= '</select>';
Expand All @@ -829,15 +829,15 @@ function b_newbb_post_edit($options)
$form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>' . _MB_NEWBB_TIME_DESC . '</small>';
$form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'";
if (0 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'";
if (1 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'";
if (2 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_LITE;

Expand Down Expand Up @@ -879,22 +879,22 @@ function b_newbb_author_edit($options)
$form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>";
$form .= "<option value='post'";
if ($options[0] === 'post') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_POST . '</option>';
$form .= "<option value='topic'";
if ($options[0] === 'topic') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_TOPIC . '</option>';
$form .= "<option value='digest'";
if ($options[0] === 'digest') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_DIGESTS . '</option>';
$form .= "<option value='sticky'";
if ($options[0] === 'sticky') {
$form .= " selected='selected' ";
$form .= ' selected ';
}
$form .= '>' . _MB_NEWBB_CRITERIA_STICKYS . '</option>';
$form .= '</select>';
Expand All @@ -903,11 +903,11 @@ function b_newbb_author_edit($options)
$form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>' . _MB_NEWBB_TIME_DESC . '</small>';
$form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'";
if (0 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='1'";
if (1 == $options[3]) {
$form .= " checked='checked'";
$form .= ' checked';
}
$form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_LITE;

Expand Down Expand Up @@ -945,9 +945,9 @@ function b_newbb_custom($options)
{
// if no newbb module block set, we have to include the language file
if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) {
include_once($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'));
include_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php');
} else {
include_once($GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'));
include_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php');
}

$options = explode('|', $options);
Expand All @@ -970,9 +970,9 @@ function b_newbb_custom_topic($options)

// if no newbb module block set, we have to include the language file
if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) {
include_once($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'));
include_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php');
} else {
include_once($GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'));
include_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php');
}

$options = explode('|', $options);
Expand All @@ -995,9 +995,9 @@ function b_newbb_custom_post($options)

// if no newbb module block set, we have to include the language file
if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) {
include_once($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'));
include_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php');
} else {
include_once($GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'));
include_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php');
}

$options = explode('|', $options);
Expand All @@ -1019,9 +1019,9 @@ function b_newbb_custom_author($options)
{
// if no newbb module block set, we have to include the language file
if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) {
include_once($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'));
include_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php');
} else {
include_once($GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'));
include_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php');
}

$options = explode('|', $options);
Expand Down
Loading

0 comments on commit 7ebf794

Please sign in to comment.