Warning: The author of this contribution does not provide support for it anymore.

Breizh Ajax Checks

This and Separate login and username mod - Breizh Ajax Checks

This and Separate login and username mod

by PiperB » Thu Mar 09, 2017 10:01 pm

I wish someone would have tweaked this to combine with Separate Login and Username mod, so that it checks that the login name and username are not the same and all that good stuff.

Dream, dream dream dream. ♪♫ :P

Not sure if I have the patience to do it myself right now. Probably be the only way it ever happens seeing that this has reached end of support, lol. Nice to try though. :lol:
<!-- IF U_LOVE_NOTEPAD++ -->
[td class=statement]I Notepad++ ![/td]
<!-- ENDNEVER --> <!-- tee hee --> :P
Whoa ooo whoa ooo whoa I'm a Lady!
User avatar
PiperB
Registered User
Posts: 173
Joined: Mon Nov 07, 2016 6:54 pm
Contact:

Re: This and Separate login and username mod

by PiperB » Fri Mar 10, 2017 11:48 pm

Well, I modded this to do the checks and work with Separate Login and Username mod. Haven't added the check to see if login name and usernames are the same, but it will check for dupes of the same login name in the database as well as warn if the names are too short and so on and so forth.

I've decided to add the main board file changes here for the default board files effected and then upload the changes I made to the Breizh Ajax Checks mod to include the functionality for the separate login and username mod (attachment of mod file changes further down). This makes the transition easier since the only changes that were made to the mod files are the ones I made. Also takes up less space on this page.

I've also taken screen shots and cropped out all but the part that is effected by these changes. I did not make screen shots of the user control panel profile account settings area for security reasons. Tested and works awesome. This is all for people who are using older versions of phpbb3 that still use mods or have this mod and the other one and want them to function together, because without these changes and having both mods installed, it seems generic to the end user.

Last but not least, I made a bunch more animated loading icons to replace the one that comes with the mod if you want to change it. I've included ones for both dark and light boards, though all will look good on both.

Now that I've written a novel explaining all of that, LOL, here it is.

//Language File Edit Begin
Open: language/en/ucp.php

Find:

Code: Select all

'USERNAME_TAKEN_USERNAME'		=> 'The username you entered is already in use, please select an alternative.',
Add Before: on a new blank line

Code: Select all

'LOGINNAME_TAKEN_LOGINNAME'		=> 'Login name Forbidden Too similar! Please choose another one.',
//Language File edit End.

//Prosilver Edits Begin
Open: styles/prosilver/template/ucp_profile_reg_details.html

Find:

Code: Select all

<dd><!-- IF S_CHANGE_LOGINNAME --><input type="text" name="loginname" id="loginname" value="{LOGINNAME}" class="inputbox" title="{L_LOGINNAME}" /><!-- ELSE --><strong>{LOGINNAME}</strong><!-- ENDIF --></dd>
Replace with:

Code: Select all

<dd><!-- IF S_CHANGE_LOGINNAME --><input type="text" name="loginname" id="loginname" value="{LOGINNAME}" class="inputbox" title="{L_LOGINNAME}" /><div id="loginnamecheck" class="checks_details"></div><!-- ELSE --><strong>{LOGINNAME}</strong><!-- ENDIF --></dd>
Open: styles/prosilver/template/ucp_register.html

Find:

Code: Select all

<dd><input type="text" tabindex="1" name="loginname" id="loginname" size="25" value="{LOGINNAME}" class="inputbox autowidth" title="{L_LOGINNAME}" /></dd>
Replace with:

Code: Select all

<dd><input type="text" tabindex="1" name="loginname" id="loginname" size="25" value="{LOGINNAME}" class="inputbox autowidth" title="{L_LOGINNAME}" /><span id="loginnamecheck"></span></dd>
//Prosilver Edits End.

//Subsilver2 Edits Begin
Open: styles/subsilver2/template/ucp_profile_reg_details.html

Find:

Code: Select all

<td class="row2"><!-- IF S_CHANGE_LOGINNAME --><input type="text" class="post" name="loginname" size="30" value="{LOGINNAME}" /><!-- ELSE --><b class="gen">{LOGINNAME}</b><!-- ENDIF --></td>
Replace with:

Code: Select all

<td class="row2"><!-- IF S_CHANGE_LOGINNAME --><input type="text" class="post" name="loginname" size="30" value="{LOGINNAME}" /><div id="loginnamecheck" class="checks_details"></div><!-- ELSE --><b class="gen">{LOGINNAME}</b><!-- ENDIF --></td>
Open: styles/subsilver2/template/ucp_register.html

Find:

Code: Select all

<td class="row2"><input class="post" type="text" name="loginname" size="25" value="{LOGINNAME}" /></td></td>
Replace with:

Code: Select all

<td class="row2"><input class="post" type="text" name="loginname" size="25" value="{LOGINNAME}" /><span id="loginnamecheck"></span></td></td>
//Subsilver2 Edits End.

Changed mod Files download here. Just overwrite the files where they belong if you do this mod.
BAC_w_Sep_Login_Username.zip
(131.41 KiB) Downloaded 33 times

Now for some screen shots. (Note: click on the images to enlarge to full size)

Too short of a user name shows this.
1.png

If login name is already taken, this is what will display. (I chose to say forbidden because it's similar because I thought it was not a good idea to have the default which straight out tells people that it's already being used, which if left that way would ruin the whole reason for the separate login name in the first place. So this way it leads then to not truly know, but just knowing they need to choose a different one.)
2.png

What they see if the login name can be used or rather is not taken by anyone else.
3.png

I hope this helps someone out there using both of these mods or perhaps wanted to use both mods but did not want the generic results of having some insta checked and then having to be told on a separate page for the login names being taken.

If I get the chance to change it so that it forbids the same login name and username, I will, until then, at least it's now functional together and it does do the checks instantly.

Enjoy! :)
<!-- IF U_LOVE_NOTEPAD++ -->
[td class=statement]I Notepad++ ![/td]
<!-- ENDNEVER --> <!-- tee hee --> :P
Whoa ooo whoa ooo whoa I'm a Lady!
User avatar
PiperB
Registered User
Posts: 173
Joined: Mon Nov 07, 2016 6:54 pm
Contact: