Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: phpBB session management with cpg 1.4.4  (Read 3105 times)

0 Members and 1 Guest are viewing this topic.

MadMarian

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
phpBB session management with cpg 1.4.4
« on: March 27, 2006, 07:04:15 pm »

Hey folks,

have my bridge finally working but a little problem with the session management. I already asked the guys from the phpBB support and they said it should work that way, so I hope one of you can help me out.

Here it goes:

I have a self coded homepage with phpBB and coppermine:

homepage: www.screamsilence.net
board: www.screamsilence.net/forum/
gallery: www.screamsilence.net/gallery/

Now I want my users to be able to login from anywhere via a loginbox in the left hand upper corner. Once logged in you see "Hallo <username>". This works for all my pages but for the gallery. The left hand part of the page is an extra php file which is included so that I have to change dates etc. only in one file. Now the first part of the session management I put into my theme.php

Code: [Select]
session_start();
define('IN_PHPBB', true);

$phpbb_root_path = '../forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

And the second part I put into my extra file:

Code: [Select]
if($userdata['session_logged_in'])
$loginbox_header = "Hallo ".$userdata['username'];
else
$loginbox_header = "Login";

When I log in the cookie seems to be set correctly since the gallery shows the upload button for pictures. Also when I go to the forum or browse through my page... everywhere my login box says "Hallo <username>". Just not in the gallery.

I'd be glad for any ideas...
Logged

MadMarian

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: phpBB session management with cpg 1.4.4
« Reply #1 on: March 30, 2006, 10:20:34 am »

Alright cornered the problem. Seems to be connected to the custom header. My navigation.php file which contains the login box and dates etc. is included in cpg via custom header. Now when I put all my code for the login box into theme.php is works!!! But then the popup windows for the pictures are screwed up. So why can I not read out the session varibale in a file that's included via custom header?
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 16 queries.