mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Fixes #5345 Oversized navigation icon fix.
This commit is contained in:
@@ -2537,7 +2537,7 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
|||||||
$tmp[$c]['text'] = $sc->sc_nav_link_name();
|
$tmp[$c]['text'] = $sc->sc_nav_link_name();
|
||||||
$tmp[$c]['description'] = $tp->toHTML($lk['link_description'], '', 'defs');
|
$tmp[$c]['description'] = $tp->toHTML($lk['link_description'], '', 'defs');
|
||||||
$tmp[$c]['link'] = $sc->sc_nav_link_url(); // $tp->replaceConstants($link,'full');
|
$tmp[$c]['link'] = $sc->sc_nav_link_url(); // $tp->replaceConstants($link,'full');
|
||||||
$tmp[$c]['image'] = $sc->sc_nav_link_icon(); // vartrue($lk['link_button']) ? "<img class='icon S16' src='".$tp->replaceConstants($lk['link_button'])."' alt='".$tp->toAttribute($lk['link_description'],'','defs')."' />": '';
|
$tmp[$c]['image'] = $sc->sc_nav_link_icon(['class'=>'icon S16']); // vartrue($lk['link_button']) ? "<img class='icon S16' src='".$tp->replaceConstants($lk['link_button'])."' alt='".$tp->toAttribute($lk['link_description'],'','defs')."' />": '';
|
||||||
$tmp[$c]['image_large'] = '';
|
$tmp[$c]['image_large'] = '';
|
||||||
$tmp[$c]['image_src'] = vartrue($lk['link_button']);
|
$tmp[$c]['image_src'] = vartrue($lk['link_button']);
|
||||||
$tmp[$c]['image_large_src'] = '';
|
$tmp[$c]['image_large_src'] = '';
|
||||||
|
@@ -77,7 +77,7 @@ require_once(__DIR__.'/navigation_shortcodes_legacy.php');
|
|||||||
/**
|
/**
|
||||||
* Return the name of the current link
|
* Return the name of the current link
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string|null
|
||||||
* @example {NAV_LINK_NAME}
|
* @example {NAV_LINK_NAME}
|
||||||
*/
|
*/
|
||||||
function sc_nav_link_name($parm = null)
|
function sc_nav_link_name($parm = null)
|
||||||
@@ -256,16 +256,14 @@ require_once(__DIR__.'/navigation_shortcodes_legacy.php');
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// if($icon = $tp->toGlyph($this->var['link_button']))
|
$opts = array('fw' => true, 'space' => ' ', 'legacy' => "{e_IMAGE}icons/");
|
||||||
// {
|
|
||||||
// return $icon;
|
if(!empty($parm) && is_array($parm))
|
||||||
// }
|
|
||||||
// else
|
|
||||||
{
|
{
|
||||||
//$path = e107::getParser()->replaceConstants($this->var['link_button'], 'full', TRUE);
|
$opts = array_merge($opts, $parm);
|
||||||
return $tp->toIcon($this->var['link_button'], array('fw' => true, 'space' => ' ', 'legacy' => "{e_IMAGE}icons/"));
|
|
||||||
// return "<img class='icon' src='".$path."' alt='' />";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $tp->toIcon($this->var['link_button'], $opts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,7 +271,7 @@ require_once(__DIR__.'/navigation_shortcodes_legacy.php');
|
|||||||
/**
|
/**
|
||||||
* Return the link description of the current link
|
* Return the link description of the current link
|
||||||
* @example {NAV_LINK_DESCRIPTION}
|
* @example {NAV_LINK_DESCRIPTION}
|
||||||
* @return string
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
function sc_nav_link_description($parm = null)
|
function sc_nav_link_description($parm = null)
|
||||||
{
|
{
|
||||||
@@ -293,14 +291,14 @@ require_once(__DIR__.'/navigation_shortcodes_legacy.php');
|
|||||||
/**
|
/**
|
||||||
* Return the parsed sublinks of the current link
|
* Return the parsed sublinks of the current link
|
||||||
* @example {NAV_LINK_SUB}
|
* @example {NAV_LINK_SUB}
|
||||||
* @return string
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
function sc_nav_link_sub($parm = null)
|
function sc_nav_link_sub($parm = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(empty($this->var['link_sub']))
|
if(empty($this->var['link_sub']))
|
||||||
{
|
{
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_string($this->var['link_sub'])) // html override option.
|
if(is_string($this->var['link_sub'])) // html override option.
|
||||||
|
Reference in New Issue
Block a user