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'; 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}
  • 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";