PDA

View Full Version : End-User Options - Ajax Check Username


MrNase
19 Sep 2006, 09:27
Due to popular demand I decided to put some work into it to make it fully 3.6.1 compliant.

This one uses the phrase system so you can easily translate it without going through the Js-file.
This one uses the vBulletin Ajax Handler, no more custom and buggy solution for connection to the server.
This one uses vB-functions to create the XML file needed for the Ajax magic. ;)

Generally said: This one is the old Add-on taken one step further. :D

I am a bit handicapped at the moment when it comes to typing but the Add-On is working fine on my forums and so I decided to release it. :)


Screenshots are attached, for a live demo visit this page: http://www.pagodentreff.de/diskussionsforum/register.php?do=register
(PLEASE don't register just for fun! :))

What else do I need to say? Well.. make a backup before you start installing this Addon-On. I say it's safe but don't trust the German guy. ;)

Have fun and click install. :)



Attention:
In order to get this Add-on working you must allow guest access to the file 'misc.php'. That file does the username check and it is important that guests can access that file.

ShellingFox
19 Sep 2006, 09:47
Nice mods. Helpfull for newbie to register :)

Snake
19 Sep 2006, 09:57
Yeah you are right. Thanks for this!

MrNase
19 Sep 2006, 09:59
No problem! :)

Can anyone confirm that it is working? I deleted my installation and imported it again without any problems.

TTG
19 Sep 2006, 10:58
Can anyone confirm that it is working?

Works fine on my 3.6.1.

Clicked install

MrNase
19 Sep 2006, 11:46
Thank you for confirming it. :)

tuanvic
19 Sep 2006, 12:53
this can work on vbb 3.6.0 thanks

MrNase
19 Sep 2006, 12:56
Yes it will work with vB3.6 but I am developing for the most current version which is 3.6.1 :)

tuanvic
19 Sep 2006, 13:17
can u develop also with passwork to check this password long enough or email match or not thanks so much this is reallt helpful for newbie install thanks

MrNase
19 Sep 2006, 13:22
A check if both addresses match shouldn't be a problem but I don't do anything with passwords because would need to have the password send to the server. :)
Please don't forget to click install (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=127004) after you installed it. :)

tuanvic
19 Sep 2006, 13:59
can u make it email match thanks so much. looking for ur new release mod thanks

MrNase
19 Sep 2006, 14:05
I will once I have time to. :)

Protoman
19 Sep 2006, 15:41
+1, would also love the in-use email check.

for the password, you could create a JS that would rate it from 'weak' to 'strong' or something like that

MrNase
19 Sep 2006, 16:35
Because you asked for it: http://www.vbulletin.org/forum/showthread.php?t=127028 ;)
It is the same as this one but it checks if the desired email address is already in use. :)

Gripemaster
19 Sep 2006, 17:51
Seems to have installed, edited the tmeplates, but tested it on the Register page and doesn't appear to be working...tried to register a name that is taken but got no message. :(

*Reserving install* :)

MrNase
19 Sep 2006, 17:57
Did you upload the new file to your server?

Send me a PM with the url and I'll look into it. :)

Gripemaster
19 Sep 2006, 17:59
Did you upload the new file to your server?

Send me a PM with the url and I'll look into it. :)

Yep...followed instructions to a T.

PM coming your way...

MrNase
19 Sep 2006, 18:01
Did you make sure it is enabled via vBulletin Settings?

Gripemaster
19 Sep 2006, 18:17
Pretty sure I did, in User Registration Options.

MrNase
19 Sep 2006, 18:40
I had a look into it, see your PM.

I think I've spotted the error. You must allow guest access to misc.php because that is the file which checks the username availability. As a guest I got an error message trying to open misc.php?do=checkusername&username=admin (admin is the username to be checked) and therefore the Ajax function can't work properly. :)
Allow guest access to misc.php and it will run fine. :)

Protoman
19 Sep 2006, 19:16
installed! instructions say to edit 'registration' template, 'register' is the correct template to edit.

also, should div#checkusername {
padding: 5px 7px;
bediv.checkusername {
padding: 5px 7px;?

MrNase
19 Sep 2006, 20:21
No, I created a new div and it's ID (#) is checkusername. :) By using div.checkusername you have a div with the class 'checkusername'. :)

The typo will be fixed soon. :)

sudn3sc3d
19 Sep 2006, 20:52
thanks alot mate!"installed"

DivisionByZero
24 Sep 2006, 23:51
nice one... hey, could you add the preg_match check already built in vb 3.6.1? Also, what about adding the restricted words (moderator, etc.) thats also in the options settings.

This way, it can check for "taken" names as well as "illegal" words and characters and reply with "this username is unavailable or cannot be used".

YLP1
25 Sep 2006, 06:35
Hmmm..... I don't have a "registration" template. I have a register template but there is a whole lot more code than the three lines.

I am probably missing something and need to direction to find my way.

I did install the plugin and the clientscript file.

Any advise is greatly appreciated.

MrNase
25 Sep 2006, 19:30
Chris: Good idea, I'll have to take a closer look at it. :)


YLP1: Yeah, it's the 'register' template.. The word 'registration' is a typo by me as Protoman already pointed out in post #21. :)
You can set up an admin account for me that allows template edits and I'll install it for you if you have problems with the instructions.
Otherwise you should specify at what step you are so that I can explain it further. :)

thanks,
Dominik

Hornstar
27 Sep 2006, 07:12
your demo link gave me this message

vBulletin-Systemmitteilung
Da du dich entschieden hast, die Nutzungsbedingungen nicht zu akzeptieren, kannst du die Registrierung nicht fortsetzen.

Gehe auf die Startseite des Forums oder klicke in deinem Browser auf 'Zurück', falls du die Nutzungsbedingungen doch akzeptieren möchtest.


what ever that means tho?

Mohamed Ashraf
27 Sep 2006, 09:50
working like charm I installed it

it working fine with english usernames but it not working with arabic username ,, any ideas how to make it work with arabic characters??

thank you
All the best

JakeS
03 Oct 2006, 23:58
Was my own fault, i was so tired i pasted in wrong place. - All is working now, great mod.


your demo link gave me this message

vBulletin-Systemmitteilung
Da du dich entschieden hast, die Nutzungsbedingungen nicht zu akzeptieren, kannst du die Registrierung nicht fortsetzen.

Gehe auf die Startseite des Forums oder klicke in deinem Browser auf 'Zurück', falls du die Nutzungsbedingungen doch akzeptieren möchtest.


what ever that means tho?

click the forum index then click register, then you can test it.

HS2005
07 Oct 2006, 11:40
Great Hack and a nice idea:cool:

Thought it was a java script but it turns out that you can use ajax as well for vbulletin :)

abramelin
07 Oct 2006, 18:21
is this works on 3.6.2?

ravi
09 Oct 2006, 02:49
Attention:
In order to get this Add-on working you must allow guest access to the file 'misc.php'. That file does the username check and it is important that guests can access that file.

I am confused about what this means, how can I give guest access to a Vb php file i.e, misc.php can someone who are using this modification can enlighten me please.

eNforce
11 Oct 2006, 01:57
is this works on 3.6.2?

working fine on my install of 3.6.2

demo:
http://www.areyouserios.com/register.php

Great hack, thanks :)

Shazz
11 Oct 2006, 02:24
*installed.

trilljester
12 Oct 2006, 20:52
working fine on my install of 3.6.2

demo:
http://www.areyouserios.com/register.php

Great hack, thanks :)

You might want to check that there chief, it didn't show anything when I tried to register.

Shazz
12 Oct 2006, 21:19
You might want to check that there chief, it didn't show anything when I tried to register.
Im pretty sure mine works on my IE
Check it on yours
vBShazz.com

eNforce
12 Oct 2006, 21:31
You might want to check that there chief, it didn't show anything when I tried to register.

Now that is really weird, it was working when I posted that it was. Reuploaded the product and it started working again. (it's working right now)

Invalid ID
13 Oct 2006, 04:31
Just clicking 'Register', gives this error:




var phrase_checkusernameok = 'This username is not yet taken. Feel free to use it!'; var phrase_checkusernametaken = 'This username is already taken. Please choose another one.';

magnus
13 Oct 2006, 14:23
Great Hack and a nice idea:cool:

Thought it was a java script but it turns out that you can use ajax as well for vbulletin :)

AJAX is an acronym for Asynchronous JavaScript and XML. So, really, it is JavaScript. :)

magnus
13 Oct 2006, 20:01
I got bored, so I modified the plugin to perform automatic template edits. I, personally, hate having to reapply template edits on upgrades/reverts/etc. so whenever possible I try to hardcode the template edits.

Just import and enable. Done! :)

* Note: This was modified using the Default style on a fresh 3.6.2 installation. That shouldn't matter, but still. :P

da420
13 Oct 2006, 20:35
Thanks magnus, works perfectly. More products should include the template edits, but then again that would make upgrading and reverting templates too easy. ;)

Shazz
13 Oct 2006, 20:52
I got bored, so I modified the plugin to perform automatic template edits. I, personally, hate having to reapply template edits on upgrades/reverts/etc. so whenever possible I try to hardcode the template edits.

Just import and enable. Done! :)

* Note: This was modified using the Default style on a fresh 3.6.2 installation. That shouldn't matter, but still. :P
What does this do?
Automatic updates?

trilljester
13 Oct 2006, 20:56
Now that is really weird, it was working when I posted that it was. Reuploaded the product and it started working again. (it's working right now)

yep, now it's working. You might want to change the color from green to orange or something, it's hard to see with the black background. Looks good though!

Distance
14 Oct 2006, 20:24
Hi i cant figure out how to get these both to work together..


Username and Email

magnus
14 Oct 2006, 20:40
What does this do?
Automatic updates?

No. If you've installed the original adaptation of this plugin, then you'll remember there were template edits to be performed. My modifications simply eliminate those steps and performs the template edits automatically, like many other more recent plugins.

No new features. No fixes. Just automatic template edits -- oh, and I renamed all instances of "Ajax" to "AJAX" -- just because I'm a stickler.

Shazz
14 Oct 2006, 20:54
No. If you've installed the original adaptation of this plugin, then you'll remember there were template edits to be performed. My modifications simply eliminate those steps and performs the template edits automatically, like many other more recent plugins.

No new features. No fixes. Just automatic template edits -- oh, and I renamed all instances of "Ajax" to "AJAX" -- just because I'm a stickler.
Oh... I get it, Thanx for the letting me know :)

Distance
15 Oct 2006, 22:31
Hi i cant figure out how to get these both to work together..


Username and Email

my message.. ;)

Shazz
15 Oct 2006, 22:42
my message.. ;)
I think it would be a seperate modification... But it would be nice to have :)
Like
' passwords do not match'
and the rest.
IPB has this built in :(

Aerox95
27 Oct 2006, 07:21
hi, great hack. would click install if it works on my board ^^ but i've no idea what you're meaning with allowing guest access on misc.php - but i'm sure it's only a matter of time until i'll find it out :p but maybe you should describe exactly what you're meaning with this....

and maybe you thought about including a check for censored words? this would be a nice feature :)

thx & best regards ausm Saarland! ^^

Aerox95
27 Oct 2006, 08:26
okay, problem solved, but it wasn't misc.php.... :-/

elrafei
06 Nov 2006, 17:11
than u man :)

elrafei
06 Nov 2006, 18:10
i have a problem after i install the hack

when u go to register u find this 2 lines in the top of page


var phrase_checkusernameok = 'This username is not yet taken. Feel free to use it!'; var phrase_checkusernametaken = 'This username is already taken. Please choose another one.';

please help me to fix this problem >>

mauro1947
17 Nov 2006, 20:59
Hi!
This mods works fine with vBulletin 3.6.3?
Somebody has probed???
Thanks, and excuse my english!

Shazz
17 Nov 2006, 21:00
Hi!
This mods works fine with vBulletin 3.6.3?
Somebody has probed???
Thanks, and excuse my english!

Yes...

mauro1947
17 Nov 2006, 21:02
Hi!
Thanks for your FASTEST reply!
Thanks again
Bye!

Shazz
17 Nov 2006, 21:08
Your welcome, have a nice day...

da420
18 Nov 2006, 01:13
Your welcome, have a nice day...

Would you like fries with that?

blogtorank
18 Nov 2006, 01:30
Thanks for the great hack!!! *Installed*

Masked Crusader
25 Nov 2006, 03:16
Great mod especially with the number of users I already have :)

*Installed*

Shazz
25 Nov 2006, 06:26
Would you like fries with that?

Um..
..?

Brew
02 Jan 2007, 05:47
I've seen something like this on some web site and I was impressed.

Now I have it on mine :cool:

Woot!

Terminatoronly
02 Jan 2007, 08:51
nice hack installed :D it would be great if you make it for the password and the email too it will look much better when it appear it like that with a picture with right and wrong pictures thats awsem

grandfso
09 Jan 2007, 01:30
Well, I switched to vB 3.6.4 and on register.php?do=register I get:
var phrase_checkusernameok = 'This username is not yet taken. Feel free to use it!'; var phrase_checkusernametaken = 'This username is already taken. Please choose another one.';

Is this something with the mod not supporting newest vB or it's me?

mrahul
11 Jan 2007, 07:34
how can I allow guests to view misc.php ?? & is it safe to use, i.e no probs from hackers ?

tankaya61
11 Jan 2007, 07:51
its working 3.6.4
thanks

yuriy
11 Jan 2007, 17:12
what did I do wrong? wow, I am not a n00b at this but these are my results on registration, check my screenshot to see a problem, I am running vB3.6.4 and I have 2 username input boxes, please help me, Thanks!


EDIT: everything is working fine, in instructions it says:

# now FIND

<div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
<strong>$vbphrase[username]</strong>:<br />
<input type="text" class="bginput" name="username" size="50" maxlength="$vboptions[maxuserlength]" value="$username" />
</div>



# and REPLACE it with:

<div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
<strong>$vbphrase[username]</strong>:<br />
<input type="text" class="bginput" name="username" size="50" maxlength="$vboptions[maxuserlength]" value="$username" <if condition="$vboptions['checkusernameactive']">onblur="checkUsername(this.value)"</if> />
<if condition="$vboptions['checkusernameactive']"><div id="checkusername"></div></if>
</div>



but I usually search for: the first couple of letters like <div class="smallfont" style="margin-bottom:$ :) but I didn't see little lower another same text was there :) so yea no probs with this, it's working GOOD!

as you can see in my template I got 2 alike ones:

<div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
<phrase 1="$vboptions[bbtitle]">$vbphrase[to_post_must_first_register]</phrase>
</div>

<div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
<strong>$vbphrase[username]</strong>:<br />
<input type="text" class="bginput" name="username" size="50" maxlength="$vboptions[maxuserlength]" value="$username" />
</div>

at first I edited the first text, and I had that dumb thing thats in my screenshot, as soon as I edited the second one, and replaced the first one, everything is GOOD!

magnus
12 Jan 2007, 16:21
I posted a version earlier in the thread that will perform the template edits automatically. So, if you're not comfortable editing templates you can try that one.

Rabbitoh Warren
03 Sep 2007, 15:51
Is this hack working on vB 3.6.8?

funinthesun
17 Nov 2007, 16:46
Thank you for this - installed.

It's working fine for me on 3.6.8

dfc005
25 Mar 2008, 05:37
Does this hack work on 3.7.0 rc1?

dfc005
31 Mar 2008, 07:24
Anyone?

Robert9
20 Apr 2008, 18:19
Has anyone an idea how to add an regexp to proof the new username?
I php i do something like: ^[0-9a-zA-Z\.\-_]+$
but i have no clue how to do this is js.

dfc005
17 May 2008, 03:08
I guess this hack is no longer supported.

Anyone know of a similar one or got this working for vB 3.7.0

Welshy2008
07 Aug 2008, 21:49
Thank You MrNase.

RCA
10 Sep 2008, 11:13
this mod isn't working in vb 3.7.3