Support > cpg1.5 plugins

Joomla 2x-3x to CPG Tunnel

(1/18) > >>

ron4mac:
This package contains a plugin for CPG and one for Joomla.  Installing and configuring the plugins will create a "tunnel" whereby registered Joomla! users can link to CPG and automatically be logged in to CPG (with automatic account creation).  Joomla! and CPG must be in the same domain.

Note: This method DOES NOT provide visual integration.

Comments, suggestions, requests, complaints ... all welcome.

README.txt

--- Code: ---Joomla! to Coppermine Photo Gallery Tunnel
version: 1.2

The two zipped files in this package are plugins for Joomla! and CPG.
The CPG plugin is named generically because it may be used to tunnel additional web apps in the future.

For CPG:
--------
Install the plugin, cpg1.5.x_plugin_tunnel2cpg_v1.2.zip
Configure its 'secret phrase', usergroup settings and optional theme name.

For Joomla!:
------------
Install the plugin, plg_system_cpgtunnel_v1.2.zip
Enable the plugin and configure its 'secret phrase' (phrase same as CPG) and usergroup settings

Establish any links in Joomla! that will point to CPG as:  <CPG URL>/index.php?file=tunnel2cpg/joomla
Use the same link when setting up access to CPG using a Joomla! menu item 'wrapper'.


NOTES:
------
Joomla! users will have to logout and back in before a tunnel will be established.
Subsequently, when users logout from Joomla!, they will also be logged out of CPG.

Once users have accessed the CPG instance via Joomla!, they will also be able to go directly to the
CPG instance (<CPG URL>) and login with their same Joomla! username and password.

A sample CPG theme is provided that is designed for use when accessing CPG via a Joomla! menu item wrapper.

--- End code ---

v1.1.1 Bug fix (!important!)
   Changed encoding method to correct rare issue with cookie data pattern causing site access problems
   (bad upload corrected)
   
v1.2 Maintenance/Update
   Added code to logout user from CPG when they have logged out from Joomla!.
   

phill104:
Excellent work as usual.

I assume you have seen the mehdi bridge that does similar? With a few hacks it works with Joomla 2.5 but I have not tested it with J3.x yet.

ron4mac:

--- Quote from: Phill Luckhurst on June 01, 2013, 09:50:29 pm ---I assume you have seen the mehdi bridge that does similar?

--- End quote ---

Have not seen the mehdi bridge.  The whole bridge thing seemed a little cumbersome, so I thought I'd try a tunnel. :D

Αndré:
Can you please explain what exactly your tunnel does? If you bridge Coppermine to another application, the user management and authentication is completely dropped by Coppermine. How exactly works your tunnel? Does one application use the other's user database and authentication cookies or will it be cloned in some way?

ron4mac:

--- Quote from: Αndré on June 03, 2013, 01:33:31 pm ---Can you please explain what exactly your tunnel does? If you bridge Coppermine to another application, the user management and authentication is completely dropped by Coppermine. How exactly works your tunnel? Does one application use the other's user database and authentication cookies or will it be cloned in some way?

--- End quote ---

When a Joomla! user logs in and is in the allowed group(s), the Joomla! system plugin grabs the the user's info, including actual password, and creates an encrypted cookie with these data that has a persistence to match how they logged in.  Then, when linking to CPG using the tunnel URL, the tunnel plugin sees the tunnel cookie and decrypts it.  If the user does not exist in CPG, the plugin creates the user in the CPG specified group, otherwise it simply logs-in the user.  In either case, the plugin then redirects to the main CPG entry point. When the Joomla! user logs out, the tunnel cookie is deleted.

I have done the same thing with myBB for a family site of mine.  In the case of myBB (and many other apps, I would presume), without hacking the app, the actual password is not available.  In that case, I take the first 10 characters of their password hash to use as a password at CPG.  This, of course, means that the user cannot login directly at CPG, but I have yet to see that as a problem.

Thanks for your interest.  Have I been clear enough?

Navigation

[0] Message Index

[#] Next page

Go to full version