[ABD] Auto Image Resizer w Lytebox - phpBB 3.0.1 GOLD

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
yamada
Registered User
Posts: 26
Joined: Wed Sep 05, 2007 10:56 pm

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by yamada » Thu Nov 22, 2007 3:01 pm

ahh...thats looks good... ;)

evannak
Registered User
Posts: 14
Joined: Mon Oct 15, 2007 10:09 am
Contact:

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by evannak » Thu Nov 22, 2007 3:31 pm

lolz.... the file is expired... m fooled now. god help me!!!!!

odklizec
Registered User
Posts: 43
Joined: Sun Aug 12, 2007 10:42 pm

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by odklizec » Thu Nov 22, 2007 3:41 pm

The AutoResizing can be added also to Attachments! All you need to do is to open the attachment.html (in style you wish to edit) and find and replace this code:

Code: Select all

<dt class="attach-image"><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt>
with this:

Code: Select all

<a href="{_file.U_INLINE_LINK}"  rel="lytebox" title="" class="image-resize" >
<img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></a>
I'm not the author of this Attachment "hack". I just found it somewhere (probably in this discussion ;) ).

moifest
Registered User
Posts: 251
Joined: Tue Nov 06, 2007 4:58 pm

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by moifest » Thu Nov 22, 2007 5:49 pm

Thanks for sharing that bit of info.

The attachments mod in phpBB3 already stops page breaking but using the lytebox mod will add that extra 'cool' factor to viewing the image full sized :mrgreen:
evannak wrote:lolz.... the file is expired... m fooled now. god help me!!!!!
Get it here :P

User avatar
wuschel_stefan
Registered User
Posts: 44
Joined: Wed Apr 11, 2007 11:56 am
Contact:

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by wuschel_stefan » Thu Nov 22, 2007 6:53 pm

moifest wrote:Not all images, just those added to the page using BBcode.

It will not resize an image unless its dimensions are greater than what you specify, so if it resizing sig images then change the settings for the max image size in the mod to the max you would allow sigs to be that way it wont resize them.

i.e. If the largest sig image is 800px then change the max image size to 820px or something.

The sig will still be clickable on the page to load in lytebox but wont show the resizzed info bar.

Working on mine here:

http://board.scottishmondeoforum.com/vi ... =83&t=9730
Yes, that is what i did.
But its also klickable to.
If there is a Link behind the signature its not compfortable when the lytebox is opening :(

pauldredge
Registered User
Posts: 185
Joined: Thu Feb 09, 2006 7:25 pm

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by pauldredge » Thu Nov 29, 2007 10:22 am

anyone got a copy of this?

User avatar
wuschel_stefan
Registered User
Posts: 44
Joined: Wed Apr 11, 2007 11:56 am
Contact:

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by wuschel_stefan » Thu Nov 29, 2007 12:47 pm

look some topics ahead. Someone postet a link.

moifest
Registered User
Posts: 251
Joined: Tue Nov 06, 2007 4:58 pm

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by moifest » Thu Nov 29, 2007 7:24 pm

pauldredge wrote:anyone got a copy of this?
Download link in my reply about 5 replies up from this one

User avatar
alohastone
Registered User
Posts: 65
Joined: Wed Jun 20, 2007 9:04 am
Location: Germany

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by alohastone » Thu Nov 29, 2007 9:00 pm

Nice Mod. That Auto-Resize stuff really should be standard. But with Lightbox included, this mod is definitely worth the install. Works fine on my RC7. Thanks for sharing!

EDIT: Got the same problem as wuschel_stefan. With this mod installed it's impossible to have an image linked to a website because EVERY image inserted with BBCode gets the Lightbox Feature - even if it's not being resized. That's due to the changes made in bbcode.php:

Code: Select all

				'img'		=> '<a href="$1" rel="lytebox" title="" class="image-resize" ><img src="$1" alt="' . $user->lang['IMAGE'] . '" /></a>',
This means EVERY IMG gets the a href="image.jpg" rel="lytebox" stuff. And that's not how it should be, I think. Somehow the script needs to check if an image is being resized, and if so, it should add the Lightbox stuff. If the image is NOT being resized, it should NOT add the Lightbox a href rel= stuff.

Unfortunately I'm not a coder, that's why I don't know if or how this could be accomplished. But that's the way the mod should work.
my personal weblog: alohastone.com

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by saaiberke » Fri Nov 30, 2007 3:39 am

If it can help someone, you can download the mod here.

Grtz,

Nic

User avatar
wuschel_stefan
Registered User
Posts: 44
Joined: Wed Apr 11, 2007 11:56 am
Contact:

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by wuschel_stefan » Fri Nov 30, 2007 11:43 am

alohastone wrote:Nice Mod. That Auto-Resize stuff really should be standard. But with Lightbox included, this mod is definitely worth the install. Works fine on my RC7. Thanks for sharing!

EDIT: Got the same problem as wuschel_stefan. With this mod installed it's impossible to have an image linked to a website because EVERY image inserted with BBCode gets the Lightbox Feature - even if it's not being resized. That's due to the changes made in bbcode.php:

Code: Select all

				'img'		=> '<a href="$1" rel="lytebox" title="" class="image-resize" ><img src="$1" alt="' . $user->lang['IMAGE'] . '" /></a>',
This means EVERY IMG gets the a href="image.jpg" rel="lytebox" stuff. And that's not how it should be, I think. Somehow the script needs to check if an image is being resized, and if so, it should add the Lightbox stuff. If the image is NOT being resized, it should NOT add the Lightbox a href rel= stuff.

Unfortunately I'm not a coder, that's why I don't know if or how this could be accomplished. But that's the way the mod should work.
You need the a href for the lytebox feature.
But maybe someone can do it with javascript onlick() funktion.

And change something in lytebox.js:

Code: Select all

LyteBox.prototype.updateLyteboxItems = function() {	
	var anchors = (this.isFrame) ? window.parent.frames[window.name].document.getElementsByTagName('a') : document.getElementsByTagName('a');
	for (var i = 0; i < anchors.length; i++) {
		var anchor = anchors[i];
		var relAttribute = String(anchor.getAttribute('rel'));
		if (anchor.getAttribute('href')) {
			if (relAttribute.toLowerCase().match('lytebox')) {
				anchor.onclick = function () { myLytebox.start(this, false, false); return false; }
			} else if (relAttribute.toLowerCase().match('lyteshow')) {
				anchor.onclick = function () { myLytebox.start(this, true, false); return false; }
			} else if (relAttribute.toLowerCase().match('lyteframe')) {
				anchor.onclick = function () { myLytebox.start(this, false, true); return false; }
			}
		}
		
		if (anchors[i].className == "image-resize") 
		{
			var img = anchors[i].getElementsByTagName("img");
			if (img[0].width > this.imgMaxWidth) 
			{
				$warning = this.imgWarning.replace('%1$s', img[0].width).replace('%2$s', img[0].height); 
				anchors[i].innerHTML = '<div id="image-resize" style="width:' + this.imgMaxWidth + 'px;">' + $warning + '</div>' + '<img src="' + img[0].src + '" width="' + this.imgMaxWidth + '" alt="">'; 
			}
		}
	}
};

evannak
Registered User
Posts: 14
Joined: Mon Oct 15, 2007 10:09 am
Contact:

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by evannak » Sun Dec 02, 2007 2:11 pm

does this mod work with subsilver2?

Thank for guiding me..

User avatar
alohastone
Registered User
Posts: 65
Joined: Wed Jun 20, 2007 9:04 am
Location: Germany

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by alohastone » Mon Dec 03, 2007 7:57 pm

wuschel_stefan wrote: You need the a href for the lytebox feature.
But maybe someone can do it with javascript onlick() funktion.
Yeah, I know that the a href is needed for the lightbox feature. But it should only be added to images that were resized. What's the point in lightboxing every image?

Something like "if image resized > add a href to original image with rel='lightbox'" would make sense.
my personal weblog: alohastone.com

SquaredArches
Registered User
Posts: 87
Joined: Tue Nov 14, 2006 8:38 am

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by SquaredArches » Tue Dec 18, 2007 7:51 am

Wow... I just tried to install this but something went awry... not only do I get the error at the top of the page as follows:

[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3391: 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 3393: 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 3394: 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 3395: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)

But it also left aligned the page and changed the forum width? I'd suggest they can be fixed by refreshing the style... except I can't log into the ACP because for some reason between logging in and being directed back to the main page, the index then appears as if you have not logged in... if that makes sense?

Any help would be urgently and greatly appreciated!

SquaredArches
Registered User
Posts: 87
Joined: Tue Nov 14, 2006 8:38 am

Re: [BETA] Auto Image Resizer w Lytebox 1.2.0 for phpBB 3.0 RC3

Post by SquaredArches » Tue Dec 18, 2007 8:30 am

Crap- the whole thing seems to be down now... when I attempt to access the forum I just get a plain white page?! :o

If anyone could help with how I can get this sorted it would be much appreciated!

Locked

Return to “[3.0.x] Abandoned MODs”