2008-12-01, 08:56 AM
hello..need some help..
i have a php file and i add this to my forum,
it something like this.
this is mybb file
www.mysite.com/forum/mybb files
this is my file
www.mysite.com/forum/myfile.php
i want only users can view this.like mybb setting when forum viewable only by registered members.
if guest trying to put this www.mysite.com/forum/myfile.php on his browser, i want to prompt the login page before he can access or view that page.
what code should i add?
sorry for my englsih.. hope you understand..
nevermind i've figure it out by adding this code..
i have a php file and i add this to my forum,
it something like this.
this is mybb file
www.mysite.com/forum/mybb files
this is my file
www.mysite.com/forum/myfile.php
i want only users can view this.like mybb setting when forum viewable only by registered members.
if guest trying to put this www.mysite.com/forum/myfile.php on his browser, i want to prompt the login page before he can access or view that page.
what code should i add?
sorry for my englsih.. hope you understand..
nevermind i've figure it out by adding this code..
// No permission for guests
if(!$mybb->user['uid'])
{
error_no_permission();
}