Login After Register

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
rohansakhale
Registered User
Posts: 30
Joined: Sat Aug 15, 2009 6:02 am
Contact:

Re: Login After Register

Post by rohansakhale » Mon Mar 15, 2010 2:02 am

I would like to test the v1.0.3 final version on my 3.0.7 board.

Can i have the link of working mod with no errors.

Thank you

User avatar
paulnicholson
Registered User
Posts: 230
Joined: Thu Jun 04, 2009 9:04 pm
Location: Australia
Contact:

Re: Login After Register

Post by paulnicholson » Mon Mar 15, 2010 6:17 am

Guys, you're gonna love me if I'm the first one to discover this!!!!

Auto redirect to avatar gallery page of your choice after registration.

Backup this file: includes/ucp/ucp_register.php

Now edit:

Find:

Code: Select all

$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
Replace with something similar to this:

Code: Select all

$auth->login($data['username'], $data['new_password']);
				$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="http://www.theatrenetwork.com.au/ucp.php?i=profile&mode=avatar&display_gallery=1")>', '</a>');
This is the MOD from this topic plus it takes my new registered users directly to the avatar gallery. My gallery folder is called '1'. (You need gallery folders for the gallery to work). Just go to the gallery page when you're logged in as admin and then copy the web address (URL). Then paste it into the code like I did after '<a href="

Don't worry, they'll be logged in as themselves, not as admin.

Next I'm going to change the Text that appears on first login in the language folder somewhere. I haven't worked out auto redirect yet, people still have to click the link.

User avatar
paulnicholson
Registered User
Posts: 230
Joined: Thu Jun 04, 2009 9:04 pm
Location: Australia
Contact:

Redirect to any page you want after registration

Post by paulnicholson » Mon Mar 15, 2010 9:20 pm

FULL INSTRUCTIONS ON HOW TO REDIRECT ANYWHERE ON REGISTRATION:
New members will see a welcome note you have written and be redirected to the URL of your choice. They will already be logged in so they can visit any page on your site.
  1. *Backup includes/ucp/ucp_register.php
    Backup language/en/common.php
    Backup language/en/ucp.php

    *Okay, so apply the MOD from this forum, which is simply this:

    Open: includes/ucp/ucp_register.php

    FIND:

    Code: Select all

    $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
                      trigger_error($message);
    ADD BEFORE:

    Code: Select all

    $auth->login($data['username'], $data['new_password']);
    *So you now have this:

    $auth->login($data['username'], $data['new_password']);
    $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
    trigger_error($message);


    FIND:

    Code: Select all

    $auth->login($data['username'], $data['new_password']);
    $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
                      trigger_error($message);
    REPLACE WITH:

    Code: Select all

    $auth->login($data['username'], $data['new_password']);
    $message = $message . '<br /><br />' . sprintf($user->lang['PROCEED'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
                      trigger_error($message);
    *FIND:

    Code: Select all

    $auth->login($data['username'], $data['new_password']);
    $message = $message . '<br /><br />' . sprintf($user->lang['PROCEED'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
                      trigger_error($message);
    FIND IN LINE:

    Code: Select all

     '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">'
    REPLACE WITH:

    Code: Select all

     '<a href="http://www.example.com">'
    So you now have this:
    $auth->login($data['username'], $data['new_password']);
    $message = $message . '<br /><br />' . sprintf($user->lang['PROCEED'], '<a href="http://www.example.com">', '</a>');
    trigger_error($message);


    *Save and Put includes/ucp/ucp_register.php onto your webhost directory.

    *OPEN: language/en/common.php

    FIND:

    Code: Select all

    'PRIVATE_MESSAGES'		=> 'Private messages',
    	'PRIVATE_MESSAGING'		=> 'Private messaging',
    ADD AFTER:

    Code: Select all

    'PROCEED'		=> '%sProceed%s',
    *Save and Put language/en/common.php onto your webhost directory.

    *OPEN: language/en/ucp.php

    FIND:

    Code: Select all

    'ACCOUNT_ADDED'					=> 'Thank you for registering, your account has been created. You may now login with your username and password.',
    REPLACE WITH SOMETHING LIKE:

    Code: Select all

    'ACCOUNT_ADDED'					=> 'Congratulations! You are now a member of the sexiest theatre website in Australia. Jump right in and advertise yourself now, or simply post a comment in Theatre Chat. Remember to include lots of photos and YouTube videos of yourself. Above all, be entertaining :)',
    *Save and Put language/en/ucp.php onto your webhost directory.
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

My newly registered users are taken directly to the avatar gallery where they simply submit an avatar and are already in the User Control Panel, configuring their preferences. They should take a far greater interest in my site now that they've made a little nest for themselves.

I hope this works for you. Feel free to make it into a MOD. I can't be bothered.
TN-registration-redirect-1-0f-3-2010-03-16.jpg
TN-registration-redirect-1-0f-3-2010-03-16.jpg (207.43 KiB) Viewed 998 times
TN-registration-redirect-2-0f-3-2010-03-16.jpg
TN-registration-redirect-2-0f-3-2010-03-16.jpg (167.94 KiB) Viewed 998 times
TN-registration-redirect-3-0f-3-2010-03-16.jpg
TN-registration-redirect-3-0f-3-2010-03-16.jpg (238.68 KiB) Viewed 998 times

myju
Registered User
Posts: 105
Joined: Wed Feb 03, 2010 1:54 am
Location: Dublin, Ireland.
Contact:

Re: Login After Register

Post by myju » Mon Mar 15, 2010 11:25 pm

I installed the version in the above post, on the following:
  • 3.0.7-PL1
  • debug - enabled
  • debug extra - enabled
Results:
  • Worked as intended
  • No debug errors
  • Validated for XHTML 1.0 Strict and CSS level 2.1
Thanks to comkidwizzer3, paulnicholson and whoever else collaborated on creating this mod, much appreciated. :)

User avatar
w00t!
Registered User
Posts: 179
Joined: Thu Feb 12, 2009 12:33 am
Location: Santiago, Chile

Re: Login After Register

Post by w00t! » Sun Mar 21, 2010 4:13 pm

What do you mean with "It will automatically ignore activation." I have user activation (by email) enabled, will this work with it? I think, by the sound of it, it won't...

User avatar
paulnicholson
Registered User
Posts: 230
Joined: Thu Jun 04, 2009 9:04 pm
Location: Australia
Contact:

Re: Login After Register

Post by paulnicholson » Sun Mar 21, 2010 4:30 pm

w00t! wrote:What do you mean with "It will automatically ignore activation." I have user activation (by email) enabled, will this work with it? I think, by the sound of it, it won't...
"This will automatically log someone in after they register. It will automatically ignore activation."

You're right, this is REALLY AMBIGUOUS and could mean about fifty different things. What I think it means is that the email based activation system will be ignored, because the moment somebody registers, they will be logged in. If you have an email confirmation system in place, people are already having to spend three hundred seconds going and checking their email from a different program to click the confirmation link, so what's thirty seconds of typing their login details going to matter? Sorry, just being mean. This MOD doesn't seem to accomodate email confirmation security yet.

User avatar
ravikum
Registered User
Posts: 82
Joined: Tue Dec 02, 2008 5:13 pm
Location: Internet 24X7

Re: Login After Register

Post by ravikum » Mon Mar 22, 2010 3:20 am

I think, if it ignores email confirmation after registration, there is a great chance of spam.
Any spammer can register with some invalid email and post spam

User avatar
paulnicholson
Registered User
Posts: 230
Joined: Thu Jun 04, 2009 9:04 pm
Location: Australia
Contact:

Re: Login After Register

Post by paulnicholson » Mon Mar 22, 2010 7:41 am

Spambots are common, but they can be blocked with a couple of registration page security checks. Human spammers are rare for me. Id prefer to make signing up easy. Slow sign ups are a deterrent to lots of people unless your website is irresistable.

User avatar
w00t!
Registered User
Posts: 179
Joined: Thu Feb 12, 2009 12:33 am
Location: Santiago, Chile

Re: Login After Register

Post by w00t! » Mon Mar 22, 2010 12:13 pm

paulnicholson wrote:
w00t! wrote:What do you mean with "It will automatically ignore activation." I have user activation (by email) enabled, will this work with it? I think, by the sound of it, it won't...
"This will automatically log someone in after they register. It will automatically ignore activation."

You're right, this is REALLY AMBIGUOUS and could mean about fifty different things. What I think it means is that the email based activation system will be ignored, because the moment somebody registers, they will be logged in. If you have an email confirmation system in place, people are already having to spend three hundred seconds going and checking their email from a different program to click the confirmation link, so what's thirty seconds of typing their login details going to matter? Sorry, just being mean. This MOD doesn't seem to accomodate email confirmation security yet.
What kind of reply was that? :? :lol:

myju
Registered User
Posts: 105
Joined: Wed Feb 03, 2010 1:54 am
Location: Dublin, Ireland.
Contact:

Re: Login After Register

Post by myju » Thu Apr 01, 2010 12:07 am

After i installed this mod, this is what i did to redirect the user straight to the index.php page after clicking submit on the registration form, therefore bypassing/eliminating the confirmation page that contains the 'Proceed' link.

Open: includes/ucp/ucp_register.php

Find:

Code: Select all

    $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
                      trigger_error($message);
Replace with:

Code: Select all

redirect($redirect_url);
This validates in xhtml strict, but i am a novice at php so does anyone know if this is in keeping with standard coding practice for phpbb?

Comkid
Registered User
Posts: 132
Joined: Thu Mar 25, 2010 5:40 am

Re: Login After Register

Post by Comkid » Thu Apr 01, 2010 8:55 am

@myju: As the coder of this MOD, I would recommend that, you put this instead of your code:

Code: Select all

redirect($redirect_url, false, true); 
That will allow it to accept external URLs, so, URLs that are not from your board root, like index.php would only work in that if the , false, true code wasn't there, so http://google.com wouldn't work, but if you add , false, true code it will work ;) But, index.php, would now, not work if you add that code ;)

Also, read the the third post on the first page, which has been updated ;)
paulnicholson wrote:Guys, you're gonna love me if I'm the first one to discover this!!!!

Auto redirect to avatar gallery page of your choice after registration.

Backup this file: includes/ucp/ucp_register.php

Now edit:

Find:

Code: Select all

$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
Replace with something similar to this:

Code: Select all

$auth->login($data['username'], $data['new_password']);
				$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="http://www.theatrenetwork.com.au/ucp.php?i=profile&mode=avatar&display_gallery=1")>', '</a>');
This is the MOD from this topic plus it takes my new registered users directly to the avatar gallery. My gallery folder is called '1'. (You need gallery folders for the gallery to work). Just go to the gallery page when you're logged in as admin and then copy the web address (URL). Then paste it into the code like I did after '<a href="

Don't worry, they'll be logged in as themselves, not as admin.

Next I'm going to change the Text that appears on first login in the language folder somewhere. I haven't worked out auto redirect yet, people still have to click the link.
I had code like this (well, code that did the same thing) in version v1.0.2, sorry, for taking it down, but it had some errors. I'm close to finishing the ACP MODule, then I'll give out the v1.1, which will include what it states on the third post on the first page ;)
I ist Comkid :P

myju
Registered User
Posts: 105
Joined: Wed Feb 03, 2010 1:54 am
Location: Dublin, Ireland.
Contact:

Re: Login After Register

Post by myju » Thu Apr 01, 2010 12:08 pm

@Comkid

You've lost me on the external link stuff :D

Rather than having the phpbb installed in a sub-directory, I have phpbb installed on at the top domain location, say www.domain.com
So the index.php of my forum is located at www.domain.com/index.php
So if someone goes to www.domain.com or www.domain.com/index.php they land on the forum index page for both.

After a user clicks on the submit button on the register form they are redirected straight to www.domain.com

I'm not quite 100% sure what you mean so do you mean?
If i use the , false, true code i will be redirected to www.domain.com
Whereas if i do not use the , false, true code i will be redirected to www.domain.com/index.php in my case (or {root}/index.php for people who have the forum installed on a sub-directory)

If that is what you mean, should i keep using without the , false, true code since my forum is installed on my top directory?

I know i'm probably completely misunderstanding you so apologies in advance ;)

Comkid
Registered User
Posts: 132
Joined: Thu Mar 25, 2010 5:40 am

Re: Login After Register

Post by Comkid » Fri Apr 02, 2010 1:10 am

Alright, let me reexplain ;)

Code: Select all

redirect('index.php'); 
Will work fine, but this won't

Code: Select all

redirect('http://google.com'); 
Now but if you do this:

Code: Select all

redirect('http://google.com', false, true); 
It will work, but the one under won't work anymore:

Code: Select all

redirect('index.php', false, true); 
I ist Comkid :P

myju
Registered User
Posts: 105
Joined: Wed Feb 03, 2010 1:54 am
Location: Dublin, Ireland.
Contact:

Re: Login After Register

Post by myju » Fri Apr 02, 2010 1:21 am

Ah! i understand now :idea:

Very good too, that's good to know so people can know which code to use depending on if they want to redirect their users to www.example.com rather than www.example.com/phpbb/index.php

Excellent stuff Comkid, thanks! :)

Comkid
Registered User
Posts: 132
Joined: Thu Mar 25, 2010 5:40 am

Re: Login After Register

Post by Comkid » Fri Apr 02, 2010 2:17 am

No problems, hopefully, v1.1 will come out, tomorrow :D
I ist Comkid :P

Locked

Return to “[3.0.x] MOD Database Releases”