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
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');
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'];
+}
+
?>
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']) {