Allow different module path than sites/all/modules
Ander5 - December 2, 2007 - 04:49
| Project: | jQuery Lightbox |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
When opening an image into a popup, the close image "button" that is normally in the lower right corner is not shown (period) in the latest version of firefox, and IE just shows the typical "image not found" x thing.

#1
Upon further investigation, I noticed the path to the image is "/sites/all/modules/jlightbox/images/closelabel.gif" which is incorrect. In my case, it should be "/cnwc/modules/jlightbox/images/closelabel.gif". Hopefully this additional information is useful.
#2
According to latest release notes the path to images has been fixed, but it does not look like the changes were committed. I am still showing the incorrect path in 5.x-1.1, which causes the missing loading and close gif. Otherwise seems to work well.
#3
So in other words I need to wait until the author commits the changes and re-uploads the module?
#4
No, jLightbox is not yet able to support different module paths than the default sites/all/modules currently. If you put jLightbox into sites/all/modules, it will work.
AFAIK, a different path would have to be passed via Drupal.settings(), thus being another javascript snippet slowing down your site. I would like to fix this soon (without performance issues), however, I just don't feel comfortable with additional inline javascript on each page request.
Any suggestions/solutions, and of course patches, are welcome.
#5
drupal_get_path('module', 'jlightbox') .'/images/closelabel.gif'
#6
i have the last stable release of jlightbox installed in the /sites/all/modules directory but the closelabel image is not displayed. i suspect that when drupal is not installed in the root the /sites... link is not working properly (goes to server root instead of drupal root). if not there might be some interference with the i18n module (that adds language to the path).
so, is the code suggested above supposed to be put in the following line of the jlightbox.uncompressed.js file?
fileBottomNavCloseImage: '/sites/all/modules/jlightbox/images/closelabel.gif',and then renaming as jlightbox.js ?
thank you
#7
up