News:

SMF 2.1.3 has been released! Take it for a spin! Read more.

Main Menu

Smush it! For SMF - Image Attachment Space Save

Started by SMFHacks.com Team, March 01, 2016, 02:29:04 AM

Previous topic - Next topic

SMFHacks.com Team

Link to Mod

Smush it! For SMF - Image Attachment Space Saver

I recently found out about Smush it from using on some of my wordpress sites. Then just today I saw Spuds had created it. So spent about 2 hours and have ported it to SMF enjoy.


###Introduction
This adds the ability to run WPMU DEV WordPress Smush API service on your attachments.  Smush.it uses optimization techniques specific to each image format to remove unnecessary bytes from image files. It is a "lossless" tool, which means it optimizes the images without changing their look or visual quality. Typical savings are in the 5-20% file size reduction.  After Smush.it runs it will report how many bytes have been saved as well as the percent reduction for each file.  Smaller files save bandwidth, disk space and make your forum faster.

###License
Ported to SMF by vbgamer45 http://www.smfhacks.com
Original by Spuds
The software is licensed under [Mozilla Public License 1.1 (MPL-1.1)](http://opensource.org/licenses/MPL-1.1).

###Features
* Ability to run Smush.it on all current attachments in a batch mode (based on attachment age/size)
* Admin->Forum->Attachments & Avatars->File Maintenance
* Ability to selectively run Smush.it on any single or selection of attachments
* Admin->Forum->Attachments & Avatars->Browse->Smush.it
* Can run as a scheduled task to Smush.it attachments added in the last 24hrs
* Admin->Maintenance->Scheduled Tasks

###Important Notes
* The Smush.it service will not accept files >1M in size, as such no size reduction on those files is possible with this addon
* Unable to copy the Smush.it file back to the attachment directory: This generally indicates that the original attachment file was saved with permissions (or owner/group) that will not allow the forum to replace it.  This can occur if the attachments were FTP-ed to the site or your site changed how PHP is run.  You will need to change the file permissions as needed (664)
* Smush.it returned the following error: Failed to create a temp dir: This means what it says, e.g. Smush.it is unavailable at the current time, all you can do is try again later
* I ran Smush.it and now the file does not show up in the browse list! This means the file was reduced in size below your lower size setting (admin -> configuration -> modification settings -> misc -> Attempt to Sumsh.it all attachments larger than)

###Installation
Simply install the package to install this addon
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

FrizzleFried

How does this differ from the other Smush it! SMF mod?

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

live627

You mean the one that got removed by its author?

vbgamer45

bah Just found it. Wish I knew before i made it o well at least it is the latest code.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

whoey

not sure if intentional or not, some instances of "smush.it" are typoed as "sumsh.it"

not a functional thing, just cosmetic. ;)

vbgamer45

k yeah Not the best with spelling at times will check it out.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

1.1 Update
!Removed create_function for better PHP 7.4.x+ support
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Shades.

Just seen this error in logs:

QuoteApply Filter: Only show the error messages of this URLhttps://bikerhound.com/index.php?scheduled=task;ts=1619398800Apply Filter: Only show the errors with the same message8192: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedenceApply Filter: Only show the errors from this fileFile: /xxxxx/xxxxx/public_html/xxxxx/Sources/smu******.subs.php
Line: 101
??? :o
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

vbgamer45

Copy this to sources folder and see if it helps
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Shades.

Quote from: vbgamer45 on April 25, 2021, 10:00:29 PM
Copy this to sources folder and see if it helps
Looks good so far! I ran the task manager and smush it and no errors thanks! 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

vbgamer45

Yes since it is a warning for PHP8 that is the next release.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: