Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Quick register
Hello everyone,
I want it to make super easy and quick for people to register. The form should be on the Vanilla index, and have only three fields:
1. desired username
2. email
3. password
After the visitor has filled these three fields, he/she will click "Register" and will be automatically logged into his/hers new account.
How to go about this?
I want it to make super easy and quick for people to register. The form should be on the Vanilla index, and have only three fields:
1. desired username
2. email
3. password
After the visitor has filled these three fields, he/she will click "Register" and will be automatically logged into his/hers new account.
How to go about this?
0
This discussion has been closed.
Comments
$ApplyForm = $Context->ObjectFactory->CreateControl($Context, "ApplyForm", "ApplicationForm");
with a bit of css, could work
Add that where, miquel? And should it be wrapped in something?
have you looked at the extension I mentioned? maybe you could also want to take a look at Guest Sign In, which adds a login form in the sidebar
if you don't want to deep into the code, just give me more details and I'll try to get it
the extension I made, just displays the same login form that appears on people.php when logging in, but css'd to fit more or less, the default vanilla styling. so changing the position (the weight) where the control (the login form) is displayed will affect in which part of the html structure will be 'echoed', tweaking its css, will affect in which part of the result page will be displayed
hope it cleared something
This is your extension code:
if($Context->Session->UserID == 0 and $Context->SelfUrl != 'people.php') { if(isset($Head)) $Head->AddStyleSheet('extensions/DirectMenuSignIn/style.css'); $SignInForm = $Context->ObjectFactory->CreateControl($Context, "SignInForm", "frmSignIn"); $Page->AddRenderControl($SignInForm, $Configuration["CONTROL_POSITION_HEAD"] + 1); if($Context->SelfUrl == 'index.php') $Context->PageTitle = $Context->GetDefinition('AllDiscussions'); } ?>
To what should I change it to?
if($Context->Session->UserID == 0 and $Context->SelfUrl == 'index.php') { if(isset($Head)) $Head->AddStyleSheet('extensions/name_of_the_extension/style.css'); $ApplyForm = $Context->ObjectFactory->CreateControl($Context, "ApplyForm", "ApplicationForm"); $Page->AddRenderControl($ApplyForm, $Configuration["position_in_the_html_structure"] + 1); }
"Notice: Undefined index: position_in_the_html_structure"
$Page->AddRenderControl($ApplyForm, $Configuration["position_in_the_html_structure"] + 1);
$Configuration["position_in_the_html_structure"] + 1
you can put any number that will play as its weight, the lower the weight, the higher the control will display. if you want to see an example in herewell sorry, in this case it seems to be just the other way round, just run some tests
<?php /* Extension Name: Direct Menu Sign In Extension Url: N/A Description: Adds a sign in form to the top menu if the person viewing the forum doesn't have an active session. Version: 0.1 Author: miquel Author Url: N/A Code & Inspiration from Mark O'Sullivan & WallPhone (GuestSignIn extension) Portions Copyright 2003 - 2005 Mark O'Sullivan */ if($Context->Session->UserID == 0 and $Context->SelfUrl == 'index.php') { if(isset($Head)) $Head->AddStyleSheet('extensions/name_of_the_extension/style.css'); $ApplyForm = $Context->ObjectFactory->CreateControl($Context, "ApplyForm", "ApplicationForm"); $Page->AddRenderControl($ApplyForm, $Configuration["CONTROL_POSITION_MENU"] + 1); } ?>
AddStyleSheet('extensions/name_of_the_extension/style.css');
is set up correctly to the path wher the css file is, and also be careful to change the name of the extension if you also have the other one enabledI've tried all I can with my limited code knowledge.
A link to that form is all you need, why take up space with it on the main page?
However I'm sure there's a way to do it, you'll have to wait for a better qualified person to reply though.