SimplePortal

Customization => Custom Coding => Topic started by: Elochai on March 05, 2009, 08:54:43 PM

Title: Make an ?action=portal
Post by: Elochai on March 05, 2009, 08:54:43 PM
After having Sp running for over 2 weeks, I checked my Google Analytics.  The day after I installed SP, my bounce rate jumped to 50% (from 20%).  I would like it to be that I have SP installed, be the index.php page be my forum, and have action=portal be the portal page.  I know I have to edit my index.php file, but I don't know exactly what to do.
Thanks for any help :)
Title: Re: Make an ?action=portal
Post by: Nathaniel on March 06, 2009, 12:37:20 AM
The edits below are for your 'index.php' file, although you will also have to edit your links to change the title and link.

Please note that you will have to undo these edits before you uninstall SimplePortal for whatever reason (like upgrading). Otherwise it won't uninstall properly.

If you have SMF 1.1.x then replace the '2' parts in the code with '1-1'.

Find this code:
Code: [Select]
// Action and board are both empty... SPortal!
if (empty($board) && empty($topic) && $modSettings['sp_portal_mode'] == 1)
{
require_once($sourcedir . '/SPortal2.php');
return 'SPortal';
}
// Action and board are still both empty but no portal... BoardIndex
elseif (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}

Replace with this code:
Code: [Select]
// Action and board are still both empty but no portal... BoardIndex
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}

Find this code:
Code: [Select]
'forum' => array('BoardIndex.php', 'BoardIndex'),Replace with this code:
Code: [Select]
'portal' => array('SPortal2.php', 'SPortal'),
SimplePortal 2.3.8 © 2008-2024, SimplePortal