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: phpbb3 : default group membership  (Read 21457 times)

0 Members and 1 Guest are viewing this topic.

john degey

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 3
phpbb3 : default group membership
« on: April 25, 2009, 12:55:41 pm »

hello
i've just upgrade coppermine to the last version and upgrade my phpbb to last stable version 3.
i've bridge the two subdomain and everything works well... but only for the user's default group in phpbb.

I explain: i have set permissions on the album for two diffrents groups : a general group and a private group.
All members of my forum are members of the general group. this group has privileges on coppermine : it can post comment/rates on the public albums.
Some members of the general group are also members of other groups, and have change their default group to this specific group.
After that, they could not post any comment or rates some pictures.
Only the user of the general group who have this general group as the default one can post comment/rates pictures.

As administrator, if i made myself member of the general one in phpbb, and set it as my default group, i can't be admin in coppermine.
If i revert to the administrator group as my default one in phpbb, then i'm seen as administrator in coppermine.

Can you do something for that ?
Thanks

john
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: phpbb3 : default group membership
« Reply #1 on: April 25, 2009, 07:13:18 pm »

Especially for you as contributor we expect that you read the stickies and do as suggested in them. There's a sticky thread on this board named "When requesting bridge support - mandatory!" that was named that way for particular, obvious reasons.
Logged

john degey

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 3
Re: phpbb3 : default group membership
« Reply #2 on: April 25, 2009, 10:46:06 pm »

Hello Joachim
i sure have to give you a test user (it already exist in fact) but i should have made a second one with a dedicatedalbum etc ... sorry but i did not have the time just before leaving home today. I just post when i saw the problem. Now i came back home, and take a little time to debug.

Here are the problems.

in the phpbb3.inc.php, i have change at line 77

Code: [Select]
// Board table names
                // John Degey : add the user_group for multi group user
$this->table = array(
'users' => 'users',
'groups' => 'groups',
'usersgroups' => 'user_group',
'sessions' => 'sessions'
);

// Derived full table names
                // John Degey : add the user_group for multi group user + correct the backticks for name table
$this->usertable = '`' . $this->db['name'] . '`.`' . $this->db['prefix'] . $this->table['users'].'`';
$this->groupstable =  '`' . $this->db['name'] . '`.`' . $this->db['prefix'] . $this->table['groups'].'`';
$this->usergroupstable = '`' . $this->db['name'] . '`.`' . $this->db['prefix'] . $this->table['usersgroups'].'`';
$this->sessionstable =  '`' . $this->db['name'] . '`.`' . $this->db['prefix'] . $this->table['sessions'].'`';

in the udb_base.inc.php, i've corrected what it seems like a bug for me at line 57

Code: [Select]
      // John Degey : correct the "+100" for the returned group id
      $sql = "SELECT u.{$f['user_id']} AS id, u.{$f['username']} AS username, u.{$f['password']} AS password, ug.{$f['usertbl_group_id']}[b]+100[/b] AS group_id ".
               "FROM {$this->usertable} AS u, {$this->usergroupstable} AS ug ".
               "WHERE u.{$f['user_id']}=ug.{$f['user_id']} AND u.{$f['user_id']}='$id'";

now everything seems to works as expected
a user doesn't have to have the group used in coppermine as the default one in phpbb.

John

ps: after other tests, there is still a problem when a user is member of different groups who have differents privileges in coppermine


Edit: after some debugging, i have made some change to the bridge
here is my version
now all my settings works, multi group, admin, not default group etc ...
i have tested with use_post_based_groups = 1 only

hope this one will help you improve coppermine
regards

John
« Last Edit: April 26, 2009, 01:24:37 am by john degey »
Logged

KungenAvPeking

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: phpbb3 : default group membership
« Reply #3 on: June 14, 2009, 02:17:49 pm »

Am I the only one getting:

Parse error: syntax error, unexpected $end in /hsphere/local/home/XXXXXXXX/kameran.nu/bridge/phpbb3.inc.php on line 323

when using this?

I'm not a coder or anything, so I'm lost on what to do, but I would like the "Multi group" functions of Coppermine to work also after
bridging.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: phpbb3 : default group membership
« Reply #4 on: June 14, 2009, 02:23:46 pm »

Start a thread of your own, doing exactly as suggested in the sticky thread on this sub-board and the corresponding section of the docs. Getting a parse error means that you haven't applied the modifications as suggested.
Logged

KungenAvPeking

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: phpbb3 : default group membership
« Reply #5 on: June 14, 2009, 02:51:08 pm »

Well, sorry if I posted in the wrong place, but it is using phpbb3.inc.php from THIS thread...
If there is an error in the attached file, would it not be better to post the question/bug here?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: phpbb3 : default group membership
« Reply #6 on: June 14, 2009, 04:56:40 pm »

No, start your own thread referring to the code in this one as required. It is very hard for us to track multiple problems in one thread which is one of many reasons our rules exist. Please respect them and do as Joachim requested.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: phpbb3 : default group membership
« Reply #7 on: June 15, 2009, 07:42:12 am »

Well, sorry if I posted in the wrong place, but it is using phpbb3.inc.php from THIS thread...
If there is an error in the attached file, would it not be better to post the question/bug here?
Don't use that file in the first place. Use the one that get's supported. The file John has attached to this thread is an extra that may or may not work for some and needs evaluation. You need to do as suggested. If you have proven that everything works as expected and that you have the skills to test the attached file, then you'll be told to do so. Just dumping a report of a parse error into a posting certainly doesn't qualify you as an expert, so you should heed advice. Your new thread is http://forum.coppermine-gallery.net/index.php/topic,60109.0.html
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.