From 5c883ddfbefa145b24be3fec03e592825ebfb717 Mon Sep 17 00:00:00 2001 From: Mark Vincent Date: Mon, 11 Sep 2017 20:13:43 -0500 Subject: [PATCH 1/3] Fixes #254 ...where even when deactivated the 'Manage Sideboxes' link was still displayed in ACP -> Config -> Plugins (leading to a dead link) --- Upload/inc/plugins/asb/install.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Upload/inc/plugins/asb/install.php b/Upload/inc/plugins/asb/install.php index aafb10a..035351a 100644 --- a/Upload/inc/plugins/asb/install.php +++ b/Upload/inc/plugins/asb/install.php @@ -20,7 +20,7 @@ */ function asb_info() { - global $mybb, $lang, $cp_style; + global $mybb, $lang, $cp_style, $cache; if (!$lang->asb) { $lang->load('asb'); @@ -39,18 +39,29 @@ function asb_info() EOF; } + // only show Manage Sideboxes link if active + $plugin_list = $cache->read('plugins'); + $manage_link = ''; + if (!empty($plugin_list['active']) && + is_array($plugin_list['active']) && + in_array('asb', $plugin_list['active'])) { + $url = ASB_URL; + $manage_link = << + {$lang->asb_manage_sideboxes} + +EOF; + } + $settings_link = << {$settings_link} EOF; - $url = ASB_URL; $extra_links = << {$settings_link} -
  • - {$lang->asb_manage_sideboxes} -
  • {$remove_link} + {$manage_link}{$remove_link}
  • {$lang->asb_help}
  • From 565847fe55ae513dcf99f5b6ae3b19e49afe74bb Mon Sep 17 00:00:00 2001 From: Mark Vincent Date: Mon, 11 Sep 2017 20:25:03 -0500 Subject: [PATCH 2/3] Fixes #253 ...where post URLs were formed incorrectly when using SEO-friendly links. --- Upload/inc/plugins/asb/modules/recent_posts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Upload/inc/plugins/asb/modules/recent_posts.php b/Upload/inc/plugins/asb/modules/recent_posts.php index ed063bd..55fced4 100644 --- a/Upload/inc/plugins/asb/modules/recent_posts.php +++ b/Upload/inc/plugins/asb/modules/recent_posts.php @@ -286,7 +286,7 @@ function recent_posts_get_postlist($settings) } $post['subject'] = htmlspecialchars_uni($parser->parse_badwords($post['subject'])); - $post['link'] = get_thread_link($post['tid']) . "&pid={$post['pid']}#pid{$post['pid']}"; + $post['link'] = get_post_link($post['pid'], $post['tid']) . "#pid{$post['pid']}"; // we just need the text and smilies (we'll parse them after we check length) $pattern = "|[[\/\!]*?[^\[\]]*?]|si"; From 9715042a03030161655754b11b05623cbf08192f Mon Sep 17 00:00:00 2001 From: Mark Vincent Date: Mon, 11 Sep 2017 20:39:44 -0500 Subject: [PATCH 3/3] 3.1.3 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 1c598e6..935595e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Advanced-Sidebox 3.1.2 +## Advanced-Sidebox 3.1.3

    Advanced Sidebox Logo diff --git a/Upload/inc/plugins/asb.php b/Upload/inc/plugins/asb.php index 66a72c3..ed0239c 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.2'); +define('ASB_VERSION', '3.1.3'); // some basic functions used everywhere require_once MYBB_ROOT . 'inc/plugins/asb/functions.php';