Firefox PHP

Module: Embed Images

Posted by Maurice Makaay 
Re: Module: Embed Images
May 23, 2008 11:34AM
Added it in changeset 3321.
I thought I already handled that one, but this was for "#phorum div.message-body".


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
May 23, 2008 05:50PM
Hi Maurice,

just me again ;-)

For the moment it seems that my users are also feeded with dog food[/quote], they found another problem. ;-)

Since images are embedded with a div-tag they start always on a "new line". If users include foreign smileys inside a text, the smiley lost his position because he moves to next line.

Example: [forum.langzeittest.de]

How to avoid that?

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Embed Images
May 23, 2008 06:32PM
a "foreign" smiley is an external image. I see no way to avoid that but maybe maurice has a clue.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Module: Embed Images
May 23, 2008 07:31PM
Nope, no clue. It's not designed for in line remote smiley images. You could remove the float from the embed images div, but that would change the behavior for the other images. Maybe for the good, maybe for the bad. That is up to your users.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
May 23, 2008 10:04PM
I would recommend an edit to the bbcode to use [smiley][/smiley] instead of img for the list of smileys. Otherwise edit the embed images to ignore the array of smileys.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Embed Images
May 23, 2008 10:24PM
The smileys from the smileys module are not the problem. It is about smileys that are hosting on some other server. A [smiley] tag could be an option. If that one is built to handle the image before the bbcode or embed_images modules do (possible to configure through module priorities), it should not be hard to implement.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
May 26, 2008 11:13AM
Hi Maurice,

Quote
Maurice Makaay
Nope, no clue. It's not designed for in line remote smiley images. You could remove the float from the embed images div, but that would change the behavior for the other images. Maybe for the good, maybe for the bad. That is up to your users.

The Embed Images Module tries to show images in a nice boxes with a text link to the original image. But if the image is very small (like an icon) there is no box shown, no text link, just the additional link on the (icon) image shows a difference to normal behavior (without Embed Image Module).

So I see various solutions:

- No additional treatment by the Embed Image Module for small images or
- Replacing div by span or
- Styling divs as inline element

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Embed Images
May 26, 2008 11:23AM
No, no and no, sorry ;-) All images are treated the same. There is a special div for cases where the image is scaled down, to show that it is scaled down. For the rest, things are the same. Switching between inline / floating / block / whatever for different sized images makes no sense, because that would really confuse the users. So if you want to change the bahavior in some way, then just make them all inline through the module templates.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
May 26, 2008 01:42PM
Hi Maurice,

Quote
Maurice Makaay
There is a special div for cases where the image is scaled down, to show that it is scaled down.

This was the crucial hint for me. I changed thumbnail.tpl in my template like this:

{IF VIEWER->IS_SCALED}
  ...original content of thumbnail.tpl...
{ELSE}
  {IF VIEWER->TARGET_URL}
    {VAR TARGET_URL VIEWER->TARGET_URL}
  {ELSE}
    {VAR TARGET_URL VIEWER->URL}
  {/IF}
  {IF TARGET_URL}<a href="{TARGET_URL}">{/IF}
  <img src="{VIEWER->THUMBNAIL_URL}"
    {IF VIEWER->W} width="{VIEWER->W}"{/IF}
    {IF VIEWER->H} height="{VIEWER->H}"{/IF} 
    id="image_{VIEWER->ID}"
    alt="{VIEWER->DESCRIPTION}. "
    title="{VIEWER->DESCRIPTION}. "/>
  {IF TARGET_URL}</a>{/IF}
{/IF}

So images which are not scaled are shown just with the link and image tag. Smileys keep in place.

Once more it was very helpful to specify a problem to find together a solution. Thanks!

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Embed Images
May 26, 2008 01:50PM
Yeah, good problem descriptions lead to solutions ;-)
And templates make the world spin.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login