Skip to content

Commit

Permalink
Merge pull request #352 from WildcardSearch/maintenance
Browse files Browse the repository at this point in the history
3.1.17 Release
  • Loading branch information
Mark Vincent authored Feb 27, 2019
2 parents 42a0ea2 + 02cee7e commit 72bc83f
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Advanced-Sidebox 3.1.16
## Advanced-Sidebox 3.1.17

<p align="center">
<img title="Advanced Sidebox Logo" alt="Advanced Sidebox Logo" src="http://i.imgur.com/4QWLq5V.png" />
Expand Down
2 changes: 1 addition & 1 deletion Upload/inc/plugins/asb.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// for modules
define('IN_ASB', true);
define('ASB_MODULES_DIR', MYBB_ROOT.'inc/plugins/asb/modules');
define('ASB_VERSION', '3.1.16');
define('ASB_VERSION', '3.1.17');
define('ASB_CUSTOM_VERSION', '2.0');
define('ASB_SCRIPT_VERSION', '2.0');

Expand Down
37 changes: 37 additions & 0 deletions Upload/inc/plugins/asb/acp.php
Original file line number Diff line number Diff line change
Expand Up @@ -1815,4 +1815,41 @@ function asbUpdateThemeSelectSettingOnEdit()
asbUpdateThemeSelectSetting();
}

/**
* add our user sidebox preference setting in user edit
*
* @param array options
* @return void
*/
$plugins->add_hook('admin_user_users_edit_other_options', 'asb_admin_user_users_edit_other_options');
function asb_admin_user_users_edit_other_options($other_options)
{
global $mybb, $user, $lang, $form, $form_container;

if (!$lang->asb) {
$lang->load('asb');
}

$checked = false;
if ($user['show_sidebox'] > 0) {
$checked = true;
}

array_unshift($other_options, $form->generate_check_box('show_sidebox', 1, 'Show side boxes', array("checked" => $mybb->input['show_sidebox'])));
return $other_options;
}

/**
* update the user sidebox preference when saving the user
*
* @return void
*/
$plugins->add_hook('admin_user_users_edit_commit_start', 'asb_admin_user_users_edit_commit_start');
function asb_admin_user_users_edit_commit_start()
{
global $mybb, $extra_user_updates;

$extra_user_updates['show_sidebox'] = $mybb->input['show_sidebox'];
}

?>
1 change: 1 addition & 0 deletions Upload/inc/plugins/asb/modules/recent_posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ function recent_posts_get_postlist($settings)
// we just need the text and smilies (we'll parse them after we check length)
$pattern = "|[[\/\!]*?[^\[\]]*?]|si";
$post_excerpt = strip_tags(str_replace('<br />', '', asbStripUrls(preg_replace($pattern, '$1', $post['message']))));
$post_excerpt = htmlspecialchars_uni($parser->parse_badwords($post_excerpt));

if ($settings['max_length'] &&
strlen($post_excerpt) > $settings['max_length']) {
Expand Down

0 comments on commit 72bc83f

Please sign in to comment.