External link icon should be a CSS class
- Status
- Closed
- Subject
- External link icon should be a CSS class
- Version
- 5.x
- Category
- Feature request
- Less than 30-minutes fix
- Feature
- Wiki Syntax (text area, parser, external wiki, etc)
- Resolution status
- Fixed or Solved
- Submitted by
- jacmoe
- Volunteered to solve
- jacmoe
- Lastmod by
- jacmoe
- Rating
- Description
In tikilib.php, the external link icon is hardcoded:
Copy to clipboardif ($prefs['feature_wiki_ext_icon'] == 'y' && !$options['suppress_icons']) { $ext_icon = "<img border=\"0\" class=\"externallink\" src=\"img/icons/external_link.gif\" alt=\" (external link)\" />"; }
That is not good if you want that icon to be different.
You have to overwrite img/icons/external_link.gif with your own, and remember to re-overwrite it when updated to a new Tiki.It would be better to either allow the user/admin to give a link to an alternative icon, or even better: put it in CSS, so that it can be overwritten in themes.
A quick fix would be to change line 5806 and line 6245 from this:
Copy to clipboard$ext_icon = "<img border=\"0\" class=\"externallink\" src=\"img/icons/external_link.gif\" alt=\" (external link)\" />";to this:
Copy to clipboard$ext_icon = "<span class=\"externallink\">Â Â Â </span>";And then put a CSS class in design.css or other appropriate css file, so that it can be overridden by theme css:
Copy to clipboard.externallink { background: url(img/icons/external_link.gif) no-repeat; }- Solution
In the end, I just added a new preference variable: external link icon source.
Much better solution, IMO.Fixed by revision: 26985 (trunk)
- Importance
- 5
- Easy to solve?
- 8
- Priority
- 40
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 3170
- Created
- Friday 07 May, 2010 19:57:53 UTC
by jacmoe - LastModif
- Saturday 08 May, 2010 00:43:35 UTC