changing registration process?

changing registration process?

Postby Nomad on Mon Jun 02, 2008 10:20 am

I'm looking to change how the registration works - instead of having to click a link to go to the first registration page, what I'm looking to do is move the first bit where a user puts the preferred name of the blog - i.e. 'username' in step 1 into the summary.php page so it would look like - input box (where the name goes).domain-name.com

example here -> test page

So a new user puts in name, checks it as ok and then clicks register. This then would take them to the next part (or step 1 as it is now) however the username info is already collected and all they do is then fill in the rest of the form. i.e. full name, password, e-mail and authimage.

My thinking here is it would promote more folk to sign up. It seems as thats the way a lot of places do there sign up. I know I used to get more sign ups when I used to have the first part of the registration in my summary.php up to version 1.1 but then I had a problem with authimage not working for some reason so had to abandon the registration from summary.php as I couldn't get it working.

Is there much involved in this? And how would I go about doing it?
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Re: changing registration process?

Postby jondaley on Mon Jun 02, 2008 12:09 pm

You'll need to copy some of the stuff from class/summary/action/dousercreation.class.php into class/summary/action/douserregister.class.php.

Something like:

Code: Select all
function doUserRegister($actionInfo, $request){
    $this->RegisterAction( $actionInfo, $request );
    $this->registerFieldValidator( "userName", new UsernameValidator());
    $view = new SummaryUserCreationView();
    $view->setErrorMessage( $this->_locale->tr("error_adding_user" ));
    $this->setValidationErrorView( $view );
}


and change the perform function to something like this:

Code: Select all
function perform(){
           // clean the session data
            SessionManager::setSessionValue( "blogName", "" );
            SessionManager::setSessionValue( "blogCategoryId", "" );
            SessionManager::setSessionValue( "blogLocale", "" );
            SessionManager::setSessionValue( "blogSubDomain", "" );
            SessionManager::setSessionValue( "blogMainDomain", "" );
            SessionManager::setSessionValue( "userName", "" );
            SessionManager::setSessionValue( "userPassword", "" );
            SessionManager::setSessionValue( "userEmail", "" );
            SessionManager::setSessionValue( "userFullName", "" );

       $userName = $this->_request->getValue( "userName" );

       // check if there is already a user with the same username
       $users = new Users();
       if( $users->getUserInfoFromUsername( $userName )) {
              $this->_view = new SummaryUserCreationView();
              $this->_form->setFieldValidationStatus( "userName", false );
              $this->setCommonData( true );
              return false;
       }
       else{
           $this->_view = new SummaryUserCreationView();
           $this->_view->setValue( "username", $username );
           $this->setCommonData();
           return true;
       }
}


I wrote this code in this forum, and didn't try it out at all, so you'll likely have to do some work on it. Try putting print and print_r statements in various places to see what is going on.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: changing registration process?

Postby Nomad on Wed Jun 04, 2008 8:14 pm

hmm I tried that there j and when I went to the normal registration page (1st stage) I got the following message Parse error:

Code: Select all
syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in public_html/class/summary/action/douserregister.class.php on line 51


at the moment i have the summary.php with the first part of registration stage 1 in it (Chose a username)

so I tried a name and clicked the next button - obviously it kicked up a fuss as normally we would be on page 1 of registration and if anything is missed - then it asks you to fill in all fields. So it loads the page 1 page (Have a look to see what I mean - link in my sig) - I'm wondering if theres a way I can just get it to go to that page ?(page 1 of registration) but not have it pick it up as an error?...
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Re: changing registration process?

Postby jondaley on Thu Jun 05, 2008 6:10 am

That's why I said "something like"... you'll need to look at the line that is causing the error, and maybe the line before it or so, and try to figure out where the typo, or bad variable name is, etc. print_r($var) will be your friend.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: changing registration process?

Postby Nomad on Sun Oct 24, 2010 5:20 am

I'm also Still (after all this time) trying to get this to work....

anyone care to help :)
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Re: changing registration process?

Postby jondaley on Sun Oct 24, 2010 3:43 pm

if you post the code that you have, others can take a look at it.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: changing registration process?

Postby Nomad on Mon Oct 25, 2010 12:55 pm

jondaley wrote:if you post the code that you have, others can take a look at it.


well I don't have code as such :oops:

ok I tried this the way I did when i did have it working (Version 1.0 if I remember right).. basically all I did there was take the actual register form (PT1) and put that into the summary.php I also had to use part of the header I found to get it to work so i just used an include register1.template but altered the header and footer so they were blank apart from the bit i needed for the registration form to work..

this bit it was (Or similar)
Code: Select all
{include file="summary/header.template" selected="register" columns=1}


However at the time I could never get the authimage to work with that method (Think I posted about it at the time - few years ago now)

So I thought well i should still be bale to use that method but it doesn't work - just keeps putting me back on the step 1 of registration....

as for any of the other stuff I'm lost - don't like messing with the core files in case i break summit....

btw if ye want to have a look Jon just click on link in sig there - will leave it up for an hour or so...
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire


Return to Other Problems

cron