Easy Gallery Joomla 1.5 Patch/Fix

Discuss the development and implementation of Joomla! components here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
Matt S
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Mar 03, 2008 7:49 pm

Easy Gallery Joomla 1.5 Patch/Fix

Post by Matt S » Mon Mar 03, 2008 8:37 pm

I came across this and thought I might help save someone some debug/correction time. Easy Gallery doesn't show version in their panel, so I can't specify which one I patched with this, but I suspect it would work on nearly any version.

When installed on a Joomla 1.5 system (Legacy mode required), Easy Gallery will install without problems, but links to it will produce php code errors. These are fixed easily by a simple replacement in the components/com_easygallery/easygallery.php file.

On line 25, replace:

Code: Select all

require_once( $mainframe->getCfg('absolute_path') . '/includes/patTemplate/patTemplate.php');
with

Code: Select all

require_once( $mainframe->getCfg('absolute_path') . '/libraries/pattemplate/patTemplate.php');
It seems to work fine from this point on, just the Joomla directory structure moved pattemplate to the libraries folder (and made the T lowercase).

I'm also including a copy of the easygallery.php file so you can just upload it rather than editing it, if you like. Just unzip it and drop it in the com_easygallery directory.
You do not have the required permissions to view the files attached to this post.
Matt S.
Sitecats Web Development
http://www.sitecats.com

Matt S
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Mar 03, 2008 7:49 pm

Re: Easy Gallery Joomla 1.5 Patch/Fix

Post by Matt S » Tue Mar 04, 2008 3:37 pm

Correction:

I'm afraid the patch I posted, upon further testing, only corrects an error message. Easy Gallery does not, easily at least, work with 1.5. I had a number of file-upload errors when trying to actually place images in the gallery, so if they're a full patch, I suspect my file above is only the first step.
Matt S.
Sitecats Web Development
http://www.sitecats.com

lrech
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Aug 23, 2008 7:01 am

Re: Easy Gallery Joomla 1.5 Patch/Fix

Post by lrech » Sat Aug 23, 2008 7:15 am

Matt, thanks for the fix above. I also hit the upload problem as well and managed to track it back to the

Code: Select all

$eg_ftp_disabled
variable having a value of null when referenced in the addFile() function.

I added

Code: Select all

require(PATH_EASYGALLERY . '/configuration.php');
to the addFile() function in administrator/components/com_easy_gallery/classes/photos.php. This seemed to fix the upload problem by bringing in the values for the globally declared variables in the function.

Code snippet with a little more context:

Code: Select all

function addFile(&$ftp, $filepath, $filename, $imagename, $filetype, $description, $cid, $state){
    global $database, $eg_ftp_path, $eg_image_path, $eg_original_path, $eg_thumbnail_path, $eg_ftp_disabled, $mainframe;
    global $eg_max_height, $eg_max_width, $eg_thumbnail_height, $eg_thumbnail_width;
   require(PATH_EASYGALLERY . '/configuration.php');
    $time = time();
 
Hope this helps

Lou.

abolay
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Jul 29, 2013 9:58 am

Re: Easy Gallery Joomla 1.5 Patch/Fix

Post by abolay » Sun Aug 18, 2013 5:10 pm

my Problem with Easy Gallery in Joomla 1.5 This is post : :(
http://forum.joomla.org/viewtopic.php?f=429&t=814091
Please help me, thanks


Locked

Return to “Components”