Thread: Anti-Spam Options - Verify Email Before Registration
View Single Post
  #268  
Old 05-08-2015, 05:59 PM
da_judge's Avatar
da_judge da_judge is offline
 
Join Date: Jan 2006
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fix for mobile themes...

Goto Styles & Templates > Stlye Manager.. and in your mobile theme in drop down

Add New Template

Label the template

Code:
reg_ver_start
Then in code box add this code and save... it should all be ok now

Code:
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"> 

xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}">
<head>
	
	{vb:cssfile additional.css}
        {vb:cssfile register.css}
	<title><vb:if condition="$show['coppa']">{vb:rawphrase coppa} </vb:if>{vb:rawphrase register_at_x, {vb:raw 

vboptions.bbtitle}}</title>
{vb:raw headinclude_bottom}
{vb:stylevar htmldoctype}
 <script type="text/javascript" src="{vb:raw jqueryurl}"></script>
</head>
<body>

<script type="text/javascript">

$(document).ready(function() {
 
    $('#registerform').submit(function() { 

        $(".error").hide();
        var hasError = false;
        var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
 
        var emailaddressVal = $("#email").val();
        var emailconfirmVal = $("#emailconfirm").val();

        if(emailconfirmVal == '') {
            $("#emailconfirm").after('<span class="error">{vb:rawphrase you_cant_leave_this_field_empty}</span> ');
            hasError = true;
        }

        if(emailaddressVal == '') {
            $("#email").after('<span class="error">{vb:rawphrase you_cant_leave_this_field_empty}</span> ');
            hasError = true;
        }


        if(!emailReg.test(emailaddressVal)) {
            $("#email").after('<span class="error">{vb:rawphrase invalid_email_form}</span> ');
            hasError = true;
        }

        if(!emailReg.test(emailconfirmVal )) {
            $("#emailconfirm").after('<span class="error">{vb:rawphrase invalid_email_form}</span> ');
            hasError = true;
        }

        if( emailconfirmVal != emailaddressVal ) {
            $("#emailconfirm").after('<span class="error">{vb:rawphrase emails_do_not_match}</span> ');
            hasError = true;
        }

        if(hasError == true) { return false; }
 
    });
});
</script>
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" 

id="vbulletin_html">
  <head>
    <title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>

    
    
    {vb:raw headinclude}
    {vb:raw headinclude_bottom}
  </head>
  <body>
    {vb:raw header}
    
    {vb:raw navbar}
    
    <div id="pagetitle">
	<h1>{vb:rawphrase vbulletin_registration}</h1>

	<vb:if condition="$vboptions['usecoppa']"><p class="description">{vb:rawphrase step_2_of_2}</p></vb:if>
</div>
<form id="registerform" action="register.php" name="register" method="post">
   
        <vb:if condition="$show['emailerrors']">
		<h2 class="blockhead">{vb:rawphrase errors_occurred_during_registration}</h2>
		<div class="blockbody">
			<ul class="blockrow">
				{vb:raw errorlist}
			</ul>

		</div>
	</vb:if>
  
	<h2 class="blockhead">{vb:rawphrase register_at_x, {vb:raw vboptions.bbtitle}}</h2>
	<div class="blockbody formcontrols">
		
		<vb:if condition="$show['coppa']">
			<div class="blockrow">{vb:rawphrase until_receive_signed_form}</div>
		</vb:if>

		<h3 class="blocksubhead">{vb:rawphrase email_address}</h3>

		<div class="blockrow">
                <ul class="group">
                    <li>
                        <label for="email">{vb:rawphrase email_address}:</label>
                        <input type="text" class="textbox" name="email" id="email" maxlength="50" value="{vb:raw email}" 

dir="ltr" tabindex="1" />
                    </li>
                    <li>
                        <label for="emailconfirm">{vb:rawphrase confirm_email_address}:</label>
                        <input type="text" class="textbox" name="emailconfirm" id="emailconfirm" maxlength="50" 

value="{vb:raw emailconfirm}" dir="ltr" tabindex="1" />
                    </li>
                </ul>



			
<br>
                <p class="description">{vb:rawphrase reg_ver_confirm_code}</p>

                <input type="hidden" id="codehasbeenset" name="codehasbeenset" value="1" />
				<vb:if condition="$show['reorder']">
	                <input type="button" onclick="$('#reorder').val('1'); $('#registerform').submit();" class="button" 

value="{vb:rawphrase reorderconfirmationcode}" tabindex="1" accesskey="s" />
					<input type="button" onclick="$('#ihaveit').val('1'); $('#registerform').submit

();" class="button" value="{vb:rawphrase ifounditthanks}" tabindex="1" accesskey="s" />
	                <input type="hidden" id="reorder" name="reorder" value="{vb:raw reorder}" />
	                <input type="hidden" id="ihaveit" name="ihaveit" value="{vb:raw ihaveit}" />
				</vb:if>
 
               <input type="submit" class="button" value="{vb:rawphrase complete_registration}" tabindex="1" accesskey="s" 

/>

            </div>         
</form>

{vb:raw footer}

</body>
</html>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01948 seconds
  • Memory Usage 1,797KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete