Jump to content
bbh_blocked_dnftl
Tiberium Technology® Forums

Welcome to Tiberium Technology® Forums

Welcome to Tiberium Technology® Forums, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of Tiberium Technology® Forums by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.

Recommended Posts

  • Root Admin
Posted

This hook trys to safe diskspace on your servers harddisk by resizing uploaded images before they get saved.

 

You can set the max. allowed file dimension for uploaded images (e.g. 1024x768). If the uploaded image exceeds this dimensions it will be resized and resampled.

The second option is a filesize check. If the uploaded image is smaller then the set dimensions, but the filesize is bigger than allowed, it will be resampled to save diskspace.

 

The following settings will be added to your settings interface after installation:

  • Enable or disable the hook
  • Resize to width x height (this is also the size the file will checked against)
  • Maximum filesize in KB
  • Imagequality for jpeg, png and gif (to compress the image after resizing)

If you only use the traditional uploader, no further steps must be done after installing the hook.

 

If you want to use the Flash Uploader, you have to edit on template bit:

Goto ACP->Look & Feel->YOUR SKIN->Post Screen->uploadForm

 

and search for

'file_size_limit': "{$stats['max_single_upload']}" } )});

 

replace {$stats['max_single_upload']} with 0.

 

This is because the flash uploader checks the filesize befor it really uploads to the server.

Known Issues:

The Flash Uploader displayes the original uploaded Filesize instead of the resized filesize.

Demo notes:

The Demo has the following settings applied (512kb max upload filesize and resize to 800x600 pixels).

Simple upload an image greater than 512KB

 

Oh, and one last thing:

When the resized image is still bigger then the allowed size (per Post Member settings, etc.) there will still be an error ;). This hook trys just to prevent the storage of unchanged 10 Megapixel camera images ;).

 

 

This is a Hook from the Free Mod a Week List:

This Plugin has been created because you have voted for it in the Mod a week Request thread ( http://community.inv...-reboot-thread/ ). Keep up giving us developers ideas for modification and help us to improve existing ones by reporting problems :).

 

Changelog:

1.0.0: Initial Version

 

This hook is FREE to use however Donations are greatly appreciated!

https://www.paypal.com/en_US/AT/i/btn/btn_donateCC_LG.gif

 

 

View the full article IPS Resources

 

 


My Free Mods:
[NG23] News System v1.1.1 | Custom Pages v4.2 | (NG30) Google Adsense Ads v1.2.2
(NG30) Google Ads In Topic View v1.1.1 | (NG30) iClient Message In A Bottle v1.1.0 | (NG30) Forum Icon Legend v1.0.1
(NG30) Registration Notes v1.0.0 | (NG30) IP.Chat Message v1.0.0

My Paid Mods:
(NG33) Global Adverts v2.1.0 | (NG30) Rotating Banners v1.1.0 | (NG33) BuyNow BBCode v2.0.0
(NG33) Members Donate Button v1.0.8 | (NG33) Xbox/Psn Tags v1.0.3
(NG30) Image Align BBCode v1.0.0 | (NG30) Topic HTML v1.0.0 | (NG30) Google Checkout v1.0.0 | (NG30) LightBox Link BBCode v1.0.0

Mods In Development:
(NG33) Social Groups Addon - Group Payment Button | (NG33) Global Ads v2.2.0 Alpha 1

My Services:
Mod Installation Service | Skin Installation Service | Forum Upgrade Service

25d62e68d76cd7f75667a83cf86de91d.png571a3be8802342dcad9f07b714798cab.pngd650fe3d5d63fbbbab3604d6dc2414a0.png45b90d1ccf717d0a8f5d408051b94ef2.png
cacd42cb21d2574e269f68f0e79192dc.png62544e0b76b142e25661166266eb7944.png9fd72f98b8e65b7fb691407ee5d42391.png
b7abd2a44678e89c2bb3aa91e401ea99.png9687ca76387f2ede1fbb7df8d2508b3e.pngc8c57eb84a468892635126acaf75ff6f.png

---------------------------
For Support Questions About Your Hosting Account, Please Post Your Question In The HelpDesk System.
http://www.tiberiumstudios.net/Files/Sigs/sig.gif
---------------------------
My YouTube! Channel
The Price of War Clan.com
---------------------------

NXE:
NuclearGeneral.png
NewNXE:
NuclearGeneral.png
DarkSigBar:
NuclearGeneral.png
XboxOneSig:
NuclearGeneral.png
XboxOneSig2:
NuclearGeneral.png

×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines, & Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.