hello i m new to elgg and bit new to PHP also. ( Basic Knowledge of PHP ) i want the custom Registration field in website when user comes to signup? i want to:-
First & Last Name
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- Aniket Kadam@ackadam
Aniket Kadam - 0 likes
- Aniket Kadam@ackadam
Aniket Kadam - 0 likes
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- sem@sembrestels
sem - 0 likes
- Create a new plugin, do not modify the core.
- Override the /views/default/forms/register.php. Erease the email and passwordagain fields (39-47 and 58-65 lines).
- Override the actions/register.php.
- Change
- Change
- Aniket Kadam@ackadam
Aniket Kadam - 0 likes
- Change
- Change
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- Aniket Kadam@ackadam
Aniket Kadam - 0 likes
You must log in to post replies.You can use the profile manager plugin to add new fields to the registration form.
The display name and username/email you can simply overwrite the language strings.
http://docs.elgg.org/wiki/Engine/Internationalisation
Basically, create a new plugin with a language file - and create an entry for the keys that control that output. The core language file can be found in languages/en.php (don't modify it directly, but you can use it find the strings you need to overwrite)
i have use Profile Manager for this but how can i get rid of extra Fields in register page other than i have above
how to remove Username field & Repeat Password field from Reister page with profile manager
That you won't be able to do with profile manager.
The username is very integral for elgg, and having a repeat password will save a lot of annoyances when people register and mistype it and can't log in again the next time.
That said, it can be done, you're just going to have to get your hands dirty. Here's a relevant thread, make sure to read it all: http://community.elgg.org/discussion/view/839506/registration-page?annoff=0
As Matt said:
$username = get_input('username');
by$username = str_replace('@', '_', get_input('email'));
(line 12)$password2 = get_input('password2', null, false);
by$password2 = $password;
This will be enough, as you can see, you need to change the registration form and the action associated to it. The action gets the username and the password2 from the email (replacing the @ by a _) and password1, respectively.
hey, sem thanks for help but above code in action/register.php
$username = get_input('username');
by$username = str_replace('@', '_', get_input('email'));
(line 12)$password2 = get_input('password2', null, false);
by$password2 = $password;
give error like => Password field cannot be empty
please help.
if you read the thread I posted above, you don't need to overwrite action/register
create the hook as shown in the thread to extend the action
generate your username and set it as an input just like in the thread
the only other thing you should need is to remove the second password
ok i will do that and let you know the results.