Question

I am using the Joomla modal window squeezebox. I wish to be able to add some text below the image popup, like on www.pathgate.org images.

Is there any way I can add this when calling up the modal window in the article?

E.g. Click here for

I was thinking there might be something like: description: 'lorem ipsum doler sit amet'

Était-ce utile?

La solution

something like this

<a class="modal" href="images/powered_by.png" title="text" rel="{handler:'img_ext'}">test</a>

window.addEvent('load', function() {
  SqueezeBox.handlers.img_ext = function(elm) {
    var url = elm.href;
    this.image = new Image();
    var events = {
       loaded: function() {
       var win = {x: window.getWidth() - this.options.marginImage.x, y: window.getHeight() - this.options.marginImage.y};
       var size = {x: this.image.width, y: this.image.height};
       for (var i = 0; i < 2; i++)
        if (size.x > win.x) {
          size.y *= win.x / size.x;
          size.x = win.x;
        } else if (size.y > win.y) {
        size.x *= win.y / size.y;
        size.y = win.y;
       }
    size = {x: parseInt(size.x), y: parseInt(size.y)};
    if (window.webkit419) this.image = new Element('img', {'src': this.image.src});
    else $(this.image);
    this.image.setProperties({
        'width': size.x,
        'height': size.y});
    size.y += 50;
    var title = new Element('div',{text:elm.title});
    var wrapper = new Element('div');
    wrapper.adopt([this.image,title]);
    this.applyContent(wrapper, size);
    }.bind(this),
    failed: this.onError.bind(this)
    };
    (function() {
       this.src = url;
    }).delay(10, this.image);
    this.image.onload = events.loaded;
    this.image.onerror = this.image.onabort = events.failed;
    };
SqueezeBox.parsers.img_ext=function(preset) {
return (preset || this.url.test(/\.(jpg|jpeg|png|gif|bmp)$/i)) ? $(this.element) : false;
};
}); 
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top