Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 889
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Portal block at login page at a closed website.

Started by Maarten, July 03, 2010, 10:54:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Maarten

Dear SimplePortal,

Quote
* Which version of SMF you're using. SMF 2.0 RC3
* Which version of SimplePortal you're using. SimplePortal 2.3.2
* A link to your forum. (Or screenshots, either or). http://www.nhfans.nl/
* Any errors from your error log that may be related (please remove paths and IP addresses as this could give out personal information not needed on a public forum.) No, this is a question.
* A detailed description of the problem. (VERY IMPORTANT). This is a question not a problem.


I'm looking for a way to put a portalblock at the begin page of my website! Thats not home if you aren't logged in thats the login panel because it's a closed website (Login required)

Is there any way to put a portal block on that page?


Greetings,
Maarten

Nathaniel

Under 'display options' for that block, check the 'Advanced Options' checkbox, then under 'Select Actions' check the 'Login' checkbox.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Maarten

#2
Quote from: Nathaniel on July 03, 2010, 07:38:30 PM
Under 'display options' for that block, check the 'Advanced Options' checkbox, then under 'Select Actions' check the 'Login' checkbox.
Yeah I did that but it doesn't show up.

EDIT:
It seems the portal block only show up when I'm logged in? Or if the website is a open website (So no login required). So this could be a big/issue? :'(

Nathaniel

Find and remove the code below from your 'Sources/Subs-Portal.php' file.
|| (empty($modSettings['allow_guestAccess']) && $context['user']['is_guest'])

That will allow guests to view blocks, even when guests don't have access to the forums. You may need to change permissions on a few of your blocks though (so that guests can't view them).
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Maarten

Yeah it worked! But now every portal block shows up like it's the portal home? I just want one portal block on the page.. And that's a ad :P

So is there a way to put ONE or just the chosen portal blocks on the page?
Because the portal blocks who should show up in the portal it self shows up in the login page (Just index.php it asks you to login)? Kinda weird isn't it....

Nathaniel

Quote from: Nathaniel on July 04, 2010, 09:36:56 PM
That will allow guests to view blocks, even when guests don't have access to the forums. You may need to change permissions on a few of your blocks though (so that guests can't view them).
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Maarten

Thanks you very much! (Solved)

It's not solved, I put the block permission to 'Guests' didn't select the others (So guests only), but the portal block still shows up at the portal page when I'm logged in?!

Nathaniel

That would be because you are admin. If you follow the instructions in the post below then you shouldn't have that problem:

Quote from: Nathaniel on July 03, 2010, 07:38:30 PM
Under 'display options' for that block, check the 'Advanced Options' checkbox, then under 'Select Actions' check the 'Login' checkbox.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Maarten

Well I already did that.. But when I uncheck the 'portel', the portal block isn't showing up at the login pages that says that a login a requert (To see the portal page in this case)

Nathaniel

Hmm, the SP code which detects the login page, looks for the 'login' action which isn't what you want in this case. Make the edits below to your Sources/Subs-Portal.php file.

Code ("Find") 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']))
{
$context['disable_sp'] = true;
if ($standalone)
{
$get_string = '';
foreach ($_GET as $get_var => $get_value)
$get_string .= $get_var . (!empty($get_value) ? '=' . $get_value : '') . ';';
redirectExit(substr($get_string, 0, -1));
}
return;
}


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']))
{
$context['disable_sp'] = true;
if ($standalone)
{
$get_string = '';
foreach ($_GET as $get_var => $get_value)
$get_string .= $get_var . (!empty($get_value) ? '=' . $get_value : '') . ';';
redirectExit(substr($get_string, 0, -1));
}
return;
}
elseif (empty($modSettings['allow_guestAccess']) && $context['user']['is_guest'])
{
$context['disable_sp'] = true;
}


Code ("Find") Select
$portal = (empty($action) && empty($board) && SMF != 'SSI' && $modSettings['sp_portal_mode'] == 1) || !empty($context['standalone']) ? true : false;

Code ("Replace") Select
$portal = (empty($action) && empty($board) && SMF != 'SSI' && $modSettings['sp_portal_mode'] == 1) || !empty($context['standalone']) ? true : false;

global $user_info;
if (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', 'smstats', 'mailq', 'verificationcode', 'openidreturn',))))
$action = 'login';


With those edits, the 'login' action should work as you want it to, so you can remove the 'portal' display option from that block.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Maarten