Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Would it be possible to add support for Lightbox or any variant? A full list of options: http://www.mindreamz.net/50.html
Comments
Comment #1
sunPossible, yes. But definitely not soon, since Image Assist's JavaScript needs a complete overhaul first. I'd mark this postponed normally, but given the current size of the issue queue and the limited scope of this issue, I'm marking this won't fix.
Comment #2
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedIt's pretty simple to adjust code to allow this to happen.
Right now you have the following options for including a link with the rendered image: 'none' => t('Not a link'), 'node' => t('Link to image page'), 'popup' => t('Open in popup window'), 'url' => t('Go to URL').
Just add the option for: 'imagelink' => t('Link to image') and the corresponding code to link the image directly without any custom js popup.
Lightbox2 - http://drupal.org/project/lightbox2 - will take it from there.
All that needs to be done in Lightbox2 is to add "image" to the custom class images listing in the settings screen and you are all set. Lightbox2 will open the link in its own nice Lightbox pop up.
Instructions for Code changes follow:
Change (line 780 of img_assist.module 6.x-2.0-alpha4) at function img_assist_properties_form($form_state, $node, $update):
into
And Add (at line 1508 of img_assist.module 6.x-2.0-alpha4) to function theme_img_assist_inline($node, $size, $attributes):
between
and
Change (line 186 of img_assist.admin.inc 6.x-2.0-alpha4) at function img_assist_admin_settings()
into
Right now I have tested it and have it working by choosing the Custom URL option, but for regular users it's a drag to figure out the actual url of the original image. Take a look at the pic in the middle of the article here http://www.socinfo.com/linux-on-windows-and-mac (the one at the beginning and the ones at the end are cck imagefields, so ignore them).
Comment #3
sunThis will be resolved via upcoming Wysiwyg integration.
Comment #4
jarizaro CreditAttribution: jarizaro commentedSolution in #22 works ok, except , there is a little error in this...
The correct code to insert is:
Note the output line, i changed url variable name to popup_url. If not, this doesn't work.
With this change, for me, this solution is working ok.