forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: ron4mac on June 01, 2013, 02:01:29 pm

Title: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on June 01, 2013, 02:01:29 pm
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: [Select]
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.

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!.
   
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: Phill Luckhurst on June 01, 2013, 09:50:29 pm
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.
Title: Re: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on June 01, 2013, 10:27:29 pm
I assume you have seen the mehdi bridge that does similar?

Have not seen the mehdi bridge.  The whole bridge thing seemed a little cumbersome, so I thought I'd try a tunnel. :D
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: Α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?
Title: Re: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on June 03, 2013, 02:19:36 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?

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?
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: trehahn on June 22, 2013, 01:24:29 am
Hello, I have been searching for a way to link Joomla 2.5 to Coppermine for awhile, and came across this.  I installed the plugin on both sites, entered the secret phrase but it isn't working.  I get the following error:

Failed to authenticate via tunnel (sentinal not detected)

I have tried changing settings and nothing.  I also did a search for that error, and found nothing that would help me.  Any idea why it's not working?  Thank you for your time, I look forward to your reply.

Tim
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: trehahn on June 22, 2013, 01:38:59 am
I continued to mess with settings on both sides, and was able to get it to work only if you're logged in.  I can now access it from my admin account on Joomla, and my registered account, however when I use the Public link I still get the error.  Is this normal?  Is there a way for the public to view the files?
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on June 22, 2013, 01:40:12 am
I installed the plugin on both sites, entered the secret phrase but it isn't working.  I get the following error:

Failed to authenticate via tunnel (sentinal not detected)

Hi Tim.

Two things to make sure of:  1) make sure the Joomla plugin is enabled, and 2) that you logout of Joomla and then log back in.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on June 22, 2013, 01:45:50 am
I continued to mess with settings on both sides, and was able to get it to work only if you're logged in.  I can now access it from my admin account on Joomla, and my registered account, however when I use the Public link I still get the error.  Is this normal?  Is there a way for the public to view the files?

The tunnel is designed for registered users on Joomla to enter CPG (as CPG registered users) without having to log in.  For public users, you need to just have a normal link to your CPG instance from Joomla (and have files there viewable by the public).
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: trehahn on June 22, 2013, 03:04:26 am
I thought about the extra link for Joomla, but the problem with that is the registered users will then see 2 links, one that'll use the tunnel one that will not.    I thought of that already, but having the 2 links will be confusing for registered users.  I was hoping there was something I missed.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on June 22, 2013, 03:41:48 am
I thought about the extra link for Joomla, but the problem with that is the registered users will then see 2 links, one that'll use the tunnel one that will not.    I thought of that already, but having the 2 links will be confusing for registered users.  I was hoping there was something I missed.
When public users link to CPG via the tunnel, they have exactly the same capabilities they would have had they linked from a normal link.  The only difference is that authentication message.  If you want to soften that message you could make changes to two files:

./plugins/tunnel2cpg/joomla.php
Code: [Select]
change 8th line:
cpgRedirectPage . . . . . [$joomlaTunnel_result], 0, 'warning');
to:
cpgRedirectPage . . . . . [$joomlaTunnel_result], 0, 'info');

./plugins/tunnel2cpg/lang/english.php
Code: [Select]
near the bottom of the file:
$lang_plugin_tunnel2cpg['nosentinal'] = ' (sentinal not detected)';
to:
$lang_plugin_tunnel2cpg['nosentinal'] = ' <whatever you would like it to say>';

I'm not sure how you're providing the link in Joomla, but there are ways to present things that will be one way for registered users and another way for public users ... but that's a thread for a Joomla! forum  :-X
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: trehahn on June 22, 2013, 08:12:27 am
Thank you again!  Coppermine is such a great program, with the ability to do all files I haven't found any other that will do sound, video, pictures etc and is compatible with Joomla yet.  This is the only work around I've found! I may look into other Joomla options for the public/registered menu as well.  Thanks again.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ildaniel on October 03, 2013, 11:20:57 pm
Hi,
i have the smae problem : Failed to authenticate via tunnel (sentinal not detected)
to terhahn : your tunnel work? what are your settings in joomla and coppermine?
in addition to the secret phrase about what you have done?
thanks


Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on October 04, 2013, 01:39:27 am
Hi,
i have the smae problem : Failed to authenticate via tunnel (sentinal not detected)
to terhahn : your tunnel work? what are your settings in joomla and coppermine?
in addition to the secret phrase about what you have done?
thanks

These requirements must be met:  The Joomla! and CPG locations must be in the same domain, both plugins must be enabled, you must be using the same web browser for access to both and you must have just logged in to Joomla! (logging out first if necessary).  And, of course, you must be linking to CPG as described in the original post above.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ildaniel on October 26, 2013, 04:19:55 pm
nothing. joomla and cpg in the same domain, but in different directories and in different databse. both plugins activated, the same passphrase, log out and log in, but the tunnel does not work.
I do not understand why .... I have very few options, where can I go wrong?
cookies? the user must first be registered individually in cpg for later access through the tunnel? the user must register after the installation of the tunnel?
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on October 26, 2013, 06:34:29 pm
@ildaniel
Can you PM me with your Joomla! site url?  And will I be able to register? (or can you create an account for me)
I'll see what I might be able to discover without having to go behind the scenes.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ildaniel on October 27, 2013, 01:57:27 am

I can not send personal messages
the address is www.ilcubo.net
registration is permitted
thanks for asking
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ildaniel on October 27, 2013, 10:04:14 am
activated
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on October 29, 2013, 06:07:28 pm
activated
When logging in to your site, the tunnel plugin should be creating a cookie ("joomla_2_cpg").  That is not happening.  The only reasons that I can think of for why that is not happening is:  1) the plugin is not enabled,  2) the registered user group is not one of the groups configured in the tunnel plugin or 3) some sort of error is occurring.

Pease check your error logs for any associated error, insure that the Joomla plugin is enabled and your registered user group is configured in the plugin as an allowed group.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ildaniel on October 29, 2013, 10:07:06 pm
ok, thanks for your time
the plugin is activated, the selected group ok (I also tried to create another group for it)
from the error log I see this:

PHP Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /web/htdocs/www.ilcubo.net/home/gallerie/include/inspekt.php on line 124, referer: http://www.ilcubo.net/J3/
PHP Strict Standards: Non-static method Inspekt::makeServerCage() should not be called statically, assuming $this from incompatible context in /web/htdocs/www.ilcubo.net/home/gallerie/include/inspekt/supercage.php on line 134, referer: http://www.ilcubo.net/J3/

coppermine path should be "www.ilcubo.net/gallerie" but I see the string "ilcubo.net/home/gallerie..." maybe it's the problem here?

on the coppermine forum I read something like that in other cases, perhaps this can be the problem?
you think that I can also post on the forum Italian Joomla to verify the problem, with a link to this topic?

Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on October 29, 2013, 10:27:22 pm
ildaniel,

Without access to your Joomla backend, there isn't anything more I can do to help.  For some reason, the login procedure at your site is not creating the 'cookie' needed for the tunnel to operate.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ildaniel on October 29, 2013, 10:41:47 pm

actually I realize now that the plugin is for joomla 2.5 and not for 3.x, the version that I'm using ......
I'm sorry but I had not read ....
will wait so that you will also test it on 3.x
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on October 29, 2013, 11:01:03 pm
actually I realize now that the plugin is for joomla 2.5 and not for 3.x, the version that I'm using ......
I'm sorry but I had not read ....
will wait so that you will also test it on 3.x
The plugin has been developed and tested successfully with Joomla 3.x.
I have not, however, tested it with Joomla 3.x running under PHP 5.4 (as it seems is the PHP version for your site).
I will test it under those circumstances as soon as possible .. probably by tomorrow (30 Oct).
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on October 30, 2013, 12:43:08 am
ildaniel,

I tested the plugin on Joomla 3.1.5 running under PHP 5.4.19 without any issue. I have no way to help you further unless you are to let me in as an admin. If it is important enough for you to do that, you can email me a temporary login to the back end that you create for me.  Email to: ronnie(curly_at_sign)rjconline(full_stop)net
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on October 30, 2013, 01:33:05 pm
ildaniel,

Thanks for your help in discovering an error with the Joomla! part of this plugin.  Somehow, the version included with the package was an older one that does not work with Joomla! v3.x.  It has been corrected in the original post above.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: bobbritt on December 07, 2013, 04:22:12 pm
Thanks for developing this!

I have a site that is currently using the mehdi bridge solution to link J! 2.5 to CPG1.5.

What wouldhappen if I disable Mehdi and enabled yours?

Will users Galleries still be associate with the correct user?
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on December 07, 2013, 06:56:12 pm
I'm not totally familiar with the internals of the Mehdi bridge.  But, for example, if you login to J! as "user1" with password "pass1", and can DIRECTLY login to your CPG instance (no bridge active) with the same username and password, then this 'tunnel' method should work.

Please be aware that this method does not provide any visual integration (I think the Mehdi bridge may do that).

If you can point me at the Mehdi bridge (and any modifications you're using), I'll look at it to determine whether any conversion process would be needed.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: bobbritt on December 07, 2013, 09:17:28 pm
Thanks for the prompt reply.

Sure I don't mind showing you our setup. I do have the visualization working as well.

As I understand it, with the Mehdi bridge there are no physical users on the CPG side.

Our website is
http://www.modelersalliance.com/
and the gallery is
http://www.modelersalliance.com/gallery

The biggest problem I have with the Mehdi Bridge is of course, no support.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on December 09, 2013, 01:57:28 am
bobbritt,

I have taken a look at the Mehdi bridge code.  The answer to your question is that, no, you would not be able to simply switch to my 'tunnel' solution and have your users be able to access their files.

It is conceivable, however, that it could be possible with some modifications made to my 'tunnel'.  I'm not sure that it would work and I have no way to test it.  And if you were to try it, you would definitely need to do so with a backup of your site.

My recommendation:  If what you have is working for you, keep what you have (regardless of support).
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: bobbritt on December 09, 2013, 02:28:50 am
Thank you Ron, the long term plan was to run it till it broke, I'll be back to see ya when it breaks.  :o

If you're interested in testing it out, I could install a sandbox site. Perhaps after the new year.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on December 10, 2013, 02:39:17 pm
I decided to look into visual integration of CPG into Joomla!.  Finding that doing so without the use of an iframe was a tougher nut than I wanted to try cracking, I settled on enhancing the CPG plugin for use with a Joomla! menu item wrapper (iframe).  Find the result (v1.1) in the original post above.

A sample 'tunneling' theme is included that inhibits unnecessary buttons (login,logout,contact,etc.). With some CSS tweaks (CPG and Joomla!), I think it would be possible to create a pretty visually clean appearance.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: Αndré on December 10, 2013, 04:08:54 pm
IMHO we don't need a separate theme, but let the plugin remove unnecessary buttons and styling.
Title: Re: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on December 10, 2013, 04:26:54 pm
IMHO we don't need a separate theme, but let the plugin remove unnecessary buttons and styling.
Good point, I suppose, André.  But I think I'd rather let the enduser decide what buttons and styling they do or don't want .. and I think that's easiest achieved by use of a custom theme rather than a dozen options in a plugin.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: Phill Luckhurst on December 10, 2013, 04:58:55 pm
There is a problem with a few of the current Joomla frameworks not playing well with the wrapper menu item, something users should be aware of when testing.
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ildaniel on December 30, 2013, 04:28:52 pm
hello,
I just installed the new version and the wrapper is very convenient.
a problem with users:
1) if the user is not already registered in commermine, everything ok
2) if the user is already registered in coppermine, I get:
"Failed to authenticate via tunnel (login rejected)"

Is this normal?
Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ron4mac on December 30, 2013, 04:37:26 pm
hello,
I just installed the new version and the wrapper is very convenient.
a problem with users:
1) if the user is not already registered in commermine, everything ok
2) if the user is already registered in coppermine, I get:
"Failed to authenticate via tunnel (login rejected)"

Is this normal?

If the user is already registered in coppermine, their coppermine password must match their Joomla! password.

Title: Re: Joomla! 2x-3x to CPG Tunnel
Post by: ildaniel on December 30, 2013, 05:00:22 pm
ok perfect,
I'm sorry if you had already written in previous posts or in the readme but my English is pitiful.
I think I'll have to add an alert to warn users about this.
thanks
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: sk8connection on February 03, 2015, 06:00:52 am
Hi, can it be that the cpg part of your zip Filer version 1.1.1 is wrong? Because i can't install (upload) the plugin on cpg! the joomla plugin works.
Even if i upload it via ftp the plugin shows not up in Coppermine.
Thanks for an answer.

Sincerely sk8connection
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on February 03, 2015, 06:18:18 am
Even if i upload it via ftp the plugin shows not up in Coppermine.
Please review the CPG documentation that describes how to install a plugin. There have been no other such issue.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on March 21, 2015, 01:14:00 pm
can it be that the cpg part of your zip Filer version 1.1.1 is wrong?
OMG!!  I CAN'T BELIEVE HOW STUPID I AM SOMETIMES!! :-[

The CPG plugin part was, indeed, just another zipped copy of the Joomla plugin. (how do I do these things :-\)

Please find the corrected download in the original post. My apologies to all who unsuccessfully tried to use this version (1.1.1).
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on May 06, 2015, 11:20:42 am
Hello,

excuse my bad english. The tunnel works fine at login.
What can I do that I automatically logged out from cpg when I logged out Joomla.

Thanks

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on May 06, 2015, 01:58:43 pm
What can I do that I automatically logged out from cpg when I logged out Joomla.
I will look at your request and see what I can do. It may take me several days before I can, though.
Thank you for your feedback.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on May 06, 2015, 03:43:14 pm
Hello,

thanks for your fast response.

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on May 07, 2015, 05:05:18 am
DirkMa,

My goal in creating the 'tunnel' plugin(s) was to create a simple, yet secure way for Joomla users to sync with CPG. One of the side-effects of that simplicity could cause you to still be logged into CPG (only when the CPG site is visited directly from the same machine) even after you have logged out from Joomla.

This is, at best, a kludgy hack and, as such, I'm not yet going to make it a part of the plugin release. But you can try it out to see if it suits your needs. Replace the codebase.php and joomla.php files in the CPG plugin with the ones attached here. Let me know if it works for you and about any problems you may have with it.

[ changes incorporated into version 1.2 (see original post) ]
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on May 08, 2015, 09:54:03 pm
Hello,

it look's good. The only problem what I have is, that when I logged in Joomla and klick first (only the first) the link to the gallery it doesn't logged in the gallery. After I klick second and more the link to the gallery it logged in the gallery. After I logged out Joomla I logged out the gallery too. If I then again logged in Joomla and klick the link to gallery it logged in immediately to the gallery.

Thanks for the help

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on September 25, 2015, 06:15:07 am
Hello,

I have a new problem. After updating Coppermine (1.5.38) und Joomla (3.4.4) the Tunnel don't work.
If the Plugin is active in Joomla, I become a white side (Firefox) or the Information "The request was dismissed because the security token is invalid. Please refresh the page and try again." (IE) if I logged in Joomla.
Can you help me again?

Thanks

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on September 25, 2015, 03:52:48 pm
Quote
Can you help me again?
I'm away until Monday but will look into it early next week.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on September 28, 2015, 03:56:06 am
I have a new problem. After updating Coppermine (1.5.38) und Joomla (3.4.4) the Tunnel don't work.
I'm not able to recreate what you are seeing.  Is there a link where I can possibly see the result that you are having?
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on September 28, 2015, 05:51:45 am
Hallo,

thanks for helping. I send you a Link with password.

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on September 28, 2015, 06:13:13 am
Hello,

after a new activate the plugin in Joomla and Coppermine I become a other mistake.

Fatal error: Call to undefined function mcrypt_module_open() in /var/www/vhosts/xxxxxxx/httpdocs/Home/Joomla/cpg15x/plugins/tunnel2cpg/joomla.php on line 57

I can sent private messages and I don't want to write a password in a Forum :(.

Thanks

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Phill Luckhurst on September 28, 2015, 11:40:08 am
Please do as suggested above and provide a link so we can look into the issue.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on September 30, 2015, 05:44:44 am
Hello,

thank you for helping but I don't write a passwort in a Forum. Then I must live with this Problem.

Thanks

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on September 30, 2015, 08:32:58 am
after a new activate the plugin in Joomla and Coppermine I become a other mistake.
Fatal error: Call to undefined function mcrypt_module_open() in /var/www/vhosts/xxxxxxx/httpdocs/Home/Joomla/cpg15x/plugins/tunnel2cpg/joomla.php on line 57
I can sent private messages and I don't want to write a password in a Forum :(.
If you are getting an error on mcrypt_module_open(), you must have made more changes than just updating Joomla and CPG. You can send me a link to your site by sending it to the username: otheron4mac, which is at the domain: gmail.com.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Phill Luckhurst on September 30, 2015, 06:15:01 pm
Hello,

thank you for helping but I don't write a passwort in a Forum. Then I must live with this Problem.

Thanks

Dirk

It was just a link, no password would have been required. Hopefully you can take up Ron's kind offer and email him directly. Good luck with your site.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on October 01, 2015, 06:22:59 am
Hello,

@ron4mac
Thanks, I have send you the data's.

@all
To see the error you must logged in because you don't see the link for go to the error page.

Thanks

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on October 01, 2015, 09:46:43 pm
As I suspected, the issue is that the mcrypt module is not enabled in your PHP version (5.5.9). Perhaps you changed PHP versions at the same time you were upgrading Joomla and CPG. I thought mcrypt is enabled by default in most PHP distributions, but maybe not.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on October 01, 2015, 10:25:51 pm
Hey,

your support is very good. Thanks.
I don't have change the php after update and it was 5.5.9.
I have to ask my hoster whether he has changed slightly.

Thanks

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on October 02, 2015, 04:52:36 am
I have to ask my hoster whether he has changed slightly.
I noticed that your hoster is running ubuntu 14.  This link (http://php.net/manual/en/mcrypt.setup.php) has some info on setting up mcrypt for PHP.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on October 05, 2015, 10:41:02 am
Hallo,

my hoster have make changes and now I don't get any Errors.
But the Tunnel don't work correctly. When I Login in Joomla I don't Login in Coppermine.
I have the same Problem with  php 5.3.29.

Thanks

Dirk

Your accounts for my side are activ
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on October 05, 2015, 02:15:39 pm
The Joomla plugin needed to be made available for guests/public so that it could function as they are logging in.  It should work for you now.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: DirkMa on October 06, 2015, 06:00:47 am
Hello,

thank you for helping. It's all ok.

Dirk
Title: Re: Joomla 2x-3x to CPG Tunnel + phpBB3
Post by: ron4mac on October 18, 2015, 04:52:38 pm
For those who may be using phpBB (version >=3.1), here is a beta version of the 'tunnel' that will accept a tunnel from phpBB.
See the README.txt file for instructions on installing the CPG plugin and the phpBB extension.

PLEASE NOTE: The tunnel is not compatible with CPG/phpBB3 instances that are already bridged.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on November 29, 2015, 08:35:18 am
Hello ron4mac,

I want to thank you for this great work.
I think there's a lot of joomla users that are pleased to link their site with joomla.
This plugin needs to be integrate in the bridges option of cpg.

I use your tunnel with succes with joomla 3 and cpg 1,5
cpg is showed into the joomla wrapper and visual integration is perfect after some settings.
I use the "simple" theme for cpg

Instalation was easy, everything is clear in the reas me file.
I use the final extract plugin to remove the registration log in functions into cpg.
So everything is fine.

Thanks again.


I have some questions please.

- Is it possible to allow more than one joomla user group to access onto cpg with their joomla account, or do I need to setup all joomla groups as a registered child group ?


- I removed with succes the registration message from cpg for non registered access, the log in message from cpg for registered access, both with the help of the final extract plug in.

Is there a way to remove the log out message from cpg (hide this message) for registered access ?
Because if you log out from cpg page, you don't log out from joomla.
It is a problem for most of users, I think.


- last question, I think cookie life from cpf and joomla are not the same with the tunnel integration.
I discovered that I could be still log in into cpg, and automaticly log out from joomla page.
I assume I need to modify the joomla cookie life to match it with the cpg/tunnel cookie life, I don't take a look for it by now, may be you have some suggestion about that.

thanks.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on November 29, 2015, 01:34:43 pm
Is it possible to allow more than one joomla user group to access onto cpg with their joomla account, or do I need to setup all joomla groups as a registered child group ?
In the Joomla cpgtunnel plugin you should be able to select multiple user groups that will be allowed to 'tunnel' into CPG.

Quote
Is there a way to remove the log out message from cpg (hide this message) for registered access ?
See the bottom of the file, theme.php, in the sample cpg theme that I included with the plugins. Follow the example using $excluded_buttons[].

Quote
last question, I think cookie life from cpf and joomla are not the same with the tunnel integration.
It may help to use the plugins from the beta that includes phpBB3 (2 posts above).  But matching login life is difficult and is likely to not always work. Many hosting sites are now using nginx/varnish or other such variations that cause sessions to end if no access is being made, regardless of any lifetime settings in the app.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on November 29, 2015, 02:50:02 pm
Thank a lot for you answer.

I will try your suggestions and let you know.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on November 29, 2015, 09:43:32 pm
See the bottom of the file, theme.php, in the sample cpg theme that I included with the plugins. Follow the example using $excluded_buttons[].

ok, so I'm not very familiar with PHP code, but I tried:

I looked for the logout button on my theme (simple theme), and found:

Code: [Select]
}
    addbutton($sys_menu_buttons,'{UPL_PIC_LNK}','{UPL_PIC_TITLE}','{UPL_PIC_TGT}','upload_pic',$template_sys_menu_spacer,'','{UPL_PIC_ICO}','standaloneli');
    addbutton($sys_menu_buttons,'{REGISTER_LNK}','{REGISTER_TITLE}','{REGISTER_TGT}','register',$template_sys_menu_spacer,'','{REGISTER_ICO}','standaloneli');
    addbutton($sys_menu_buttons,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','','','{LOGIN_ICO}','standaloneli');
    //addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','','','{LOGOUT_ICO}','standaloneli');
    // Login and Logout don't have a spacer as only one is shown, and either would be the last option.
   
  $sys_menu_buttons = CPGPluginAPI::filter('sys_menu',$sys_menu_buttons);
  $params = array('{BUTTONS}' => assemble_template_buttons($template_sys_menu_button,$sys_menu_buttons));
  $template_sys_menu = template_eval($template_sys_menu,$params);
}


I replaced with:

Code: [Select]
    }
    addbutton($sys_menu_buttons,'{UPL_PIC_LNK}','{UPL_PIC_TITLE}','{UPL_PIC_TGT}','upload_pic',$template_sys_menu_spacer,'','{UPL_PIC_ICO}','standaloneli');
    addbutton($sys_menu_buttons,'{REGISTER_LNK}','{REGISTER_TITLE}','{REGISTER_TGT}','register',$template_sys_menu_spacer,'','{REGISTER_ICO}','standaloneli');
    addbutton($sys_menu_buttons,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','','','{LOGIN_ICO}','standaloneli');
    //addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','','','{LOGOUT_ICO}','standaloneli');
    // Login and Logout don't have a spacer as only one is shown, and either would be the last option.
   
  $excluded_buttons[] = 'logout';
  $sys_menu_buttons = CPGPluginAPI::filter('sys_menu',$sys_menu_buttons);
  $params = array('{BUTTONS}' => assemble_template_buttons($template_sys_menu_button,$sys_menu_buttons));
  $template_sys_menu = template_eval($template_sys_menu,$params);
}



So it works if I log in into the joomla module connexion (and so into the CPG tunnel), but when I log out from the Joomla connexion module, I have a template error:


Code: [Select]
Template error
Failed to find block 'logout' (#<!-- BEGIN logout -->(.*?)<!-- END logout -->#s) in :
<ul class="dropmenu">
         
                        <!-- BEGIN home -->
                        <li>
                            <a href="{HOME_TGT}" title="{HOME_TITLE}" class="firstlevel" ><span class="firstlevel">{HOME_ICO}{HOME_LNK}</span></a>
                            <ul>
                               
                               
                                <!-- BEGIN my_profile -->
                                <li>
                                    <a href="{MY_PROF_TGT}" title="{MY_PROF_TITLE}" ><span>{MY_PROF_ICO}{MY_PROF_LNK}</span></a>
                                </li>
                                <!-- END my_profile -->
                                <!-- BEGIN allow_memberlist -->
                                <li>
                                    <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}" ><span>{MEMBERLIST_ICO}{MEMBERLIST_LNK}</span></a>
                                </li>
                                <!-- END allow_memberlist -->
                            </ul>
                        </li>
                        <!-- END home -->
                        <!-- BEGIN my_gallery -->
                        <li>
                            <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}" class="firstlevel" ><span class="firstlevel">{MY_GAL_ICO}{MY_GAL_LNK}</span></a>
                            <ul>
                                <!-- BEGIN leave_admin_mode -->
                                <li>
                                    <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}" ><span>{USR_MODE_ICO}{USR_MODE_LNK}</span></a>
                                </li>
                                <!-- END leave_admin_mode -->
                                <!-- BEGIN enter_admin_mode -->
                                <li>
                                    <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}" ><span>{ADM_MODE_ICO}{ADM_MODE_LNK}</span></a>
                                </li>
                                <!-- END enter_admin_mode -->
                            </ul>
                        </li>
                        <!-- END my_gallery -->
                        <!-- BEGIN upload_pic -->
                        <li>
                            <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}"  class="firstlevel" ><span class="firstlevel">{UPL_PIC_ICO}{UPL_PIC_LNK}</span></a>
                        </li>
                        <!-- END upload_pic -->
                        <!-- BEGIN register -->
                        <li>
                            <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}"  class="firstlevel" ><span class="firstlevel">{REGISTER_ICO}{REGISTER_LNK}</span></a>
                        </li>
                        <!-- END register -->
                        <!-- BEGIN login -->
                        <li>
                            <a href="{LOGIN_TGT}" title="{LOGIN_TITLE}"  class="firstlevel" ><span class="firstlevel">{LOGIN_ICO}{LOGIN_LNK}</span></a>
                        </li>
                        <!-- END login -->
</ul>


I assume, because of my no knowledge of the code I forget something ... may be you will have an idea.
I attached the theme.php of the simple theme.
If you don't have time to have a look, I will understand, of course.

thanks anyway.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on November 29, 2015, 10:16:06 pm
Sorry I failed to give you enough information. You will have to modify the assemble_template_buttons function in your theme.php file.

At around line 32, change:
Code: [Select]
global $openulid;to:
Code: [Select]
global $openulid, $excluded_buttons;
and at around line 72, change:
Code: [Select]
return $output;to:
Code: [Select]
foreach ($excluded_buttons as $eb) {
   $output .= '<!-- BEGIN '.$eb.' --><!-- END '.$eb.' -->';
}
return $output;
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on November 29, 2015, 11:30:05 pm
Don't be sorry please, you have no obligation to help me, it"s me who is sorry to disturb you about something like that.

Thank you for your answer, I will try the change code allready and will let you know.
I will let you know too about anything I could find about both joomla/CPG session life.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on November 29, 2015, 11:56:16 pm
ron4mac, how to thank you ?

everything is fine ! works as expected (no logout appears, and I can log out without error)
thank you again for the time you spent for free ...  ;)

As I said, I"m doing a search about the log in duration of both joomla/CPG, if I find something, I will give some news here.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 07, 2015, 04:22:22 am
Hello ron4mac,
me again ...

Everything was fine with the tunnel, but now something is broken, could you help please ?

- I didn't have the domain registration when I did the cpg setting, so I had access to both cpg and joomla with the server adress.
- I attached the domain name two days ago, and I changed the setting in both cpg config (url) and joomla config (menu link), and now I have complete access with the domain name.
- both plug in enabled and published
- same secret phrase and group access
- unpublished both plug in and tried with the beta one (with phpbb tunnel) same result.

It don't work, something is broken ...  :-[

I cant be loged into cpg from joomla with allready existing user, and when I create a new user, he will not be created in cpg.

If you could help, I will provide you admin acces for both cpg and joomla.
I'm still working on the pages, so the site is not alive.

Tell me.
thanks in advance.
Christophe.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on December 07, 2015, 04:31:43 am
If you could help, I will provide you admin acces for both cpg and joomla.

If you can PM me with the site and login informations, I will see what I can do to help.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 07, 2015, 04:34:41 am
I would love to do it.
thank you.

But I can't send PL because of the board rules ... so ... how to do ?

this is the site adress: http://idler-drive.com
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on December 07, 2015, 04:47:33 am
But I can't send PL because of the board rules ... so ... how to do ?
Email me the login info:
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 07, 2015, 04:49:26 am
thanks a lot

I do it allready (you can delete your adress).
thanks again.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 07, 2015, 05:00:18 am
done ...  :)

of course you can do what you want for trying.

- tunnel2cpg is your latest release (with phpbb tunnel)
- I can only upload cpg plug in via FTP (if needed, tell me).

Merci,
Christophe.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on December 07, 2015, 05:44:04 am
It seems to be working correctly now.  Only thing I did, really, was to change the menu item alias for the iFrame wrapper.

BTW, I recommend that you try the HTML5 Upload plugin (http://forum.coppermine-gallery.net/index.php/topic,75927.0.html).
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 07, 2015, 06:00:39 am
thank you for your help (really thank you) but unfortunatly It doesn't work.

- trying both opera and firefox
- trying 3 user login (admin, test and mine)
- cookies cleaned
- log in / log out / log in back

Same result, when loged into joomla and try access the gallery with the joomla menu, I'm not loged into cpg.

Are you sure it works on your side ?

merci,
Christophe.

PS will have a look the upload plugin.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on December 07, 2015, 06:08:57 am
Tried another browser. I had to login/out twice for some reason. But after that, it worked. I don't know if it would help for you to revert to the non-beta version of the tunnel plugins.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 07, 2015, 06:13:35 am
OK.

so I will try another browser, but before it worked fine with opera (and firefox testing).

I will try the non beta version

and will let you know ...

thanks for your help.
...  ;)
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 07, 2015, 01:51:22 pm
Hello Ron,

I can confirm that it is still not working (tested with IE and Chrome onto another computer).

When it was working fine, using server adress for both config of joomla and cpg, I created 3 users.
These 3 users in joomla was synchronised with the help of the tunnel.
So when I try to access to cpg from the joomla link (the one you modified the alias), I don't be loged into cpg.

With these 3 users, if I try lo log into cpg with its direct login adress (domain//galerie/login.php).
I can log in with success.

So If now I create a new user in joomla and try access to cpg with the joomla link, I can't be loged.
If I try to log in with cpg direct log in adress, I can't, because the new user is not create in cpg tables.

Thant means, tunnel is broken, there's no more synchronisation between joomla and cpg.


* My thoughts.
It was perfectly working when settings were made with the server adress, problems come when I attached the domain name.

I think there's a problem with some path somewhere.
I modified every path in joomla configuration (from server path to domain path for cache and log files).
I modified the joomla link to access cpg via the tunnel (from server adress to domain adress)
In cpg, I modified the URL in the admin config.

So what did I forget ?
Could it be some path setting somewhere else (in cpg files or cpg table) that don't be modified ?

I really think the problem is here.
Whant is you thought please ?

- I will now give a try to the upload plug in you suggested.
- then, I will give a try to your old tunnel plug in (the one I used with succes with server adress).


If it doesn't work anymore, and if you see no more solution.
Do you thing I should try a complete re-install of the cpg script ?
Sure I don't really want to do that, because this is some work ... but if it's the only solution ... is there any chance of succes ?

I love your plug in, this a great feature added to cpg.
It makes me mad, I saw it working perfectly, and now I can't make it works.

Thanks,
Christophe.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 07, 2015, 02:03:41 pm
oh !

some news, I just give a try with my android tablet.
the tunnel works ... with opera browser ... I don't understand.

works fine with new created user too ... fabulous !!!

I need to try onto some other computers (I will ask a friend for that), if that works, I need to clean the browser I used to create the site with the adress server (allready clened the coockies, but I forgot something I think).

I will let you know.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: ron4mac on December 07, 2015, 02:17:36 pm
Whatever version of the tunnel your are using, you must make sure you are using the CPG and Joomla plugins that came together in the same package.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 07, 2015, 02:23:19 pm
shame on me.

- it was a newbe error.

I just deleted the cache of every browser I used to make the pages site with the server adress, and now the tunnel works fine with the domain adress on every browser.

I'm so sorry ...

I want to thank you again for the support you provided for free, you have no obligation of doing that.

I love your plug in, it works fine, it was my mistake.
Thanks,
Christophe.
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 08, 2015, 01:57:19 am
Hello,

So I went back to Joomla_to_CPG_v1.2, because with the beta version, you are not log out from cpg when you log out from joomla (it was like that on my tests).

I cleaned cookies and cache on every browsers I used to work on the site pages, and then re-install the Joomla_to_CPG_v1.2 version.
It works fine, as expected, you are log out from cpg when you are log out from joomla.

As I said, it's a great cpg plugin, a must have if you're a joomla user.
...  ;)
Title: Re: Re: Joomla 2x-3x to CPG Tunnel
Post by: Cynos on December 10, 2015, 03:26:42 am
In the Joomla cpgtunnel plugin you should be able to select multiple user groups that will be allowed to 'tunnel' into CPG.

Hello, me again.
The plug-in is still working fine  ;)

May I ask you a possible future feature ?

- I'm using two user groups in joomla (level1 and level2).
- these groups don't have the same access permissions (ACL) in kunena and in other joomla componments.
- I created these two groups in coppemine, with differents permissions.

In kunena (and joomla) I manage the group modification without editing the users profil with the help of alphauserpoint (automatic update the group level with some rules, like number of kunena posts for exemple).

But I will need to edit each coppermine profil because the cpg tunnel plug-in will add new users to only one group.

Request is a possible groupe synchronisation between joomla and cpg when creating new user, or updating user (same of the password update that works fine)  when using the tunnel.

I don't know if it's possible, but that would be a great feature !
thanks for all ... 8)
Title: Re: Joomla 2x-3x to CPG Tunnel
Post by: zebios on November 22, 2016, 06:27:37 am
hello,
I just installed the new version and the wrapper is very convenient.
Thanks  ;)