Hey,
I would like to add some more information in the registration form.
For example:
- first name
- last name
So... I added the fields in the register.tpl file and I can see the fields on my site. In the database I added the fields (firstname, lastname) as well, no problem, but I have no idea how can I fill the fields in the database?!?
I already changed these files:
register.tpl
<li>
<span class="property">
<label for="firstname">* {'Firstname'|@translate}</label>
</span>
<input type="text" name="firstname" id="firstname" value="{$F_FIRSTNAME}" >
</li>
and the same for lastname.
register.php (line 79-82)
'F_ACTION' => 'register.php',
'F_LOGIN' => $login,
'F_FIRSTNAME' => $firstname,
'F_LASTNAME' => $lastname,
'F_EMAIL' => $email
functions_user.inc.php (line 116-123)
$insert =
array(
$conf['user_fields']['id'] => $next_id,
$conf['user_fields']['username'] => mysql_real_escape_string($login),
$conf['user_fields']['firstname'] => mysql_real_escape_string($firstname),
$conf['user_fields']['lastname'] => mysql_real_escape_string($lastname),
$conf['user_fields']['password'] => $conf['pass_convert']($password),
$conf['user_fields']['email'] => $mail_address
);
In the registration form I get the notice Undefined variable: firstname and lastname, but why? Where can I find the declaration for the variables?
Greets andi
Offline
I am having the same problem can someone help us please. thanks
The problem is these fields have NOTHING to do in the users table.
We have a user_infos table to describe role/levels in Piwigo and user interface.
These fields could be there but they will better be in a separated table.
So they can't be inserted in the same insert statement than id, username, password and email as proposed.
The real right solution is not to modifiy register.php which could be upgraded by next release but to write a plugin to do it correctly.
A bit more complex at the starting point, much more efficient later.
You need to know some php coding basis and we could help you to code it.
Offline
Sorry to wake an old thread but I have the same thing here. I'd love to have first/last name on my users and I kind find any plugin which enabled this?
Am I looking poor or do I have to develop one?
Offline
Hi :-)
For piwigo 2.5 -> [extension by ddtddt] Add Info Users
For piwigo 2.6, you must develop one
http://piwigo.org/releases/2.6.0#user_manager
Offline
Hi
I have made such a system on my family gallery. I will give you tomorrow the trick
Don't hesitate to bump the thread
Offline
sege wrote:
Sorry to wake an old thread but I have the same thing here. I'd love to have first/last name on my users and I kind find any plugin which enabled this?
Am I looking poor or do I have to develop one?
if your goal is to replace the simple 'username' by First and Last name to log-in/register, here a tutorial in our Doc based on what I made : http://piwigo.org/doc/doku.php?id=user_ … last_names
If what you want is to add first and last name as a complementary of info, so in addition but keep the username/nickname , the plugin of ddtddt is what you need
Offline
How the heck did I miss that? I have search for user, last first name and so on. Lucky for me I'm just blind, if not this wouldn't exist. Or something like that. Thanks, seem to do exactly what I want! :)
You won't upgrade it to 2.6? I'll probably develop and stick to 2.5 at the moment and roll to 2.6 later, maybe I'll have to do something about this then.
Offline
ddtddt, will you upgrade your extension to work with 2.6 or do I have to find another solution to move on to 2.6? Didn't think it would be out this soon and it feels wrong to build around 2.5 when 2.6 is out.
Offline
sege wrote:
ddtddt, will you upgrade your extension to work with 2.6 or do I have to find another solution to move on to 2.6? Didn't think it would be out this soon and it feels wrong to build around 2.5 when 2.6 is out.
Hi :-)
Admin part gestion user is change for Piwigo 2.6
I haven't planned yet to update
Offline
Can I somehow convince you to update? A beer? Two? 50 translated lines? ;)
Offline
sege wrote:
Can I somehow convince you to update? A beer? Two? 50 translated lines? ;)
Hi :-)
2 week in sweden :-D
Seriously time to find a solution for the admin part
I thinks (but i don't test) public part and register works
Offline
Hmm, it'll do for me actually. I'll give it a try. The admin part I can handle in SQL or something instead.
I just wan't to register first/last name and use it automatically as photographer when uploading.
Offline
Hi :-)
I just take the time to test
I make change
you can test new release plugin 2.6.a -> [extension by ddtddt] Add Info Users
Offline
I think it works, I used the 2.5 version for 2.6 and it worked as well. At least registration and getting the info into the database.
I can't change info in admin GUI but maybe you didn't fix that? I really don't need it so I don't care.. :)
I have a few questions also;
Q1: I would like to change the textbox in registration page, can I do that with CSS? It's hard coded in the profile_add.tpl so I changed there but that isn't a very good idea.
Q2: Is it possible to require the boxes to be filled at registration?
Offline