JoomG2 Module for Gallery2 (v2.3.0 and above)
This module allows users to organize their photos and other multimedia files in Gallery2 while managing other content using the Jooma! CMS application.
The difference from existing efforts is that the module runs within the Gallery2 Framework instead of an iframe.
As a result, a single set of normal Gallery2 URLs is maintained which removes the usual setup of having a separate gallery address from the embedded address. Users can now maintain search engine rankings and can provide direct links to gallery pages.
Please read the Gallery2 Codex for relevant documentation.
******** UPDATE: Version 1.0.6 ********
03/05/2012
Change Log:
- Fix: Added Windows OS aware installation checks to enable use on Windows servers - Thanks to Broer van Smeden (http://web-oplosser.nl) for supplying a patch
- Fix: Updated path to Joomla 2.5 Version file for installation checks - Thanks to Broer van Smeden (http://web-oplosser.nl) for supplying a patch
******** UPDATE: Version 1.0.5 ********
26/01/2012
Change Log:
- Enhancement: Adds Joomla! 2.5 support
- Amendment: The specified path to Gallery 2 entered in the Joomla! g2Auth module may now include the base filename (index.php or main.php)
- Amendment: The specified path to Gallery 2 entered as the Joomla! External URL item may now include the base filename (index.php or main.php)
******** UPDATE: Version 1.0.4 ********
12/11/2011
Change Log:
- Fix: Some relative paths to Joomla! were not rebased to the Gallery2 folder location resulting in broken links
******** UPDATE: Version 1.0.3 ********
23/10/2011
Change Log:
- Fix: Error in Id mapping to HTML refine class
******** UPDATE: Version 1.0.2 ********
07/10/2011
Change Log:
- Enhancement: Auto completes user logout when triggered from G2. Previously only redirected to Joomla! logout page
- Amendment: Displays version ID in configuration screen
- Amendment: External ID map prefix added at a single location
- Amendment: User object collision processing
- Fix: Fatal error when the com_joomg2 admin link is clicked in Joomal!
- Fix: Did not recognise G2 login password. Only Joomla! password worked
- Fix: HTML syntax error in plug link for Joomla 1.6+
- Fix: External Map ID table was not cleared on uninstallation
******** UPDATE: Version 1.0.1 ********
04/10/2011
Change Log:
- Amendment: Displays version ID in configuration screen
- Fix: Unable to detect Joomla! 1.6+ during module installation
******** UPDATE: Version 1.0.0 ********
31/08/2011
Change Log:
- Enhancement: Adds Joomla! 1.6 support
- Enhancement: Adds Joomla! 1.7 support
- Amendment: Adds unique ID to external mapping
- Amendment: Manually pushes component content into Joomla! document buffer for v1.6+
- Fix: HTML syntax error in plug link
- Fix: Uses inbuilt G2 function to retrieve "$_GET" inputs for improved security
******** UPDATE: Version 0.9.2 ********
11/08/2011
Change Log:
- Amendment: Modular internal structure for files and corresponding code.
- Amendment: Drops auto JQuery conflict resolution.
Notes:
1) Structural changes to files and code to enable maintaining compatibility with new release cycle adopted by Joomla! Team.
******** UPDATE: Version 0.9.1 ********
24/06/2011
Change Log:
- Enhancement: Adds user integration
- Enhancement: Adds Joomla! Community Builder plugin support
- Enhancement: Adds Gallery2 URL Rewrite Module support
- Amendment: Checks for presence of Gallery2 Authentication Plugin in Joomla! before activating user integration.
- Amendment: Removes "Gallery::BeforeProcess" event
- Amendment: Adjusts "Gallery::BeforeOutput" event implementation
- Fix: HTML postprocessing was stuck on "Rationalised"
- Fix: PHP fatal error if Joomla! 1.6 was selected
- Fix: Flawed Error handling in module.inc
Notes:
1) Updated to "Stable" Status
2) Joomla! 1.6 support is inactive
3) Important installation information added to codex
******** UPDATE: Version 0.9.0 ********
23/06/2011
Change Log:
- Enhancement: Self contained HTML postprocessing
- Enhancement: Installation steps indication
- Amendment: Refactored to address dependency issues with Refine Module
- Amendment: Site Administration pages displayed in normal G2 environment to permit emergency access by site administrator
- Amendment: Event triggers now included as separate files for ease of use
- Fix: Event trigger changed to address user session conflict issues
- Fix: Lazy regex did not cover required HTML page permutations
Notes:
1) Updated to "Release Candidate" Status
2) Joomla! 1.6 support is inactive
3) User integration is Inactive
******** UPDATE: Version 0.8.2 (Beta) ********
15/06/2011
Change Log:
- Fix: Potential conflict with upcoming G2Drupal Module. Both now cannot be activated at the same time.
- Fix: Improperly defined variable scope prevented data transfer to Refine module.
Notes:
1) Joomla! 1.6 support is inactive
2) User integration is Inactive
******** INITIAL RELEASE: Version 0.8.1 (Beta) ********
28/05/2011
Change Log:
- Initial Release
Notes:
1) Joomla! 1.6 support is inactive.
2) User integration is Inactive.
--
dakanji.com
Posts: 6550
Finally, a true embed for joomla.
Good job.
I was getting weary of the jFusion-iframe support questions ;)
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 40
This is a great idea ... I have been waiting to have a true G2 integration with Joomla.
When I put the "JoomG2" module into /modules, and then tried to click on "plugins" in Site Admin, I received a blank page. I attempted a re-install of G2 (test site) ... with the JoomG2 module intact. Once the installation got to "install plugins", I received an error regarding "expecting encap string ')' ..." in module.inc at line 87. When I remove the module, the plugins page is functioning again.
Line 87 appears to be the section on the G2Drupal module?
Please advise.
Allan
Posts: 1395
Thanks for the feedback.
Required actions to fix v0.8.3:
1. Find all instances of
$ret'and replace with$retin module.inc (2 Instances)2. Find all instances of
'0.8.3'and replace with'0.8.3a'in module.inc (1 Instance)This will update the module to v0.8.3a which I'll upload later.
--
dakanji.com
Posts: 40
The version I downloaded from your site was 0.8.2 ...
In this, there were 3 instances of $ret' and one instance of 0.8.2.
Also - when configuring the module in G2, it asks for the full server path to the Joomla folder. In the Codex, it says that we will need the Item ID of the Joomla external menu item, though there is no place to use this.
Allan
Posts: 1395
I see.
Check back after 1800 GMT today for resolutions.
--
dakanji.com
Posts: 1395
Some other issues have cropped up and I need to go back to the first version (unreleased 0.8.0) and work my way up the changes.
It might take a few days.
--
dakanji.com
Posts: 1395
I found what looks like a bug in G2 ... The "orderweight" parameter in the registerFactoryImplementation command does not seem to have any effect.
Both the Refine and JoomG2 modules listen for the "Before:Display" event and no matter what the "orderweight" parameter setting is, the Refine module always fires before the JoomG2 module which effectively disables the JoomG2 modlule.
The upshot is to:
1. Investigate, confirm and fix this issue which would need input from the core dev team (highly unlikely)
2. Refactor both modules to remove interdependencies (doable)
I'll work on Option 2 and should have the revised versions up by 1200 GMT tomorrow.
***EDIT***
Thinking about it, there is no way such a bug can be in G2 so I just have to get some sleep and look at things afresh later.
--
dakanji.com
Posts: 1395
Thanks to the feedback, I have been able/motivated to push this forward.
The event "issue" was not a G2 bug as I thought on reflection. Nevertheless, I went ahead with removing the interdependencies for other reasons. Also, only one of the JoomG2, RefineHTML and upcoming G2Drupal modules can be activated at a time.
In addition, I have been able to overcome the main stumbling block to implementing user integration in the process.
Basically, the BeforeDisplay event used by the module was introduced in G2.3.0 but has some shortcomings in its implementation with regards to the use it was being put to for this module.
1. It is fired too early in the process flow. Specifically, it is fired before the G2 session is created which wrecks havoc with attempts at user integration (which = managing sessions). The result was a host of authentication errors.
2. It does not provide a feedback into the process flow. In effect, trying to manipulate html using this event meant short-circuiting the process flow, hence JoomG2 bypassing the caching system and relying on RefineHTML to reinstate it.
Both issues have now been addressed by the introduction of a new event (BeforeOutput) which has to be manually added to main.php. With this, fired after the G2 session has been created, full user integratiom can be done and since the output is fed back into the normal flow, there is no need for another module to complete the process for caching.
I chose not to amend/move the existing event hook so as not to affect other 3rd party tools that may be operating within its current parameters.
The hack to introduce the new event is benign and will not change other operations. It simply hooks into the process if the module is active.
I am now testing some scenarios before uploading v0.9.0 for which the "beta" tag will be dropped. This will not have user integration implemented as this will follow after.
--
dakanji.com
Posts: 397
Woot! I have been fussing with JFusion all weekend. <insert lots of sighing> Then I found this bridge.
Am working through it now. One question if I may... will this allow any user logged into their Joomla environment to be able to 'jump' to their home album in G2? That is the one problem I had after working through Jfusion. While the user credentials were passed down to G2, when a user went from Joomla to G2, they had to be dropped into one directory only instead of taking advantage of being able to go to they 'home' directory.
Will bang through this as someone said, "Finally, a true Joomla/G2 bridge". Very cool...
Posts: 6550
W/ the User Album module you can have users jump to their own album when they visit gallery.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 397
You must have been reading my mind. I was *just* about to leave a post indicating how far I had progressed (very), and where I am slogging a bit.
Yes sir, I did find that a new Joomla user not only can have their album autocreated on accessing it for the first time (cool), but can jump to the album when accessed (very cool).
Here are a couple of issues I had run in to so far if I may...
When a new user is created, their album is created, and they click to go to their album, all is excellent so far. However, I don't have any menu choices to Add Album, Add Items, simple things like that. I have been tweaking settings to see if I can get past this, but so far no go. Question is, shouldn't an album owner have at least a minimum of permissions to do things like Add Album, Add Items, Edit Album, Edit Photo, etc? Or, how does one get these permissions to show up?
Second question is, I logged in as administrator to see if there was anything I could do at the top level album to tweak permissions, etc. Except as admin I cannot see any other albums. I am just dropped into the admin's root level album. I cannot go up to the main root of G2 and see any other albums as admin. This is a bit of a sticky wicket as administrators should be able to administer into other albums, but so far I can't see others that have been created. I have tried a myriad of combinations to see if I can 'see' everything as admin, but all I can do is work on the admin's album (and admin has all of the Add Items, Add Albums, Edit Album, etc... functions, unlike a registered user in Joomla). Hopefully it is something I have set up incorrectly. Oh, I also cannot log out of Joomla, then try to log directly into G2 as admin as it reverts me to the entire login space for Joomla/G2. I can't log in to G2 separately which of course is no big deal if the admin can see everything and do admin stuff. I can see Site Admin. I just cannot see the tree of albums that as admin I should be able to see regardless of permissions.
When leads to a third question. Is it possible to be able for other registered users who then have their G2 root level albums created for them... possible for all user albums to be seen via any user (unless the user changes permissions to prevent this). In other words, if the user Everybody has permission to see all permitted albums, publicly viewable albums, is this possible in this bridge? Am trying to figure out how non registered aka Joe Q Public users can see albums that are created and administrated by the individual.
This is an looooooooong awaited function I will say that. Something I know I and some others can really get behind and donate to. The initial installation was flawless thanks to the very well written and clear install text. Kudos to Dayo for doing something that is the exception rather than the rule in these kinds of things, creating clear Install notes. Well done. Am very glad I came across this after crawling through the mud with another bridge component that kinda worked, but not really...
Thank you for your response suprsidr....
Posts: 6550
Personally I don't have gallery auto-create a user's album on mysite. They don't always join for the album, and I end up w/ a ton of albums to delete.
Gallery displays a link to "Your Album" all the time. When the user first clicks the link gallery creates the album - much better.
I've also expanded the user albums module to auto create sub albums and some default content based on a template album.
As for permissions, there are some options in gallery admin -> user albums but also I believe they inherit some permissions from the parent album.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 397
Zow, that was fast (understatement)....
Brilliant. You have just given me the idea of how to get to an album instead of automatically take the user there. Nice.
And yes, agree that allowing albums to be created auto is a mess. I've worked out a mechanism via Community Builder to minimize that, so I'm ok there (he says... now watch as my logic is flawed as I get run over by a truck). But understand what you are saying.
Am still stumped tho on how to allow the administrator to 'see' everything from the top level down. That is not happening, and also for the registered user to see the core functions like Add Items, Add Albums, etc. I am unable to get the admin to the parent root album to even see the permissions. Seems to me that a user/owner of an album would be able to see the basic menu choices by default. Am working my through it because this is a most excellent find today. Kid in candy store after a loooong time looking at G2 and Joomla as if they are 50,000,000 miles apart. This is cool stuff...
Posts: 397
Suprsidr, you have a cool site. Tooled around a bit. Learned about your products and services. This may come into play. Very good to learn.
One very simple that is just plain eluding me is to just get to be able to see the top level galleries, with breadcrumbs, and be able to navigate. I do not have this showing up at all. And then to get the permissions so that album owners can administrate their own albums, and so on. I know I am missing something that is probably in front of me...
You have a cool site.
Posts: 6550
You may have mucked things up a bit.
I'd uninstall the user albums module and start over.
Admin should have free roam.
Make sure Gallery is functioning correctly in the first place.
Make sure all albums are visible to everyone, and then re-install user albums module and choose which parent album to have gallery create the user albums in.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 397
Great minds? Or more accurately... yes, I may have mucked things up. Admin should have free roam, yes. I did install G2 for the umpteenth time this weekend, getting really quick about it and as your post popped into email was thinking, maybe too quick.
I am doing exactly as you say. Uninstalling and reinstalling. And making sure it all plays nice before bolting it into Dayo's bridge.
I appreciate these very fast responses. Note that after having perused your site, I suspect we will be chatting some things up with your Site Services. They are in line with something we are working on here. I have to get a core build first to demonstrate the model blah blah blah... but two things got on my radar this afternoon. Dayo's bridge and your site and services.
Anywayz, back to crawling through some mud. But after a few days of fussing with other ways of getting this done, this afternoon and eve, not the least of which has been your participation, has given some light at the end of the tunnel.
I will come back and report progress. I appreciate your responses....
And one other thing I have found today. Cookies being very persnickity. A lot of clearing caches and cookies to get things to play nice...
Posts: 4
Dear Dayo!
I tried to download and install your Bridge for the newest versions of Gallery2 (2.3.1) and Joomla (1.7.1), but when I installed the modules in Gallery2 I found out, that the version of the bridge I got from your site is 0.9.2 and not 1.0.0 and so there is no support for Joomla 1.7.
Posts: 1395
Fixed
--
dakanji.com
Posts: 4
Thanks for the fast fix!
I gave it another try and installing the Joomla stuff should work (looks like it does). But when I configure joomg2 in Gallery2 I cannot choose Joomla 1.7 for the Joomla Version (there is only Joomla 1.5 to choose).
Posts: 1395
I see. I just changed the link using my phone. I'll have a look later.
--
dakanji.com
Posts: 1395
I just checked and if you did indeed download the linked v1.0.0 version, you should definitely get the option to select Joomla 1.7.
--
dakanji.com
Posts: 4
I can only choose Version 1.5, because all other option tags are commented (<!-- <option ... -->). I have to admit that I cannot see why that's so.
Posts: 1395
The tags are commented in the v0.9.2 release because the relevant code does not work.
I am not sure what the issue is exactly.
To recap.
1. You pointed out that when you used the download link, you got v0.9.2
2. I fixed the download link to point to v1.0.0
Have you actually downloaded v1.0.0?
--
dakanji.com
Posts: 4
I downloaded and re-uploaded to my server version 1.0.0. Before uploading the new version I uninstalled and deleted all v0.9.2 files.
What changed with the new version is that now in Joomla the textbox for the path of Gallery2 is present in the configuration page of the authentication plugin (which was missing when installing v0.9.2). But when I try to configure the JoomG2 Module in Gallery2 there is still only Joomla V1.5 to choose (see HTML below).
<table class="gbDataTable">
<tbody><tr>
<td>
<big><b>Step 1 of 5</b></big>
</td>
<td>
</td>
</tr>
<tr>
<td>
Joomla! Version:
</td>
<td>
<select id="g2_form[joomVersion]" name="g2_form[joomVersion]">
<!--<option value="1.8" >Version 1.8</option>-->
<!--<option value="1.7" >Version 1.7</option>-->
<!--<option value="1.6" >Version 1.6</option>-->
<option value="1.5">Version 1.5</option>
</select>
</td>
</tr>
</tbody></table>
Posts: 1395
That output is not from v1.0.0. Also, the authentication plugin has always needed the path to Gallery2.
In any case, you probably need to clear your browser cache.
--
dakanji.com
Posts: 2
Hi Dayo, I am stuck at step 2.
the error message states that "Valid Joomla! 1.7 installation not found in entered path." yet the path should be correct. The path I tried is the same one shown in configuration.php $log (without the /log of course)...
Hope you can help.
Cheers,
Fabian
Posts: 1395
Update the G2 module with the attached files (after removing the "_.txt") and post the error message you get.
I had used the "Valid installation not found" message in too many places to be able to figure out what the issue might be.
***EDIT***
Attachments removed
--
dakanji.com
Posts: 2
thanks for the quick response. awesome and great effort!
the good news are: the error message is gone.
unfortunately, I still cannot proceed to step 3. ;)
First I enter the path to the server (it is autocompleted and links to the same directory the domain points to, thus it should be correct, right?)
When I press next, the browser (I have tried firefox, opera and ie) clears the field with the directory information.
Any idea?
thanks in advance?
Posts: 1395
I am not so sure that is good news since all the replacements were supposed to do was produce more specific error messages.
Try uninstalling and starting the G2 module installation from scratch with the replacements in place.
--
dakanji.com
Posts: 2
Greetings, Dayo.
First of all, thanks for connector.
But I have some troubles when installing it.
There is clean install of Gallery2 (2.3.1).
Joomla 1.5.24, JoomG2 Bridge 1.0.3
When I'm trying to configure plugin for Gallery2 on step 2 it says:
Full server path to Joomla! folder:
I've tried different methods, works only "..\" and ".\"
It says:
As soon as I can't put Joomla there...
Any suggestions?
Posts: 1395
I'm sorry but I don't understand your query.
Did you enter the full server path to Joomla ... or are you trying to use a relative path ... or are you trying to inform me that only a relative path works?
--
dakanji.com
Posts: 2
Work fine.
Seems like under Win platform address should be like in unix, W/O drive letter.
instead of
I'm sorry.
Posts: 1395
Glad you managed to figure it out as I wouldn't have been able to offer any suggestions for a Windows server.
--
dakanji.com
Posts: 2
Hi everybody! I'm having a problem when configuring the plugin for gallery on step 2. I enter the full path to my joomla site but it gives me a 500 internal server error. The logs give me this error
Maybe because I'm using Jfusion? It seems improbable to me..
Can you help me?
I have a Joomla 2.5.3 site and Gallery is version 2.3.1
ps your work seems very promising! Just what I was looking for!
Posts: 1395
Why would you be running JFusion and this module at the same time?
The module was specifically written to be used in place of JFusion.
--
dakanji.com
Posts: 2
Because I need to test its potential. I cannot remove Jfusion only to find out that I cannot run joomg2.
What could be the problem?? Joomla 2.5???
Posts: 1395
You should create separate test environments to test things you are unsure of.
--
dakanji.com
Posts: 1
I don't have Jfusion, but i have the same problem to configurate the plugin.
I have Joomla 2.5 installed, but i can't found "Full server path to Joomla! folder: " in step 2 of 5 .
May, please, help me?
Thanks
Posts: 1395
Hello,
You need to be precise when reporting problems to save people running off in the wrong direction.
When you say you "have the same problem", are you saying you actually get the same "PHP Fatal error: Cannot redeclare class JVersion etc etc etc" message that mrkappa has?
--
dakanji.com