I wanted extlink to operate on image links as well. Currently, the javascript that processes links specifically excludes them (probably to avoid putting little icons after the images, which would be weird).
But we're not using the icons, instead, extlink_extra provides a colorbox option, and for that to work the image links need the "ext" class applied.
This patch adds a variable, extlink_class_img
which defaults to FALSE (so no change in behavior. If you set it to TRUE in your settings.php file however, it should catch imagelinks as well. It's a little rough (I didnt add it to the admin screen, variable not removed on uninstall) but if there's interest I will improve it.
Comment | File | Size | Author |
---|---|---|---|
#12 | extlink-1857612-12.patch | 2.35 KB | elachlan |
#6 | extlink_apply_to_images-1857612-6.patch | 2.43 KB | rj |
#4 | extlink_apply_to_images-1857612-4.patch | 2.36 KB | rj |
#1 | extlink-apply-to-images-1857612-1.patch | 2.39 KB | rj |
extlink-apply-to-images.patch | 1.84 KB | kscheirer | |
Comments
Comment #1
rj CreditAttribution: rj commented+1 for this.
New patch attached that includes a checkbox on the admin screen to enable/disable.
Comment #2
elachlan CreditAttribution: elachlan commentedAs we have
extlink_mailto_class
as a variable I would like to follow the naming convention and make the variableextlink_img_class
.Also the administration menu item should appear below the mailto. We should treat it as a separate option.
Comment #3
elachlan CreditAttribution: elachlan commentedIf you re-roll the patch I will see about it's inclusion.
Comment #4
rj CreditAttribution: rj commentedSee attached.
Comment #6
rj CreditAttribution: rj commentedThis should be better.
Comment #8
elachlan CreditAttribution: elachlan commentedTests are failing at the moment. I am currently fixing it. Sorry!
Comment #9
rj CreditAttribution: rj commentedYeah I saw it was coming from extlink.test, let me know when I should resubmit.
Comment #10
elachlan CreditAttribution: elachlan commented#6: extlink_apply_to_images-1857612-6.patch queued for re-testing.
Comment #11
elachlan CreditAttribution: elachlan commentedI might get you to re-roll once the changes in Issues #1329786: JS refactoring are completed.
Comment #12
elachlan CreditAttribution: elachlan commentedRe-rolled the patch. Looks like it's working. Let me know what you think.
Comment #13
rj CreditAttribution: rj commentedLooks good!
Comment #14
elachlan CreditAttribution: elachlan commentedCommitted to Git.
Comment #15
DamienMcKennaMoving to the correct branch.
Comment #16
elachlan CreditAttribution: elachlan commentedI believe the new setting wasn't added to extlink.settings.yml
Its in all other places.
Comment #17
elachlan CreditAttribution: elachlan commentedAs far as I can tell this was already done.