Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: leroymcqy - heinäkuu 07, 2014, 07:35:54 IP

Otsikko: how can i use the registration outside of smf
Kirjoitti: leroymcqy - heinäkuu 07, 2014, 07:35:54 IP
i want to know how can i use the registration page outside the forum. i am wanting to show the registration page outside in a custom page i am working on.
Otsikko: Re: how can i use the registration outside of smf
Kirjoitti: Arantor - heinäkuu 07, 2014, 07:38:16 IP
With great difficult since the registration page then needs to submit back to itself.

Can you please explain in detail what you are trying to do?
Otsikko: Re: how can i use the registration outside of smf
Kirjoitti: leroymcqy - heinäkuu 07, 2014, 07:43:40 IP
i want to take the form fields and put them into a custom form for registration. i already done it for login form.

just need one for registration. i done it awhile back but forgot how to do it again.


echo'<form  class="login" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" id="login">
<p><input type="text" id="user" name="user" size="9" value="', $user_info['username'], '" /></p>
<p><input type="password" name="passwrd" value="', $txt['password'], '" id="passwrd" size="9" /></p>
<input type="hidden" name="cookielength" value="-1" />
<p><input type="submit" value="', $txt['login'], '" /></p>
</form>';


thats my login form.

i am wanting to do the same with the registration page. i know it can be done but its been a long time since i last done that so i can't remember how i did it.
Otsikko: Re: how can i use the registration outside of smf
Kirjoitti: Arantor - heinäkuu 07, 2014, 07:49:15 IP
Interesting, that's actually potentially less secure than normal registration (and won't work in SMF 2.1 either)

The thing about the registration form is that it's in 2 separate parts both of which require going back to the main registration page to make it work. You'd have to make some serious changes to make it work the way you want.
Otsikko: Re: how can i use the registration outside of smf
Kirjoitti: leroymcqy - heinäkuu 08, 2014, 03:37:48 IP
i couldnt just do it like the login form. where i took the fields name and the hidden field and the action and put it in the registration form.
Otsikko: Re: how can i use the registration outside of smf
Kirjoitti: Kindred - heinäkuu 08, 2014, 06:33:28 IP
No...  Registration is  more complicated than login.