Page 1 of 1

Filename on hover

Posted: Mon Aug 08, 2011 11:18 pm
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

Re: Filename on hover

Posted: Tue Aug 09, 2011 8:27 am
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>
';

Re: Filename on hover

Posted: Wed Aug 10, 2011 12:40 pm
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 "?>" ??

Re: Filename on hover

Posted: Wed Aug 10, 2011 3:48 pm
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 :)

Re: Filename on hover

Posted: Mon Jan 02, 2012 11:22 am
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! :)