MyBB-Plugins Forums

Full Version: Transfer a value
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!
I have a problem and i don`t know how to solve it!
What I want?
I`ve maked a new registration input text who has value="" ! When a user acces this URL "member.php?action=register&code=341" and click on Agree button I want to change the new input text on value="341"
PHP Code:
$plugins->add_hook('member_register_agreement''registeragree'1);
$plugins->add_hook('member_register_start''registershow'1);
function 
registeragree()
{
    global 
$mybb$db$infocode;
    if (
is_null(htmlspecialchars($mybb->input['code'])))
    {
        
$infocode "";
    }   
    else
    {
        
$infocode htmlspecialchars($mybb->input['code']);
    }
}
function 
registershow()
{
    global 
$mybb$templates$theme$invitationfield$infocode;
    if (
$infocode != "")
    {
        
$invsystemname $infocode;   
    }
    else
    {
        
$invsystemname "";
    }
    
$template '<br />
<fieldset class="trow2">
<legend><strong>Cod Invitatie</strong></legend>
<table cellspacing="0" cellpadding="{$theme[\'tablespace\']}">
<tr>
<td><span class="smalltext"><label for="referrer">Introdu codul invitatiei tale pentru a te putea ├â┬«nregistra</label></span></td>
</tr>
<tr>
<td>
<input type="text" class="textbox" name="invsystemname" id="invsystem" value="'
.$invsystemname.'" style="width: 100%;" />
</td>
</tr></table>
</fieldset>'
;
    eval(
"\$invitationfield = \$template;");    

I think that i must make some changes into global.php because $infocode is not declared!?
Can you tell me an another method to do this, if is one more simple?
PS: Excuse me for my bad english!

No Permission

Unfortunately you do not have sufficient rights to view replies in this thread.