This module is perfect for my needs: it makes great teasers with inline images. Is there any easy way to get the image in the teaser to link to the node?
This module is perfect for my needs: it makes great teasers with inline images. Is there any easy way to get the image in the teaser to link to the node?
Comments
Comment #1
povinho commentedHi!
I managed to do this by changing the "inline_upload.module" code for the Option ":
"Display image with a link to the image file".
It would be great to be possible create a 3rd option: "Display image with a link to the node"
Well this how I did it:
I'm using the "Auto-Inline" option (No [inline:...] in the text) so in the "inline_upload.module" code I've changed:
For:
I would like to find a way to change ". '/node/' for some variable for other options.
Also just the "ALT" or Title doesn't return the name of the file I changed:
for
Please let me know if you find a cleaner way to do this and also don't show the link when you are already inside the Node.
I hope it helps.
I'm still testing it :)
Regards,
Ricardo
Comment #2
fasdalf@fasdalf.ru commentedI suggest
$output = l($output, 'node/' . $file->nid, array('absolute' => 'TRUE', 'attributes' => $attributes, 'html' => TRUE));for link to use Drupal path aliases.Comment #3
povinho commentedI've tested it and it works! Thank you Fasdalf :)