From 4de2ed18b1e15f1b293f547dc540fbac7dc2266f Mon Sep 17 00:00:00 2001 From: Mark Vincent Date: Mon, 25 Feb 2019 15:12:32 -0600 Subject: [PATCH 1/3] Fixes #350 --- Upload/inc/plugins/asb/modules/recent_posts.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Upload/inc/plugins/asb/modules/recent_posts.php b/Upload/inc/plugins/asb/modules/recent_posts.php index 029d215..0063495 100644 --- a/Upload/inc/plugins/asb/modules/recent_posts.php +++ b/Upload/inc/plugins/asb/modules/recent_posts.php @@ -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('
', '', 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']) { From 3c4e8acaeb103d4a2cc26a84c15eab0626c8133f Mon Sep 17 00:00:00 2001 From: Mark Vincent Date: Mon, 25 Feb 2019 15:24:19 -0600 Subject: [PATCH 2/3] Fixes #318 --- Upload/inc/plugins/asb/acp.php | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Upload/inc/plugins/asb/acp.php b/Upload/inc/plugins/asb/acp.php index 32472d9..5a0a916 100644 --- a/Upload/inc/plugins/asb/acp.php +++ b/Upload/inc/plugins/asb/acp.php @@ -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']; +} + ?> From 02cee7e62fcc053da8a684091e65d60573be71fc Mon Sep 17 00:00:00 2001 From: Mark Vincent Date: Wed, 27 Feb 2019 15:04:55 -0600 Subject: [PATCH 3/3] 3.1.17 Pre-release --- README.md | 2 +- Upload/inc/plugins/asb.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f30b478..29595fc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Advanced-Sidebox 3.1.16 +## Advanced-Sidebox 3.1.17

Advanced Sidebox Logo diff --git a/Upload/inc/plugins/asb.php b/Upload/inc/plugins/asb.php index 5ae64b5..92f87df 100644 --- a/Upload/inc/plugins/asb.php +++ b/Upload/inc/plugins/asb.php @@ -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');