Mambo and G2 embedding

aravot
aravot's picture

Joined: 2005-03-05
Posts: 61
Posted: Mon, 2005-04-18 22:58

Tried to install '[kings]Egg' version got following error

Quote:
Upload component - Faild
/mysite.com/mambo/mambo/media/install_4264380dcadbd/com_gallery2/gallery2.php does not exist!

 
[kings]Egg

Joined: 2005-04-18
Posts: 9
Posted: Mon, 2005-04-18 23:15

Yet another update... The latest and, err, greatest instalment of the user-aware g2 component is here. I think i've fixed the admin problem KAC was talking about. As for aravot's install problem... could that be my mangled packaging? KAC, you said you had to repackage. If you could do that again with this version so that it works, and tell me what I'm doing wrong, then I'll make sure that any future versions I release work "out of the box". And i'll be eternally grateful.
Still to be added: the user cleanup function. I think that the standard pass-through authentication seems to be quite reasonable now. Also, valiant, possible tiny bug in the integration embedding skeleton code: the return value checks aren't entirely consistent (ie the "A real error has occurred" section at the bottom technically includes the GALLERY_SUCCESS code, which should be dealt with separately. Maybe. If you've already spotted this, please ignore! :)).

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Mon, 2005-04-18 23:39

OK, here is [kings]Egg's version of the component repacked and ready for install. I installed and uninstalled it a couple of time to make sure it worked.

I still have a problem though with logging in as the admin.

Now I get this error:

Quote:
Your user accounts seem to be messed up. Check your g2_ExternalIdMap table!

The standard users login works fine though. Only my admin login is not working.

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Mon, 2005-04-18 23:49

ooops, I forgot to tell you how I repacked it.

You had this folder structure:
com_gallery2 folder >CVS folder & gallery2 folder>files

I repackaged it like this:
gallery2 folder>files

You had two folders inside com_gallery2, "CVS" & "gallery2". You only need "gallery2".

Extract mine, you'll see. Hopefully, aravot will test it also.

 
tmmgeekette

Joined: 2004-03-15
Posts: 30
Posted: Tue, 2005-04-19 00:05

hello! I have read 11 pages here but have not heard anybody have the same problem as mine. I have fresh mambo 4.5.2 install with fresh gallery from CVS of 2 days ago. the gallery component works fine until i install the sidebar. The sidebar works fine too until i click on the gallery link i created in the main menu.

If i deactivate the module, gallery goes back to working fine.

you can see it here http://www.littledeath.net/mambo

any idea what i might be doing wrong??

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Tue, 2005-04-19 01:29

tmmgeekette,

Post all the component settings you're using.

 
tmmgeekette

Joined: 2004-03-15
Posts: 30
Posted: Tue, 2005-04-19 01:37

i installed the debug module on gallery but not sure how to see it?

anyways..

/home/ldeath/www/littledeath/gallery2/
../gallery2/
/mambo
index.php?option=com_gallery2
index.php
no
no
no
no

 
tmmgeekette

Joined: 2004-03-15
Posts: 30
Posted: Tue, 2005-04-19 01:37

also, i have zero errors in mysql db logs, zero apache errs as well.

 
aravot
aravot's picture

Joined: 2005-03-05
Posts: 61
Posted: Tue, 2005-04-19 05:54

[kings]Egg, tried your version same error as before, next tried KAC repacked version installation was successful, you can view it HERE

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-04-19 05:57

[kings]Egg, i'm on the go. if you could explain me when this gallery success error message is printed, in which case, then i can fix it...

 
[kings]Egg

Joined: 2005-04-18
Posts: 9
Posted: Tue, 2005-04-19 09:27

KAC: Thanks for the repack. As for your admin login problems: I assume you're logging in to Mambo with user 'admin'. What's happening is that G2 can't find anyone mapped to admin's user ID so tries to see what's wrong, but finds there IS an entry in the g2_ExternalIdMap table, which must be pointing to nobody...
If you have phpMyAdmin installed:

    Look at Mambo's mos_users table, "browse" it, and find what the id of Administrator is (mine is 62)
    Now look at G2's g2_ExternalIdMap table and see if there's a corresponding entry with g_externalId set to the same value. If there is, delete it and try to log in as admin again the usual way.

valiant:
Your original code is:

$ret = GalleryEmbed::init(...activeUserId => $uid, ...);
if ($ret->isError()) {
    if ($ret->getErrorCode() & ERROR_MISSING_OBJECT) {

        // check if the there's no G2 user mapped to the activeUserId
        $ret = GalleryEmbed::isExternalIdMapped($uid, 'GalleryUser');
        if ($ret->isError() && ($ret->getErrorCode() & ERROR_MISSING_OBJECT)) {
            // user not mapped, map create G2 user now
            GalleryEmbed::createUser(....);
            GalleryEmbed::init(...,activeUserId => $uid, ....);
        } else {
            // a real problem, handle it, i.e. raise error or echo error message
        }
    } else {
        // a real problem, handle it, i.e. raise error or echo error message
    }
}

My changes would be as follows: check for success return value from isExternalIdMapped and also check for admin trying to log in since they will exist but won't be mapped. If there's a better way please let me know!

$ret = GalleryEmbed::init(...activeUserId => $uid, ...);
if ($ret->isError()) {
    if ($ret->getErrorCode() & ERROR_MISSING_OBJECT) {

        // check if the there's no G2 user mapped to the activeUserId
        $ret = GalleryEmbed::isExternalIdMapped($uid, 'GalleryUser');
        if (!$ret->isError()) {
            // User exists in g2_ExternalIdMap table but the mapping may be invalid
            // take action e.g. replace entry with correct mapping and / or create user            
        }
        else if ($ret->getErrorCode() & ERROR_MISSING_OBJECT) {
            // user not mapped, map create G2 user now
            // also, watch out for admin: they won't be idmapped but they will exist
            if ($uid == $admin_uid)
            {
                GalleryEmbed::addExternalIdMapEntry($uid, $g2adminId, 'GalleryUser');
            }
            else
            {
                GalleryEmbed::createUser(....);
                GalleryEmbed::init(...,activeUserId => $uid, ....);
            }
        } else {
            // a real problem, handle it, i.e. raise error or echo error message
        }
    } else {
        // a real problem, handle it, i.e. raise error or echo error message
    }
}

Hope this helps![/]

[/]

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-04-19 11:06

ah, thanks. forgot about that. i've never tested the code, that's why must have forgotten this case.
but the interpretation of
$ret = GalleryEmbed::isExternalIdMapped($uid, 'GalleryUser');
if (!$ret->isError()) {
would be slightly different than what you write there.
if we receive an error upon GallerEMbed::init, but the isExternalIdMapped returns a success status, then we know that the users exists in G2 and that it is properly mapped to the mambo user. but we don't know, why we received the original error on GallerEmbed::init, we don't know what caused the error.
so to say, we should handle it the same way, as the error on the line "// a real problem, handle it, ...".

$ret = GalleryEmbed::init(...activeUserId => $uid, ...);
if ($ret->isError()) {
    if ($ret->getErrorCode() & ERROR_MISSING_OBJECT) {
        // check if the there's no G2 user mapped to the activeUserId
        $ret = GalleryEmbed::isExternalIdMapped($uid, 'GalleryUser');
        if ($ret->isError() && $ret->getErrorCode() & ERROR_MISSING_OBJECT) {
            // user not mapped, map create G2 user now
            $ret = GalleryEmbed::createUser(....);
            // handle error status
            $ret = GalleryEmbed::checkActiveUser($activeUserId);
            // handle error status
        } else {
            /* either we received an error on isExternalIdMapped -> can't do anything about it, print error. or the user exists in G2 and is mapped -> we don't know the reason why GallerEmbed::init failed. -> print error unknown in this case too. */
        }
    } else {
        // unknown error during ::init, print error
    }
}

i don't agree with your admin uid exception. is this something specific to the mambo integration. is the admin uid mapped? because, there's no real exception for the admin in the GallerEmbed code, it needs a externalIdMap like every other user.

if one wanted to make the above code even shorter because the differentiation between the different errors don't really matter but for debugging, one could write:

$ret = GalleryEmbed::init(...activeUserId => $uid, ...);
if ($ret->isError()) {
    // check if the there's no G2 user mapped to the activeUserId
    $ret = GalleryEmbed::isExternalIdMapped($uid, 'GalleryUser');
    if ($ret->getErrorCode() & ERROR_MISSING_OBJECT) {
        // user not mapped, map create G2 user now
        $ret = GalleryEmbed::createUser(....);
        // handle error status
        $ret = GalleryEmbed::checkActiveUser($activeUserId);
        // handle error status
    } else {
        /* either we received an error on isExternalIdMapped -> can't do anything about it, print error. or the user exists in G2 and is mapped -> we don't know the reason why GallerEmbed::init failed. -> print error unknown in this case too. */
    }
}
 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Tue, 2005-04-19 14:01

[kings]Egg,

Thanks for the suggestion, I will check that out in phpMYadmin.

BTW, my username and password, although I created them seperately, for both Mambo and Gallery is the same.

***************************************************************

Also, attached here is a Mambo module I put together that will display only a random image from the gallery. I didn't like that I had to show all the G2 sidebar info on the Home page. I wanted only the Random Image on the Home page and everything else from the sidebar to come up only when clicking on the gallery link. Looks much cleaner, IMO.

EDIT: Until one of the prgramers fixes the coding here: In order for to work, you will have to download it, extract it, edit the PHP file with your website address, repack it. Then install it in Mambo. SORRY!

 
tmmgeekette

Joined: 2004-03-15
Posts: 30
Posted: Tue, 2005-04-19 14:41

KAC, a nice alternative to the sidebar!! thanks! BTW, the files have your info in them and although i installed them in my site, the random pics come from some other gallery "www.francofriends.com" LOL!!

I still would like to get the sidebar to work on my site. I plan to have it show only when gallery is being viewed.. but I continue havine the same problem I mentioned above.

Btw, is there any other info I can get to help troubleshoot my problem?

 
tmmgeekette

Joined: 2004-03-15
Posts: 30
Posted: Tue, 2005-04-19 15:02

I am an idiot. I jus t figured out how to debug.. lol!!

So I have gallery2 configured to use its own database.

The component seems to read the G2 db info from config.php in gallery path so it knows the db info for the gallery and so does the sidebar as long as they're not trying to run together. (make sense?) So I can see them both updating g2_ItemAttributesMap in the proper G2 database but only when running separately.

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Tue, 2005-04-19 15:05
[kings wrote:
Egg"] If you have phpMyAdmin installed:

    Look at Mambo's mos_users table, "browse" it, and find what the id of Administrator is (mine is 62)
    Now look at G2's g2_ExternalIdMap table and see if there's a corresponding entry with g_externalId set to the same value. If there is, delete it and try to log in as admin again the usual way.

OK [kings]EGG. I tried the above. My ID was also 62 in the mos_user table. I found the corresponding g_externalId in the g2_ExternalIdMap and deleted it. (kinda worried me doing that, isn't that deleting the gallery admin?).

I then logged into Mambo and got this error:

Quote:
Error (ERROR_COLLISION)

* in modules/core/classes/GalleryUser.class at line 167 (gallerystatus::error)
* in embed.php at line 258 (galleryuser::create)
* in /home/kac/domains/seemypics.net/public_html/components/com_gallery2/gallery2.php at line 142 (galleryembed::createuser)
* in /home/kac/domains/seemypics.net/public_html/index.php at line 182

[/]

[/]

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Tue, 2005-04-19 15:11
tmmgeekette wrote:
KAC, a nice alternative to the sidebar!! thanks! BTW, the files have your info in them and although i installed them in my site, the random pics come from some other gallery "www.francofriends.com" LOL!!

I still would like to get the sidebar to work on my site. I plan to have it show only when gallery is being viewed.. but I continue havine the same problem I mentioned above.

Btw, is there any other info I can get to help troubleshoot my problem?

Now THAT is funny!

As you can see, I don't know anything about programming. Just trying to contribute since these people have given me much. Hopefully one of you can edit the included php file appropriately so it pulls your address. LOL

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-04-19 15:13

no, deleting entries in g2_ExternalIdMap is harmless. it just says "the user with externalId (mambo user id) x is no more mapped to gallery user (entityId) with id y.

 
[kings]Egg

Joined: 2005-04-18
Posts: 9
Posted: Tue, 2005-04-19 15:21

Hmm... Don't worry, you haven't deleted the gallery admin, just the mapping from the Mambo user to the Gallery admin. If you check the gallery2.php file you should see that I've done a specific test for admin. Is your Mambo admin user actually called 'admin'? If so, then i can't see why the

if ((strcasecmp($my->username, 'admin')==0)

doesn't evaluate to TRUE. And if this test is successful, it should never try to "createUser". You could perhaps try to debug it by putting the following line above the if ((strcasecmp...):

echo $my->username . " evaluates to ";
echo strcasecmp($my->username, 'admin'); //should be 0 for admin user!

It should output "admin evaluates to 0". If you try this, tell me what happens... Of course, you can always manually insert the appropriate externalUserMap in phpMyAdmin but that's cheating :)[/code]

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Tue, 2005-04-19 15:36

[kings]Egg,

Before I try this, my admin login is not "admin" it's "KAC". Does that make a difference?

Should I try something else first before doing what you suggested above?

 
[kings]Egg

Joined: 2005-04-18
Posts: 9
Posted: Tue, 2005-04-19 15:37

In reply to valiant:
I interpreted the "embed::init fails and embed::isExternalIdMapped succeeds" case as one where the user has been deleted from G2 using the normal G2 interface - however, the standard delete user function didn't get rid of the external id mapping. At least it didn't for me. In fact, thinking about it, is this a bug in Gallery2 that needs to be fixed? Anyway, that's why I treated it differently - I suppose in the final version this case should never arise unless somebody's been messing around with their database (like I have done :))

Quote:
i don't agree with your admin uid exception. is this something specific to the mambo integration. is the admin uid mapped? because, there's no real exception for the admin in the GallerEmbed code, it needs a externalIdMap like every other user.

As far as this goes: if no mapping is detected, your code calls the GalleryEmbed::createUser method to map AND create the user simultaneously. This is great, as long as the user doesn't exist. When I started work on this, my admin user existed in G2 but there was no external id map for it (just like you'd expect). Now when i used your suggested method, embed::init failed (no id map found), then createUser was attempted but failed (ERROR_COLLISION since admin already exists). Which is why I've put the admin exception in: since admin will definitely exist already, we need to create an ID map only - which createUser will not do since it will detect a collision and fail.
There's always a possibility that i've got the wrong end of the stick of course. Please let me know! :)

 
aravot
aravot's picture

Joined: 2005-03-05
Posts: 61
Posted: Tue, 2005-04-19 15:40

I too didn't like gallery side bar with all the info (it could be programmed to have options to enable/disable) I only want to show random pics, so KAC I tried your version works OK but like tmmgeekette mentioned the pictures come from a different gallery "www.francofriends.com", see it HERE

 
[kings]Egg

Joined: 2005-04-18
Posts: 9
Posted: Tue, 2005-04-19 15:41

KAC: aaaah it all becomes clear. My string test for admin is therefore not the best way to do it. I stupidly assumed that the Mambo admin user was always called 'admin'. I have a feeling i should be checking a different flag ($my->isAdmin or something like that). I'll check it out and fix it later. A quick hack to get it working for you now would be to change the strcasecmp($my->username, 'admin') to strcasecmp($my->username, 'kac') but obviously that's no good for everybody else who wants to use the component :)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-04-19 15:55

[kings]Egg, @admin checking: has the admin a special UID in mambo? like 0? or a constant which is defined somewhere? or is there something like ->isAdmin()?
whatever, i still wouldn't do this check on each request.

You can map the admin user in the install code of your module.
GalleryEmbed:: has a method to map users without creating a new user.
see function addExternalIdMapEntry($externalId, $entityId, $entityType).

you can get the $entityId of the G2 site admin by GalleryCoreApi::fetchuserbyusername or even better:
- get the id of the admin group by getParameter('id.adminGroup')
- get a user of the admin group GalleryCoreApi::fetchUsersForGroup($adminGroupId, $count=1);
- and then you have the $user->getId() as the entityId
- then map the mambo externalId with the G2 entityId

-> no admin check on each request.

Quote:
I interpreted the "embed::init fails and embed::isExternalIdMapped succeeds" case as one where the user has been deleted from G2 using the normal G2 interface - however, the standard delete user function didn't get rid of the external id mapping. At least it didn't for me. In fact, thinking about it, is this a bug in Gallery2 that needs to be fixed?

any function of G2 can fail. that's why we have the GalleryStatus ($ret) objects everywhere, to check if everything worked fine.
So yes, GalleryEmbed::init *should* only fail, if the actveUserId does not exist in G2. But it can fail for any reason. That's why i introduced "::isExternalIdMapped". So that we can check to be sure what the reason was why ::init failed.
Long story cut short: don't interpret more into the error status codes than possible. Always assume that a function call wasn't executed successfully for some strange reason if the return value is not success.

 
tmmgeekette

Joined: 2004-03-15
Posts: 30
Posted: Tue, 2005-04-19 15:56

aravot, i fixed mine by just editing mod_g2random.php. simple fix. I wish clicking on the images would redirect to gallery inside mambo, not to standalone..

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Tue, 2005-04-19 15:58
aravot wrote:
I too didn't like gallery side bar with all the info (it could be programmed to have options to enable/disable) I only want to show random pics, so KAC I tried your version works OK but like tmmgeekette mentioned the pictures come from a different gallery "www.francofriends.com", see it HERE

Sorry aravot, that was an error due to my non-existant programming knowledge. :P :(

Anyway, you can easily fix it.

FTP into your site
Go to the mambo "modules" folder
Grab the file called "mod_g2random.php"
Open it with wordpad or notepad.
Replace the MY site address with YOURS.
Save and close it
FTP it back to the same folder.....done.

Sorry about that!!!!!!!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-04-19 16:02

KAC, lol, i had to laugh out load. I did the same once, but with a ultralow security password for a test install :)
I'd change my password if I were you, though ;)

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Tue, 2005-04-19 16:21

:lol: :lol: :lol: :oops: :P

 
tmmgeekette

Joined: 2004-03-15
Posts: 30
Posted: Tue, 2005-04-19 16:34

so i just moved my gallery2 tables into the mambo database and all is well again. I like the sidebar but.. it's too big for most of the site.

thanks.

 
[kings]Egg

Joined: 2005-04-18
Posts: 9
Posted: Wed, 2005-04-20 00:07

Hello, me again. I've taken into account what valiant's been saying and I think i have a slightly nicer implementation now (take a look at my code to see if i'm using the embed:: patterns correctly now!). This release should fix KAC's problem, and will auto-fix any messed up g2_ExternalIdMap tables too hopefully. In fact, even if you delete all the entries from your g2_externalIdMap table, this thing should recreate it for you when the users log in.
It also comes up with a brief message in Mambo when you install it to point you in the right direction. Basically, if you want to use it, uninstall your current com_gallery2, install this new one, set up the various parameters as before, set the "Run user setup script" option to "Yes" and save the options. Whichever user you install with will be mapped to the g2 admin account. This is because Mambo can have lots of admins, and so there's no obvious choice for which one to pass through. An additional "feature"/bug is that if you do the install process as some administrator that isn't called admin, then run the component when logged in as another user called admin, it will map the user called admin to the gallery2 admin user as well, ie you will have two mambo accounts mapped to the 'admin' G2 account. That shouldn't really be a problem though. It might even be useful!

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Wed, 2005-04-20 04:12

Works like a charm! :wink:

 
aravot
aravot's picture

Joined: 2005-03-05
Posts: 61
Posted: Wed, 2005-04-20 06:15
KAC wrote:
Works like a charm! :wink:

Same here

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-04-20 12:00

[kings]Egg, great work!

nitpicks:
- GalleryEmbed::addExternalIdMapEntry($my->id, $g2user->getId(), 'GalleryUser'); returns also a Gallery Status object, you should check if the function executed successfully.

- same for GalleryEmbed::checkActiveUser($my->id);

- when you do "echo $ret->getAsHtml();". you could add some extra info, such that if someone has this error, you know exactly where it came from.
i.e. echo "unknown error during isExternalIdMapped\n<br>" . $ret->getAsHtml();

- after each echo $ret->getAsHtml();, you have a return statement. but not on line 149. probably you forgot it?

- user album creation:
1. IMO you shouldn't create it yourself. G2 has a user album module and you can it creates useralbums for you when a G2 user is created. See the module details in site admin.
2. It won't create a user album, if the user already existed in G2 and you just do a addexternalMapEntry. Ergo, you should move the user album creation code (if you really want to keep it) directly under the addexternalmapentry call.
3. that way, you also don't do the whole "does the user already have a user album" code on each request.

- css / javascript / page title: can you somehow add css style sheets / javascript / set the page title with the mambo API / can you hack it?
because after the GalleryEmbed::handleRequest() call, you can get the list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']);
what you do right now is output html from the <head> part in the <body> part. that is not a correct html page and won't display correctly on all browsers. you should really not just output $g2moddata['headHtml'] directly...

i really like what you've accomplished, it's getting better and better!

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Wed, 2005-04-20 14:50

I was thinking, the Gallery Remote will need to be update now too, right?

Currently the only embedded options are for PHP-Nuke and two others. Mambo is not listed.

Is there a temporary way around this?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-04-20 15:00

KAC, please discuss GR in an appropriate forum thread (there already exist some embedded G2 + GR topics).
If you want something to happen, you better post a message in the GR forum.

 
devinerickson
devinerickson's picture

Joined: 2005-04-20
Posts: 7
Posted: Tue, 2005-04-26 02:22

Hi, I'm a student developer working with [kings]Egg's new version (btw incredible job [kings]Egg). I have been having a problem with the relative path for my gallery.

I am getting the error
"Fatal error: Undefined class name 'galleryembed' in /home/starving/public_html/test3/components/com_gallery2/gallery2.php on line 87"

The mambo site I'm deploying it on is
www.starvingcoder.com/test3

I installed G2 under that mambo site, making it accessable at
www.starvingcoder.com/test3/gallery2

When I open the site up under ftp i can access the gallery folder (containing embed.php) under
/www/test3/gallery2

Due to this information I set up the component values as follows:
full path: http://www.starvingcoder.com/test3/gallery2/
relative path: ../test3/gallery2
path to mambo: ../test3

Can you please advise what I should input for these values to get past this error?

 
aravot
aravot's picture

Joined: 2005-03-05
Posts: 61
Posted: Tue, 2005-04-26 06:16
devinerickson wrote:
Hi, I'm a student developer working with [kings]Egg's new version (btw incredible job [kings]Egg). I have been having a problem with the relative path for my gallery.

I am getting the error
"Fatal error: Undefined class name 'galleryembed' in /home/starving/public_html/test3/components/com_gallery2/gallery2.php on line 87"

The mambo site I'm deploying it on is
www.starvingcoder.com/test3

I installed G2 under that mambo site, making it accessable at
www.starvingcoder.com/test3/gallery2

When I open the site up under ftp i can access the gallery folder (containing embed.php) under
/www/test3/gallery2

Due to this information I set up the component values as follows:
full path: http://www.starvingcoder.com/test3/gallery2/
relative path: ../test3/gallery2
path to mambo: ../test3

Can you please advise what I should input for these values to get past this error?

full path should be your server path example:
/home/domains/starvingcoder.com/www/test3/gallery2/
relative path: /gallery2
path to mambo: /

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Tue, 2005-04-26 13:03
aravot wrote:
full path should be your server path example:
/home/domains/starvingcoder.com/www/test3/gallery2/
relative path: /gallery2
path to mambo: /

aravot is right about the full path but the relative path must have the "." period(s).

relative path: ../gallery2

or

relative path: ./gallery2

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Tue, 2005-04-26 13:07

You guys with this Mambo/G2 combination,

How are you uploading new pics to your gallery?

Looking at the Gallery Remote forum, it appears nobody has figured out how to send the username and password in the URL address for the embedded Gallery Remote to work.

Meanwhile, I'm disabling the embedding, uploading with Gallery Remote (stand alone mode), then re-enabling the embedding.....kinds sux.

 
aravot
aravot's picture

Joined: 2005-03-05
Posts: 61
Posted: Tue, 2005-04-26 15:45
KAC wrote:
aravot wrote:
full path should be your server path example:
/home/domains/starvingcoder.com/www/test3/gallery2/
relative path: /gallery2
path to mambo: /

aravot is right about the full path but the relative path must have the "." period(s).

relative path: ../gallery2

or

relative path: ./gallery2

KAC in my setup for 'Relative Path' I had to use /gallery2 and 'Path to Mambo:' / maybe cause I am running as sub-domain.

 
devinerickson
devinerickson's picture

Joined: 2005-04-20
Posts: 7
Posted: Tue, 2005-04-26 19:30

Thanks guys. I used avarot's suggestion for the full path
(/home/domains/starvingcoder.com/www/test3/gallery2/ ) however, mambo is installed under a sub-directory, so i had to use /test3/gallery2. The component is viewable however, the picture links are broken and if i click anything i get a "page does not exist" error. Any suggestions?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-04-26 19:44

please post all your config paths and post also a generated G2 url for an image (right click on image, copy image address) and post a generated g2 url for another g2 page.
then we can the right paths for your install.

 
aravot
aravot's picture

Joined: 2005-03-05
Posts: 61
Posted: Tue, 2005-04-26 21:01

My mambo too is installed in sub-directory (sub-domain) here is snap shot of my configuration page and my -> Test Web site

[img]http://webpages.charter.net/osipof/g2/g2sidebar_config.gif[/img]

 
devinerickson
devinerickson's picture

Joined: 2005-04-20
Posts: 7
Posted: Tue, 2005-04-26 21:50

Well what do you know... I was about to paste the generated url of the picture, when i realized it came out like "/localhost/picturegallery//picturegallery"
I played around with the relative paths until it worked. Here's what i ended up with:

Full path: C:\wamp\www\picturegallery\gallery2\
relative path: gallery2
path to mambo: picturegallery

and it works! Thanks for your help guys. Heh, now i just have to fix the login problem (it doesn't store state) and I'll have a working gallery. I've posted about that here:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=135593#135593

 
Polubog

Joined: 2005-04-18
Posts: 1
Posted: Wed, 2005-04-27 01:45

So, I'm starting to think maybe I have a weird server setup. I've been trying to figure this out for ages. I have G2 installed, and it works perfectly standalone. I installed com_gallery2, and when I try to access the embeded page, it dies after writing the first <table>, <tr>, and <td> tags. You can see this here:
http://www.mishakononov.com/index.php?option=com_gallery2
Working the debug settings and going through some code, it seems to be stalling where Smarty fetches the embedHead.tpl file. What I can't figure out is why. I'm assuming it's not a fault in Smarty, but I really can't figure it out. Help?

 
Honda

Joined: 2004-06-18
Posts: 11
Posted: Wed, 2005-04-27 12:30

Hello G2 Developers,

The G2 component is working good :D
but i have one question..

Full path to gallery G2: /home/the3boys.nl/www/gallery2/
Relative path to gallery G2:./gallery2
path to mambo : /
embeduri : index.php?option=com_gallery2&Itemid=70
loginpage redirect : index.php

I use G2 sidebar to the latest version.
but one problem is there. WHen i go to site admin link i get a crash in sidebar.. Permission denied.
When i unpublish G2 sidebar the site admin link is working good.
Where can i search to solve it? Or to help you to solve?

greetings honda

 
aravot
aravot's picture

Joined: 2005-03-05
Posts: 61
Posted: Wed, 2005-04-27 21:23

Attached is a modified* version of KAC Mambo module that displays only random images from gallery albums, put together by asking for help around various forums namely mambohacks.com and simplemachines.org.

* Following has been fixed.

KAC wrote:
EDIT: Until one of the prgramers fixes the coding here: In order for to work, you will have to download it, extract it, edit the PHP file with your website address, repack it. Then install it in Mambo. SORRY!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-04-27 21:40

aravot so this is a third component of the G2 mambo integration?

[kings]Egg, what's the status? is the your thing repacked like the others requested? don't know about mambo things...
if so, i'll commit it to the cvs.

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Thu, 2005-04-28 02:58

good job aravot!

valiant, there are three things you can get here that are working and ready for CVS.

1. The "com_gallery2.zip" component that [kings]Egg posted on Apr 19, 2005 - 05:07 PM

2. The "mod_g2_sidebar_updated.zip" module that randycarver posted on Apr 08, 2005 - 08:40 AM

3. The "mod_g2_random_image.zip" module that aravat posted on Apr 27, 2005 - 02:23 PM

 
aravot
aravot's picture

Joined: 2005-03-05
Posts: 61
Posted: Thu, 2005-04-28 04:32

KAC, now we need to find a way to open the image wrapped in mambo (like sidebar) instead of new window.

Anyone out there give a hint/help.