ReIMG Image Resizer

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

ReIMG Image Resizer

Post by DavidIQ » Tue May 12, 2009 5:52 pm

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 1134 times
Older versions:
reimg_image_resizer.zip
Version 1.0.1
(104.45 KiB) Downloaded 493 times
reimg_image_resizer.zip
Version 1.0.0
(66.35 KiB) Downloaded 428 times
reimg_image_resizer.zip
Release Candidate 3 a.k.a. v. 0.0.12
(93.88 KiB) Downloaded 421 times
reimg_image_resizer.zip
Release Candidate 2 a.k.a. v. 0.0.11
(91.79 KiB) Downloaded 778 times
reimg_image_resizer.zip
Release Candidate 1
(166.86 KiB) Downloaded 743 times
reimg_image_resizer_0_0_b9.zip
ReIMG Image Resizer Beta 9
(63.18 KiB) Downloaded 673 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 » Sun Jun 21, 2009 11:08 am

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 » Sun Jun 21, 2009 12:01 pm

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

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC2] ReIMG Image Resizer

Post by DavidIQ » Sun Jun 21, 2009 1:10 pm

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 » Sun Jun 21, 2009 2:35 pm

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.

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC2] ReIMG Image Resizer

Post by DavidIQ » Sun Jun 21, 2009 2:58 pm

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 » Sun Jun 21, 2009 3:27 pm

ftp and notepad

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC2] ReIMG Image Resizer

Post by DavidIQ » Sun Jun 21, 2009 9:54 pm

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 » Mon Jun 22, 2009 12:31 am

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

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC2] ReIMG Image Resizer

Post by DavidIQ » Mon Jun 22, 2009 12:57 pm

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 » Tue Jun 23, 2009 5:20 am

Thanx

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

Re: [RC3] ReIMG Image Resizer

Post by tomek » Mon Jul 13, 2009 12:23 pm

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() . '/>',

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC3] ReIMG Image Resizer

Post by DavidIQ » Mon Jul 13, 2009 1:45 pm

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 » Mon Jul 13, 2009 2:11 pm

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

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: [RC3] ReIMG Image Resizer

Post by DavidIQ » Mon Jul 13, 2009 8:49 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest