Mambo and G2 embedding

DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Mon, 2005-02-07 14:53

edit by valiant:
The mambo integration is still in development. Therefore I renamed this topic which was "formely known as "Mambo and G2 embedding done :)".
Get the newest integration code from http://galleryupdates.jpmullan.com/#integrations and not from this forum thread.
</edit>

Over the week-end I dedicated some time to find a way to embed G2 into Mambo 4.5.1 (latest version). I started from the embedding component for Gallery 1 and some other code I found here (php-nuke integration).

So first and foremost, thanks to the people who created that code. I merely adapted it :-)

Attached you will find the component which you should install in Mambo using the admin and create a suitable menu link to it. You will also have to provide the following values for the component.

1) The full absolute path to the gallery installation
2) The relative path to the gallery installation

I installed the component on my site here

There are still some thing going wrong like the displaying of the gallery (CSS issue?) Also, there is no real integration now (just embedding).

I really hope that this can be the starting point for more advanced php goeroes since I'm a VERY beginner in PHP.

Kind regards,
DrBob

AttachmentSize
com_gallery2.zip25.69 KB
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-02-07 15:25

DrBob, great news! I hope you find some help in the mambo forums to get actual integration (user management) working. In the Embedding & Integration sticky topic and on http://sf.net/projects/gallery/ -> integration/gallery2/ you'll find integrations for xaraya, postnuke, phpnuke, drupal, ... this could make further development easier for a mambo integration.

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Tue, 2005-02-08 08:54

wow... thanks for the work on this... really solved a quest I've been working on for a while now... :D that said, I'm really looking forward to more in-depth integration of the products to include things like pass-through authentication and back-end configuration, etc... :D Can't wait!

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Tue, 2005-02-08 14:45

Ok, as written in my previous post, I had some issues with the gallery layout. I just re-installed everything using MSAS (Mambo Stand-Alone-Server) with todays Gallery G2 build, and now everything is ok :-)

I'll apply the same changes to my live site later tonight so you can all check it out.

I also made a small module for Mambo so you can display the G2 sidebar (attached below). Testing on MSAS did not show any errors but when trying it on my live site, I noticed some things are not going like they should. So use at your own risk :wink:

Valiant, Regarding further integration, I really hope that I gave the kick-of for other people to start working on this (I made some posts on 2 Mambo forums) I am just not proficient enough to start on a real integration (users sync, etc).

Kind regards,
DrBob

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Tue, 2005-02-08 20:03

I just finished an update of the Mambo Component.
From the Mambo Admin, you can now set the following :

  • Full path to G2 installation
  • Relative path to G2
  • EmbedUri
  • Show sidebar yes/no
  • Showlogin yes/no
  • login redirect

I think that this more or less finished "embedding" Gallery (no integration).
Again.... any help is welcome for extending the component.

For the ZIP file itself, please see the very first post in this thread.[/]

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-02-08 20:32

cool. Are you sure you don't want to integrate users too? ;)
I'm sure you need some php knowledge to do what you have accomplished here, integrating the users won't be more difficult (the initial synchronization, import, export is a different thing).

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Wed, 2005-02-09 12:06

Valiant, Yes I'm sure :(

First of all, the current embedding does have its errors and I can't seem to fix them. From the embedded gallery, it's impossible to to any actions besides browsing through the images (like uploading, etc).

Also, the module I created for displaying G2's sidebar only works the first time it's loaded. (also, Mambo reacts strange when I assign that module only to the Gallery component link)

And last but not least, I've been taking a look at possible ways to implement user synchronisation and I simply have to admit that I don't know enough about Mambo (and what Mambo does in the background)

All these points could be tackled by a developer who has more knowledge about Mambo itself. I made some reference post on two Mambo forums but until now, I received no response whatsoever. Lets just hope somebody turns up the next couple of days :-?

 
g5

Joined: 2005-02-03
Posts: 18
Posted: Wed, 2005-02-09 18:38

Hi Dr. Bob,

Implemented G2 in Mambo 4.5.1b, using Gallery G2.2005-02-09-09-37-20.zip. All looks good so far, however for some reason, the images are just not appearing. Did you run into such problems? Stand-alone, the images appear, however when embedded in Mambo, they do not?

SA = http://thebrennans.ca/gallery2/
Embedded = http://thebrennans.ca/index.php?option=com_gallery2&Itemid=40

Any suggestions as to what i should look for? Do you think the fact that i located my image folder outside of the root have anything to do with this?

BTW, fantastic job on this... Can't wait to see where G2 takes us!!!

Cheers,

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Wed, 2005-02-09 20:23

g5, most probable cause is that the relative path to the gallery is not correct. In your case, this should be /gallery2/

The location of the g2data folder itself does not have any influence on the embedding.

Kind regards,
DrBob

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-02-09 22:58

g5, DrBob is absolutely with his indications. Only that the relative path shouldn't start with a slash ('/'), it's just "gallery/" without the quotes.

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Thu, 2005-02-10 08:10

I just found out how to solve the first of two issues with the Mambo module for displaying the gallery sidebar :)

In Mambo, you can define when to display a certain module. This is done by linking the module to a link defined in the menu using the admin pages.

Issue 1:
In the case that you enabled the module only for the gallery it would be shown correctly when a visitor clicks on the main link to the gallery in the menu. Any subsequent link in the gallery itself would cause it to dissappear.

Mambo apparently needs an extra variable named Itemid to keep track of when a module should be shown or not. This variable should be added to the gallery's embeduri. I don't know how to dynamically fetch the correct value for this variable so I just added it manually in the admin.

The correct value can be seen in the URL when you click on the link in the menu (in my case this would be &Itemid=56 ). Look it up for your site and just add it to the embedUri (in my case I end up with index.php?option=com_gallery2&Itemid=56)

Issue 2:
When you defined that the module should be shown on other content items (like news, links, homepage, etc). When the site is loaded the very first time, the module is shown correctly. However, any subsequent link you click causes the module to be shown with errors (missing CSS, random image, etc).

Using httpwatch (great tool BTW), I noticed that the relative path is not correct anymore. Ex: first time the link to the random image is http://[domain]/gallery/etc... subsequent link it changes to http://[domain]/mambo/gallery/etc...

I really don't have a clue why and how this is changed.

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Fri, 2005-02-11 03:35

fixed one minor issue with the embedded forum that had been bugging me. In my implementation anyway, I was having problems with the nested tables being more narrow than the rest of the available space. To fix it, I simply went to

< mambo_root >/gallery/themes/mambo_dark/styles/theme.css

and added the last line to the css entry shown here:

#gsAlbumContents, #gsAdminContents, #gsOtherContents {
    border-top: 1px solid #000000;
    border-left: 1px solid #000000;
    background-color: #333;
    width: 100%;
}

and voila, the problem goes away... :D Hope this helps...

 
edoumenc

Joined: 2005-02-12
Posts: 1
Posted: Sat, 2005-02-12 20:42

hi, i installed "com_gallery2" and "Mod_g2_sidebar" but i have an error.
In user interface i have this error message :
"isDone is not defined, something very bad must have happened."

And in administrator interface this error message :
Warning: file_get_contents(/home/doumenc/www/mambo/modules//mod_galleryside.xml): failed to open stream: No such file or directory in /home/doumenc/www/mambo/includes/domit/xml_domit_lite_parser.php on line 1031

Can you help me ??
:D

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Sat, 2005-02-12 21:56

drbob:

I'm working on a customization to your integration that forces full-sized images to pop-up in a new window without the mambo toolbars, etc. This is as simple as telling mambo to use index2.php instead of index.php, so I've made a number of changes to the scripts you provided to allow for a detachUri parameter (as of now, the admin scripts capture and display the param and I added a row to the mos_gallery2 table for it, so that part is working...). I'm well on my way to making this thing work, with one exception. I can't figure out how to tell gallery2.php to use the detachUri instead of the embedUri and was hoping you could provide some insight...

As of now, I've updated gallery2.php as follows:

if ( the linky thing somehow tells you its detached ) {
        print '<table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="contentpane">' . "\n<tr><td>\n";
                require_once(MOS_GALLERY2_PARAMS_PATH . 'embed.php');
                   $ret = GalleryEmbed::init(array(
                   'detachUri' => MOS_GALLERY2_PARAMS_DETACHURI,
                   'relativeG2Path' => MOS_GALLERY2_PARAMS_RELATIVEG2PATH,
                   'loginRedirect' => MOS_GALLERY2_PARAMS_LOGINREDIRECT,
                   'activeUserId' => '0'));
    }
else {
        print '<table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="contentpane">' . "\n<tr><td>\n";
                require_once(MOS_GALLERY2_PARAMS_PATH . 'embed.php');
                   $ret = GalleryEmbed::init(array(
                   'embedUri' => MOS_GALLERY2_PARAMS_EMBEDURI,
                   'relativeG2Path' => MOS_GALLERY2_PARAMS_RELATIVEG2PATH,
                   'loginRedirect' => MOS_GALLERY2_PARAMS_LOGINREDIRECT,
                   'activeUserId' => '0'));
    }

Obviously, there's duplication of the code earlier in the script that retrieves the param, etc. So tell me, Dr. Bob, how do I go about telling the script that it should execute the first block of code and not the latter?

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Sat, 2005-02-12 23:36

in going through this, I think I've determined that the best to call the correct block of code is to set a session variable. so I'm working towards that...

this got me to thinking that it might be possible to do some kind of mambo session token grabbing for current user ID whose name could be found in the mambo user table (SELECT `id` FROM `mos_users` WHERE `username` = whatever;) and then mapping that username over to the g2 user store to permit SSO from mambo into g2. Obviously, it's not perfect and doesn't address the issue of having to create two user accounts, but it might be something...

 
chua85

Joined: 2005-02-03
Posts: 7
Posted: Wed, 2005-02-16 15:42

"isDone is not defined, something very bad must have happened."

My admin component is working fine tho.

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Wed, 2005-02-16 19:13

strange...

Before testing the embedding, please make sure you installed Gallery G2 correctly and verify it's working in the stand-alone setting.

If that is the case, the only reason I see for that error would be that the absolute path is not correct (or maybe access rights) .

I'm sorry but I cannot provide more help than this :-(

 
drumicube

Joined: 2005-01-07
Posts: 32
Posted: Thu, 2005-02-17 01:04

Hi DrBob, i'm the guy involves in the php-nuke module.
I have also noticed many feedback for my mod related to the chua85 problem.
I have installed a poll on my website, and it results than half of the people are lost ! I think the real problem don't come from the code itself but mostly from a lack of information for the users.

That's why i would like to improve my mod by adding control tests to check params entered by the end user, and also more information on how it works.

Why not sharing this together, our job are quite similar no ?

cheers.

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Thu, 2005-02-17 06:29

Drumicube, I would be more than willing to join forces so we can tackle these issues but again I must confess that I'm not that great in writing php code. Simply put, don't ask me to code something from scratch, I only can adapt existing code (that's why I'm still hoping to find somebody with php & Mambo experience)

Regarding the above error. I think it is mainly caused by a wrong absolute path. Is there a way to dynamically search for the path where G2 is installed (maybe by checking G2's DB or something) ?

Regards.

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Thu, 2005-02-17 08:33

I tried to start with the user integration for Mambo and found the following:

When visiting a mambo site, a cookie is created with the following variables:

  • mosvisitor
  • sessioncookie
  • gallerysid (added as soon as you visit the embedded gallery)

Using some procedures from Mambo, retrieving the current userID/username should not be that difficult. Any hints on how to proceed are welcome :-)

In my embedding component, as a test, I hardcoded the activeUserID to '5' (that's the admin ID of gallery) but now I receive the below error :

Error (ERROR_MISSING_OBJECT) : 5 GalleryUser
in w:\www\gallery\modules\core\classes\helpers\GalleryEntityHelper_simple.class at line 137 (gallerystatus::error) 
in w:\www\gallery\modules\core\classes\GalleryCoreApi.class at line 2157 (galleryentityhelper_simple::loadentitybyexternalid) 
in w:\www\gallery\embed.php at line 155 (gallerycoreapi::loadentitybyexternalid) 
in w:\www\gallery\embed.php at line 72 (galleryembed::checkactiveuser) 
in W:\www\Mambo451\components\com_gallery2\gallery2.php at line 69 (galleryembed::init) 
in W:\www\Mambo451\index.php at line 180

What is happening here ?

Also, I enabled the login for the embedded gallery. I can use this to login as the admin. The first page is displayed correctly (so with all the admin options) but as soon as I click on an admin link (add items), I receive a permission denied error. It seems that, somewhere along the way, my login info is lost.

Regards,
DrBob[/]

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-17 10:02

Note the difference between externalId and entityId.
externalId is the id of a user in the external application, in this case mambo.
entityId is the id of a user in G2.

Before you can use user ids in your integration, you have to map mambo to G2 user ids. At the moment, you have to use

require_once(xarModGetVar('gallery2','g2.includepath') . '/modules/core/classes/ExternalIdMap.c
lass');
    $ret = ExternalIdMap::addMapEntry(array('externalId' => $externalId, 'entityType' => $entityTyp
e, 'entityId' => $entityId));

But in 1,2 days you can use GalleryEmbed::addExternalMapEntry(,,).

Once you have mapped the gallery admin (entityId = 5) to a corresponding user in mambo (i.e. externalId = mambo user id of admin = 3 (?)), you can use it in GalleryEmbed::init('activeUserId' = $mamboUserId, ...);

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Thu, 2005-02-17 13:02

valiant, thanks for the quick anwser.

As a test, I just manually inserted the mapping in the DB.
Still using the hardcoded activeuserID, I see that I'm recognized as the gallery Admin but only the first time it loads. Again, when clicking any link like edit or add, I receive a permission denied message.

This leads me to think that somewhere on the way, some data is lost (session/cookie ??).

Error (ERROR_PERMISSION_DENIED) : 
in w:\www\gallery\modules\core\classes\helpers\GalleryUserHelper_medium.class at line 207 (gallerystatus::error) 
in w:\www\gallery\modules\core\classes\GalleryCoreApi.class at line 440 (galleryuserhelper_medium::assertsiteadministrator) 
in w:\www\gallery\modules\core\SiteAdmin.inc at line 46 (gallerycoreapi::assertuserissiteadministrator) 
in w:\www\gallery\modules\core\classes\GalleryView.class at line 246 (siteadminview::loadtemplate) 
in w:\www\gallery\main.php at line 257 (siteadminview::doloadtemplate) 
in w:\www\gallery\main.php at line 46
in w:\www\gallery\embed.php at line 126
in W:\www\Mambo451\modules\mod_galleryside.php at line 66 (galleryembed::handlerequest) 
in W:\www\Mambo451\includes\frontend.html.php at line 191
in W:\www\Mambo451\includes\frontend.php at line 135 (modules_html::module2) 
in W:\www\Mambo451\templates\symbiosys_v2\index.php at line 43
in W:\www\Mambo451\index.php at line 202
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-17 13:10

I have no clue how mambo works. could you give some information:
where is G2, mambo installed?
what's the relative url?
what are the urls generated in embedded G2?

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Thu, 2005-02-17 13:38

Mambo has been installed in the [site root]/mambo451 folder
Gallery has been installed in the [site root]/gallery folder

The relative URL I'm using is "../gallery"
The EmbedURI is "index.php?option=com_gallery2&Itemid=41"
The full path is "w:\www\gallery\"

This is an example of the link with this issue:
http://localhost/mambo451/index.php?option=com_gallery2&Itemid=41&g2_view=core:ItemAdmin&g2_subView=core:ItemEdit&g2_itemId=6&g2_return=http%3A%2F%2Flocalhost%2Fmambo451%2Findex.php%3Foption%3Dcom_gallery2%26Itemid%3D41&g2_returnName=album&g2_navId=

Below is the code I'm using for the embedding

require_once(MOS_GALLERY2_PARAMS_PATH . 'embed.php'); 
      	   $ret = GalleryEmbed::init(array( 
           'embedUri' => MOS_GALLERY2_PARAMS_EMBEDURI, 
           'relativeG2Path' => MOS_GALLERY2_PARAMS_RELATIVEG2PATH, 
           'loginRedirect' => MOS_GALLERY2_PARAMS_LOGINREDIRECT, 
           'activeUserId' => '62')); 
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-17 14:02

Seems to be ok. Do you use a second G2 component where the activeUserId is also set? I guess so.
Now you set the activeUserId = 62 in the G2 main block.
But the error occurs when mod_galleryside.php tries to fetch the sidebar. Either don't specify the activeUserId, or specify a correct id.

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Thu, 2005-02-17 14:08

valiant, Indeed... stupid me.. I totally forgot about the module that displays the sidebar. I also hardcoded it there and now the admin part works correctly :-)

So.. what should I do next then ?
drumicube, any chance that you could send me your latest code ?

Kind regards,
DrBob

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Thu, 2005-02-17 14:29

This is great. I've been waiting for this.

Is there a nOOb tutorial on how to install this?

I currently have Gallery2 installed as stand alone and it's working just fine.

Is it possible to leave that the way it is and just install Mambo over it (to sorta-speak) and have it point to my current gallery install or does this require that I do a fresh install of both Mambo and Gallery?

I'd love to have a nOOb tut.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-17 14:32

KAC, it's too early to install it. You'd have to download the newest mod files again and again. I'd wait a week or two. But you could help by finding a mambo developer who likes the idea if G2 in mambo and would help with a few things.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-17 15:49

DrBob,
you can now use these functions to create mappings of existing users (see embed.php):
- $ret = GalleryEmbed::addExternalIdMapEntry($externalId, $entityId, $entityType)
- list($ret, $map) = GalleryEmbed::getExternalIdMap($key)

I'll document the steps to synchronize the userbase of G2 and mambo...

 
gsbe
gsbe's picture

Joined: 2004-01-27
Posts: 33
Posted: Fri, 2005-02-18 08:04

This looks like great fun! Thanks for working on this. Does this mean that G2 doesn't have plans to support Mambo natively as with 1.4.x?

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Fri, 2005-02-18 08:43

Valiant, thanks for the info.

I've been thinking on what I should do next for the user integration. Basically the following should be done:

	If "person x" visits the embedded gallery then
		If "person x" has a Mambo_UID then
			if Mambo_UID has a ExternalMapEntry then
				User exists already so set activeUserId = Mambo_UID
			Else
				user does not yet exist
				Get mambo user details & create user in g2 userDB
				Create 	ExternalMapEntry
				set activeUserId = Mambo_UID
			End if

		Else
			set activeUserId = "0"
		End if
	End If

One issue remaining is how to map the correct mambo-user to the gallery admin user.
In the above user creation, we should avoid mapping any user to the gallery admin user. (how do we do that?)

I think it best that this mapping is done in the back-end by the administrator. Simply show a list of all mambo users and select the one you want to map to the gallery admin user manually.

Issues & questions :

  • How do I check if a mapping already exists for a mambo-user?
  • When I use GalleryEmbed::createUser(), do I still have to create the mapping myself?
  • How to handle updates & deletion of users in mambo (help needed from mambo developer)?
  • Wouldn't it be better to hook g2 into Mambo's users functions (create, update, delete) (help needed from mambo developer)?

I again made a post on a mambo forum asking for help in this. I really hope somebody shows up :-)

Kind regards,
DrBob[/]

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-02-18 09:28
DrBob wrote:
I've been thinking on what I should do next for the user integration. Basically the following should be done:
...

Your code would check all these things on every request of a G2 page. But we have to keep performance in mind. And you don't have to check if a user is already mapped on each request (well, you will have to if mambo doesn't allow hooks into the create user function).
As I describe a few paragraphs below, I'd map the existing users all at once in the beginning and map new users right at the moment when they are created (hook into create user function). Then you can assume that all users of mambo exist in G2. Hence, you only have to get the user id of the current user in mambo and use it as activeUserId in the G2 request.

DrBob wrote:
One issue remaining is how to map the correct mambo-user to the gallery admin user.
In the above user creation, we should avoid mapping any user to the gallery admin user. (how do we do that?)

I think it best that this mapping is done in the back-end by the administrator. Simply show a list of all mambo users and select the one you want to map to the gallery admin user manually.

that could be done. I'd do it a little different (as I did it in xaraya). When installing the module, the existing G2 and existing mambo users have to be mapped. (map admin to admin, anonymous to anonymous, ...). There will be some mambo users that don't exist in G2. You'll have to create them in G2. And there may be some users in G2 that don't exist in mambo, create them in mambo and create a mapping.
You'll have to know how to identify the anonymous user in mambo to map it to the G2 anonymous user. In G2, the anonymous user ID is a constant, you can get it via a query.
The same applies for the admin. There may be multiple admins in mambo, right? I guess you can identify the admin by querying for all users in the admin group (same can be done in G2).
And I'd map the existing users based on usernames.

DrBob wrote:
How do I check if a mapping already exists for a mambo-user?

Query the ExternalIdMap for the mambo user id (= externalId).
If it's not in the map, check if a user exists in G2 with the same username
If so, you can either map these two users or create a new user with the same name in G2, probably a bad idea.

DrBob wrote:
When I use GalleryEmbed::createUser(), do I still have to create the mapping myself?

No, GalleryEmbed::create/update/deleteUser manage the externalId map.

DrBob wrote:
How to handle updates & deletion of users in mambo (help needed from mambo developer)?
Wouldn't it be better to hook g2 into Mambo's users functions (create, update, delete) (help needed from mambo developer)?

Exactly. This is the right approach. If mambo allows something like "hook into create, update, delete user functions" then do it. If that is not possible, we will have to find other ways (difficult for update and delete, but quite easy for create).

 
Caymill

Joined: 2004-11-09
Posts: 4
Posted: Fri, 2005-02-18 14:02

Only a short hello to say: nice work!

We are running a G1x on an xhtml/css validating Mambo 4.51b site, well not the Gallery part though. We have a lot of pictures and videos already online (~2800 files and 118 albums), and there will be more. We would be very interested to work with G2. My personal main interest would be to integrate the multi-language operations, a basic xhtml/css validation and the naturally the native database support. We have also a mirror install available of our site, where we can experiment with these things.

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Tue, 2005-02-22 15:42

Good news :-)

A few days I was contacted by Mr_Jinx, one of the developers of Docman for Mambo. He will take a further look into the integration of G2 into Mambo. According to him there are no direct hooks in Mambo for the user creation/update/delete but through a certain way, it should be possible.

So a big thanks to Mr_Jinx :-)

Kind regards,
DrBob

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-02-22 15:58

perhaps special mambots? who knows... but these are definitely very good news!

 
QuintenU

Joined: 2005-02-23
Posts: 6
Posted: Wed, 2005-02-23 13:30

Just a quick message to say that I've successfully embedded G2 (CVS version) into Mambo 4.5.2 using the com_gallery2 component. Not sure what the embedUri should be though. User integration does not work (but reading the above, that was expected ;)). Excellent work DrBob!

 
mx3

Joined: 2005-02-23
Posts: 6
Posted: Wed, 2005-02-23 14:55

hi,

i realise you're very busy and this kind of request is a annoying but can you help me understand this error please?

Fatal error: Undefined class name 'galleryembed' in ../public_html/directory/components/com_gallery2/gallery2.php on line 65

g2 standalone functions perfectly, just having problems embedding mambo 4.5.2

many thanks for the work you've done so far ...this will be a powerful engine

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-02-23 15:30

seems like embed.php wasn't included -> path to g2 is wrong.

 
mx3

Joined: 2005-02-23
Posts: 6
Posted: Thu, 2005-02-24 07:42

thanks valient i am completely stuck ...i have tried absolutely everything i can think of but just can not embed g2 into mambo, keep getting the same error as previous post

full path to g2 http://subdomain.somewhere.com/G2/
Relative path to Galleryg2 G2/
embedUri index.php?option=com_gallery2

where 'G2' is the installation dir for g2, first child of subdomain (root dir for mambo) ie.'home/user/public_html/subdomain'

linux/apache
mambo 4.5.2.1 (patched)
g2 2.0-alpha-4 (standard release)

if anyone could help i'd appreciate it

 
mx3

Joined: 2005-02-23
Posts: 6
Posted: Thu, 2005-02-24 08:00

delete please

 
gsbe
gsbe's picture

Joined: 2004-01-27
Posts: 33
Posted: Thu, 2005-02-24 08:16

Not to be a pain, but I am still wondering: Does this mean that G2 doesn't have plans to support Mambo natively as with 1.4.x?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-24 09:32

gsbe, yes and no. Integrations are a little different in G2 than in G1. G2 doesn't have any integration built-in, but it has an interface and an API which should be generic enough to work with all kinds of other applications (custom websites, CMS, forums, ...).

Then there are people like me or DrBob and lots of others who write a specific integration for a specific application. For CMS as mambo or xaraya, these integrations are mostly "modules" as mambo is modular.

So, once DrBob is finished with the mambo integration, you can download his integration code and G2, and it is as if G2 had a built-in mambo integration.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-24 09:48

mx3, i'm quite sure your G2 version is too old (g2 alpha 4). please check if it works with the current nightly snapshot (you get these up to date version from downloads -> jesse mullans nightly snapshots page -> current.gallery2.tar.gz).

 
mx3

Joined: 2005-02-23
Posts: 6
Posted: Thu, 2005-02-24 09:52

success! ...

G2 alpha 4 vs 17
mambo 4.5.2.1 (patched)

embeds ...doesn't look pretty but embeds!

 
mx3

Joined: 2005-02-23
Posts: 6
Posted: Fri, 2005-02-25 10:42

Check G2 standalone (SA) up to date and functioning.
Check Mambo installation up to date and functioning.
Download and install com_gallery2.zip as a component in mambo admin.
Create menu for G2

com_gallery2.zip config:
1. Full Path to Gallery G2: /lib/user/public_html/webfolder/gallery2/
2. Relative path to Gallery G2: gallery2/
3. embedUri: index.php?option=com_gallery2&Itemid=28
4. Login page redirect: index.php

NB:
1. this is the full server path, not an http URL!
2. relative to your mambo install ie. if 'gallery2' folder is placed in
mambo dir the relative path is 'gallery2/' (without quotes)
3. note the 'item id' number from your menu in mambo admin (or from
your client window) and add to the example string.
4. self explanatory

If you encounter problems with G2 login or 'permission denied' remove cookies, try setting firefox/client to session only ...clear cache etc
If possible untar all files on the server, FTP can cause problems

This post is for users like me for which this is new ground!

 
Rejay

Joined: 2005-02-01
Posts: 7
Posted: Fri, 2005-02-25 16:30

Hi Guys,
i'm in develop for a website with Mambo. We need a Gallery and like to include Gallery2 in Mambo.
Thanks for the good work until now. Our PHP-develops like to integrate also the user-management of gallery2 into mambo.
I can post their work here, if they are successful.

cu,
Rejay

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-02-25 17:01

Rejay, good news indeed. G2 is successfully integrated in the xaraya and the postnuke CMS, including user and auth/session management, i.e. the general problems are solved, probably your devs could adapt some code from there. But everything that is special to mambo has to be developed. Good luck!

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Mon, 2005-02-28 19:50

how close are we to finishing up the final integration points? Also, where does one go to download the latest iteration of the development you guys are doing? I'm essentially running DrBob's second rev of the integration with some small hacks that I've added here and there specifically for my site... I got distracted from stuff that I was doing in terms of user integration and full page pop-ups, so I haven't made any progress there myself. Thanks for all the work, guys... looks like it's going in the right direction :)

 
funky

Joined: 2005-02-28
Posts: 1
Posted: Mon, 2005-02-28 22:07
edoumenc wrote:
hi, i installed "com_gallery2" and "Mod_g2_sidebar" but i have an error.
In user interface i have this error message :
"isDone is not defined, something very bad must have happened."

And in administrator interface this error message :
Warning: file_get_contents(/home/doumenc/www/mambo/modules//mod_galleryside.xml): failed to open stream: No such file or directory in /home/doumenc/www/mambo/includes/domit/xml_domit_lite_parser.php on line 1031

Can you help me ??
:D

Hi
I have exactly the same problem and tried to solve it for several hours. I cannot find a solution and I think there's nothing wrong with a path or a setting because everything works fine. Also a friend of mine has the same problem with a similar installation.
Could you please try to help again? What can I do to solve it?
Thanks

 
mx3

Joined: 2005-02-23
Posts: 6
Posted: Wed, 2005-03-02 17:13

hi funky,

check your paths again carefully, if both installations are functioning the fault probably lies with the path config ...see previous forum page for an example
good luck!

 
falgon

Joined: 2005-03-02
Posts: 1
Posted: Wed, 2005-03-02 17:46
funky wrote:
edoumenc wrote:
hi, i installed "com_gallery2" and "Mod_g2_sidebar" but i have an error.
In user interface i have this error message :
"isDone is not defined, something very bad must have happened."

And in administrator interface this error message :
Warning: file_get_contents(/home/doumenc/www/mambo/modules//mod_galleryside.xml): failed to open stream: No such file or directory in /home/doumenc/www/mambo/includes/domit/xml_domit_lite_parser.php on line 1031

Can you help me ??
:D

Hi
I have exactly the same problem and tried to solve it for several hours. I cannot find a solution and I think there's nothing wrong with a path or a setting because everything works fine. Also a friend of mine has the same problem with a similar installation.
Could you please try to help again? What can I do to solve it?
Thanks

I am experiencing the same problem and am positive that gallery component paths are correct (I have double and triple checked these).

My Mambo install is located in /var/www/localhost/htdocs/tristenlopez.com and gallery2 is installed in /var/www/localhost/htdocs/tristenlopez.com/gallery2 and I have located the gallery content folder at /var/www/localhost/htdocs/tristenlopez.com/images/stories/albums .