Firefox PHP

Module: Embed Images

Posted by Maurice Makaay 
Re: Module: Embed Images
November 30, 2008 03:08PM
Hi,

Would it be possible to improve the caching of images in the following way:
If a remote image is smaller than the maximum width and height set up in the module options, then the image is not cached locally, but instead just an information telling Phorum to display it directly from the remote site is stored.
This way, the image would be fetched only once by the server hosting Phorum (to know the size). This would decrease the bandwidth usage. It would increase the bandwidth of the server hosting the image, but it usually is a temporary host or a site made for that (such as imageshack, yoopix, etc.).

My problem is that with this "Embed image" module, distant images are increasing my bandwidth usage.
Maurice: you explained me or IRC how to turn OFF the module for some tags, such as the
Re: Module: Embed Images
November 30, 2008 03:15PM
well, to know the dimensions of the remote image it needs to be fetched anyway.


Thomas Seifert
Re: Module: Embed Images
November 30, 2008 05:13PM
Of course that could be an option. I specifically chose to do the local caching of thumbnails for remote images, because it vastly improves the performance of the forum. When I did not do that, I got far too many complaints that the forum was not working very good, while in fact the remote image hosts were crappy and slow. I could add it as a future consideration to not do the local caching, but to only cache the fact that the image does not need scaling. Maybe there could be even a dirty solution, where the image is scaled down in the browser by applying a different size (ugly, but no resizing required) instead of doing a nice local scaledown.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
December 01, 2008 04:02PM
Thanks Maurice for taking this into account :)

I would not go for a resizing by the browser, it is usually ugly. Maybe the latest versions of the browsers, such as Firefox 3 or ie 8 are better than their predecessors?

Cactus : [www.cactuspro.com]
Re: Module: Embed Images
December 01, 2008 04:15PM
If scaling is required, then this is the only option when handling remote images without local caching. Of course, this would be configured as a feature, because browsers indeed do a bad job at scaling.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
mac
Re: Module: Embed Images
January 09, 2009 12:53AM
Images embedded with BBcode <img> and that exists on the same server that phorum 5.2.9a is installed works well. However, images outside the server gets a " Image error Connection to server failed (Connection timed out)" ?

When disabling this module then all images show.

Any idea why? Thanks
Re: Module: Embed Images
January 09, 2009 03:00AM
No idea. Provide us some examples, so we can try to reproduce the problem. In the worst case, your hosting provider has disabled outgoing network connections that are setup from your web server, in which case there would be no way to get this working. Right now, we cannot tell whether this is the case or not.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
January 22, 2009 01:15AM
I am installing our forum on a new server and I get errors whichever the thumbnailviewer I try to use.

The two errors are (in the order they appear in firefox javascript console):
1 ) in javascript.php:

/* Added by module "smileys", file "mods/smileys/smileys_editor_tools.js.php" */

<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/var/www/vhosts/lapassionduvin.net/httpdocs/phorum/mods/spamhurdles/defaults.php:40) in <b>/home/var/www/vhosts/lapassionduvin.net/httpdocs/phorum/mods/smileys/smileys_editor_tools.js.php</b> on line <b>1</b><br />


2) in list.php:
thumbnailviewer is not defined

These errors occur as soon as I choose a thumbnailviewer it is not browser.
I am pretty sure they are related with security, permissions ...

How to fix it?
Re: Module: Embed Images
January 22, 2009 11:28AM
Have you tried 5.2.10RC1?
There was a fix in Phorum for the javascript error.
Related changelog:

r3698 | mmakaay | 2008-11-12 20:26:28 +0100 (Wed, 12 Nov 2008) | 3 lines

Removed content-type header from the smileys javascript code. It is no longer
needed now the javascript is incorporated from javascript.php.

You can try implementing that change by hand to see if that fixes your issue. Basically, remove the first line from mods/smileys/smileys_editor_tools.js.php


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
January 22, 2009 11:47AM
Heu ... what is 5.2.10RC1?

It works! but I have not understood why smileys_editor_tools.js.php had problem only when I selected a viewer ...

Thanks.
Sorry, only registered users may post in this forum.

Click here to login