forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 pnCPG (Coppermine for postNuke/Zikula) => Topic started by: casNuy on November 24, 2005, 10:33:55 pm

Title: Single signon Coppermine & Drupal
Post by: casNuy on November 24, 2005, 10:33:55 pm
Have been playing with Drupal and really like the CMS. The available galleries are not offering all I would like to see.
So i created a single signon method for Drupal. This is very basic, it just enables single signon.

For those who were looking for it...............

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: dahlgren on March 17, 2006, 06:43:30 pm
Great! It's just one thing I can't understand how to do. When I load my coppermine album no pictures are visible, I have to press album list first. Anyone know what I done wrong?
Title: Re: Single signon Coppermine & Drupal
Post by: Nibbler on March 17, 2006, 10:11:02 pm
Post a link. Is this even related to the thread you are replying to ?
Title: Re: Single signon Coppermine & Drupal
Post by: dahlgren on March 17, 2006, 10:16:11 pm
I have solved the problem already. I had edit the code in the drupal page a bit to get it to work but now everthing is fine.

Code: [Select]
<?php
Global $user;
$url="http://www.mycoppermine.com/index.php";
echo 
"<iframe src='$url' align='center' width='100%' height='800px' space=0 vspace=0 marginwidth=0 marginheight=0 frameborder=0 scrolling=auto name='pnCPG' onload='parent.scrollTo(0,0);' ></iframe>";
?>
Title: Re: Single signon Coppermine & Drupal
Post by: gatesession on May 24, 2006, 10:57:26 am
Hmm,

For me everything works out nice except for that I need to login separatly into Coppermine gallery.
Bridging is not working out fine.

I used the dahlgrens php-code.
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on May 25, 2006, 03:24:46 pm
I have always been surprised that the Dahlgrens code worked.
I have created a module for Drupal in the past, have attached it to this posting.

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: wenxin on August 16, 2006, 01:26:51 am
Fantastic, works very well on my sites. Thanks.
Title: Re: Single signon Coppermine & Drupal
Post by: supafloh on October 11, 2006, 06:20:23 pm
works fine on my setp as well.

just wondering how could i make the coppermine gallery to open in a new browser window instead of inside the drupal frame?


thanks,
flo
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on October 19, 2006, 09:46:09 pm
That feature is now available in an updated version for 4.7.
You can download it at :
http://nuy.info/downloads/index.php?dir=Developments/Coppermine/Drupal/

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: supafloh on October 20, 2006, 07:34:55 am
Thanks!

maybe it's just too early for me today:-) but:

1, does the description in INSTALL.TXT miss something?
2, actually what do i do with "cpg.module"?
3, ...or i just have to replace the existing "index_dr.php" in my cpg install folder (no changes in drupal required)?


Flo
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on October 21, 2006, 11:25:10 am
You need to install the module within Drupal as you would do with any other module. Index_dr.php indeed goes into the Coppermine directory.
Cas
Title: Re: Single signon Coppermine & Drupal
Post by: supafloh on October 23, 2006, 09:05:13 am
Cas,

thanks so far! :)

Unfortunately clicking on the new "Coppermine" menuitem throws the following error:

"user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND uid = 1' at line 1 query: SELECT value FROM profile_values WHERE fid = AND uid = 1 in /srv/www/...../htdocs/drupal/includes/database.mysql.inc on line 120."

Do you know what's wrong here?


Thx,
Flo
Title: Re: Single signon Coppermine & Drupal
Post by: supafloh on October 23, 2006, 03:19:16 pm
...even though i get this error mentioned above, cpg opens either in the same frame or in a new window. so to me it actually seems to work just fine. just the error message is irritating...

...running cpg1.4.9 out-of-the-box setup.

Flo
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on October 28, 2006, 11:04:17 am
Looks like I did not include the correct install.txt
Within Drupal you go to the Module Profiles (Administer, Settings, Profiles)
Add a single line text field with the following criteria :
Category : Passwords
Title : Your Coppermine Password
Formname : profile_cpg_pwd
Explanation : The password you use to access the Coppermine photo gallery
Check  option : Private field, content only available to privileged users
Click Save the field

Now if you go to your account, you will notice a new Tab called passwords.
Here you can enter your Coppermine password. This allows you to also use Coppermine outside Drupal

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: supafloh on October 29, 2006, 11:00:03 am
Cas

Pretty cool! Thanks for your work! Works like charming!

just one quesiton remaining: the username for drupal and coppermine have to be the same?


Thanks again,

Flo
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on October 29, 2006, 12:22:35 pm
Users will be automatically added to Coppermine if they access it thru Drupal.

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: mike15 on October 31, 2006, 08:20:15 am
I had to download "Advanced User" module from drupal.org and follow the directions at which point all my problems went away.

Thanks for putting this together.  Nice work!
Mike
Title: Re: Single signon Coppermine & Drupal
Post by: kdrewnj on March 01, 2007, 04:48:12 am
where do I define the path to the coppermine gallery? thank you
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on March 01, 2007, 09:39:03 pm
go to Administer, Site configuration & cpg module settings

The above is valkid for Drupal 5.

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: kdrewnj on March 02, 2007, 12:16:50 am
casNuy....THANK YOU!!!! I could not find that on my own after much searching...it works perfectly....the integration is exactly what I wanted....great code...thanks again.
Title: Re: Single signon Coppermine & Drupal
Post by: perfecthill on July 02, 2007, 11:02:08 pm

Hi,
I realise this is an old topic, but I thought it would be worth seeing if I get a reply!
I've installed the CPG module and have both Drupal and Coppermine running fine.
Coppermine is visible through the iframe, but despite following the instructions for the single sign-on, users still need to login seperately for coppermine.

I was wondering if there had been any further progress with this module, or if any body knows where I might have gone wrong!

Thanks :)

P.S. I'm using drupal 5, running here: http://www.ridinginaction.co.uk/seasonair/
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on July 02, 2007, 11:19:02 pm
Well it should be working fine also with Drupal 5.
Please verify my dopwnload section on www.nuy.info/downloads to see if you have the latest version.

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: supafloh on July 03, 2007, 11:37:46 am
using your nice code since quite a while. works all just fine!

just one thing i see in my apache error log. as soon as i click on the CPG menuitem for getting my gallery to load, i get the following log entry:

PHP Notice:  Undefined index:  check in /srv/www/vhosts/<mydomain>/drupal/cpg/index_dr.php on line 19, referer: http://<mydomain>/drupal/?q=cpg

it works all fine. just curious what the above notice wants to tell me. any idea?
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on July 03, 2007, 10:41:06 pm
yes, i know where that comes from. In the past that script was called with 2 parameters. Nowadays only with one (1).
To get rid of the message, simply remove the following line from index_dr.php:
Quote
"
$check = $form_vars['check'] ;
That should take care of this.

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: perfecthill on July 04, 2007, 06:43:45 pm
Hi, The Drupal 5 version is the one that I downloaded and followed the instructions for so I don't know what i'm doing wrong.  Everything is fine except that it doesn't log me in to coppermine when I log in and as Coppermine is easily the best gallery tool that I've found for what I want I'd really like to get it working.

If it helps at all you can log in as admin and have a look your self: www.ridinginaction.co.uk/seasonair (http://www.ridinginaction.co.uk/seasonair)
*** | *** [Edit GauGau] Edited out your admin account. This is a public board. Never post admin details. Change your password immediately! [/Edit]

There is also a regular user called test, password test incase you want to check that.

Any help will be greatfuly recieved.
Thanks
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on July 10, 2007, 09:31:25 pm
A few questions for you:
1.what platform are you running on ?
2. what is the version of Coppermine ?
3. Can You also pm me a admin account for coppermine ?

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: idezmax on July 24, 2007, 06:24:26 am
thank


----------------------------
http://www.idezmax.com
Title: Re: Single signon Coppermine & Drupal
Post by: Saudor on August 06, 2007, 04:39:22 am
go to Administer, Site configuration & cpg module settings

The above is valkid for Drupal 5.

Cas

hmm..cant seem to find that option in drupal 5.1? Does it not work in 5.1? Thanks
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on August 06, 2007, 08:51:46 pm
Just upgraded to Drupal 5.2 and those options are still there.
You do need to activate this module under Sitebuilding-Modules though.

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: rmas on August 27, 2007, 04:35:13 pm
hmm..cant seem to find that option in drupal 5.1? Does it not work in 5.1? Thanks
I'm using drupal 5.2 with drupal5_cpg and also can't find "Administer, Site configuration & cpg module settings" . I assume I need to go there to define the path to coppermine
drupal is installed in my document root directory
coppermine 1.4.12 is installed in a sub-directory
cpg module is enabled
coppermine appears in the top-level menu
coppermines password is set using profiles
Maybe I'm missing something?
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on August 28, 2007, 08:25:49 pm
Have done a test from scratch and if you follow the instructions, it works on my machine:
*******************
Within Drupal you need to activate the Profiles module.
This module allows you to add fields to the user definition
Go to the profile module
Add a single line text field with the following criteria :
Category : Passwords
Title : Your Coppermine Password
Formname : profile_cpg_pwd
Explanation : The password you use to access the Coppermine photo gallery
Check  option : Private field, content only available to privileged users
Click Save the field
Now if you go to your account, you will notice a new Tab called Passwords.
Here you can enter your Coppermine password. This allows you to also use Coppermine outside Drupal
*********

Make sure you use the correct name for the field and that you have entered a password under your account.

Cas
Title: Re: Single signon Coppermine & Drupal
Post by: rmas on August 29, 2007, 03:49:07 am
Have done a test from scratch and if you follow the instructions, it works on my machine:
Followed instructions, but didn't work
Now I've done a clean re-install and it works perfectly.
Previous coppermine installation was an upgrade to 1.4 from v1.3.3 - don't know whether that might have caused a problem.
:-[ Sorry to have prompted you to do another test. 
Thanks for a great module- exactly what I need   :)
Title: Re: Single signon Coppermine & Drupal
Post by: jolly on March 10, 2009, 10:18:17 am
Is there any module  which working with drupal 6.8 ?
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on March 10, 2009, 12:41:02 pm
No, not at the moment.
Is somewhere on my todo list but have no target for that
Title: Re: Single signon Coppermine & Drupal
Post by: jolly on March 11, 2009, 12:30:22 pm
Is 100$ makes this case at 1st place on your list ?
Title: Re: Single signon Coppermine & Drupal
Post by: casNuy on March 12, 2009, 05:26:18 pm
No that will not help. This activity is something on the side next to my normal job.
There are various other things which I really need to habdle first...........