1. JonusC
  2. Newbies area
  3. Sunday, 14 June 2009
  4.  Subscribe via email
Heya there!

Well I went to the effort of making and installing my own emoticon set, but then I noticed that the "name" of the emoticon (what you type to get it) doesn't come up in the tooltip on mouse over.

On (some versions of?) IE, it does this from whatever is in the 'alt' value, but that isn't W3C spec. Firefox and Opera take it from the 'title' value to get a tooltip for an image. Why do I think this is important? Well, user friendliness really I think is the only reason. I know I like to have image tooltips on my sites!

Just incase, here's a little screenshot example of what this change allows:
[img size=188]http://compojoom.com/components/com_agora/img/members/1866/title_example.png[/img]
(Notice the o_O tooltip which is the text required to make that emoticon)

So, I made this small change to the code in comment.class.php located at /public_html/components/com_comment/joscomment/ - maye I suggest to you Daniel to perhaps include an option to turn this on/off in the plugin backend for the next release? I can do it myself if you like, but it's not very hard to code at all and the newest code you have is probably very different to the current public release :lol:

Well if anyone is interested, here's the code changes (in the file /public_html/components/com_comment/joscomment/comment.class.php )


(01) Line 2340, changed from...
$html = str_replace($ubb, "<img src='" . $this->_emoticons_path . '/' . $icon . "' border='0' alt='' />", $html);

...to...
$html = str_replace($ubb, "<img src='" . $this->_emoticons_path . '/' . $icon . "' border='0' alt='' title='$ubb' />", $html);

...which adds the mouseover text to the emoticons in the comments content.

(02) Line 2788, changed from...
$html .= "<img src='$this->_emoticons_path/$icon' border='0' alt='$ubb' />";

...to...
$html .= "<img src='$this->_emoticons_path/$icon' border='0' alt='$ubb' title='$ubb' />";

...which adds the mouseover text to the emoticons in edit/new comment form.

Cheers :)

P.S. Daniel, a question for you - is there a reason why alt text needs to be empty for these emoticons? I was going to put it in there, but there's a comment saying it breaks something... :blink:
Responses (10)


There are %s replies to this question. If you want to see them you need a valid subscription.
If you have a valid subscription, please login now.
Visit store now

Last questions

CMigrator: Path from Drupal 6 to J5?
(Category s/b CMigrator, but didn't see it on the list) I'm interested in usi...
0 Replies
Posted on Monday, 28 April 2025
  • New
  • Dowload all Hotspots entries
    Hi there, I'm looking for a way to dowload all the Hotspots entries. I've got t...
    0 Replies
    Posted on Sunday, 06 April 2025
    • #kml
    • #download
    Set number of hotspots / user groups
    Hi, I'm working with Hotspots for my new website and I love it! After trying ...
    0 Replies
    Posted on Monday, 31 March 2025
    J5 compatibility for Hotspots
    Hi guys, Just started to update my old J3x website. Is there J5 compatibility p...
    1 Replies
    Posted on Monday, 24 February 2025
    • #Hotspots
    • #hotspots Joomla 5
    Text size in the comment input form
    Hello. How can I increase the font size in the comment input field? For examp...
    0 Replies
    Posted on Wednesday, 26 February 2025
    • #CComment 6