Image title as tooltip

Phoca Gallery modules - modules for Phoca Gallery extension
Aikidoka
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 20 May 2008, 21:53
Location: United States of America

I like the image tit

Post by Aikidoka »

I like the image title as a tooltip so it appears immediately with the cursor going over the image. Here's how to do it with the random image module.

Edit mod_phocagallery_random_image.php

Find the code JHTML::_('behavior.modal', 'a.modal-button');


Add before or afterJHTML::_('behavior.tooltip');



Find the code .'<div class="phocagallery-box-file-third">' . "\n"


Replace it with .'<div class="hasTip phocagallery-box-file-third" title="'.$image_object->title.
'">' . "\n"



When I open the file with an actual editor with line number, I'll add those also.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47891
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

thank yo for this in

Post by Jan »

thank yo for this info...

Jan
If you find Phoca extensions useful, please support the project
Aikidoka
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 20 May 2008, 21:53
Location: United States of America

Probably should also

Post by Aikidoka »

Probably should also remove the anchor tag's title text if going to tooltips. This will keep the title from popping up over the tooltip if the user leave the mouse stationary.

Find
.'<a class="'.$button->methodname.'" title="'.$image_object->title.'" href="'. J
Route::_($image_object->link).'"';


Replace with
.'<a class="'.$button->methodname.'" href="'. JRoute::_($image_object->link).'"'
;
Post Reply