ReIMG Image Resizer

Any and all modifications I have created for phpBB3 will be listed here and support will be provided.
Locked
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

ReIMG Image Resizer

Post by DavidIQ »

This is not really my MOD but a MOD I'm taking over for TaleTN as he's allowed me to take it over and release it to the MODDB. Here is the description from his site:

Resizes user-posted images that are too large, optionally overlaying a zoom button to view the original-sized image (optionally in a lightbox).

Features
  • Images are resized (downscaled) client-side using javascript.
  • Images don't first load in large format and then collapse, but instead appear only after they have been resized already.
  • An optional zoom button is overlayed on top of resized images, so you can click to the original-sized image. This button will not mess up a URL the poster might have placed around the image. :)
  • The original-sized image can open in the current window, in a new window, or in a cool lightbox. 8-)
  • Only user-posted images posted using Img BBCode or uploaded as attachment are resized. However, any other image can be resized (and/or equipped with a zoom button ;)) by adding onload and onerror events to the <img> XHTML tag.
  • You can specify the maximum dimensions in pixels (e.g. 640x480) and/or a maximum relative width (e.g. 80%).
  • All settings (maximum dimensions, zooming method) can be changed from the Administration Control Panel.
  • This MOD comes with default, neutral style sheeting built in, so you don't need to alter all your theme files. However, you can override these defaults from within your theme files, and thus unleash your own style sheeting magic on the resized images.
  • Quick loading, compressed/stripped javascript files as well as full javascript source code files are included.
  • I've successfully tested this MOD in Internet Explorer 7, Internet Explorer 6, Internet Explorer 8, Firefox 3, Firefox 2, Firefox 1.5, Firefox 1.0, Opera 9.5, Opera 9.27, Safari 3.1 and Mozilla 1.7.
Known issues
  • This MOD uses HTML attributes (onload and onerror) that are not part of the XHTML 1.0 Strict and Transitional specifications. This is not a problem in virtually all popular browser software, but if you really need to stay 100% XHTML 1.0 compliant, then you could leave out the onload and onerror attributes.
  • Safari and Opera currently do not always position the zoom in/out buttons on the right side when in right-to-left mode, but apart from that everything works fine. I am kind of hoping that these issues will be addressed in future releases of Safari and Opera... :whistle:
Demo:
N/A

Download:
reimg_image_resizer.zip
Version 1.0.2
(107.22 KiB) Downloaded 1678 times
Older versions:
reimg_image_resizer.zip
Version 1.0.1
(104.45 KiB) Downloaded 965 times
reimg_image_resizer.zip
Version 1.0.0
(66.35 KiB) Downloaded 915 times
reimg_image_resizer.zip
Release Candidate 3 a.k.a. v. 0.0.12
(93.88 KiB) Downloaded 885 times
reimg_image_resizer.zip
Release Candidate 2 a.k.a. v. 0.0.11
(91.79 KiB) Downloaded 1263 times
reimg_image_resizer.zip
Release Candidate 1
(166.86 KiB) Downloaded 1211 times
reimg_image_resizer_0_0_b9.zip
ReIMG Image Resizer Beta 9
(63.18 KiB) Downloaded 1131 times
See also:
http://www.phpbb.com/community/viewtopi ... &t=1696215

Demo:
viewtopic.php?f=9&t=353
JohnBoyZA
Posts: 6
Joined: Sun Jun 21, 2009 11:01 am
Location: Cape Town

Re: [RC2] ReIMG Image Resizer

Post by JohnBoyZA »

Hi

I need help with the Image Resizer and not sure where to post my query. Have already been snubbed on phpBB. Please take note that I'm still getting to grips with BB and mods.

I installed and uploaded the Image Resizer, but now have an error msg. Please help - see below. :oops: My url:
http://patrol4x4.co.za

[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3842: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3844: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3845: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3846: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)
JohnBoyZA
Posts: 6
Joined: Sun Jun 21, 2009 11:01 am
Location: Cape Town

Re: [RC2] ReIMG Image Resizer

Post by JohnBoyZA »

I think the problem could relate to the first step. Here, I think you need to modify OR add an SQL query. Now, this gets scary for me, but I managed to use phpMyAdmin to navigate to phpbb_config. Here there are tabs: Structure, SQL etc. I assume I must click on the SQL tab and add the 'SQL' text you provide - but not sure - please help
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC2] ReIMG Image Resizer

Post by DavidIQ »

The error is due to a common mistake done while editing .php files. There is a white space or new line before the <?php or after the ?> in language/en/common.php
JohnBoyZA
Posts: 6
Joined: Sun Jun 21, 2009 11:01 am
Location: Cape Town

Re: [RC2] ReIMG Image Resizer

Post by JohnBoyZA »

Hi David

thanx for the quick response, however, that wasn't the problem - checked. When I revert to the original, no problem. As soon as I add the required change i.e.:
'REIMG_ZOOM_IN' => 'Zoom in (real dimensions: %1$d x %2$d)',
'REIMG_ZOOM_OUT' => 'Zoom out',
Then I get the error.

Also, I can't get the resizer to work and have rechecked the steps. I'm sure the problem lies as per ealier post above.

Would appreciate help.
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC2] ReIMG Image Resizer

Post by DavidIQ »

What are you using to edit the files and what are you uploading them with?
JohnBoyZA
Posts: 6
Joined: Sun Jun 21, 2009 11:01 am
Location: Cape Town

Re: [RC2] ReIMG Image Resizer

Post by JohnBoyZA »

ftp and notepad
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC2] ReIMG Image Resizer

Post by DavidIQ »

Use notepad++ as notepad can have adverse effects on php files.
JohnBoyZA
Posts: 6
Joined: Sun Jun 21, 2009 11:01 am
Location: Cape Town

Re: [RC2] ReIMG Image Resizer

Post by JohnBoyZA »

Great, notepad++ is great and seems to have sorted the formatting out issues, but the mod still doesn't work. Please see my earlier question wrt the SQL editing - I think I am still missing something here.
Thanx
John
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC2] ReIMG Image Resizer

Post by DavidIQ »

Those queries are to be run through phpMyAdmin or other similar database administration tool. In the future I'll likely add an install script to do this for the user but, for now, you must do it manually. There is a topic on phpbb.com that shows you how to use phpMyAdmin. I believe it's in the MOD Writers Discussion or MOD Requests forums as a sticky.
JohnBoyZA
Posts: 6
Joined: Sun Jun 21, 2009 11:01 am
Location: Cape Town

Re: [RC2] ReIMG Image Resizer

Post by JohnBoyZA »

Thanx
tomek
Posts: 2
Joined: Mon Jul 13, 2009 12:11 pm
Location: Dom

Re: [RC3] ReIMG Image Resizer

Post by tomek »

Code: Select all

Fatal error: Call to undefined function reimg_properties() in C:\wamp\www\phpBB3_3\includes\bbcode.php on line 421
installed it (newest version 0.12) on my localhost with phpbb3 3.0.5 to test before i update my forum, checked all editions 2 times, sql worked fine, dunno what did i wrong, could you help me

and heres the line 421:

Code: Select all

'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" ' . reimg_properties() . '/>',
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC3] ReIMG Image Resizer

Post by DavidIQ »

You've made an error in the edit where the reimg_properties() function is added. You put it before the } where it should go after it.
tomek
Posts: 2
Joined: Mon Jul 13, 2009 12:11 pm
Location: Dom

Re: [RC3] ReIMG Image Resizer

Post by tomek »

DavidIQ wrote:You've made an error in the edit where the reimg_properties() function is added. You put it before the } where it should go after it.
hmm, tbh i don't know where i could do this typo, i looked again at files and mod instalation and couldn't find it. You say that i had written it in wrong place, but i followed your guide quite strickly so i really don't know what i did wrong
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC3] ReIMG Image Resizer

Post by DavidIQ »

Post the contents of your includes/acp/acp_board.php file.
Locked