From b105b854e6d76b4b4f0cf15e4dea89d5a85f500f Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 10 Dec 2016 17:05:12 -0800 Subject: [PATCH] Bc Fixes. Fix for broken navigation when using {SITELINKS} shortcode. --- e107_handlers/sitelinks_class.php | 14 +++++++++++--- e107_web/css/backcompat.css | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/e107_handlers/sitelinks_class.php b/e107_handlers/sitelinks_class.php index 51cb5e201..a13922d71 100644 --- a/e107_handlers/sitelinks_class.php +++ b/e107_handlers/sitelinks_class.php @@ -260,6 +260,8 @@ class sitelinks } + + // If submenu: Fix Name, Add Indentation. if ($submenu == TRUE) { @@ -274,10 +276,14 @@ class sitelinks // Convert any {e_XXX} to absolute URLs (relative ones sometimes get broken by adding e_HTTP at the front) $linkInfo['link_url'] = $tp -> replaceConstants($linkInfo['link_url'], TRUE, TRUE); // replace {e_xxxx} - if(strpos($linkInfo['link_url'],"{") !== FALSE) + if(strpos($linkInfo['link_url'],"{") !== false) { $linkInfo['link_url'] = $tp->parseTemplate($linkInfo['link_url'], TRUE); // shortcode in URL support - dynamic urls for multilanguage. } + elseif($linkInfo['link_url'][0] != '/') + { + $linkInfo['link_url'] = e_HTTP.ltrim($linkInfo['link_url'],'/'); + } // By default links are not highlighted. if (isset($linkInfo['link_expand']) && $linkInfo['link_expand']) @@ -306,7 +312,7 @@ class sitelinks elseif ($linkInfo['link_url']) { // Only add the e_BASE if it actually has an URL. - $linkInfo['link_url'] = (strpos($linkInfo['link_url'], '://') === FALSE && strpos($linkInfo['link_url'], 'mailto:') !== 0 ? e_HTTP.$linkInfo['link_url'] : $linkInfo['link_url']); + $linkInfo['link_url'] = (strpos($linkInfo['link_url'], '://') === FALSE && strpos($linkInfo['link_url'], 'mailto:') !== 0 ? $linkInfo['link_url'] : $linkInfo['link_url']); // Only check if its highlighted if it has an URL if ($this->hilite($linkInfo['link_url'], $style['linkstart_hilite'])== TRUE) @@ -333,7 +339,7 @@ class sitelinks // Open link in a new window. (equivalent of target='_blank' ) $link_append = ($linkInfo['link_open'] == 1) ? " rel='external'" : ""; } - +e107::getDebug()->log($linkInfo['link_url']); // Remove default images if its a button and add new image at the start. if ($linkInfo['link_button']) { @@ -371,6 +377,8 @@ class sitelinks $_link = $linkstart.$indent.$_link; + e107::getDebug()->log($linkInfo['link_url']); + global $SITELINKSTYLE; if(!$SITELINKSTYLE) { diff --git a/e107_web/css/backcompat.css b/e107_web/css/backcompat.css index b68a96bfc..f6033242f 100644 --- a/e107_web/css/backcompat.css +++ b/e107_web/css/backcompat.css @@ -28,4 +28,6 @@ div.news-empty { text-align:center; font-weight: bold } div.checkboxes label.checkbox { display: block } textarea.bbarea { margin:0; } -#chatbox-input-block { text-align:center } \ No newline at end of file +#chatbox-input-block { text-align:center } +ul.breadcrumb li { display:inline-block; padding-right:5px;} +ul.breadcrumb li span.divider { padding-left:5px; } \ No newline at end of file