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

Question regarding custom fields
How do I access custom fields after I have created them?...
0 Replies
Posted on Wednesday, 24 April 2024
  • New
    • #custom fields
    Google no index für bestimmte Seiten/Details
    Hallo ich habe eine kleine Frage: wo kann ich einstellen, dass Google die Seite...
    0 Replies
    Posted on Wednesday, 24 April 2024
  • New
  • Language parameter in the link to the comment
    Hello. 1) I have a multilingual website (3 languages). If someone added a comme...
    1 Replies
    Posted on Saturday, 06 April 2024
    categories icon in header
    Hi! I saw this in the promo, but I can't find how to set it up. https://compo...
    0 Replies
    Posted on Monday, 22 April 2024
  • New
    • #style
    • #Categories
    Questions on new installation...
    Working on getting this set up... https://eastend2024.joepolecheck.com/rumma...
    3 Replies
    Posted on Wednesday, 17 April 2024
  • Resolved
  • New