Hi,
How to make any page that if user is not login it redirects to login page.
I.e.
My page is
www.site.com/home.php
And my forum address is
http://www.site.com/forum
Please help me to sort out this issue it will be really great help from you guys.
Kind Regards, Muneeb ul haq
Home.php
require "./forum/global.php";
if (!$mybb->user['uid']){
header ("Location: http://www.site.com/forum/member.php?action=login");
}
(2010-03-05, 07:09 PM)dvdxseo Wrote: [ -> ]Home.php
require "./forum/global.php";
if (!$mybb->user['uid']){
header ("Location: http://www.site.com/forum/member.php?action=login");
}
i am getting this error
Direct initialization of this file is not allowed.
Please make sure IN_MYBB is defined.
Add this above that code
define('IN_MYBB', 1);
(2010-03-05, 07:36 PM)dvdxseo Wrote: [ -> ]Add this above that code
define('IN_MYBB', 1);
Hi,
Thanks for your help it is redirecting the login page but there is one issue when I click on login it is showing data something.
www.site.com/member,
U can try on my page, you will see ….
www.fpsharepoints.com/home.php
demo login, bandara,
password: b123456
(2010-03-05, 07:46 PM)themulhaq Wrote: [ -> ] (2010-03-05, 07:36 PM)dvdxseo Wrote: [ -> ]Add this above that code
define('IN_MYBB', 1);
u got it ???? friend
Hi,
Thanks for your help it is redirecting the login page but there is one issue when I click on login it is showing data something. www.site.com/member,
U can try on my page, you will see ….
www.fpsharepoints.com/home.php
demo login, bandara,
password: b123456
Go to ACP -> Templates & Style -> Templates -> Your template -> Member templates -> member_login
find:
<form action="member.php" method="post">
Replace with
<form action="{$mybb->settings['bburl']}/member.php" method="post">
Hi,
Support team, still I am facing the same problem when I click on button it goes to root directory and shows,
www.site.com/members.php
I changed as you mentioned above, Just open my site and you will that I made changes but still facing the same issue. It is not getting action from forum
www.fpsharepoints.com/home.php
Kind Regards, Muneeb
You may need to change the board URL, you can do this in ./inc/settings.php then you will need to do it again in ACP to make the change permanent.
(2010-03-05, 11:17 PM)TimB. Wrote: [ -> ]You may need to change the board URL, you can do this in ./inc/settings.php then you will need to do it again in ACP to make the change permanent.
Hi, suppose my URL is
$settings['bburl'] = "http://fpsharepoints.com/Upload";
What i should make it? what URL I should put for above requirements?
Thanks & Regards, Muneeb