============================================================================================================================
Title: Portal System

Version: 1.1

Author: John Briggs

Description:
This modification will add a portal system interface section to your forum.
This modification provide the ability to create blocks for the portal.

Copyright:  2009 John Briggs. All rights reserved.

Compatibility: XMB 1.9.8 SP4

Install Note: Before adding this modificaiton to your forum you should back up all files related to this modification.

License Note: This modification is released under the GPL v3 License. A copy is provided with this software package.

Author Note: This modification is developed and released for use with XMB 1.9.8 SP4 which is provided by XMBGarage.com.

============================================================================================================================
=======
Step 1:
=======

Please upload the following files to your forum directory.

"portal.php", "cp_portal.php", "portal.xmb"

Please upload the following file to your forum "lang" directory.

"English.portal.php"

Please upload the following image to all your theme folders.

"top_portal.gif"

============================================================================================================================
=======
Step 2:
=======
================
Edit File: index.php
================
==========
Find Code:
==========

require 'header.php';

===============
Add Code Below:
===============

// Portal System Mod Begin
if ($SETTINGS['portalstatus'] == 'on' && $SETTINGS['portalview'] == 'on' && !isset($forums) && !isset($gid)) {
    redirect('portal.php', 0);
}
// Portal System Mod End

============================================================================================================================
=======
Step 3:
=======
=================
Edit File: header.php
=================
==========
Find Code:
==========

$othertid = '';

===============
Add Code Below:
===============

// Portal System Mod Begin
$setCanonicalLink = '';
// Portal System Mod End

==========
Find Code:
==========

    'members',

===============
Add Code Below:
===============

    'portal_templates',

==========
Find Code:
==========

if (file_exists(ROOT.'lang/'.$langfile.'.lang.php')) {
    require ROOT.'lang/'.$langfile.'.lang.php';
} else {
    require ROOT.'lang/English.lang.php';
}

===============
Add Code Below:
===============

// Portal System Mod Begin
if (file_exists(ROOT.'lang/'.$langfile.'.portal.php')) {
    require ROOT.'lang/'.$langfile.'.portal.php';
} else {
    require ROOT.'lang/English.portal.php';
}
// Portal System Mod End

==========
Find Code:
==========

    $logo = '<a href="index.php"><img src="'.$boardimg.'" alt="'.$bbname.'" border="0" /></a>';

================
Replace Code With:
================

    // Portal System Mod Begin
    if ($SETTINGS['portalstatus'] == 'on' && $SETTINGS['portalview'] == 'on') {
        $logo = '<a href="index.php?forums"><img src="'.$THEME['boardimg'].'" alt="'.$bbname.'" border="0" /></a>';
    } else {
        $logo = '<a href="index.php"><img src="'.$THEME['boardimg'].'" alt="'.$bbname.'" border="0" /></a>';
    }
    // Portal System Mod End


==========
Find Code:
==========

if ($SETTINGS['searchstatus'] == 'on') {
    $links[] = '<img src="'.$imgdir.'/top_search.gif" alt="'.$lang['altsearch'].'" border="0" /> <a href="misc.php?action=search"><font class="navtd">'.$lang['textsearch'].'</font></a>';
}

===============
Add Code Above:
===============

// Portal System Mod Begin
if ($SETTINGS['portalstatus'] == 'on') {
    if (X_SCRIPT != 'portal.php') {
        $links[] = '<img src="'.$THEME['imgdir'].'/top_portal.gif" alt="'.$lang['portalnav'].'" border="0" /> <a href="portal.php"><font class="navtd">'.$lang['portalnav'].'</font></a>';
    } else if ($SETTINGS['portalstatus'] == 'on' && $SETTINGS['portalview'] == 'on') {
        $links[] = '<img src="'.$THEME['imgdir'].'/top_portal.gif" alt="'.$lang['portalindexnav'].'" border="0" /> <a href="index.php?forums"><font class="navtd">'.$lang['portalindexnav'].'</font></a>';
    } else {
        $links[] = '<img src="'.$THEME['imgdir'].'/top_portal.gif" alt="'.$lang['portalindexnav'].'" border="0" /> <a href="index.php"><font class="navtd">'.$lang['portalindexnav'].'</font></a>';
    }
}
// Portal System Mod End

==========
Find Code:
==========

$quickjump = '';
if ($SETTINGS['quickjump_status'] == 'on') {
    $quickjump = forumJump();
}

===============
Add Code Below:
===============

// Portal System Mod Begin
$setCanonicalLink = '';
if ($SETTINGS['portalstatus'] == 'on' && $SETTINGS['portalview'] == 'on') {
    $setCanonicalLink = 'index.php?forums';
} else {
    $setCanonicalLink = 'index.php';
}
// Portal System Mod End

============================================================================================================================
=======
Step 4:
=======
=======================
Edit File: inlcude/admin.inc.php
=======================
==========
Find Code:
==========

    <td class="tablerow" align="left" valign="top" width="20%" bgcolor="<?php echo $THEME['altbg2']?>">
    </td>

================
Replace Code With:
================

    <td class="tablerow" align="left" valign="top" width="20%" bgcolor="<?php echo $THEME['altbg2']?>">
    <!-- Portal System Mod Begin -->
    &raquo;&nbsp;<a href="cp_portal.php"><?php echo $lang['portalcp']?></a><br />
    <!-- Portal System Mod End -->
    </td>

============================================================================================================================
=======
Step 5:
=======
=======================
Edit File: include/online.inc.php
=======================

==========
Find Code:
==========

    } else if (false !== strpos($url, '/cp.php') || false !== strpos($url, '/cp2.php')

================
Replace Code With:
================

    } else if (false !== strpos($url, '/cp.php') || false !== strpos($url, '/cp2.php') || false !== strpos($url, '/cp_portal.php')

==========
Find Code:
==========

    } else if (false !== strpos($url, '/topicadmin.php')) {
        $location = $lang['onlinetopicadmin'];

===============
Add Code Below:
===============

    // Portal System Mod Begin
    } else if (false !== strpos($url, '/portal.php')) {
        $location = $lang['portalonline'];
    // Portal System Mod End

============================================================================================================================
=======
Step 6:
=======

===============================
Go To Administration Panel --> Templates
===============================
=====================
Edit Template: footer
=====================
==========
Find Code:
==========

index.php

================
Replace Code With:
================

$setCanonicalLink

============================================================================================================================
=======
Step 7:
=======
===============================
Go To Administration Panel --> Templates
===============================
=================
Edit Template: header
=================
==========
Find Code:
==========

index.php

================
Replace Code With:
================

$setCanonicalLink

============================================================================================================================
=======
Step 8:
=======

Please run install.php from your forum directory.

Example: http://www.yourdomain.ext/yourforum/install.php

============================================================================================================================
=======
Step 9:
=======

Please DELETE!! the following files from your "forum" directory if they still exist.

"install.php", "portal.xmb"

============================================================================================================================
========
Step 10:
========

To learn how to create new portal blocks please read the provided text file named "How_To.txt".

============================================================================================================================
Enjoy!