maternal
Welcome, Guest. Please login or register.
Did you miss your activation email?

 
Advanced search

18813 Posts in 5583 Topics- by 9413 Members - Latest Member: RageKage

June 19, 2013, 11:45:05 PM
JOOM::GALLERY::FORUMJoomGallery 1.5 MVCUploadsHack - Resize Originals
Pages: [1]
Print
Author Topic: Hack - Resize Originals  (Read 695 times)
0 Members and 1 Guest are viewing this topic.
WebTrooper
Newbie
*
Offline Offline

Posts: 2



View Profile
« on: November 25, 2011, 10:02:45 PM »

This is a VERY basic hack to resize the original images during upload. I needed it so hired someone at elance.com to do it for me.  

If anybody wants to continue work on this - make it a plugin, add an admin interface, store full size originals in another folder, etc... - the please post any "working" edits here so others can use it.

This hack is for joomgallery_1_5_7_4_stable_build_20111009. I am not a programmer and I do not know if it will work with any other version of JoomGallery. For other versions, I recommend changing only the code requred, rather than replacing the entire file. Of course, always back up your files before doing any editing.

The following is the instructions the code contractor told me. Download the zip file attached to this post and follow the instructions. It's only one file, so really easy to implement. Enjoy!

======== INSTRUCTIONS AS PROVIDED BY THE CONTRACTOR ==============

I update "administrator\components\com_joomgallery\helpers\upload.php"
Original and my version attached.
Around line #1569 I add this:
//
// Resize original image begins
//
$return = JoomFile::resizeImage($this->_debugoutput,
$source,
$this->_ambit->getImg('orig_path', $filename, null, $this->catid),
false,
1280, //$this->_config->get('jg_maxwidth'),
false,
$this->_config->get('jg_thumbcreation'),
$this->_config->get('jg_picturequality'),
true,
0
);
//
// resize original image end
//

1280 - is maximum width.

======================================================
« Last Edit: November 26, 2011, 03:08:31 AM by WebTrooper » Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic

Bad Behavior has blocked 366 access attempts in the last 7 days.

maternal