1. sjudelson
  2. Sherlock Holmes
  3. Commercial Templates
  4. Thursday, 06 January 2022
  5.  Subscribe via email
I am using the Nina template. I am also using the J51 InlineIcons extensions to direct to internal and external URLs.

Is it possible to use the J51 Inline Icons extension to open a page as a popup box or modal window? It did not work by simply adding < " class="modal > after the link address or setting the page class of the page to be opened to modal (perhaps my implementation was wrong). If there is a solution, is it also possible to direct Inline Icons to popup a module instead of a URL page?

I know there third-party popup extensions that can probably do this but thought I would ask you first if your extension can do the same. Thank you for your fine templates and extensions!
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

If you are familiar with creating module overrides, you create one for the InlineIcons module and try replacing the following (line 69)...

echo '<a href="'.$item->j51_iconurl.'" class="j51_inlineicon" data-balloon="'.$item->j51_icontitle.'" data-balloon-pos="up" '.$target.'><i class="fa '.$item->j51_iconclass.'" title="'.$item->j51_icontitle.'" style="color:'.$item->j51_iconcolor.'" ></i></a>';


With...

echo '<a onclick="window.open("'.$item->j51_iconurl.'", "name","width=600,height=400")" href="'.$item->j51_iconurl.'" class="j51_inlineicon" data-balloon="'.$item->j51_icontitle.'" data-balloon-pos="up" '.$target.'><i class="fa '.$item->j51_iconclass.'" title="'.$item->j51_icontitle.'" style="color:'.$item->j51_iconcolor.'" ></i></a>';


Ciaran
  1. more than a month ago
  2. Commercial Templates
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Ciaran,

Thanks for the reply! I was not familiar with creating module overrides, but found a pretty straightforward description and instructions at https://www.joomlashack.com/blog/joomla/overrides. I am confident I can create the override you suggest.

Before I create the module override, will it affect the way other instances of InlineIcons module works? I am using InlineIcons in another module position to open social media links. This instance of InlineIcons works wonderfully and I would prefer not to change it and cause this instance to open popups.

Steven
  1. more than a month ago
  2. Commercial Templates
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Ciaran,

I created the module override and cut and pasted the change you suggested. Unfortunately, the override did not work. With the override in place, instead of displaying the various Fontawesome icons, my site displayed several strings of characters. Attached is a screenshot showing the strings.

Steven
Attachments (1)
  1. more than a month ago
  2. Commercial Templates
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
After thinking this through some more, I think I may be asking the InlineIcons module to do more than it was meant to do. Inlineicons does a fantastic job displaying icons (i.e., specifying the FontAwesome icon, size, color, hover text, padding) and specifying the URL to be opened and whether it should open in the current or a new window. I want a few other options of how links are opened.

Specifically, I want to also be able to open an existing module or internal article in a module position or in a modal popup (in addition to the new or current window choices). And I want to be able to specify these choices on a case-by-case basis (so that some icons open in a new window and some open in a modal). Is this possible with InlineIcons? I believe I can accomplish the same behavior with the Modals extension by Regular Labs (and a couple of other extensions), but with more work setting up the way icons are formatted and displayed. Do you have a suggestion or advice?

Steven
  1. more than a month ago
  2. Commercial Templates
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Steven

To answer your question, yes an override will effect all instances of the module if you create a standard override titled default.php. Joomla however allows you to create multiple overrides for a module and then select which override you wish to use within a module instance settings.

Simply create the override as normal and then rename that override (eg default.php -> newwindow.php). You can then select this override via the Advanced -> Layout option of your module instance settings. There is no limit to the number of override you create.

I hope this helps

Ciaran
  1. more than a month ago
  2. Commercial Templates
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok