vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - ajaxReg - Ajax Registration, with instant field checking (https://vborg.vbsupport.ru/showthread.php?t=144869)

Coders Shack 04-21-2007 11:09 PM

Quote:

Originally Posted by b6gm6n (Post 1232910)
i have a problem which i have not found the answer yet...same as chads... now here, i must remember... every user name is available, banned or whatever or not... please advise, cheers

-b6

what you just described is the purpose of the hack...

all the usernames will appear one of the following:

+ Available
+ Banned
+ Invalid Chars

I do not understand your issue.

TheMilkCarton 04-21-2007 11:33 PM

I think he was saying that everything shows up as "Available" even if it's a Banned Username, or already taken?

Dead End Society 04-22-2007 02:25 AM

^ Yes, the same thing has happened to me even after this upgrade. It says that every name is available, have it be a taken name, banned, or what ever. How can I fix this?

http://deadendsociety.net

Coders Shack 04-22-2007 02:30 AM

Quote:

Originally Posted by TheMilkCarton (Post 1233000)
I think he was saying that everything shows up as "Available" even if it's a Banned Username, or already taken?

oh hmm.

testebr 04-22-2007 07:26 AM

Quote:

^ Yes, the same thing has happened to me even after this upgrade. It says that every name is available, have it be a taken name, banned, or what ever. How can I fix this?
I have same problem.


Can you add referrer field check to your mod?

Thanks

bjhuang 04-22-2007 07:31 AM

should respect disable_ajax option.

Coders Shack 04-22-2007 08:18 AM

Quote:

Originally Posted by b6gm6n (Post 1232910)
i have a problem which i have not found the answer yet...same as chads... now here, i must remember... every user name is available, banned or whatever or not... please advise, cheers

-b6

do you have ajax enabled?

b6gm6n 04-22-2007 09:22 AM

oh yes all enabled...i had the very same problem with chads hack until i did something... forgotten what exactly... hoped you knew

kruchczan 04-22-2007 09:30 AM

Error :(
Not activist blocking user:

administrator Is Available
admin Is Available
mod Is Available

succo 04-22-2007 10:14 AM

ok, i tried to install it, but it didn't work, as all the other mods which modify 'full page' templates... i explain... i'm running a vba-wrapped vbulletin, in which every page is wrapped with vbadvanced columns, and this causes all the templates to be rewritten with vba styles, even (and more than others) the ones containing a full page, not only the <body></body> part, so that every plugin rewriting the template (out of the 'body' tag) isn't going to work

i'd recommend adding a plugin which inserts the needed code (the one loading register.js) directly in headinclude... i had to do it many times with other mods (such as googlemap ones, just to say)... it's a simple plugin like this:
Code:

if (THIS_SCRIPT == 'register')
{
$str = '<!-- / CSS Stylesheet -->';
$vbulletin->templatecache['headinclude'] = str_replace($str,$str.'<script type=\"text/javascript\" src=\"./clientscript/register.js\"></script>
<script type=\"text/javascript\">                                               
        var ajaxreg_email_error_1 = \"$vbphrase[ajaxreg_email_error_1]\";
        var ajaxreg_email_error_2 = \"$vbphrase[ajaxreg_email_error_2]\";
        var ajaxreg_email_error_3 = \"$vbphrase[ajaxreg_email_error_3]\";
        var ajaxreg_email_error_4 = \"$vbphrase[ajaxreg_email_error_4]\";
        var ajaxreg_email_error_5 = \"$vbphrase[ajaxreg_email_error_5]\";
        var ajaxreg_email_error_6 = \"$vbphrase[ajaxreg_email_error_6]\";
        var ajaxreg_email_error_7 = \"$vbphrase[ajaxreg_email_error_7]\";
        var ajaxreg_email_error_8 = \"$vbphrase[ajaxreg_email_error_8]\";
        var ajaxreg_name_minuserlength = \"' . $minuserlength['minuserlength'] . '\";
        var ajaxreg_name_usernameregex = \"' . $usernameregex['usernameregex'] . '\";
        var ajaxreg_name_inuse = \"$vbphrase[ajaxreg_name_inuse]\";
        var ajaxreg_name_illegal = \"$vbphrase[ajaxreg_name_illegal]\";
        var ajaxreg_name_ok = \"$vbphrase[ajaxreg_name_ok]\";
        var ajaxreg_name_error_1 = \"$vbphrase[ajaxreg_name_error_1]\";
        var ajaxreg_name_error_2 = \"$vbphrase[ajaxreg_name_error_2]\";
        var ajaxreg_name_checking = \"$vbphrase[ajaxreg_name_checking]\";
        var ajaxreg_password_error_1 = \"$vbphrase[ajaxreg_password_error_1]\";
        var ajaxreg_password_ok = \"$vbphrase[ajaxreg_password_ok]\";
        var ajaxreg_password_nomatch = \"$vbphrase[ajaxreg_password_nomatch]\";
        var ajaxreg_password_match = \"$vbphrase[ajaxreg_password_match]\";
        var ajaxreg_email_ok = \"$vbphrase[ajaxreg_email_ok]\";
        var ajaxreg_email_nomatch = \"$vbphrase[ajaxreg_email_nomatch]\";
        var ajaxreg_email_match = \"$vbphrase[ajaxreg_email_match]\";
</script>',$vbulletin->templatecache['headinclude']);
}

or something like this, even if i usually do it using a template containing the code to be inserted :)

akulion 04-22-2007 12:14 PM

works very nicely
thanks

Panagioths 04-22-2007 12:21 PM

Quote:

Originally Posted by Coders Shack (Post 1232849)
ok your issue is caused because of your template, you have something else other than the form with the id="register". Fix that and it should work fine.

Well it was my mistake about the link, the actual link that starts the registration process is this http://www.world.gr/register.php
You accept the forum rules and then you procceed. I can't understand what you mean by saying that I have something else that the form with the id "register". A little help on this would be appreciated.

vip-q.com 04-22-2007 12:35 PM

1 Attachment(s)
Hi

thanks man

the hack Support Arabic but not that well

see the Attach :(
and the username taken by another user

thanks anyway :)

Streicher 04-22-2007 01:32 PM

Quote:

Originally Posted by Dead End Society (Post 1233088)
^ Yes, the same thing has happened to me even after this upgrade. It says that every name is available, have it be a taken name, banned, or what ever.

On my forumi get always the error: Contains invalid characters.

Coders Shack 04-22-2007 03:29 PM

Quote:

Originally Posted by Streicher (Post 1233350)
On my forumi get always the error: Contains invalid characters.

well do you have the regular expression set for usernames? if so then its following that.

apn3a 04-22-2007 03:33 PM

Quote:

Originally Posted by vip-q.com (Post 1233318)
Hi

thanks man

the hack Support Arabic but not that will

see the Attach :(
and the username taken by another user

thanks anyway :)


I have the same problem with greek characters :confused:

succo 04-22-2007 04:23 PM

btw, are you sure that
Code:

$vbulletin->templatecache['register'] = preg_replace('/<input type=\\\"text\\\" class=\\\"bginput\\\" name=\\\"username\\\" size=\\\"50\\\" maxlength=\\\"" \. \$GLOBALS\[\'vbulletin\'\]->options\[\'maxuserlength\'\] \. "\\\" value=\\\"\$username\\\" \/>/', '<input type=\"text\" class=\"bginput\" name=\"username\" size=\"25\" maxlength=\"$vboptions[maxuserlength]\" value=\"$username\" id=\"username\" style=\"width: 212px\" onblur=\"CheckUserName();\"/><span id=\"username_status\"></span>', $vbulletin->templatecache['register']);
will work? i think there is no such line in register template...

Coders Shack 04-22-2007 06:32 PM

Quote:

Originally Posted by succo (Post 1233454)
btw, are you sure that
Code:

$vbulletin->templatecache['register'] = preg_replace('/<input type=\\\"text\\\" class=\\\"bginput\\\" name=\\\"username\\\" size=\\\"50\\\" maxlength=\\\"" \. \$GLOBALS\[\'vbulletin\'\]->options\[\'maxuserlength\'\] \. "\\\" value=\\\"\$username\\\" \/>/', '<input type=\"text\" class=\"bginput\" name=\"username\" size=\"25\" maxlength=\"$vboptions[maxuserlength]\" value=\"$username\" id=\"username\" style=\"width: 212px\" onblur=\"CheckUserName();\"/><span id=\"username_status\"></span>', $vbulletin->templatecache['register']);
will work? i think there is no such line in register template...

yes im sure... looks crazy but thats the only way to do it from the $vbulletin->templatecache['register']) that i know of.

succo 04-22-2007 06:50 PM

oh, i see... there is " \. \$GLOBALS\[\'vbulletin\'\]->options\[\'maxuserlength\'\] \. " , so the actual option value is parsed... anyway, would you mind implementing the headinclude part, so that anyone with a vba-wrapped forum could use it? of course i could do it myself, but i'd like to make as little modifications to the mods as i can, as it would be harder to upgrade/update in a latter time, don't you agree? :)

thanks for the help :)

Coders Shack 04-22-2007 08:45 PM

Quote:

Originally Posted by Panagioths (Post 1233313)
Well it was my mistake about the link, the actual link that starts the registration process is this http://www.world.gr/register.php
You accept the forum rules and then you procceed. I can't understand what you mean by saying that I have something else that the form with the id "register". A little help on this would be appreciated.


HTML Code:

<img
                src="images/aria/misc/register.gif" name="register"  width="78" height="39" border="0" class="imgFader" id="register" alt="" />
</a>

that is causing your problem.. remove it and it will be fixed, or rename its ID.

vip-q.com 04-23-2007 11:46 AM

Coders Shack please help me with the Arabic :(

vspro 04-23-2007 12:28 PM

file attachment is version 3.0, not version 3.0.4. plz check it ! :(

vip-q.com 04-23-2007 01:14 PM

:| it's for 3.6.5 !!!!

captainslater 04-23-2007 01:16 PM

He meant the version of the modification not the vbulletin one ;)

Coders Shack 04-23-2007 02:06 PM

Quote:

Originally Posted by vspro (Post 1233976)
file attachment is version 3.0, not version 3.0.4. plz check it ! :(

its 3.04 i just forgot to update it.

rayw 04-23-2007 03:12 PM

Updated to 3.04 and it all seems to working well, thank you! :)

kingvillain 04-23-2007 06:19 PM

works great, thankyou very much :)

Streicher 04-24-2007 02:54 PM

Quote:

Originally Posted by Coders Shack (Post 1233407)
well do you have the regular expression set for usernames? if so then its following that.

Yes, i am using this ^[A-Z0-9 ]+$. But also a username like "Jeff" gives still "Contains invalid characters".

b6gm6n 04-24-2007 05:26 PM

Still stuck on usernames... i.e everything is permitted! - I'm sure there was some code to check , I'm sure the database i have my username table in isn't being read or checked... how do i point the checking of usernames to my vB database? - please advise

-b6

Wayne Luke 04-25-2007 10:42 PM

Can you post actual manual template modifications and the plugins to disable if we want to do these manually to a customized registration template? Would come in handy for those who don't want to be limited in the look of this form.

fastforward 04-25-2007 10:49 PM

Quote:

Originally Posted by Wayne Luke (Post 1235485)
Can you post actual manual template modifications and the plugins to disable if we want to do these manually to a customized registration template? Would come in handy for those who don't want to be limited in the look of this form.

Seconded! This automatic template modification thing seems to be the latest trend. I'm sure it's helpful for some, but it's a huge pain for many. :)

FireFish 04-25-2007 11:41 PM

This was a nice enhancement to my current Ajax Check Username & E-mail mods.

Now most of my reg page is AJAX :D

FReeSTER 04-26-2007 05:27 AM

where do you enable the ajax?:confused: :confused: :o

b6gm6n 04-26-2007 10:56 AM

come on it's been days and I'm working with hundreds of visitors a day and i need to get this working... un-installed until a fix has been implemented, cheers

rayw 04-26-2007 11:27 AM

Quote:

Originally Posted by b6gm6n (Post 1235724)
come on it's been days and I'm working with hundreds of visitors a day and i need to get this working... un-installed until a fix has been implemented, cheers

I have to agree! Everything seems to be working fine me except when I used symbols like: < > % ^ & $ # @ - then the rego form just does stupid stuff!

It doesn't bother me to much now though as I don't have a lot of registrations happening at the moment. :(

Coders Shack 04-26-2007 10:09 PM

Quote:

Originally Posted by Streicher (Post 1234701)
Yes, i am using this ^[A-Z0-9 ]+$. But also a username like "Jeff" gives still "Contains invalid characters".

Thats probably because your using "Jeff" and it would like to see "JEFF"

Quote:

Originally Posted by b6gm6n (Post 1234825)
Still stuck on usernames... i.e everything is permitted! - I'm sure there was some code to check , I'm sure the database i have my username table in isn't being read or checked... how do i point the checking of usernames to my vB database? - please advise

-b6

I'm not sure why yours isn't working it uses the VB database function so its taking your info from your config.php so it should work fine. It also uses your table prefix if it set.

Quote:

Originally Posted by Wayne Luke (Post 1235485)
Can you post actual manual template modifications and the plugins to disable if we want to do these manually to a customized registration template? Would come in handy for those who don't want to be limited in the look of this form.

Yes ill do this as soon as possible, I have an older version but updates have not been made. The only issue is that it needs to at least add the Javascript to the header of the template, because it designates specific Javascript valuables values.

Quote:

Originally Posted by rayw (Post 1235745)
I have to agree! Everything seems to be working fine me except when I used symbols like: < > % ^ & $ # @ - then the rego form just does stupid stuff!

It doesn't bother me to much now though as I don't have a lot of registrations happening at the moment. :(

I cant seem to re-create your error.

fastforward 04-26-2007 10:24 PM

Quote:

Originally Posted by Coders Shack (Post 1236125)
Yes ill do this as soon as possible, I have an older version but updates have not been made. The only issue is that it needs to at least add the Javascript to the header of the template, because it designates specific Javascript valuables values.

Do you mean the phrases? They can be parsed at runtime. I modified my templates manually and simply added the javascript in the following format:

<script type="text/javascript">
<!--
var ajaxreg_email_error_1 = "$vbphrase[ajaxreg_email_error_1]";
var ajaxreg_email_error_2 = "$vbphrase[ajaxreg_email_error_2]";
var ajaxreg_email_error_3 = "$vbphrase[ajaxreg_email_error_3]";
var ajaxreg_email_error_4 = "$vbphrase[ajaxreg_email_error_4]";
... ETC....
-->
</script>


It's working fine.

Coders Shack 04-26-2007 10:32 PM

well added the manual edits (doesn't include the javascript part)

rayw 04-26-2007 11:37 PM

1 Attachment(s)
I don't think many people would put > and < into their username, but this is what happens:

Attachment 63681

Also, if I type in test,ing (note the comma) when I tab down to the password field, it changes the username to test.

I can't imagine to many people creating a username like test,ing or ><testing, but I thought I would make you aware of it anyway.

I've updated as well, seems to working fine with the exception of the above.

Thanks! :)

FleaBag 04-27-2007 12:31 AM

I just got around to installing this. It adds a real touch of class to registration! Thanks again. :)


All times are GMT. The time now is 04:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01853 seconds
  • Memory Usage 1,846KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete