SimplePortal

Support => English Support => Topic started by: steve51184 on February 19, 2010, 11:24:21 AM

Title: disable for guests?
Post by: steve51184 on February 19, 2010, 11:24:21 AM
hey how do i disable simpleportal for guests?

using latest smf2 and sp
Title: Re: disable for guests?
Post by: Nathaniel on February 23, 2010, 03:43:46 PM
Disabling SMF browsing for guests will also disable SP for guests, you can also use the edit below:

Code: ("Find (Sources/Subs-Portal.php)") [Select]
if (WIRELESS || ($standalone && (isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']))) || !empty($settings['disable_sp']) || empty($modSettings['sp_portal_mode']) || (!empty($maintenance) && !allowedTo('admin_forum')) || isset($_GET['debug']) || (empty($modSettings['allow_guestAccess']) && $context['user']['is_guest']))
Code: ("Replace") [Select]
if (WIRELESS || ($standalone && (isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']))) || !empty($settings['disable_sp']) || empty($modSettings['sp_portal_mode']) || (!empty($maintenance) && !allowedTo('admin_forum')) || isset($_GET['debug']) || (empty($modSettings['allow_guestAccess']) && $context['user']['is_guest']) || $context['user']['is_guest'])
Title: Re: disable for guests?
Post by: steve51184 on February 23, 2010, 04:23:41 PM
but i don't want to disable browsing for guests just the portal so for a guest it looks just like smf and NOT sp+smf
Title: Re: disable for guests?
Post by: [SiNaN] on February 27, 2010, 06:26:37 AM
Sources/Subs-Portal.php

Code: (Find) [Select]
$context['standalone'] = $standalone;
Code: (Replace) [Select]
$context['standalone'] = $standalone;

if ($context['user']['is_guest'])
$settings['disable_sp'] = true;
Title: Re: disable for guests?
Post by: steve51184 on February 27, 2010, 08:25:55 AM
perfect thank you ;)
Title: Re: disable for guests?
Post by: Pandor on March 25, 2010, 07:05:03 PM
Disabling SMF browsing for guests will also disable SP for guests, you can also use the edit below:

Code: ("Find (Sources/Subs-Portal.php)") [Select]
if (WIRELESS || ($standalone && (isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']))) || !empty($settings['disable_sp']) || empty($modSettings['sp_portal_mode']) || (!empty($maintenance) && !allowedTo('admin_forum')) || isset($_GET['debug']) || (empty($modSettings['allow_guestAccess']) && $context['user']['is_guest']))
Code: ("Replace") [Select]
if (WIRELESS || ($standalone && (isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']))) || !empty($settings['disable_sp']) || empty($modSettings['sp_portal_mode']) || (!empty($maintenance) && !allowedTo('admin_forum')) || isset($_GET['debug']) || (empty($modSettings['allow_guestAccess']) && $context['user']['is_guest']) || $context['user']['is_guest'])
Same question here...
Although the answer wasn't what i expected.

I've disabled guests from browsing the forum and when I logout, the forum button is gone, but when I click the home button, I can see the forum index, instead of a login/register box (what I was expecting).

This is with TP in front page mode.

Seems like a flaw, As I disabled guest browsing, just because I do not want them to see the forum's index page.
Title: Re: disable for guests?
Post by: Nathaniel on March 27, 2010, 05:50:28 PM
This site is not for TinyPortal (TP). ;)

Well, that is an issue with SMF, ask over at SM.org if you want to change default SMF behaviour (the allowing of guests to view the board index).
Title: Re: disable for guests?
Post by: Pandor on March 28, 2010, 04:58:57 PM
This site is not for TinyPortal (TP). ;)

Well, that is an issue with SMF, ask over at SM.org if you want to change default SMF behaviour (the allowing of guests to view the board index).
Aargh, my bad. That's a typo though, I am using SP  :-[

I don't want guests to see anything, other then the login/register.
With SP in any other mode, it works as expected. But with SP in front page mode, when a guest clicks the home button, they can see the boards index. Trying to browse a board does take them to the login/register menu though.
Title: Re: disable for guests?
Post by: steve51184 on April 03, 2010, 10:29:12 AM
Sources/Subs-Portal.php

Code: (Find) [Select]
$context['standalone'] = $standalone;
Code: (Replace) [Select]
$context['standalone'] = $standalone;

if ($context['user']['is_guest'])
$settings['disable_sp'] = true;

this no longer works for SimplePortal 2.3.2 ???
Title: Re: disable for guests?
Post by: [SiNaN] on April 03, 2010, 11:51:09 AM
For 2.3.2:

Sources/Subs-Portal.php

Code: (Find) [Select]
sportal_load_compat();
Code: (Replace) [Select]
sportal_load_compat();

if ($context['user']['is_guest'])
$settings['disable_sp'] = true;
Title: Re: disable for guests?
Post by: steve51184 on April 03, 2010, 01:48:00 PM
perfect thank you :)
Title: Re: disable for guests?
Post by: Pandor on April 03, 2010, 05:55:33 PM
My problem seems to be fixed in 2.3.2.
Now it's showing the login/register box instead of the forum index on the frontpage, for guests.  :thumbsup:
Title: Re: disable for guests?
Post by: steve51184 on April 03, 2010, 05:58:21 PM
also can an option to disable the postal for guests not be integrated into SP?
Title: Re: disable for guests?
Post by: [SiNaN] on April 05, 2010, 04:12:50 AM
Maybe, but I'm not sure if many people would find it useful.
Title: Re: disable for guests?
Post by: demlak on November 21, 2012, 06:12:22 PM
hmm.. what about disabling sp for guests in sp 2.3.5?

EDIT:
hmm.. seems i got it..

Code: (find) [Select]
$context['SPortal']['core_compat'] = $settings['name'] == 'Core Theme';
$context['SPortal']['on_portal'] = getShowInfo(0, 'portal', '');
}
Code: (replace) [Select]
$context['SPortal']['core_compat'] = $settings['name'] == 'Core Theme';
$context['SPortal']['on_portal'] = getShowInfo(0, 'portal', '');
}

                if ($context['user']['is_guest'])
$settings['disable_sp'] = true;

seems to work.. any objections?
SimplePortal 2.3.8 © 2008-2024, SimplePortal