PDA

View Full Version : Mouseover for abbreviations?


Matt_Crawford
09-12-2009, 08:16 AM
Hi there,

We have a lot of abbreviations on our website - a member suggested that there was a modification that created automatic mouseover explanation text, but I have failed to locate this on the site.

Does anyone have any idea if this does exist? I would be eternally grateful!

Thanks,

Matt

Lynne
09-12-2009, 02:48 PM
I'd guess you can just do a str_replace for those words. I just posted this in another thread:
hook location - postbit_display_complete

$word = array(
'word 1',
'word 2',
);

$link = array(
'<span title="what you want to say">word 1</span>',
'<span title="what you want to say">word 2</span>',
);

$this->post['message'] = str_replace($word, $link, $this->post['message']);

(I use str_ireplace, but that's your choice - google the differences.) You can change the color in the span tag also, whatever you want.