Filename on hover

Admiror Gallery is free extension for Joomla! based websites. Admiror Gallery is all in one, a simple and instant solution for rendering image gallery from folder with images, but very flexible and adaptable.
Post Reply
Message
Author
spinner
Posts: 1
Joined: Mon Aug 08, 2011 11:16 pm

Filename on hover

#1 Post by spinner »

Hey Guys,

Must say I just love this extension! - It is absolutly perfect!

There is only one little thing that I cant get my head around, I dont like the filename on hover over a image,

Any clues how to remove this?

Spinner

Admiror Gallery 5 - Fundraising Campaign

User avatar
kekeljevic
Developer
Developer
Posts: 445
Joined: Tue Aug 17, 2010 2:38 pm
Location: Novi Sad, Serbia
Contact:

Re: Filename on hover

#2 Post by kekeljevic »

Tooltips are necessary, because Popups use link's title attribute to get Image Caption. It's possible to remove title attributes from links, but the cost will be loosing Captions in Popups !

For removing title attributes place this code in template, just before end line with "?>" :

Code: Select all

$html.='
<script type="text/javascript">
AG_jQuery(document).ready( function () {
    AG_jQuery("#AG_'.$AG->getGalleryID().' a").each( function () {
        AG_jQuery(this).removeAttr("title");
    });        
});
</script>
';

lauraatje
Posts: 1
Joined: Wed Aug 10, 2011 12:35 pm

Re: Filename on hover

#3 Post by lauraatje »

Hello

I am also trying to remove the file description on hover over a thumbnail, but it won't work. Can you tell me where i can do this? I've already tried the code in the template, but somehow there's is no end line with "?>" ??

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Filename on hover

#4 Post by Vasiljevski »

You can always try the dirty way :) By editing "plugins\content\AdmirorGallery\classes\agGallery.php" file

Find function:

Code: Select all

function writePopupThumb($image)
And replace:

Code: Select all

<a href="'.$this->imagesFolderPath.$image.'" title="'.htmlspecialchars($this->descArray[$image], ENT_QUOTES, "UTF-8").'" class="'.$this->popupEngine->className.'" rel="'.$this->popupEngine->rel.'" '.$this->popupEngine->customAttr.' target="_blank">
with:

Code: Select all

<a href="'.$this->imagesFolderPath.$image.'" title="" class="'.$this->popupEngine->className.'" rel="'.$this->popupEngine->rel.'" '.$this->popupEngine->customAttr.' target="_blank">
No titles, means no text on hover ;) You can even remove the title completely if you want, but I don't know is that a good idea from HTML standards :)
Help Admiror Gallery become even better,
give us a review on JED

steajbj
Posts: 1
Joined: Mon Jan 02, 2012 10:59 am

Re: Filename on hover

#5 Post by steajbj »

I found that the above methods removed the title hover successfully but they also stripped the lightbox caption text too (unless I somehow missed something?) I was however able to remove the title hover and KEEP the caption for the Slimbox Popup by doing the following:

Open the file "plugins\content\AdmirorGallery\classes\agGallery.php"

Find function:

Code: Select all

function writePopupThumb($image)
And replace:

Code: Select all

<a href="'.$this->imagesFolderPath.$image.'" title="'.htmlspecialchars($this->descArray[$image], ENT_QUOTES, "UTF-8").'" class="'.$this->popupEngine->className.'" rel="'.$this->popupEngine->rel.'" '.$this->popupEngine->customAttr.' target="_blank">
With:

Code: Select all

<a href="'.$this->imagesFolderPath.$image.'" slimboxcaption="'.htmlspecialchars($this->descArray[$image], ENT_QUOTES, "UTF-8").'" class="'.$this->popupEngine->className.'" rel="'.$this->popupEngine->rel.'" '.$this->popupEngine->customAttr.' target="_blank">
Then open the file "plugins\content\AdmirorGallery\popups\slimbox\js\slimbox2.js"

And replace:

Code: Select all

// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
	AG_jQuery(function($) {
		$("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
		});
	});
}
With:

Code: Select all

// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)

	AG_jQuery(function($) {
$("a[rel^='lightbox']").slimbox({ /* Put custom options here */ }, function(el) {
        return [el.href, el.getAttribute("slimboxcaption")];
}, function(el) {
  return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
 });
});

I hope this helps! :)

Admiror Gallery 5 - Fundraising Campaign

Post Reply