PDA

View Full Version : Miscellaneous Hacks - Smush.it Attachment & Avatar


EXIDE
12-15-2011, 11:00 PM
This sends your image attachments and avatars to smush.it for compression, if the image can be compressed it will download the newly compressed one and replace the attachment or avatar with it.

If you would like features added to it or you find any bugs or problems please let me know.

ACP->Settings->Options->Smush.it Attachment & Avatar Options

[Requirements]
You need to be using PHP 5.2.0 or greater.
You must be storing attachments and avatars in the filesystem.

4.1.x Version: https://vborg.vbsupport.ru/showthread.php?t=275542

http://www.smushit.com/ysmush.it/

[Updates]
30/12/11:
Added option to smush user uploaded avatars.
Smarter way of fetching avatars and attachments.

24/3/12:
Added TABLE_PREFIX to install and uninstall code.
Fixed typo in uninstall code.

Remember to select "Allow Overwrite" when importing the product.

Arcade Fire
12-17-2011, 09:38 AM
Works fine, vB3.8.5. Thanks!

vijayninel
12-17-2011, 11:26 AM
Great idea. Thanks. :)

vijayninel
12-17-2011, 12:12 PM
Edit : not working for me. Size remains the same. :(

EXIDE
12-17-2011, 04:30 PM
Edit : not working for me. Size remains the same. :(

Please check your PM.

bestone96
02-29-2012, 10:18 AM
thanks a lot

karel1985
04-26-2012, 05:21 PM
unable to install this plugin:

Database error in vBulletin 4.1.12:

Invalid SQL:
ALTER TABLE vb`attachment` ADD `smushed` VARCHAR( 3 ) NOT NULL DEFAULT 'no';

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`attachment` ADD `smushed` VARCHAR( 3 ) NOT NULL DEFAULT 'no'' at line 1
Error Number : 1064
Request Date : Thursday, April 26th 2012 @ 08:18:40 PM
Error Date : Thursday, April 26th 2012 @ 08:18:41 PM
Script : http://www.pc-helpforum.be/admincp/plugin.php?do=productimport
Referrer : http://www.pc-helpforum.be/admincp/plugin.php?do=productadd
IP Address : 78.22.132.252
Username : karel
Classname : vB_Database_MySQLi
MySQL Version : 5.5.21

EXIDE
04-26-2012, 05:40 PM
unable to install this plugin:

Database error in vBulletin 4.1.12:

Invalid SQL:
ALTER TABLE vb`attachment` ADD `smushed` VARCHAR( 3 ) NOT NULL DEFAULT 'no';

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`attachment` ADD `smushed` VARCHAR( 3 ) NOT NULL DEFAULT 'no'' at line 1
Error Number : 1064
Request Date : Thursday, April 26th 2012 @ 08:18:40 PM
Error Date : Thursday, April 26th 2012 @ 08:18:41 PM
Script : http://www.pc-helpforum.be/admincp/plugin.php?do=productimport
Referrer : http://www.pc-helpforum.be/admincp/plugin.php?do=productadd
IP Address : 78.22.132.252
Username : karel
Classname : vB_Database_MySQLi
MySQL Version : 5.5.21

I uploaded a different XML, try that one.

Brandon Sheley
04-26-2012, 08:00 PM
Nice work, this is something I add to my blogs.. Good to see a 3.x version