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?
0 • •
Comments
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •$ApplyForm = $Context->ObjectFactory->CreateControl($Context, "ApplyForm", "ApplicationForm");with a bit of css, could work
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Add that where, miquel? And should it be wrapped in something?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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 ;)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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);
}
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •"Notice: Undefined index: position_in_the_html_structure"
$Page->AddRenderControl($ApplyForm, $Configuration["position_in_the_html_structure"] + 1);- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •$Configuration["position_in_the_html_structure"] + 1you 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 ;)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •<?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);
}
?>
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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 enabled- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •I've tried all I can with my limited code knowledge.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •