Firefox PHP

Module: Embed Images

Posted by Maurice Makaay 
All files from this thread

File Name File Size   Posted by Date 244.1 KB open | download Maurice Makaay 08/31/2016 Read message
2.jpg 9.9 KB open | download swing 11/26/2009 Read message
Screenshot.JPG 17.2 KB open | download Telelinc 04/05/2011 Read message 4.5 KB open | download Telelinc 04/05/2011 Read message
Capture.PNG 5.9 KB open | download Nicola 05/04/2011 Read message
Capture.PNG 62.7 KB open | download Nicola 05/05/2011 Read message
tankslap_embed_image_error.png 23.1 KB open | download tankslap 09/19/2011 Read message
signature.jpg 19.5 KB open | download autoven 12/08/2012 Read message
ScreenHunter_02 Dec. 14 11.46.jpg 9.6 KB open | download DavidVonB 12/14/2012 Read message
port.PNG 27.3 KB open | download Toni 12/25/2012 Read message
port80.PNG 3.3 KB open | download Toni 12/25/2012 Read message
german-kawaii.jpg 173.5 KB open | download Keith X 05/20/2016 Read message
Module: Embed Images
November 25, 2007 12:43PM
Important: this module requires Phorum 5.2.16-RC2 or newer

This module implements several image viewers that can be used for viewing images inside forum messages. The images are shown as scaled down thumbnails in the message, so large images won't break the page layout. By clicking the image, the users can view the full size image in the configured viewer.

The module will recognize:
  • [img]...[/img] BBcode style images
  • <img ...> HTML style images (if the HTML module is enabled)
  • Image attachments that are added to the body by the Embed Attachment module
  • Bare image URLs that point to .jpg, .png or .gif files

  • A maximum width and/or height for images can be configured. If an image
    exceeds the allowed size, a thumbnail image will be generated.
  • Phorum 5.2's image API code is used for consistent image scaling.
  • Images for which a thumbnail is generated will be shown in a frame
    containing a looking glass icon to inform the user that a larger view
    is available.
  • For viewing the image in its full size, multiple viewers are available:
    browser, LightBox, SlimBox and Dynamic Drive's thumbnail viewer.
  • Images that are inside a link (using BBcode ... or
    <a href="...">...</a> if the HTML module is enabled) will be shown
    in a frame containing a link icon to inform the user that by clicking the
    image, a different URL will be loaded.
  • Two thumbnail caching methods are available. By default the Phorum cache
    layer is used. However, this is a non-permanent cache, since it does have
    a TTL (time to live) for the cached items. In the module settings, you can
    configure a filesystem path for storing the thumbnail cache. This cache is
  • When using the built-in filesystem cache system, it is possible to specify
    the http URL at which this cache directory is accessible through the web.
    By doing so, the module will use links that point directly to the thumbnail
    images. This is the fastest caching option available, since the images don't
    have to be served through the script. Please read the security notice in the
    module settings if you want to use this feature.
  • For clients that support Ajax, the module implements staged loading of
    the embedded images if they are not available in the cache yet.
    This makes it possible to show a "Loading ..." notification and to
    present real errors in case the server cannot serve an image for some
    reason. This mainly was done to have clear visual feedback when previewing
    a new message. This prevents user reports about not working message
    previews in case the image scaling is slow for some reason (big image,
    slow remote server, busy system, etc.).
  • JavaScript is not neccessary for the client. Without JavaScript, the
    module will gracefully fall back to a basic non-JavaScript solution.


2016-08-31 v1.1.5 Oliver Riesen-Mallmann <>

    - Made XHTML 1.0 Transitional compliant.

2015-09-16 v1.1.4 Oliver Riesen <>

    - Fixed various undefined index warnings.

2011-01-12 v1.1.3

    - Upgraded the FancyBox code to version 1.3.4.
      Thanks to user "noe" for doing some prework on a issue
      that occurred with FancyBox in combination with a new version of
      jQuery (1.4.4). The fix for that is included in this release.

2010-10-22 v1.1.2

    - Fixed formatting of embedded images in signatures on the
      user's control center start page.

    - Fixed the CSS code for Fancybox to correctly show the shadows
      for the lightbox.

    - Implemented debugging features to help people track issues
      with this module. In the module settings page, checks are done to
      see if HTTP GET and image scaling support is available on the hosting
      platform. Furthermore, a debugging switch can be enabled, which
      makes the embedded images in the front end return a detailed debug
      log of the image loading and scaling process.

    - Added new German language files. Thanks to Oliver Riesen!

2010-10-18 v1.1.1

    - Fixed an image displaying issue for FancyBox in MSIE. This was a well
      known issue with the FancyBox CSS code and the relative image paths that
      are used in there. It was fixed by loading and filtering the CSS code,
      to replace all image URLs with absolute URLs for those images.

2010-10-16 v1.1.0

    - Implemented two new viewers for the Embed Images module:
      * jQuery Lightbox (
      * FancyBox (

    - The two new viewers make use of the jQuery library that is bundled with
      Phorum 5.2.16 and higher. For this reason, the required Phorum
      version for this module has been set to 5.2.16.

    - Added French translation. Thanks to Phorum user cactux.
      In relation with the French translation, a bug was fixed that prevented
      the use of a ' character in the loading message.

    - Fixed rendering of automatically embedded attachments when doing a
      preview during a message edit operation. Before, the image would
      show up as [embed_image XXXXXXXXXX].

2009-06-01 v1.0.9

    - Made the module compatible with changes in the 5.3 development tree.

2008-07-31 v1.0.8

    - Implemented slimbox 1.64 + mootools 1.2 as a new image viewer.

2008-06-23 v1.0.7

    - Added some more HTML validation fixes to the Dynamic Drive image viewer,
      as provided by Oliver Riesen.

2008-05-15 v1.0.6

    - Made BBcode [url] recognition case insensitive to match
      the BBcode module behavior.

    - Updated the German language files with new language files
      provided by Oliver Riesen.

    - Added some HTML validation fixes to the Dynamic Drive image viewer,
      as provided by Oliver Riesen.

2008-03-03 v1.0.5

    - A small (backward compatible) change to make the Embed Images module
      compatible with the Image API for Phorum 5.2.7 or higher. The updated
      Image API scales down images as JPG instead of PNG. This module did not
      handle the MIME type "image/jpeg" for caching the data yet.

    - Added Russian translation. Thanks to Phorum user EugenR.

2008-01-18 v1.0.4

    - Use "@ini_set" instead of "ini_set", to let the module ignore
      problems on systems where the ini_set() function was disabled
      by the administrator.

    - Changed the slimbox "domready" event to "load" to prevent conflicts
      in MSIE. We can safely do this without causing images to be clickable
      only after the full page loaded, because we have some custom code
      in the module that will setup a viewer for the images right after
      putting them in the page.

2007-12-12 v1.0.3

    - Added German translation. Thanks Hiiri!

    - Added clear:both style for <br/> tags in the message body to make
      floating divs behave better. This is also in the main template,
      but since people might not copy that code, I added the styling
      in the template for this module as well.

2007-12-11 v1.0.2

   - Added ".jpeg" as a recognized extension for images.

   - Removed some htmlspecialchar() calls around phorum_get_url(), which
     could lead to non-working URLs in some environments.

2007-11-26 v1.0.1

   - Implemented different behavior for images that do not have to be
     scaled down. Before, they would not be clickable to open them in a
     viewer. Now they are clickable, but they will not be shown using
     the magnifier icon. The main reason for this is to make the image
     part of a slideshow if a slideshow based viewer like Lightbox or
     Slimbox is used.

2007-11-25 v1.0.0

- Initial release.

Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce

Edited 23 time(s). Last edit at 08/31/2016 02:09PM by Oliver Riesen-Mallmann.
open | download - (244.1 KB)
Re: Module: Embed Images
November 27, 2007 02:43AM
Re: Module: Embed Images
November 27, 2007 02:53AM
works a treat - this is pretty darn slick now - i'm going to let my users loose on this later this week

thanks for the great efforts

Re: Module: Embed Images
November 27, 2007 04:45PM
Kudoz Maurice, me likey.


^AU^ Assassins United
Re: Module: Embed Images
January 18, 2008 12:17PM
I uploaded version 1.0.4 of the module. This one fixes two problems. Only if you encounter these problems on your system, you need to upgrade. There are no further functional changes done.

1) Errors about "ini_set" calls, because PHP was configured to disallow those.

2) Page load aborted in MSIE when using Slimbox as the image viewer.

Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
embed images mod - speeding up lightbox
January 20, 2008 10:21AM
The new embed images module is fantastic. One annoying thing I can't seem to fix is Lightbox loading the images way to slow. It does a graphical dance that slowly stretches the picture open, first horizontally, then vertically, and finally displays the X in the corner. Thats pretty and all, but annoying after awhile.

How do I set up lightbox so it displays the pictures as quickly as possible?
Re: embed images mod - speeding up lightbox
January 20, 2008 10:30AM
Edit mods/embed_images/viewers/lightbox/code/js/lightbox.js
Change this line:
var animate = true;    // toggles resizing animations
to this:
var animate = false;  // toggles resizing animations
I guess that should do the trick.

Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: embed images mod - speeding up lightbox
January 20, 2008 07:13PM
Thank you sir.
Re: Module: Embed Images
January 21, 2008 11:03AM
one minor feature with this module...

in a post with for example 3 images, when you click on image 1, you [sometimes] get image 2 instead and have to click PREV for the one you actually clicked

if you click image 3, it comes up as image "2 of 3", them image 1 is "3 of 3"

my guess is something's not getting initialised at the right time. if i had the time i'd take a look at a fix myself :(
Re: Module: Embed Images
January 21, 2008 01:03PM
Never seen that. What viewer are you using? And in what browser did you see this issue?

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

Click here to login