Announcement

  •  » Requests
  •  » Bridging and multi-user suggestion.

#16 2013-02-04 10:28:40

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Bridging and multi-user suggestion.

no you must use

Code:

$conf['user_fields'] = array(
  'id' => 'id_members',
  'username' => 'members_name',
  'password' => 'passwd',
  'email' => 'email_address'
  );

keys are the name inside Piwigo scripts, and musn't be changed

about the guest_id, Piwigo needs this user, if it doesn't exists in the SMF you should create it (with an "outrageous" id, no problem) but the row must exists, and don't forget to update piwigo_user_infos table

Offline

 

#17 2013-02-04 12:43:16

thecorfiot
Member
2011-05-24
21

Re: Bridging and multi-user suggestion.

mistic100,

I am sorry to be such a pain but I am now on my 4th reinstall today!

In my latest attempt to get this working I have created the file with the following code in it:

<?php

$conf['piwigo_users'] = 'smf_members';

$conf['user_fields'] = array(
  'id' => 'id_members',
  'username' => 'members_name',
  'password' => 'passwd',
  'email' => 'email_address'
  );

$conf['guest_id'] = 32000;

?>

I have saved the file.

In the piwigo_users table, I have set the ID for the user 'guest' to 32000 (I have discovered that it is a small integer)
In the piwigo_user_infos table I have set user_id to 32000 for status guest
I have created a member_name of guest in smf_members
In the smf_members table I have set the id_member to 32000 for member_name guest

When I log out of piwigo and attempt to open it again I get a page full of sql errors and am back to re-installing!

Help!

Bob

Offline

 

#18 2013-02-04 13:04:41

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Bridging and multi-user suggestion.

which errors please

Offline

 

#19 2013-02-04 14:07:49

thecorfiot
Member
2011-05-24
21

Re: Bridging and multi-user suggestion.

mistic100,

I have attached the errors as a text file.

Bob

Offline

 

#20 2013-02-04 16:07:07

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Bridging and multi-user suggestion.

you can't attach text files on this forum nor big images

Offline

 

#21 2013-02-04 17:18:27

thecorfiot
Member
2011-05-24
21

Re: Bridging and multi-user suggestion.

mistic100,

This is the complete output.

Bob
================================================================

Warning:  [mysql error 1054] Unknown column 'id_member' in 'field list'

SELECT id_member AS id
     , members_name AS username
     , passwd AS password
     , email_address AS email
  FROM piwigo_users
  WHERE id_member = '32000' in /home/sites/thedomainnobodywanted.com/public_html/gallery/include/dblayer/functions_mysql.inc.php on line 770

Offline

 

#22 2013-02-04 17:21:11

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Bridging and multi-user suggestion.

I missread one of your posts, use

Code:

$conf['user_table'] = 'smf_members';

again, array keys musn't be changed, only the values

Offline

 

#23 2013-02-04 21:58:05

thecorfiot
Member
2011-05-24
21

Re: Bridging and multi-user suggestion.

Hi!

This is irritating! I am beginning to think that this is beyond me! I have lost count of how many times I have done a reinstall now! I appreciate your assistance.

This is the latest errors!

Bob
================================================================
Warning:  [mysql error 1054] Unknown column 'id_member' in 'field list'

SELECT id_member AS id
     , member_name AS username
     , passwd AS password
     , email_address AS email
  FROM piwigo_users
  WHERE id_member = '32000' in /home/sites/thedomainnobodywanted.com/public_html/gallery/include/dblayer/functions_mysql.inc.php on line 770

Offline

 

#24 2013-02-04 22:16:24

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Bridging and multi-user suggestion.

because I made I typo (you could have corrected it by yourself :-) )

$conf['users_table'] = 'smf_members';

with a "s"

Offline

 

#25 2013-02-05 08:09:33

thecorfiot
Member
2011-05-24
21

Re: Bridging and multi-user suggestion.

mistic100,

Good morning and thanks for the continued support! A step forward!

I have entered the following code which when saved does not generate any error messages:

<?php

$conf['users_table'] = 'smf_members';

$conf['user_fields'] = array(
  'id' => 'id_member',
  'username' => 'member_name',
  'password' => 'passwd',
  'email' => 'email_address'
  );

$conf['guest_id'] = 32000;

?>

The only problem is that piwigo does not then accept any password. At this stage SMF functions normally.

If I do a password reset with piwigo, it works as normal but SMF no longer accepts passwords. If SMF's password is reset it works as normal but piwigo no longer accepts any password and so it goes on!

Having checked the database, identical passwords are shown for both piwigo and SMF. In piwigo it is of type varchar(32) and SMF shows varchar(64).

Bob

Last edited by thecorfiot (2013-02-05 08:21:02)

Offline

 

#26 2013-02-05 12:28:00

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Bridging and multi-user suggestion.

oh yeah, some tricky configuration here

the is a parameter $conf['pass_convert'] which must be a callable function, default is

Code:

$conf['pass_convert'] = create_function('$s', 'return md5($s);');

you have to replace it by the function SMF uses to hash password, here I can't really help, you have to find which function is used

Offline

 

#27 2013-02-05 13:47:15

thecorfiot
Member
2011-05-24
21

Re: Bridging and multi-user suggestion.

mistic100,

Thank you. Would you be in a position to advise further in the event that I can find out the function SMF uses to hash password?

I understand if I am asking a lot. Thank you for the help you have provided.

Bob

Offline

 

#28 2013-02-05 15:36:16

Greybrow
Translation Team
1970-01-01
12

Re: Bridging and multi-user suggestion.

I just started to think of integrating Piwigo with SMF and found this topic :)

I've found this in mediawiki bridge:

Code:

$pw = sha1(strtolower($username) . $password);

so I'm not sure if it's possible to pass it to $conf['pass_convert'] as it combines username and typed password to create password in database

Offline

 

#29 2013-02-05 16:06:54

thecorfiot
Member
2011-05-24
21

Re: Bridging and multi-user suggestion.

Greybrow wrote:

I just started to think of integrating Piwigo with SMF and found this topic :)

I've found this in mediawiki bridge:

Code:

$pw = sha1(strtolower($username) . $password);

so I'm not sure if it's possible to pass it to $conf['pass_convert'] as it combines username and typed password to create password in database

Greybow,

Thanks for that. I too found that when checking out the SMF support site. My problem is that as I said from the outset, I am no coder! It would certainly be an asset to bridge the two applications as the gallery mods that are available for SMFare nowhere near the quality of Piwigo (IMHO).

Bob

Offline

 

#30 2013-02-05 17:33:18

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Bridging and multi-user suggestion.

Greybrow wrote:

I just started to think of integrating Piwigo with SMF and found this topic :)

I've found this in mediawiki bridge:

Code:

$pw = sha1(strtolower($username) . $password);

so I'm not sure if it's possible to pass it to $conf['pass_convert'] as it combines username and typed password to create password in database

damn !

from here I don't know how to proceed without the use of a additional plugin (which completely overload the registration process)

Offline

 
  •  » Requests
  •  » Bridging and multi-user suggestion.

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact