17488 Posts in 4473 Topics by 1978 members
| Go to End | Next > | |
| Author | Topic: | 4665 Views |
-
Creating a Website Login and how to register members into the database

26 June 2008 at 7:14am Last edited: 8 July 2008 2:06am
Hello,
I have wishing to have my website be private, and thus this would require a login page, a page for the user to register and a page for sending/retrieving lost passwords.
I am unsure as of how to do this and have had advice ranging from using canView() to riping the forum module's code. I am new to SS and either of these methods is a little over my head right now.
Could I please get some help, thanks
-
Re: Creating a Website Login and how to register members into the database

26 June 2008 at 8:53am
Ok so I worked out a couple noob issues. I'm not sure why I could never find the access tab (yes I did try and find it before, I guess I got confused reading and thought it was supposed to be on the security tab for some reason). I am now on my way (aka going to do this tomorrow) to making a registration form (any tips anyone? any problems that people know I might encounter?).
One question I still have is how to create a simple login for users that could be a box for user/pw and a button rather than have the whole security/login page (aka I want to make the login for users cleaner and smaller).
Cheers -
Re: Creating a Website Login and how to register members into the database

26 June 2008 at 9:12am
Re login box: you can just have $LoginForm in the template, which will render a simple loginform with email/pw and a submitbutton...
-
Re: Creating a Website Login and how to register members into the database

27 June 2008 at 4:21am
Hi Dio5
When you talk about :
Re login box: you can just have $LoginForm in the template, which will render a simple loginform with email/pw and a submitbutton...Where is $loginForm to be added , which template.
Totally new to Silverstripe so excuse the ignorance.
Gerry
-
Re: Creating a Website Login and how to register members into the database

27 June 2008 at 8:35am
Hey Gerry,
you include the $LoginForm in whichever template you wish to have it in (e.g. "..tutorial/theme/template/"). Personally, I put it in my include folder under something like Login.ss which really only has the $LoginForm and some code which keeps it fiting in my theme. I had to fool around with the css to get it looking better and ended up using ID tags (in css that is "#idname{}") and messed with the padding and so forth to get it all looking tidy. If you don't have it already, make sure to get Firebug (firefox addon, press F12 to bring it up and "Inspect" objects).
So I hope that helps you out with the "just put it in templates". Basically, it's treated like $Content and all of those things, so you just need to put the code in any template and it does the rest. I just included my login when needed and left it out of my templates. -
Re: Creating a Website Login and how to register members into the database

27 June 2008 at 8:39am
As for the $LoginForm, are there other things like this that are indexed? e.g. is there a $RegisterForm or anything like that? If so, where would I look? I know I could browse http://api.silverstripe.com/ but I'm just wondering if there's anything else or if I hold the answer to my question already
-
Re: Creating a Website Login and how to register members into the database

27 June 2008 at 9:19am
There is a list of methods you can call in templates on the Page Controls page
http://doc.silverstripe.com/doku.php?id=built-in-page-controls
http://doc.silverstripe.com/doku.php?id=built-in-page-controls#quick_reference
-
Re: Creating a Website Login and how to register members into the database

7 July 2008 at 9:36am Last edited: 7 July 2008 9:38am
well it seems not to exist a $RegisterForm variable, but a $LoginForm... this loginForm is for the CMS, not for a custom made private section
| 4665 Views | ||
| Go to Top | Next > |




