2013-12-21, 04:47 PM
2013-12-21, 05:33 PM
You mean this /member.php?action=login if so in the header_welcomeblock_guest template find:
Replace with:
<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin(); return false;">{$lang->welcome_login}</a> — <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span>
Replace with:
<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login">{$lang->welcome_login}</a> — <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span>
2013-12-22, 05:44 AM
You don't understand. I want to force login on the board index (index.php) only so that it will require guests to login before viewing. Maybe redirecting guest to the login page will do but I need it only on the board index. Thanks.
Please @ all, I'm still waiting for your reply
(2013-12-22, 05:44 AM)inyavic1 Wrote: [ -> ]You don't understand. I want to force login on the board index (index.php) only so that it will require guests to login before viewing. Maybe redirecting guest to the login page will do but I need it only on the board index. Thanks.
Please @ all, I'm still waiting for your reply
2013-12-22, 05:41 PM
Please forgive me if I am wrong AGAIN, you want to make your forum viewable by logged in users only, I mean that to view your forum guests need to login?
If so go to your ACP>>Users & Groups>>Groups>>Guests>>Forums and Post under Viewing Options you will find you answer!
If so go to your ACP>>Users & Groups>>Groups>>Guests>>Forums and Post under Viewing Options you will find you answer!
2013-12-23, 08:55 AM
(2013-12-22, 05:41 PM)marcus123 Wrote: [ -> ]Please forgive me if I am wrong AGAIN, you want to make your forum viewable by logged in users only, I mean that to view your forum guests need to login?
If so go to your ACP>>Users & Groups>>Groups>>Guests>>Forums and Post under Viewing Options you will find you answer!
I didn't say forum, I said board index that is my homepage only. I don't want to restrict guest from viewing my forum. I only want to restrict them from the viewing the board index, instead they will be taken to the login page. I know this can be done in the index template but I'm not a coder so I don't know how to go about it.
2013-12-23, 02:31 PM
If you uncheck Can view board? option in ACP then they will not be able to see index whey'll get the login form
2013-12-24, 09:38 AM
(2013-12-23, 02:31 PM)marcus123 Wrote: [ -> ]If you uncheck Can view board? option in ACP then they will not be able to see index whey'll get the login form
That's the problem. If I uncheck "Can view board", guest won't be able to view threads but I want them to be able to view threads. You get me?
I only want to restrict guest access on index page.
2013-12-25, 11:41 AM
I'm so happy I've done it at last.
Here's the code
<?php
if(!$mybb->user['uid'])
{
error_no_permission();
}
?>
I inserted it in my index template and it worked although I use a pluginto enable php code in templates.
Thanks for your time anyway. Just that you didn't understand me.
Here's the code
<?php
if(!$mybb->user['uid'])
{
error_no_permission();
}
?>
I inserted it in my index template and it worked although I use a pluginto enable php code in templates.
Thanks for your time anyway. Just that you didn't understand me.
2013-12-25, 12:59 PM
Do you realize that this will also restrict access to Google and others ain't good for SEO baby!!
2013-12-26, 07:46 PM
That's the reason I want to do it in my index only. So that guest and bots can be able to access other pages.