Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 10-01-2013, 05:58 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just can't do it without being able to test it. I researched it a little and in the case of the register page there's a hook location just before you output the template, so you could just build whole new modified template called "register_advanced" and output that instead. As for the html for changing the password you could use "modifypassword_advanced" and call for that in a plugin at "profile_complete" and override the earlier call for "modifypassword". That way there's no hacking up the original templates. As for messing with the JS you would want server confirmation I suppose, just translate the JS rejex test into a PHP rejex test. But another possibility is in the new templates, have the submit buttons disabled and enabled by JS only if the password strength conditions are met.

--------------- Added [DATE]1380656685[/DATE] at [TIME]1380656685[/TIME] ---------------

I may be checking for strong passwords in a project I'm planning so this is what I plan on using in the template

HTML Code:
<input type="password" id="password" onkeydown="strongPassword.checkPasswords();" />

<input type="password" id="confirmpassword" onkeydown="strongPassword.checkPasswords();" />

<p id="use_strong_password" style="font-weight:bold;color:red;">You must use an upper-case letter, a lower-case letter and a number in your password</p>

<script>
	function vB_Strong_Password() {
		this.newPassword = fetch_object('password');
		this.confirmPassword = fetch_object('confirmpassword');
	}
	vB_Strong_Password.prototype.checkPasswords = function() {
		if(this.check(this.newPassword) && this.check(this.confirmPassword)) {
			fetch_object('use_strong_password').style.display = 'none';
			fetch_object('submit_button').removeAttribute('disabled'); // give the submit button an id and disabled="disabled"
		}
	}
	vB_Stong_Password.prototype.check = function(elt) {
		var strongPassword = (/[A-Z]/.test(elt.value) && /[a-z]/.test(elt.value) && /[0-9]/.test(elt.value));
		return strongPassword;
	}
	strongPassword = new vB_Strong_Password();
</script>
	
Reply With Quote
  #12  
Old 10-02-2013, 11:13 AM
juan71287 juan71287 is offline
 
Join Date: Dec 2003
Location: New York
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm sorry to be a noob but i don't know how can i use it

please explain me how can i use it or please make a modification xml so i can use it easily.


Thank You All.
Reply With Quote
  #13  
Old 10-02-2013, 02:22 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If my old vB3 dev site still worked I'd do it but I think you'll have to talk kh99 into it. I'm just helping out.
Reply With Quote
  #14  
Old 10-02-2013, 04:14 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I'm not much of a JS person. When I talked about doing something for this I was thinking of checking it on the server side and displaying an error if it didn't meet some criteria. But I've thought about it more and I can see how that might be annoying for users.
Reply With Quote
  #15  
Old 10-02-2013, 04:26 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you do the php and html I'll do the JS. Post the html for the part of the register form containing the password fields and the same for the change password form and I'll paste it in to one of my projects and test my JS. I see I have the id's wrong in my earlier post so be sure the id's match the correct names. I think the <p> needs to be below the password fields so they don't jump when the <p> goes blank.
Reply With Quote
  #16  
Old 10-02-2013, 04:36 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I'll see if I can get a chance to look at it later today.

BTW, you mention not having a vb3 setup - have you considered installing xampp on a local computer and installing it there? That's what I do these days for all my development. (But it is work - maybe it's not worth the effort just to answer a few questions here).
Reply With Quote
  #17  
Old 10-02-2013, 06:16 PM
juan71287 juan71287 is offline
 
Join Date: Dec 2003
Location: New York
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i can provide you a test board for it bro but i don't understand what you are saying

i am super noob i think...
Reply With Quote
  #18  
Old 10-02-2013, 07:24 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll try to put together a product you can install, but it will just check the password when submitted as opposed to having a fancy javascript control that would tell the user how good the password is as they type it. Then maybe I or someone else can add some javascript later.
Reply With Quote
  #19  
Old 10-04-2013, 05:51 AM
juan71287 juan71287 is offline
 
Join Date: Dec 2003
Location: New York
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay thanks a lot

i am waiting....
Reply With Quote
  #20  
Old 10-04-2013, 01:24 PM
jonii jonii is offline
 
Join Date: Aug 2013
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can help you. Send me a PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:08 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09063 seconds
  • Memory Usage 2,271KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete