Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Open image in Modal

422422 Developer MVP
edited October 2011 in Vanilla 2.0 - 2.8
We use this plugin it is great. I do have a question though.

We use lightbox script, to open images in Modal windows.

A typical call would be:
a href="assets/1.jpg" class="lightbox">
So my question is how could I invoke this on an attached image, I have checked fileupload.js and tried to apend the class lightbox to various elements, but no success.

So I checked out : class.mediamodel.php but for the life of me could not ascertain where to add this code.

Any suggestions ?

There was an error rendering this rich post.

Tagged:

Answers

  • Options
    422422 Developer MVP
    I added class to link_files.php like so.

    if ($CanDownload) { $DownloadUrl = Url(MediaModel::Url($Media)); $Img = '<a href="'.$DownloadUrl.'" class="lightbox">'; }

    But doesnt seem to want to play ball. Perhaps the other classes, are delimmiing the class="lightbox"

    There was an error rendering this rich post.

  • Options
    It's either 2 things.
    1) You don't do class='lightbox' but rel='lightbox'
    2) The actual "rel" you have to call isn't 'lightbox', but something similar to 'lightbox'
    for example 'facebox'. You'll have to look in the jquery source for that.

    There was an error rendering this rich post.

  • Options
    422422 Developer MVP
    We have our own lightox system, fired from class="lightbox" will try rel though...

    Thanks

    There was an error rendering this rich post.

  • Options
    SheilaSheila ✭✭

    Hi!

    Sorry, I'm really n00b with anything related to jquery..

    So: a. what script to use, in order to open attached images in Modal windows?
    And: b. how?

Sign In or Register to comment.