Mambo and G2 embedding
leeman
Joined: 2005-03-19
Posts: 22 |
![]() |
I guess my problem is that you have to be logged on to Mambo to be able to see the Gallery link ... And when I try to log on to the gallery thru the module I get a userID error ... I'm not a coder .. |
|
miopa
Joined: 2005-03-28
Posts: 3 |
![]() |
Hi all I have embeded G2 with mambo as explained in previous posts, and it works fine to the point when gallery is not the first item in the mambo mainmenu and the sidebar module is not displayed with other menu items except gallery. The main reason for not working properly in the mentioned cases is error in the paths. For example: If the url of the page is the url of the image in the random image block in the sidebar module is and shold be what happens is that the good relative path is added to the existing relative path, instead of replacing it in. I'm not sure if this is issue with the mambo component or G2 embed engine. It would be helpfull if someone gives me some leads about this so i could investigate further. |
|
scroogie
Joined: 2005-02-21
Posts: 9 |
![]() |
Quote:
what happens is that the good relative path is added to the existing relative path, instead of replacing it in. Thats a gallery2 embedded issue. G2 constructs the wrong path because it just strips the integration path you set in the options. Because the current url is not the integration path, it fails. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
- G2 is in beta, so there won't be a next alpha, but a next beta. |
|
miopa
Joined: 2005-03-28
Posts: 3 |
![]() |
Thanks scroogie, you're right. Adding $_SERVER['REQUEST_URI'] = "/"; in the beggining of the modules/mod_galleryside.php does the trick. Quote:
- how would you correct this issue? what does G2 wrong? IMO it's wrong input in the GalleryEmbed::init call, how should G2 not create wrong urls if it is configured incorrectly? Well, scroogie already wrote, and i've tested it also, it works ok only when embedUri is substring of $_SERVER['REQUEST_URI'] (or $_SERVER['REQUEST_URI'] is the root of the site). It appears easy to correct, just ignore $_SERVER['REQUEST_URI'] when creating url strings. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
i'm planning to do something like that, but until now, this is an integral part of how G2 urls are generated. stay tuned. |
|
miopa
Joined: 2005-03-28
Posts: 3 |
![]() |
There is another (unrelated) issue i discovered. I'm using macedonian localization in mambo (with utf-8 charset), and when the gallery component is loaded the date displayed in mambo is in english. I added Mecedonian in modules/core/classes/GalleryTranslator.class and set it as default in the galery admin menu, and now it's displayed in macedonian but with ISO-8859-5 instead of utf-8. I've tried to specify the correct locale in the GalleryTranslator.class, but failed. It should be "mk_MK.utf-8". Looks like this is a general problem with G2 localization. Still, i think that G2 should not mess with the site locale when called thru Embed functions. Workaround for this issue is to set the correct locale again at the end of the components/com_gallery2/gallery2.php file in DrBob's component. |
|
jrandom
Joined: 2004-12-05
Posts: 58 |
![]() |
I've tried to embed the G2 beta 1 in Mambo 4.5.2.1, but I can't see any pictures. Setup is: Config for component: Module is published on the first position on the right, no title. I tried everything suggested in the forums, nothing worked. Also tried all possible combinations for paths (and some impossible ones as well). What am I doing wrong? If you can help me (and others) by posting some sort of Howto in the forums, it would be greatly appreciated. |
|
jrandom
Joined: 2004-12-05
Posts: 58 |
![]() |
For the record, I also tried to append the &Itemid=2 (in my case) to the embedURi string. As a matter of fact, I copy/pasted the links from my site and some links from DrBob's site (where G2 works just fine), and there seems to be no difference, except that mine doesn't show any images. For the random image: For a thumbnail: Any ideas? |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
miopa, and all who are interested. I have changed how urls are created in embedded G2. There is no longer a dependency of the generated urls on the REQUEST_URI (the url with which you accessed embedded G2). See GalleryEmbed::init. There's a new parameter 'embedPath'. Take a look at the last post of the Embedding & Integration topic. I would really like to encourage one of you guys to update the mambo integration code such that i can commit it to the gallery cvs repository. |
|
ShadowX
Joined: 2005-04-04
Posts: 7 |
![]() |
I've updated the mambo component and module to reflect that change - and I made a "transparent" matrix theme that looks good when gallery is embedded in mambo. They worked with the nightly from 31 march. Test before using on production sites etc etc Here they are: |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
ShadowX, kudos! Can we see a demo and can I add the code to the cvs? |
|
ShadowX
Joined: 2005-04-04
Posts: 7 |
![]() |
Personal discovery, which might be interesting to the rest of the class: I had Mambo configured on a subdomain (mambo.mysite.com) and gallery on another (gallery.mysite.com), and I just couldn't get them to work together. Naturally, I had two folders (mambo and gallery) in my public_html folder, and I configured each on its own subdomain. WRONG. Mambo just didn't want to access gallery (which, in hindsight, doesn't seem to be that out of the ordinary, considering that it tried to form URLs like "mambo.mysite.com/gallery/..." which obviously do not exist. Solution: configured the mambo. subdomain to redirect to www .mysite.com/mambo, and configured Mambo (manually edited the configuration.php) main page as www .mysite.com/mambo. Worked like a charm. Hope that helps. [edit] I'm not giving the address of my site here because it's not finished yet. Only the software is in place, and I have a load of pictures to upload. When I'll have at least a few shots in the gallery, I'll post the link here so you can have a look. |
|
ShadowX
Joined: 2005-04-04
Posts: 7 |
![]() |
Ok... darn |
|
ShadowX
Joined: 2005-04-04
Posts: 7 |
![]() |
Like I said, there's nothing there, just the software. I have some 6GB of pics to process before creating the gallery proper. I've temporarily added 4 pics so that you can see the embedding at work. I'm using the latest mambo (4.5.2.1) and a recent G2 nightly (I think the one from 2nd or 3rd of april). I remember now having to upgrade, because the march 31st nightly didn't have the embedPath yet. Valiant, if you're happy with the way it works, you can commit it to CVS. Unfortunately I don't have time to develop it further, but maybe someone else can take over the user integration. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
excellent work ShadowX. i'll commit it to cvs, so that everyone can download it from http://galleryupdates.jpmullan.com#integrations (or directly from cvs). |
|
aravot
![]()
Joined: 2005-03-05
Posts: 61 |
![]() |
Nice work ShadowX, one comment, one question. Question: Is this the revised version of DrBob's work or completely different Comment: Version number for the build(s) would be nice. |
|
ShadowX
Joined: 2005-04-04
Posts: 7 |
![]() |
Aravot, this is indeed the revised version of DrBob's work, and all credit goes to him and whoever else made this happen. I just added the code for embedPath. Let me repeat: if someone has time and knowledge enough to continue this integration, (s)he's welcome to it, because I have neither. I hacked this just to make it work on my site, and I published it here so that others can profit from my two hours' work |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
I tried testing these out. I get errors when I try to install the module and component into Mambo. The original module and component at the beginning of this thread installs/uninstalls fine but these give me this error when I try to install them: Upload component failed: I think they may have been packed wrong. The download had folder com_gallery2/gallery2/<files> I changed it to com_gallery2/<files> and it installed OK. :-? |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
OK, after making the changes I mentioned above, it's working. It looks MUCH better now. It fits real nice now. It kind of acts weird though. SOmetimes when I click on an album it works fine. Sometimes I get: Quote:
Forbidden I then have to close my browser, wait a few seconds and open it up again and it works. Strange. |
|
steinmb01
![]()
Joined: 2005-04-07
Posts: 31 |
![]() |
I also have problem installing the module and component: |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
Yeah, just repack it like I did. Basically, all I did was extract the files to my HD. Then movied the files up one level, deleting the "gallery2" folder" and it installed fine. Do the same for the module. |
|
steinmb01
![]()
Joined: 2005-04-07
Posts: 31 |
![]() |
mmmm did that, and still prob. It is looking like this now: com_gallery2.zip Same error messages. Strange.... -- |
|
steinmb01
![]()
Joined: 2005-04-07
Posts: 31 |
![]() |
Replay to my self I had also to remove both the module and the gallery2 folder on the sidebar module package.... Now it installed scuessfully, but is not listed in the list of installed modules ????? |
|
ShadowX
Joined: 2005-04-04
Posts: 7 |
![]() |
Funny... I didn't get any errors at all. Maybe upgrading will solve your issues - I use 4.5.2 and a G2 nightly (3 or 4th of April, version 0.9.6). Of course I tested this before publishing it here, wouldn't anyone? By the way, I've put together a small demo site, with a howto describing what I've done, and the pitfalls I barely escaped from. I'll keep it there for a while - I don't have my contents up and running anyway. You can find it at www.loridani.net . Hope it helps. If you find any bugs, please let me know as well (or post them here). [update] I just checked the sister thread on the mambo forums: http://forum.mamboserver.com/showthread.php?t=22917&page=2&highlight=gallery+integration . It's been made sticky and it's the first thread on the Custom Development forum (title is "Gallery Menalto team is looking for Mambo developers to help"). Hopefully we'll get someone to help us with the user authentication as well. [update 2, to keep this small] Stein, don't remove the "modules" dir from the modules component. That's why the modules are not displayed. [update 3 final, for KAC] I checked in the mambo installation, and indeed the com_gallery2 folder doesn't have a gallery2 subfolder. On the other hand, the zip file from which I installed said component does have one. Most strange, this. In other words, me don't get it. I looked at DrBob's original zipfiles, and they also have the gallery2 subfolder in there (you may also check, they're on the first page of this thread). If you could install from a com_gallery2.zip that contains the gallery2 folder and then check with a file manager the \components\com_gallery2 and \administrator\components\com_gallery2 folders, that might shed some light on the issue. Here's the code from the gallery2.xml: <administration> <menu link="option=com_gallery">Gallery2</menu> <files> <filename>admin.gallery2.php</filename> <filename>admin.gallery2.html.php</filename> <filename>toolbar.gallery2.php</filename> </files> <images> <filename>images/logo-228x67.png</filename> </images> </administration> I compared it with a few other components, and it looks just fine to me. |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
ShadowX, I totally understand what you're saying. I saw the same thing. DrBob's original component zip DID have the gallery2 folder. I tried it at least 4 times though. His installed and uninstalled fine, yours didn't until I removed the gallery2 folder........?....and it appears steinmb01 found the same thing. I'm running 4.5.2 Mambo with the 4-4-05 G2 Snapshot. Your first "[update]" is pretty exciting. I hope we get some people on this cuz G2 is great and the combination would be super. BTW, I didn't repack the module, just the component. I simply installed DrBob's module and overwrote the individual files via FTP. It worked. Also, feel free to take a peak at my family site: http://www.seemypics.net |
|
ShadowX
Joined: 2005-04-04
Posts: 7 |
![]() |
Hmm... maybe it's because I edited and then packed it under Windows? I continue to not get it. |
|
steinmb01
![]()
Joined: 2005-04-07
Posts: 31 |
![]() |
I upgraded Mambo from 4.5.1 to 4.5.2 but it did not do the trick. It now installed, but it does not view the images and so on: G2 i running OK if I load it like this: Loading the main page, it looks like this: -- |
|
randycarver
![]()
Joined: 2005-04-08
Posts: 1 |
![]() |
Thanks for your work DrBob, Shadowx and Valiant! The mod_g2_sidebar.zip has a mod_mostrated.xml that should be named mod_galleryside.xml. This also needs to be changed in CVS. In DrBob's Mod_g2_sidebar.zip there is a mod_mostrated.zip as well as a mod_mostrated.php and mod_mostrated.xml. Is mod_mostrated part of the gallery release or is that what DrBob used for his template? I don't think its needed! I also had problems installing the component until I repacked it from the com_gallery2 directory. Attached is the sidebar module I used and here's what I did to create it: BTW if you want to reinstall the sidebar, make sure you delete the php and xml files as well as the database row in mos_modules. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
i don't know mambo at all, i'm just the maintainer of the gallery2 integrations cvs. could someone verify that the changes of randycarver are an improvement? (no offence, if it works for 1 person, it's not sure it works for all) |
|
jimmy_boi
Joined: 2005-04-05
Posts: 50 |
![]() |
DrBob wrote:
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). hi thx for the info...but i'm still having some problems to embed my gallery to mambo..can someone help me out? mambo (v4.5.2) and gallery (v1.4.4 p6) is already installed and working fine alone..but now i want to embed my gallery to mambo... i read ur thread...i downloaded those 2 zipped files and extracted it...then i copied the all files from the "gallery2" folder to my ftp account /public_html/gallery/contrib/mambo/. then i logged in to mambo as a super administrator...chose "Components-->install/uninstall-->inserted the path (/public_html/gallery/contrib/mambo/gallery2.xml) -->Upload File & Install" but then i get this message.. **** Upload component - Upload Failed ****Upload component - Failed what am i doing wrong? need help..thank you jimmy |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
I need a little help! Everything seemed to be working OK. I have Gallery2 embedded into Mambo with It set up so that you can not see the G2 sidebar module or the link to the gallery without being logged in. One user pointed out to me that she could not "view" the comments she added under a picture. So what I did was log in as the admin to G2 to edit the permissions of the root album so "Everybody" can "view comments". After doing that, I got that 404 Forbidden error. I explained earlier in this thread: Quote:
Forbidden I then closed the browser, reopened it, went back to the site homepage. I then tried to log in but could not. I type in my info and it doesn't do anything. Therefore, I can't access the site admin area. I deleted all the GALLERSID related cookies hoping that was it but that did not help. I had to disable the G2 sidebar so that site would still work after logging in without going straight to the Gallery login page. It sounds like something got corrupt. Any ideas? I have lots of e-mails asking what happened to my site.......??????? Help! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
KAC, I hope someone who's familiar with Mambo and this integration can help you. As you see, there's noone really supporting the mambo integration. |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
valiant, I don't think it's a problem with the embedding or with Mambo, I think it's a problem with the Gallery. The reason is, I have uninstalled the Gallery2 module and component for Mambo then I updated my Gallery install to the latest snapshot build and ran the "Upgrade" process successfully. At the end of the upgrade process it says "go to you gallery" (or something like that. I click on it and at this point I'm expecting Gallery to work in standalone mode. Am I wrong? I have the gallery installed in a subfolder as follows: When I enter that address in my browser, it automatically redirects me to: Now I'm at the gallery log in screen but it won't let me log in. I type my login name and password and nothing happens. At this point, I just want G2 running standalone and I'll worry about the embedding stuff later. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
- clear all your GALLERYSID cookies of the domain. |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
OK, that was it. That was probably my problem the whole time. I deleted the GALLERYSID files by searching for GALLERYSID using X1 Search on my PC. After looking at the cookies in Firefox, I found there were some more that X1 did not list. Well I'm back in business now. Thanks for taking the time to read this valiant! Now to set up the embedding again. :D |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
yes i mean clearing the cookies on your pc. |
|
decomike
Joined: 2004-11-25
Posts: 13 |
![]() |
I think i overlook something, i can't get it work :evil: Mambo 4.5.2 and gallery 2 beta 2, all working fine but not when i use mambo to call gallery, then i see only i white screen. Gallery is installed in: Mambo is installed in: Component settings: (use several different settings) Where do I go wrong???? |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
decomike, I see two things that look wrong to me. Try this: 1) You have: Relative path to G2: /gallery_2 The "." period(s) before "/gallery_2" should be there. 2) You have: Path to mambo: /www Nothing after the "/" Give that a go! |
|
decomike
Joined: 2004-11-25
Posts: 13 |
![]() |
Thanks for the input KAC! I try these option with no luck. Still got the same problem. Gr. Mike. |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
Ok, try the things I listed above with: embedUri: index.php?option=com_gallery2 Take out the "&Itemd=69" |
|
[kings]Egg
Joined: 2005-04-18
Posts: 9 |
![]() |
Hi all, First off, thanks to all those who developed the mambo integration for G2. It worked fine for me, but I needed pass-through user authentication - so I've spent the last day or so implementing this. The scheme I've used is for the Mambo component to silently create a new G2 user whenever a registered Mambo user uses the component. I've also added an option that allows users to auto-create themselves an album in the root album with the same name as their username. This is mainly for my own website but thought it might be useful to others, so you can enable it from the Mambo admin interface if you like. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
[kings]Egg, I'm a G2 dev and responsible for the integrations, i.e. I try to help people like you integrating G2 in other applications. 1. You don't use the GalleryEmbed API, (see embed.php in Gallery). It should simplify a lot. i.e. you create a G2 user manually . see my porposed solution: It would be great if you could also use the same pattern or tell me if you have a better solution. |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
[kings]Egg, Good stuff. Thank god for people like you. Would this module automatically log you into Gallery once you log into Mambo or does it just create the user name and password in Gallery? |
|
decomike
Joined: 2004-11-25
Posts: 13 |
![]() |
KAC, still nothing. Still got nothing, nada, noppes, niets. |
|
[kings]Egg
Joined: 2005-04-18
Posts: 9 |
![]() |
KAC: Cheers, and yes, it automatically logs you in if you're logged in in mambo. |
|
[kings]Egg
Joined: 2005-04-18
Posts: 9 |
![]() |
Right then. |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
YOU DA MAN [kings]Egg! I'll toast to you tonight. :D |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
[kings]Egg, great! [kings]Egg, i have just thought about my small code snippet. acutally, the second GalleryEmbe::init request could just be a GalleryEmbed::checkActiveUser request. it's a little faster... not that important though, because not that more fast. see http://gallery.menalto.com/index.php?name=PNphpBB2&file=posting |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
[kings]Egg, I installed your component. First off, I had to repack it in order for it to install succesfully. I repacked it just like I did for the one ShadowX posted ealier in this thread. Then it installed just fine. Secondly, it works great for ne users I create in Mambo. When I try to login to Mambo with my admin password and go to Gallery2, I get this error: Quote:
Error (GALLERY_SUCCESS) |
|