In-body attachment links/images (for Phorum 5.1 or later)
Posted by Maurice Makaay
All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
in_body_attachments-1.4.0_Phorum5.1.tar.gz | 95 KB | open | download | Maurice Makaay | 07/09/2007 | Read message |
in_body_attachments-1.4.0_Phorum5.1.zip | 105.3 KB | open | download | Maurice Makaay | 07/09/2007 | Read message |
January 10, 2006 09:28AM |
Admin Registered: 18 years ago Posts: 8,532 |
This module makes it possible to put links to attachment inline on any position in the message body. Moreover, image attachments can be displayed inline, so users that are reading the message can view them directly. For inline viewing, you can set a maximum width in the module's settings. Images that are too large will be shown scaled down and visitors can click the scaled down image to see the full size image. Scaling down can also be applied to bbcode
.
2007-02-14 v1.3.6
- Added options to the settings screen, which make it possible to
suppress automatic loading of the required JavaScript libraries.
This can be used to prevent conflicts in case the website already
uses one or more of the libraries (for example prototypejs,
mootools, scriptaculous and/or lightbox).
- Added the Mootools/Slimbox combination as an alternative image
viewer. This combination is a lightbox clone, only it uses the
Mootools JavaScript library as the javascript framework. The
advantages of this viewer are that the javascript code is much
lighter and the viewer has better features. Unless there's a
good reason for running Lightbox (like needing the prototype
javascript framework, which collides with Mootools), then
I would suggest running the Slimbox.
2007-02-12 v1.3.5
- Do not call the in_body_attachments_resizeimage() JavaScript call
in the onload event of images if that JavaScript function isn't
loaded. This can be the case if the message bodies are formatted
from outside phorum, where the JavaScript code for this module
isn't loaded.
2007-02-02 v1.3.4
- If image scaling is enabled for http:// tags, then the data is always
cached for the image, even if we don't scale it. This is done to
not have to depend on the remote server for the http://.
2007-01-10 v1.3.3
- Fixed undefined index warning ($max_w not set inside the hook
function phorum_mod_in_body_attachments_file).
2006-09-11 v1.3.2
- Turn white-spaces in URL's into %20, else file_get_contents()
will trip over it.
2006-09-11 v1.3.1
- Small fix: the Lightbox initialization code was run on all pages,
causing a JavaScript warning.
2006-09-11 v1.3.0
- Implemented "Lightbox" as an image viewer.
From the module settings, the admin can now choose between
"Lightbox" and "Browser" as image viewers for displaying full
size images.
See also: [
- Replaced the zoom.gif image with a more friendly one. Especially
when using small thumbnail images, the old image was a bit heavy.
2006-08-16 v1.2.1
- Small fix: the default module settings weren't loaded on
the control panel page, which could cause undefined index
warnings if the admin never saved the settings for the
module. In the control panel, the format hook is called
for formatting the user's signature.
- Moved the zoom icon to the right top side of the scaled image,
so it won't be masked by MSIE's image tools (which appear if
you hover of an image for a short time). Thanks CBiLL for
pointing this out.
2006-08-15 v1.2.0
- The module now can scale down images that were externally linked
using the bbcode
disabled from the module settings page.
Because PHP needs to read remote files for this, the PHP
configuration option allow_fopen_url must be enabled.
2006-07-25 v1.1.0
- The module now uses GD for really scaling down images instead of
only applying a different width to them. The overlay icon is
drawn directly into the scaled image. For performance, the
resulting image is cached in Phorum's cache.
This change allows for better looking scaled down images, because
most browsers use a rough image scaling method which does not look
really good.
If GD is not available within PHP, then the javascript fallback code
will still do its job. For best results however, GD is required.
2006-07-25 v1.0.3
- Added an overlay icon to scaled down images, to give a
notice to the end user that the image can be zoomed.
- Added a German translation, thanks to Oliver Riesen.
2006-07-21 v1.0.2
- Put the javascript in its own file and linked that from the
html <head> section.
- If GD tools are available, the image sizes will be remembered at
post time. This can later on be used to scale down images when they
are larger than a maximum width that can be configured from the
module settings page. Scaling down is done by simply applying a
width=".." attribute to the inline <img> tag. User can click the
image to view it in full size in a new window.
- If GD tools are not available, then the image sizes cannot be
determined at post time. As an extra strategy for catching
those cases, a javascript resize method is added. The only
drawback of this method, is that images are scaled after they
are loaded, so this causes some flickering.
2006-07-10 v1.0.1
- Added compatibility for Phorum 5.2.
2006-01-10 v1.0.0
- Initial release
Edited 14 time(s). Last edit at 07/09/2007 06:37AM by mmakaay.)
Re: In-body attachment links/images (for 5.1.5 beta or later) February 23, 2006 11:25PM |
Registered: 17 years ago Posts: 179 |
Re: In-body attachment links/images (for 5.1.5 beta or later) April 04, 2006 06:07AM |
Registered: 18 years ago Posts: 68 |
April 04, 2006 08:34AM |
Admin Registered: 18 years ago Posts: 8,532 |
What I have planned myself is scaling down uploaded image attachments in a separate mod, so they will be in my desired size when displayed in the message body. That is something different than creating thumbnails though. I'll give your request some thought when I start coding on my image rescaling.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



Re: In-body attachment links/images (for 5.1.5 beta or later) April 04, 2006 09:13AM |
Admin Registered: 20 years ago Posts: 9,240 |
Re: In-body attachment links/images (for 5.1.5 beta or later) April 05, 2006 04:53AM |
Registered: 21 years ago Posts: 1,076 |
Or caching thumbnail generator.
I'm using [phpthumb.sourceforge.net] for some specific needs. And it doesn't work with db resourses.
But the quality it produces is really good (unsharp mask...)
---
-=[ Panu ]=-
I'm using [phpthumb.sourceforge.net] for some specific needs. And it doesn't work with db resourses.
But the quality it produces is really good (unsharp mask...)
---
-=[ Panu ]=-
Re: In-body attachment links/images (for 5.1.5 beta or later) June 27, 2006 03:12PM |
Registered: 17 years ago Posts: 16 |
Re: In-body attachment links/images (for 5.1.5 beta or later) June 28, 2006 01:10AM |
Registered: 17 years ago Posts: 16 |
July 21, 2006 09:00AM |
Admin Registered: 18 years ago Posts: 8,532 |
I just uploaded a new version of the in-body attachments module. I added support for scaling down images if they are larger than the width that can be configured from the module settings screen. Scaled down images can be clicked by the visitors to view them full size.
In my implementation, I have not really scaled down the images themselves. What I do instead is applying a width=".." attribute to the <img> tags if needed. The advantage of this, is that it's very easy to change the maximum width setting for the module. Pages will automatically follow the new value. Also it is possible to implement this scaling method within JavaScript. I added some JavaScript resizing code as a fallback mechanism for people that do not have the GD tools enabled in PHP on their server.
Maybe that I will add real scaling code to the module at a later stage (mainly because it helps bringing down bandwidth usage when users post a lot of large pictures). For implementing that, I'll have to figure out some good way to store the scaled down images. The best thing would be to store them in the standard file table IMO (next to and not overwriting the original image files). Before I start on this, I first want to test out the current code base.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
In my implementation, I have not really scaled down the images themselves. What I do instead is applying a width=".." attribute to the <img> tags if needed. The advantage of this, is that it's very easy to change the maximum width setting for the module. Pages will automatically follow the new value. Also it is possible to implement this scaling method within JavaScript. I added some JavaScript resizing code as a fallback mechanism for people that do not have the GD tools enabled in PHP on their server.
Maybe that I will add real scaling code to the module at a later stage (mainly because it helps bringing down bandwidth usage when users post a lot of large pictures). For implementing that, I'll have to figure out some good way to store the scaled down images. The best thing would be to store them in the standard file table IMO (next to and not overwriting the original image files). Before I start on this, I first want to test out the current code base.
Maurice Makaay
Phorum Development Team



July 26, 2006 07:12AM |
Admin Registered: 17 years ago Posts: 744 |
Sorry, only registered users may post in this forum.