Home arrow Forum
Gallery2 issue and fix
  Welcome, Guest. Please login or register.
November 22, 2008, 12:18:07 AM
Home New Posts Search Calendar


Login with username, password and session length
Forum  |  MamboHacks.com  |  Mambo-SMF Forum 1.3.0 Support  |  Topic: Gallery2 issue and fix « previous next »
Pages: [1] Go Down Print
Author Topic: Gallery2 issue and fix  (Read 3614 times)
pestilence
Newbie
*

Karma: +2/-0
Offline Offline

Posts: 14


View Profile
Gallery2 issue and fix
« on: September 11, 2005, 07:39:12 PM »

Ok i spotted a problem with gallery2 component and smf installed.
Inside the mambohacks file there is a patch for the index.php which loads the $_REQUEST global to a $_TMP and then reassigns the contents of it back to $_REQUEST.
I spotted that there is also the need to pass the $_GET and $_POST vars to a $_TMP holder and reassign them due to smf cleaning this vars and destroying the gallery2 URL's.
This will not affect SMF in anyway.
so add inside index.php:
Code:
$_TMP_GET = $_GET;
$_TMP_POST = $_POST;
and then reassign them:

Code:
$_GET = $_TMP_GET;
$_POST = $_TMP_POST;

Add this lines immediately after:
Quote
//MAMBOHACKS.COM
$_TMP = $_REQUEST;

and reassign them after:

Code:
if (file_exists($smf_path."/SSI.php"))
require_once ($smf_path."/SSI.php");
$_REQUEST = $_TMP;
Logged
caribmon
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


View Profile
Re: Gallery2 issue and fix
« Reply #1 on: September 13, 2005, 12:27:22 PM »

can you extrapolate on this one a bit more?

It's not really clear where and how to put the code in index.php... for me at least.

Thanks

G.
Logged
rpmilius
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 23


View Profile
Re: Gallery2 issue and fix
« Reply #2 on: September 13, 2005, 05:26:59 PM »

can you extrapolate on this one a bit more?

It's not really clear where and how to put the code in index.php... for me at least.

This is how I interpretted the instructions. In mambo's index.php file, look for
Quote
//MAMBOHACKS.COM
$_TMP = $_REQUEST;
if (file_exists($mosConfig_absolute_path."/administrator/components/com_smf/config.smf.php"))
        require_once ("administrator/components/com_smf/config.smf.php");
if (file_exists($smf_path."/SSI.php"))
        require_once ($smf_path."/SSI.php");
$_REQUEST = $_TMP;

and change it to

Quote
//MAMBOHACKS.COM
$_TMP = $_REQUEST;
$_TMP_GET = $_GET;
$_TMP_POST = $_POST;

if (file_exists($mosConfig_absolute_path."/administrator/components/com_smf/config.smf.php"))
        require_once ("administrator/components/com_smf/config.smf.php");
if (file_exists($smf_path."/SSI.php"))
        require_once ($smf_path."/SSI.php");
$_REQUEST = $_TMP;
$_GET = $_TMP_GET;
$_POST = $_TMP_POST;


-Bob

SMF 1.0.5
Mambo 4.5.2.3 Stable
Mambo-SMF 1.3.1.3
Community Builder 1.0 RC1
Gallery 2.0 RC2
com_galler2 2.0.6
Logged
pestilence
Newbie
*

Karma: +2/-0
Offline Offline

Posts: 14


View Profile
Re: Gallery2 issue and fix
« Reply #3 on: September 13, 2005, 07:22:55 PM »

This is how I interpretted the instructions. In mambo's index.php file, look for
and change it to

-Bob

SMF 1.0.5
Mambo 4.5.2.3 Stable
Mambo-SMF 1.3.1.3
Community Builder 1.0 RC1
Gallery 2.0 RC2
com_galler2 2.0.6


Correct Smiley
Logged
Pages: [1] Go Up Print 
Forum  |  MamboHacks.com  |  Mambo-SMF Forum 1.3.0 Support  |  Topic: Gallery2 issue and fix « previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Forum | Powered by SMF 1.0.5 & Mambo-SMF.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by MamboHacks.com. Powered by Mambo. All rights reserved.
TERMS OF USE