phpbb3 : default group membership phpbb3 : default group membership
 

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

Main Menu

phpbb3 : default group membership

Started by john degey, April 25, 2009, 12:55:41 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

john degey

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

Joachim Müller

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.

john degey

#2
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


// 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


      // 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

KungenAvPeking

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.

Joachim Müller

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.

KungenAvPeking

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?

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

Quote from: KungenAvPeking 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?
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