vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   user registration at FORUMHOME (https://vborg.vbsupport.ru/showthread.php?t=206003)

Harmachis 02-20-2009 11:01 AM

user registration at FORUMHOME
 
hello,
i tried to add a mini User Registration field at my FORUMHOME, so that new users dont need to click on Register button. they can register simply from the index page.

i used this code:

HTML Code:

<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">

<tr>
<td class="alt1" align="left">
<span class="smallfont"><script type="text/javascript" src="$vboptions[bburl]/clientscript/vbulletin_md5.js"></script>
<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
function verify_passwords(password1, password2)
{
        // do various checks, this will save people noticing mistakes on next page
        if (password1.value == '' || password2.value == '')
        {
                alert('$vbphrase[fill_out_both_password_fields]');
                return false;
        }
        else if (password1.value != password2.value)
        {
                alert('$vbphrase[entered_passwords_do_not_match]');
                return false;
        }
        else
        {
                <if condition="$show['coppa']">
                pass_copy = password1.value;
                passconfirm_copy = password2.value;
                </if>

                var junk_output;

                md5hash(password1, document.forms.register.password_md5, junk_output, $show[nopasswordempty]);
                md5hash(password2, document.forms.register.passwordconfirm_md5, junk_output, $show[nopasswordempty]);

                <if condition="$show['coppa']">
                document.forms.register.password.value = pass_copy;
                document.forms.register.passwordconfirm.value = passconfirm_copy;
                </if>

                return true;
        }
        return false;
}
</script>

<form action="register.php?do=addmember" name="register" method="post" onsubmit="return verify_passwords(password, passwordconfirm);">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="addmember" />
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="agree" value="$agree" />
<input type="hidden" name="password_md5" />
<input type="hidden" name="passwordconfirm_md5" />

    User name:
    <input type="text" class="bginput" name="username" maxlength="$vboptions[maxuserlength]" style="width:70px" /><br />
    Password:
    <input type="password" class="bginput" name="password" size="25" maxlength="50" style="width:70px" /><br />
    Confirm password:
    <input type="password" class="bginput" name="passwordconfirm" size="25" maxlength="50" style="width:70px" /><br />
    Email:
    <input type="text" class="bginput" name="email" size="25" maxlength="50" dir="ltr" style="width:70px" /><br />
    Confirm email:
    <input type="text" class="bginput" name="emailconfirm" size="25" maxlength="50" dir="ltr" style="width:70px" /><br />

$human_verify <br />

<input type="submit" class="button" value="Submit" accesskey="s" />&nbsp;
<input name="agree" id="cb_rules_agree" value="1" type="checkbox"><strong>Agree?</strong>&nbsp;   
</form>
</span></td>
</tr>
</table>

the code: $human_verify its not working
at the output it shows $human_verify instead of showing random question (i choose random question for human varifiction)

whats the problem?

can anyone help me plz :)

Lynne 02-20-2009 02:15 PM

Where have you defined $human_verify? If you haven't defined it, it's not going to display anything.

Harmachis 02-20-2009 02:19 PM

where i should define ? at template or php file (index.php)

& what should i define?

can u help me

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

i tried adding this code at index.php...but nothing happen

Code:

                require_once(DIR . '/includes/class_humanverify.php');
                $verify =& vB_HumanVerify::fetch_library($vbulletin);
                $human_verify = $verify->output_token();


Lynne 02-20-2009 03:02 PM

You most likely need to add a plugin to do this. You need some of the registration variables defined - you should take a look at the registration page to see what is needed. Aren't there already modifications available that do this? Go check out one of them and see what they added in their plugins.

Harmachis 02-20-2009 03:04 PM

ya. there's some mod but i need to add this on my forumhome side bar

ok. i'll try later. if i failed i'll let u know :D


All times are GMT. The time now is 03:49 AM.

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.03085 seconds
  • Memory Usage 1,735KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete