Thickbox is activated (darken page etc.) but image is shown as text and box is under page's body. It's same with Thickbox module as well with my own implementation. Where can be problem? THX

You can see it here: http://cenasalvator.cz/?q=thickbox

PS: I now use Lightbox in gallery, but it's collide with jquery.js - I like use JQuery at all.

Comments

kleingeist’s picture

By default the thickbox.js script determines if it should load a html page or an image by the given url of the class="thickbox" link. It just checks if it matches the file extension of some popular formats.

  // regex to check if a href refers to an image
  var imageURL = /\.(jpe?g|png|gif|bmp)/gi;
  // check for images
  if ( baseURL.match(imageURL) ) {

If this doesn't match, the script tries to load the link as pure html code which makes no sense on the image data.

You could try to extend the if clause by checking if it matches your specific link structure. For example you could try:

  if ( baseURL.match(imageURL) || url.match(/image\/view\/[0-9]+/i) ) {

Or something like that.

Hope this helps.

Because this is in the thickbox.js code and not directly an drupal issue i suggest to change the Status to won't fix or something like that

PEpe’s picture

Status: Active » Closed (won't fix)

Yes, it was just my problem. There was path ?q=image/view/".$image->nid." in my link ... Thank you very very much! (And maybe it will help also someone else.)