Hello and thank you for a great piece of software! I have a couple of requirements that I don't think are addressed by Piwigo or for that matter, any other similar application. (I spent a few hours trying others yesterday and kept returning to Piwigo.!)
Firstly, it would be great if Piwigo could bridge with forum software. In my case I run a simplemachines forum (SMF). I have discovered that Coppermine will bridge with it so that users only log in once. However I didn't feel that Coppermine is as elegant and feature rich as Piwigo!
This would be a great extension in my opinion as most galleries intended for various forums seem totally inadequate at best and confusing in the main. If an extension was created to address this for one forum software first, (preferably SMF!), I am sure that further requests would follow.
I hope it is acceptable to include two suggestions in one post.
I would like to allow registered users of a Piwigo gallery to be able to create their own galleries which would be represented by their names and then create sub galleries for a variety of subjects. All such galleries should be visible publicly. I think that this may be feasible if the administrator were to register the user and set up their base gallery first but this would be impractical for a gallery with a high number of users. I can't help but feel that this should be possible but I can't seem to make it work. Have I missed something?
Regards,
Bob
Offline
Hi,
1) Piwigo can share the user table of any other software, they just need to be in the same database and you have to configure some things (see include/config_default.inc.php for details)
$conf['users_table'] = null; $conf['user_fields'] = array( 'id' => 'id', 'username' => 'username', 'password' => 'password', 'email' => 'mail_address' );
you can also share the autologin cookie but I never used it
$conf['remember_me_name'] = 'pwg_remember';
2) [extension by plg] Community is basic but allow many things, moreover with [extension by icy] Icy Picture Modify
Offline
mistic100 wrote:
Hi,
1) Piwigo can share the user table of any other software, they just need to be in the same database and you have to configure some things (see include/config_default.inc.php for details)Code:
$conf['users_table'] = null; $conf['user_fields'] = array( 'id' => 'id', 'username' => 'username', 'password' => 'password', 'email' => 'mail_address' );you can also share the autologin cookie but I never used it
Code:
$conf['remember_me_name'] = 'pwg_remember';2) [extension by plg] Community is basic but allow many things, moreover with [extension by icy] Icy Picture Modify
Thank you for your speedy reply.
I must confess that I am not much of a coder! I was actually hoping to keep both applications on separate databases. I will look into the autologin cookie.
I will check out the Community and Icy Picture Modify extensions.
Bob
Offline
Hi again,
I have just quickly had a look at auto login cookies and unless I am mistaken, they would potentially if used in a public location.
I only suggested that it might be possible to share a login using separate databases because Coppermine certainly does.
Bob
Offline
With the current architecture it's impossible with separate databases, because it needs to have two MySQL connection
As a very limited number of users can have more than one database (and more fewer really need more databases), it's not implemented
Offline
mistic100 wrote:
With the current architecture it's impossible with separate databases, because it needs to have two MySQL connection
As a very limited number of users can have more than one database (and more fewer really need more databases), it's not implemented
mistic100,
Okay, I have to accept that this is a limitation at the moment.
I get a little scared tinkering with databases that have been running happily! As I said, I am not great when it comes to coding!
Is it possible for you to expand on your original post. I have not installed Piwigo on the existing site. I imagine that to use the same database, all I need to do is is use a different prefix for the tables to those already in use for the forum.
I have a test bed site that has identical forum software on and so it won't be the end of the world if I screw up! I would be grateful if you could point me in the right direction. If you can, please feel free to assume that I am a total idiot! If you can't I understand.
Thanks again.
Bob
Offline
about the code I gave ? it's quite simple
activate the plugin LocalFilesEditor to have access to the advanced configuration (the first tab on the plugin page)
and complete the file with this code (modified)
$conf['users_table'] = 'other_table_name'; $conf['user_fields'] = array( 'id' => 'id', 'username' => 'username', 'password' => 'password', 'email' => 'mail_address' );
'users_table' is the name of table you want to use, the users table of SMF if I understood
'user_fields' is an array used to map table fields name to Piwigo internal names, if the SMF users table is like that :
|-- user_id --|-- username --|-- password--|-- email --|
use this (change the second collumn) :
$conf['user_fields'] = array( 'id' => 'user_id', 'username' => 'username', 'password' => 'password', 'email' => 'email' );
there is also an other interesting parameter :
$conf['guest_id'] = 2;
defining the guest (not logged) user id
if this id is not 2 in SMF you must change it here AND update the table piwigo_user_infos (change the user_id fields of the guest user)
Offline
mistic100,
Thank you! I think that I am going to have some fun this afternoon!
Bob
Offline
mistic100 wrote:
With the current architecture it's impossible with separate databases, because it needs to have two MySQL connection
You don't need 2 connections because you can use $conf['users_table'] = 'other_database.other_table_name'; as soon as the MySQL user has privileges on both databases.
Offline
I thought that, but when I tryed it I get the error
"Unknow table piwigo.forum.phpbb_users"
with $conf['users_table'] = 'forum.phpbb_users';
julien1913 had the same problem on the french forum
I don't know for julien but I tested in local with the default "root" user (complete privileges)
Offline
You've also add
$conf['external_authentification'] = true;
Offline
this is only when users register from the other app isn't it ? (so when the integrity between users table and user_infos table is not complete)
[Forum, post 139749 by mistic100 in topic 21357] Use of external user tables
Offline
Hello,
As the OP of this thread, I'd like to say thank you for the interest being taken. I must confess that I am lost with the coding side of this!
I have installed Piwigo on my test site and it uses the same database as my test SMF forum. I am not sure whether there is any benefit from running them on the same database other than the suggested limitations mentioned by mistic100 in his first reply to me.
I must confess to being confused when told "activate the plugin LocalFilesEditor to have access to the advanced configuration (the first tab on the plugin page) and complete the file with this code (modified)"
I have the LocalFilesEditor installed and activated. I am assuming that reference to the first tab on the plugin page is referring to LocalFilesEditor itself. If that is the case, which file should be completed with the code?
I warned you that my coding skills were minimal!
Bob
Offline
in this first tab there is a big textarea, it's the content of a file, the one you must complete
juste under the brown greetings line :)
File does not exist and will be created by LocalFiles Editor
you shouldn't considerate you can't do it because you don't know how to code, we give you the codes, and finding how to add them is quite easy
Offline
mistic100
Good morning! My first attempt failed last night and so I cleared the piwigo tables from the database, deleted the files and have done a reinstall. No problem!
May I confirm that I have understood you correctly. The fields in table piwigo_users that we are referring to are:
id, username, password and mail_address.
User details appear to be held in SMF in the table smf_members and are: id_members, member_name, passwd and email_address.
Therefore, the code that I should be entering is:
$conf['piwigo_users'] = 'smf_members';
$conf['user_fields'] = array(
'id' => 'id_members',
'username' => 'members_name',
'password' => 'passwd',
'mail_address' => 'email_address'
);
I ask this because I am not sure that I have the references on the correct side of the '=>'.
Next, may I query your comment about the guest id. ($conf['guest_id'] = 2;)
I have examined the piwigo table and as you say the id is always '2'. However, I cannot find any reference to a guest id in SMF! Maybe that application relies upon the fact that the user simply has not logged in. (I am guessing here!)
If my guess is correct, would it be acceptable to simply change the guest id in piwigo to something outrageous like 1000000? (The forum is popular but not that popular!
Thank you for your help.
Bob
Offline