I have a website which you can locate at xenon-x.net and it has a very basic website template setup that I'm working on making as-well as a forum that I had setup. I would like to use the forums login for the entire website.
How would I go about doing this? I don't know much about PHP but I've been developing in Java for numerous years, so if you could atleast point me in the right direction I'll be on my way.
ALl you need is this:
define('IN_MYBB', 1);
define('THIS_SCRIPT', 'index.php');
require_once './global.php';
Then you can do anywhere:
// A Guest
if(!$mybb->user['uid'])
{
// Show NOT LOGGED IN STUFF!
}
// User is logged in:
else
{
//user logged in stuff
}
(2014-04-23, 04:42 PM)Cedric Wrote: [ -> ]ALl you need is this:
define('IN_MYBB', 1);
define('THIS_SCRIPT', 'index.php');
require_once './global.php';
Then you can do anywhere:
// A Guest
if(!$mybb->user['uid'])
{
// Show NOT LOGGED IN STUFF!
}
// User is logged in:
else
{
//user logged in stuff
}
I would need to convert all of my HTML into PHP then? Or would it be okay to just embed the php in the html using <php? tags
(2014-04-23, 04:42 PM)Cedric Wrote: [ -> ]ALl you need is this:
define('IN_MYBB', 1);
define('THIS_SCRIPT', 'index.php');
require_once './global.php';
Then you can do anywhere:
// A Guest
if(!$mybb->user['uid'])
{
// Show NOT LOGGED IN STUFF!
}
// User is logged in:
else
{
//user logged in stuff
}
why not use the mybb template engine ??? it is easier
@ JimR,
because the user DOES not need a SIMPLE PHP page. he needs a complex website & has no knowledge of PHP.
So it would be nicer to just do it externally.
(2014-04-23, 05:39 PM)Cedric Wrote: [ -> ]@ JimR,
because the user DOES not need a SIMPLE PHP page. he needs a complex website & has no knowledge of PHP.
So it would be nicer to just do it externally.
hmm dynamic can html do that ? I would doubt it, please can you explain a 'SIMPLE PHP' page ? and how php could not produce a 'complex' web page