MyBB Community Forums

Full Version: Integrate Registration Form in Sidebar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello alltogether,

first of all: Thank you for such a great forum script.
For normal I ask my questions on two german support sites,
but I think my idea needs some special help.

I want to copy the registration form into the welcome box of the portal sidebar.

I have a plugin to show this sidebar on the index of the forum.
So in deed, I want to copy the registration form in this sidebar,
which is still using the templates from the portal sideboxes.

I tried it and everytime I copy the lines from the registration template
into the template of the welcome box, the captcha will not be shown.
Also I miss the password fields, when I take a look on the output.

I was searching in google for many hours and asked on 3 other sites for help
and I am still wondering, why nobody already has tried that,
because this would increase the sign up rate!

Best Regards from Germany...^^
Mathias

PS. I am up to date (1.8.4).
You can't copy HTML and variables without including necessary PHP code. This is the part responsible for displaying the registration page: https://github.com/mybb/mybb/blob/featur...#L679-1283 As you can see, it's quite vast, you ca copy parts of it depending on your needs though.
Thank you for your answer.

Yes, I understand. Is it right, the marked part of the file is the part, which I should take over in the index.php?

My needs are not so complicated I think. I only need the standard registration and the google captcha. I also disabled the agreement.

Would it be so bad if I copy just the whole code in the index.php and unnecessary veriables would be simple ignored - is this right?

Also please, could you say me, would this action slow down the site loading of the forum index?

Could I not simple include the member.php instead?

Okay i copied the code you marked in the member.php in the index.php and the portal.php.
In both cases nothing changed: The captcha and the password fields are still not viewable.

I guess there is somthing to do with the code after putting it into the index.php.
Or have I forget somthing - refreshing cache or anything else?
A little bit help would be very nice here!
I am not a php pro...
I also tried the MYBBIntegrator and I must say I am not quite sure what to do there. I uploaded it on my server, and used this code for an external testfile, but what next? How could I include the registration form then? How could I integrate the fields without variables?

<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields;
require_once '/path/to/mybb_forum/global.php';
require_once '/path/to/MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);

$info = array(
    'username' => $_POST['username'],
    'password' => $_POST['password'],
    'password2' => $_POST['password_confirm'],
    'email' => $_POST['email'],
    'email2' => $_POST['email'],
    'hideemail' => 1,
    'allownotices' => 1,
    'emailpmnotify' => 1,
    'invisible' => 0,
    'receivepms' => 1
);

$register_status = $MyBBI->register($info);

// Array means: registering failed
if (is_array($register_status))
{
    echo implode('<br />', $register_status);
}
else
{
    echo $register_status;
}
?>
So, just for information.
German support said me it would be not possible with Recaptcha (which I use).
I am thinking about using the normal Captcha, but in deed there would be also the problem, the password fields can not be seen by the user.