[2.0.11] Resize Posted Images Based on Max Width

The cleanup is complete. This forum is now read only.
Post Reply

Rating:

Excellent!
46
64%
Very Good
10
14%
Good
10
14%
Fair
3
4%
Poor
3
4%
 
Total votes: 72

User avatar
Smokeydogg
Registered User
Posts: 240
Joined: Sat Dec 06, 2003 8:02 am
Contact:

Post by Smokeydogg »

www.skandalouznetwork.com

if your using firefox dont even waste your time firefox dont work well with my site the css dont do right

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

MOD Updated to version 2.4.5
See first post for Download Link

Frastraslafra
Registered User
Posts: 21
Joined: Wed Aug 06, 2003 5:18 am

Post by Frastraslafra »

if someday I delete the mod, what happend to the posted images that were resized? they still will appear?

thanks

spooky2280
Registered User
Posts: 142
Joined: Tue Jul 20, 2004 8:48 pm

Post by spooky2280 »

Of course, but not resized.

rossmcclymont
Registered User
Posts: 459
Joined: Mon Apr 05, 2004 1:58 pm

Post by rossmcclymont »

They'll still appear, but they'll be full-sized - basicaly their actual size, just as if the MOD wasn't installed in the first place.

:D

eyespark
Registered User
Posts: 4
Joined: Mon Dec 20, 2004 1:53 pm

Post by eyespark »

PCGUY112887 wrote: Please don't tell me you wrote that just for me :p
But I stuck it in a folder and droped it in my mods folder for easymod and I get....
Critical Error

Function Trace: open_files[5]->modio_open[1]

Could not open [topic_review.php] for reading.
MOD script line #77 :: FAQ :: Report


Edit - yay I made it work!

#-----[ OPEN ]------------------------------------------
#
topic_review.php

Should be

#-----[ OPEN ]------------------------------------------
#
includes/topic_review.php

Now it works :)
DUDE YOU ROCK!
Thanks :D


Hi

I also wanted this mod to support good old <img> tags. Now, I only have one q: Do I add this mod to original one or do I replace it. I would like to resize images in [img] AND <img> tags.

Thanks!

BTW - Great mod!

User avatar
PCGUY112887
Registered User
Posts: 499
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Post by PCGUY112887 »

I just added it... uploaded it to the mod folder and ran the EasyMod installer.

If your doing it manually, just make the edits it says.

spooky2280
Registered User
Posts: 142
Joined: Tue Jul 20, 2004 8:48 pm

Post by spooky2280 »

eyespark wrote: Do I add this mod to original one or do I replace it


You can simply add it to the original. But if you care...

You can skip the edit of bbcode.tpl if you use that extra code, and don't add all the lines where I remove the onload event...

Code: Select all

$xxxxxx = str_replace('resizemod="on" onload="rmw_img_loaded(this)"','',$xxxxxx); 
... to add it again right after. Do you understand? If you don't add it in bbcode.tpl, you don't need to remove it in the php files afterwards.

BTW, I edited my post to add includes/ in front of topic_review.php

eyespark
Registered User
Posts: 4
Joined: Mon Dec 20, 2004 1:53 pm

Post by eyespark »

OK, thanks. I will try that. I'm using Hoteditor so I get html instead of bbcode. The only problem is, hoteditor doesn't insert ending tag </img> (probably a bug); that could be a problem :roll: .

Thanks again

spooky2280
Registered User
Posts: 142
Joined: Tue Jul 20, 2004 8:48 pm

Post by spooky2280 »

The IMG element does not require a closing tag:
http://msdn.microsoft.com/workshop/auth ... ts/img.asp

I highly recommand in your case to install MODs with EasyMod:
http://area51.phpbb.com/phpBB/viewtopic.php?t=15391

And use a plain text editor to edit files:
http://www.vim.org/

User avatar
PCGUY112887
Registered User
Posts: 499
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Post by PCGUY112887 »

Hehe found a bug with the IMG resize... if you use caps for <IMG it doens't resize it :P
Probally the same if you use any other caps like for SRC.

spooky2280
Registered User
Posts: 142
Joined: Tue Jul 20, 2004 8:48 pm

Post by spooky2280 »

Use a case-insensitive preg_replace. Do you know how to?

User avatar
PCGUY112887
Registered User
Posts: 499
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Post by PCGUY112887 »

I sorta know what a preg_replace is... but I don't know how to write/use one :(

Yes you can all make fun of me now.

spooky2280
Registered User
Posts: 142
Joined: Tue Jul 20, 2004 8:48 pm

Post by spooky2280 »

In PHP5, they introduced a case-insensitive version of str_replace:
http://www.php.net/manual/en/function.str-ireplace.php
If you have PHP4, here's the doc for preg_replace:
http://www.php.net/manual/en/function.preg-replace.php

I think you're too nice with your users. If I was the admin, I would tell my users: you use BBCode for your images or you go to hell. That's as simple as that.

User avatar
PCGUY112887
Registered User
Posts: 499
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Post by PCGUY112887 »

Well I too enjoy using HTML in my posts and have to catch myself on other forums :P

Thanks for the reply.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”