1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Bc Fixes. Fix for broken navigation when using {SITELINKS} shortcode.

This commit is contained in:
Cameron
2016-12-10 17:05:12 -08:00
parent 268004bd71
commit b105b854e6
2 changed files with 14 additions and 4 deletions

View File

@@ -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)
{

View File

@@ -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 }
#chatbox-input-block { text-align:center }
ul.breadcrumb li { display:inline-block; padding-right:5px;}
ul.breadcrumb li span.divider { padding-left:5px; }