|
I've been doing a job that I was asked to add some shortcut icons on the panel of Joomla! and I realized that mod_quickicon module features a function that converts the parameters supplied in html output image with a link. Well what I needed is that these icons had a target to a new browser window and started to modify this module to share with you now.
quickiconButton function ($ link, $ image, $ text)
(
global $ mainframe;
$ Lang = & JFactory:: getLanguages ();
$ Template = $ mainframe-> GetTemplate ();
?>
<Div style = "float: <? Php echo ($ lang-> isRTL ())? 'Right': 'left'; ?>;">
<div>
<A href = "<? Php echo $ link;?>">
<? Php echo JHTML ::_(' image.site ', $ image, "/ templates /'. $ Template. '/ Images / header /', NULL, NULL, $ text);?>
<span> <? php echo $ text;?> </ span> </ a>
</ Div>
</ Div>
<? Php
)
Which has to be this:
quickiconButton function ($ link, $ image, $ text, $ target)
(
global $ mainframe;
$ Lang = & JFactory:: getLanguages ();
$ Template = $ mainframe-> GetTemplate ();
?>
<Div style = "float: <? Php echo ($ lang-> isRTL (),)? 'Right': 'left'; ?>;">
<div>
<? Php if (! $ Target) (?>
<A href = "<? Php echo $ link;?>">
<? Php) else (?>
<A href = "<? Php echo $ link;?>" Target = "<? Php echo $ target;?>">
<? Php)?>
<? Php echo JHTML ::_(' image.site ', $ image,' / templates / '. $ Template.' / Images / header / ', NULL, NULL, $ text);?>
<span> <? php echo $ text;?> </ span> </ a>
</ Div>
</ Div>
<? Php
)
In addition to placing the images that we are interested in the directory administrator / templates / khepri / images / header we have to use the above function to create new icons
$ Link = 'https: / / www.paypal.com / en / help';
quickiconButton ($ link, "paypal.png ', JText:: _ (' paypal '),' _blank ');
|