Module: Embed Images
Posted by Maurice Makaay
April 12, 2009 07:22AM |
Admin Registered: 20 years ago Posts: 8,532 |
This was already reported in the SEF URL thread. Please report your issue in that thread too and not in this one. If SEF URL breaks Embed Images, then it's the SEF URL module that has a bug.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



Re: Module: Embed Images May 16, 2009 03:16AM |
Registered: 15 years ago Posts: 106 |
May 16, 2009 06:07AM |
Admin Registered: 20 years ago Posts: 8,532 |
Above the text is not a big issue. It needs a bit of hacking in the module, but it's perfectly possible. Around line 229 in mods/embed_images/embed_images.php, you could try to replace the existing code with this:
I didn't test it, but this should be about it.
Floating to the left is what is in the CSS by default, but I'm not sure if that results in the effect that you desire.
Another option is to install the Embed Attachments module. Using that, you can place an attachment marker in the message body to point exactly where you want the image to appear. The images that are shown below the message will only be shown there, in case they are not already included in the body. I would prefer that option, since it gives me even more control and requires no hacking.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Language: PHP// Handle automatic displaying of image attachments as embedded // images in the message. $block = ';';; $has_images = FALSE; if (!empty($PHORUM[';mod_embed_images';][';embed_allatt';]) && !empty($data[$id][';attachments';])) { foreach ($data[$id][';attachments';] as $aid => $attachment) { $attach = phorum_mod_embed_images_render_embedded_attachment( $attachment, $data[$id], TRUE ); if (isset($attach[';rendered_raw';])) { if (!$has_images) { $block = ';<div class="mod_embed_images_attachments">';; $has_images = TRUE; } $block .= $attach[';rendered_raw';]; unset($data[$id][';attachments';][$aid]); } } } if ($has_images) $data[$id][';body';] = $block .';</div><br style="clear:both"/>';;
I didn't test it, but this should be about it.
Floating to the left is what is in the CSS by default, but I'm not sure if that results in the effect that you desire.
Another option is to install the Embed Attachments module. Using that, you can place an attachment marker in the message body to point exactly where you want the image to appear. The images that are shown below the message will only be shown there, in case they are not already included in the body. I would prefer that option, since it gives me even more control and requires no hacking.
Maurice Makaay
Phorum Development Team



Re: Module: Embed Images May 16, 2009 11:38AM |
Registered: 15 years ago Posts: 106 |
May 16, 2009 12:55PM |
Admin Registered: 20 years ago Posts: 8,532 |
Oh yes, stupid me. Change the last two lines to the following:
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Language: PHPif ($has_images) $data[$id][';body';] = $block .';</div><br style="clear:both"/>'; . $data[$id][';body';];
Maurice Makaay
Phorum Development Team



Re: Module: Embed Images May 16, 2009 06:53PM |
Registered: 15 years ago Posts: 106 |
Re: Module: Embed Images May 18, 2009 01:15AM |
Registered: 15 years ago Posts: 1 |
May 18, 2009 03:05AM |
Admin Registered: 20 years ago Posts: 8,532 |
Sorry, I overlooked this response by you. In the current code, there is an explicit break to make sure that the text wraps below the image. Try removing <br style="clear:both"/> from the code in the module. Without that, the text should start to the right of the image. Things might get weird with multiple images, but it looks like you're only supporting one image per post.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



Re: Module: Embed Images June 16, 2009 02:59PM |
Registered: 15 years ago Posts: 5 |
By default, if you use this mod with Embed Attachments, code is dropped in like this:
[attachment1.jpg]
[attachment2.jpg]
and the thumbnails are stacked on top of each other.
If the code were
[attachment1.jpg][attachment2.jpg]
then the images would be side by side. Is there a way to change this?
thanks
[attachment1.jpg]
[attachment2.jpg]
and the thumbnails are stacked on top of each other.
If the code were
[attachment1.jpg][attachment2.jpg]
then the images would be side by side. Is there a way to change this?
thanks
June 16, 2009 03:35PM |
Admin Registered: 20 years ago Posts: 8,532 |
What exactly is it that you want to change? The way that the images are added to the post automatically or by a button click? Or do you want to prevent images from being show above each other if the embedding tags are above each other? I'm not fully sure what you are asking for.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



Sorry, only registered users may post in this forum.