MyBB Central

Full Version: How to Intergrate MyBB with HTML?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need some help on the login code to Intergrate MyBB with my HTML home page as the forum will be underground.

Basic of what Is needed, for the users to visit the index page & If they already have an account be able to login, It should be a simple script so people should know It.
Also a remember me option would be helpfull but not required.
here's a simple index page for that:
<?php
define("IN_MYBB",1);
require_once("./path/to/mybb/global.php");
if($mybb->user['uid'] == 0){
//loginform
exit;
}
//if they are logged in show this.
?>
Here you are the full code to get it working (I use it in my own website):
PHP Code:
<?php
chdir
('/home/public_html/forums'); //Change this for your path to your forum directory
define("IN_MYBB"1);
require 
'./global.php';
if(
$mybb->user['uid']) {
     
//If it's logged in
}
else {
     
//If it's not logged.
}
?>
Hello guys....!
Thank you for you generosity!I really appreciate your work. At this forum, you share us so important message.I like this kind of post which tell us much important massage.thank you again.
Thanks i needed this Big Grin
(Jan 03, 2011, 04:56 AM)Arqui Wrote: [ -> ]Here you are the full code to get it working (I use it in my own website):
PHP Code:
<?php
chdir
('/home/public_html/forums'); //Change this for your path to your forum directory
define("IN_MYBB"1);
require 
'./global.php';
if(
$mybb->user['uid']) {
     
//If it's logged in
}
else {
     
//If it's not logged.
}
?>

Thanks. I was kinda of looking for that tip as well.

Magen Digirolomo

The moment in learning mybb production
Just good in this learn something
Thank you



____________________
r4 3ds
ds3
ak3