diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 16a03ed38..3ce29f21d 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -2587,6 +2587,21 @@ class e107 self::getJs()->addLink($attributes, $browserCache); } + /** + * @param string $type eg. 'active' + * @param mixed $value eg. existing link-url value. + */ + public static function nav($type, $value=null) + { + if($value === null) + { + return e107::getRegistry('core/e107/navigation/'.$type); + } + + return e107::setRegistry('core/e107/navigation/'.$type, $value); + + } + /** * CSS Common Public Function. Prefered is shortcode script path diff --git a/e107_handlers/sitelinks_class.php b/e107_handlers/sitelinks_class.php index b7a36cb68..5b7374fca 100644 --- a/e107_handlers/sitelinks_class.php +++ b/e107_handlers/sitelinks_class.php @@ -1872,9 +1872,19 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; } { return true; } + + // New e107 v.2.3.1 - using e107::nav('active', link url); + $manualOverride = e107::getRegistry('core/e107/navigation/active'); + if(!empty($manualOverride) && empty($data['link_sub'])) + { + if(strpos($data['link_url'], $manualOverride) !==false) + { + return true; + } + } - // XXX Temporary Fix - TBD. + // XXX Temporary Fix - @deprecated. // Set the URL matching in the page itself. see: forum_viewforum.php and forum_viewtopic.php if(defined("NAVIGATION_ACTIVE") && empty($data['link_sub'])) {