Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Bridging the other way!  (Read 5331 times)

0 Members and 1 Guest are viewing this topic.

jeremy70

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Bridging the other way!
« on: October 11, 2011, 08:40:42 pm »

Hello,
I have read the forum rules and I don't have a public install of this app to give you as it is sitting on my dev machine. (you shouldn't need to "see" it anyway as this is in the logic)

Ok this is the fun part...
I am using the latest and greatest version of coppermine.

I really like this app and I am trying to get http://sourceforge.net/projects/webcalendar/ to use coppermine's session/cookies.  You have a better more secure log in system... ie more complex.
I have already been able to make both coppermine and webcalendar use the same user table and all the memembers are shared no problems.  The problem being you still have to log in 2 times.
Webcalendar does have something very similar to coppermine's bridging were it will totally throw out the login to use another applications login. Have any of you delt with this?
I have been bustin my head against the desk for the last 3 hours trying to bring all the session/login stuff from coppermine into webcalendar.
Thanks in advance!
Jer



oh and a p.s.   HOLY moly @ the captchas on this forum! lol  :o
Logged

jeremy70

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Bridging the other way!
« Reply #1 on: October 11, 2011, 08:48:56 pm »

forgot to add that the file structure is....

---Root (www)
        |
        |
        --[gallery]
        |
        --[calendar]
        |
        |
        -index.php
        -etc.php
        -etc.php
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bridging the other way!
« Reply #2 on: October 12, 2011, 11:29:29 am »

I have been bustin my head against the desk for the last 3 hours trying to bring all the session/login stuff from coppermine into webcalendar.

FYI: when you bridge Coppermine to another application Coppermine redirect to the application's login form. With the above information I guess you don't want to use Coppermine's login form, but rebuilt it within webcalendar? Maybe I misunderstood your current issue. If so, please try to explain it again.
Logged

jeremy70

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Bridging the other way!
« Reply #3 on: October 12, 2011, 03:31:56 pm »

Actually I want to use coppermine as the main application with the login from that but being able to use the session/cookies in the webcalendar so basically a single sign on for both applications. Again I have already integrated both applications to use the same member table, it's just the session/cookie chunk that I am having problems with.   I can bypass the webcalendar's login and use my own but not sure how to exactly set the cookie/session so that it will work for both applications.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bridging the other way!
« Reply #4 on: October 12, 2011, 04:48:11 pm »

To detect the session value you need to do the following:

1. Create an md5 hash of $_SERVER['HTTP_USER_AGENT'] + $CONFIG['ecards_more_pic_target']
Code: [Select]
$cookie_name = md5($_SERVER['HTTP_USER_AGENT'].$CONFIG['ecards_more_pic_target']);
2. Read the the content of that cookie
Code: [Select]
$cookie_value = $_COOKIE[$cookie_name];
3. Create an md5 hash of the cookie's value + name
Code: [Select]
$session = md5($cookie_value.$cookie_name)

You don't need to create the cookie/session, as this will be done automatically when you use the Coppermine login form. Of course you can do that yourself with your own login form.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.