MyBB Community Forums

Full Version: Integrating MyBB into your website. (Login Form)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
Hey 772pilot,

For your particular website change the line:

chdir('forum'); // path to MyBB

to:

chdir('forums'); // path to MyBB

Note extra 's' in forum. That should fix your problem.

Also change:

<form action='/forum/member.php' method='post'>

to:

<form action='/forums/member.php' method='post'>

Regards,
Black Ice
Hi all. I'm trying to use the code here as a widget in Wordpress.

However, I encounter the following error..

Cannot redeclare get_attachment_icon() in /home/****/public_html/forums/inc/functions.php on line 2161

Please advise.
You need to add define("IN_MYBB", 1);

After <?php

...
You see i have a torrent tracker and i use this code
$mybb = mysql_query("SELECT uid, loginkey FROM mybb_users WHERE uid = $row['id']");
if (mysql_num_rows($mybb) >= 1) {
    $mybbuser = mysql_fetch_array($mybb);
    my_setcookiee("mybbuser", $mybbuser['uid']."_".$mybbuser['loginkey'], null, true);
}
You have to insert the
my_setcookiee
function into your website!
But you can modify it and use it for you PHP and MySQL website somewhere after or before the setcookie function sets the cookie in your take login page, hope im useful
Thanks I have used this code and it work Big Grin but How can I add a register link next to the login form?
Wich code?
working great!SmileSmileSmileBig Grin but how make it working in Wordpress? there are some conflicts when you include "../global.php"; is there any easy option to integrate this login form into WP? Please....^^
In order to integrate to max you will have to re-write(or simply recode) the wordpress
hmm there should be easier way to do that (i think so) is there? if not... heh then too bad
Look at pluggable.php which contains some functions which could be overriden by WP's plugins, you could make a plugin which bridges WP.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48