Is it possible to make that you need to log into your forum account to access the site?
Also post your forum details on the site. E.g Welcome to the site, your logged on as *forum username*?
For the login to view thing, if you mean they have to be logged into your forum to view your forum then just go ACP > Users & Groups > Groups > Guests > Forums and Posts then unselect "Can view board".
With your second question, do you want it to say that when they log in or just somewhere in the design like where it says "Welcome back, yourusername." up the top?
(2010-01-26, 12:12 AM)TimB. Wrote: [ -> ]For the login to view thing, if you mean they have to be logged into your forum to view your forum then just go ACP > Users & Groups > Groups > Guests > Forums and Posts then unselect "Can view board".
With your second question, do you want it to say that when they log in or just somewhere in the design like where it says "Welcome back, yourusername." up the top?
No, what I want is so that you need to log in to view the site and Forum
<?php
define("IN_MYBB", 1);
define("THIS_SCRIPT", "pagename.php");
require("forums/global.php");
if($mybb->user['uid'] === 0) {
error_no_permission(); //Fix via MattRogowski. See below post :P
} else {
echo "Hai, ".$mybb->user['username']."! You have ".$mybb->user['unreadpms']." inbox messages.";
}
?>
Thanks very much above. How do I add more uids, do I use a comma?
$allowed = array("1", "2", "3", "4");
if(in_array($mybb->user['uid'], $allowed))
{
...
That will only allow people through who are in that list.