============================================================================================================================
Modification Title: Portal System Addon: Shoutbox

Version: 1.0

Author: Chris a.k.a. scan

Additonal Thanks: Please read Credits.txt

Last Updated: 04/15/10

Supported Version: XMB 1.9.5 SP1

Required: Portal System v2.4 must be installed to use this modification.

Description:
This modification will provide a fully loaded shoutbox to work with your portal with a full set of controls like:
    Shoutbox On/Off
    Allow Guest viewing of shouts On/Off
    Allow Guest to post shouts On/Off
    Allow Images in shouts On/Off
    Allow XMB Smilies On/Off
    Allow bbcode in shouts On/Off
    Allow HTML in shouts On/Off

You easily adjust the amount of shouts shown in the box and the total length allowed per shout. 
There are other features like trim old shouts and clear all shouts edit shouts delete single shouts.
This also uses the XMB censor function to help keep it clean.

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

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

Author Note:
For security purposes, Please Check: http://www.xmbgarage.com for the latest version of this modification.
Downloading this modification from other sites could cause malicious code to enter into your XMB Forum software.
As such, XMB Garage will not offer support for modifications not offered at our web site.
============================================================================================================================
=======
Step 1:
=======

Please upload the following files to your forum directory.

"cp_shout.php", "portal.shout.php", "shout.xmb", "install.php"

============================================================================================================================
=======
Step 2:
=======
========================
Edit File: lang/English.portal.php
========================
============================
Add Code To End Of File Above  ?>
============================

// Portal System Addon : Shoutbox Mod Begin
$lang['shoutbox'] = "$bbname Shoutbox";
$lang['shoutnomessage'] = "<div align=\"center\"><span class=\"mediumtxt\">You have not entered a message. Please go back and do so.</span></div>";
$lang['shoutdirectviewing'] = "<div align=\"center\"><span class=\"mediumtxt\">This file is to be used with the portal!<br />No Direct Viewing!</span></div>";
$lang['shouttolong'] = "<div align=\"center\"><span class=\"mediumtxt\">Your message was too long, messages must be less than ".$SETTINGS['shoutlength']." characters.</span></div>";
$lang['shoutsuccess'] = "Your message has been added successfully!";
$lang['shoutpost'] = 'Posted';
$lang['shoutby'] = 'By:';
$lang['shoutadminmenu'] = 'Shout Administration Menu';
$lang['shoutadmin'] = 'Shoutbox Admin';
$lang['shoutonline'] = "Viewing Shoutbox";
$lang['shoutedit'] = 'Edit Shouts';
$lang['shouttrim'] = 'Trim Shouts';
$lang['shoutcls'] = 'Clear Shouts';
$lang['shouttitle'] = "Show Shouts";
$lang['shoutdate'] = 'Shout Date:';
$lang['shoutid'] = 'ID:';
$lang['shoutsettings'] = 'Shoutbox Settings';
$lang['shoutstatus'] = 'Shout Status';
$lang['shoutgview'] = 'Guest View';
$lang['shoutgpost'] = 'Guest Shout';
$lang['shoutimg'] = 'Allow Images:';
$lang['shoutsmilies'] = 'Allow Smilies:';
$lang['shoutbbcode'] = 'Allow bbcode:';
$lang['shouthtml'] = 'Allow HTML:';
$lang['shoutoffline'] = 'Enter reason for offline Shoutbox:';
$lang['shoutshow'] = 'Number of shouts to be shown:';
$lang['shoutlength'] = 'Number of characters per shout:';
$lang['shoutsetconfirm'] = 'The Shoutbox settings have now been updated.';
$lang['shouteditconfirm'] = 'The entry was been edited!';
$lang['shoutdelconfirm'] = 'The entry was been deleted!';
$lang['shoutclsconfirm'] = 'All shouts have been cleared!';
$lang['shouttrimconfirm'] = 'Your shouts have been cleared!';
$lang['shoutconfirmcls'] = 'Are you sure you want to <strong>Delete</strong> all the shout\'s?';
$lang['shouttotal'] = 'You have a total of';
$lang['shoutshouts'] = 'shouts';
$lang['shoutmanytrim'] = 'How many would you like to trim?';
// Portal System Addon : Shoutbox Mod End

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

,'settings','smilies'

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

,'settings','shoutbox','smilies'

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

    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>

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

    <!-- Portal System Addon: Shoutbox Mod Begin -->
    &raquo;&nbsp;<a href="./cp_shout.php"><?php echo $lang['shoutadmin']?></a><br />
    <!-- Portal System Addon: Shoutbox Mod End -->

============================================================================================================================
=======
Step 5:
=======
===============
Edit File: misc.php
===============
==========
Find Code:
==========

) || false !== strpos($url, '/cp_portal.php')) {

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

) || false !== strpos($url, '/cp_portal.php') || false !== strpos($url, '/cp_shout.php')) {

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

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

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

    // Portal System Addon: Shoutbox Mod Begin
    } elseif (false !== strpos($url, "/cp_shout.php")) {
        $location = $lang['shoutonline'];
    // Portal System Addon: Shoutbox Mod End

============================================================================================================================
=======
Step 6:
=======
================
Edit File: portal.php
================
==========
Find Code:
==========

loadtemplates(

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

loadtemplates(
'portal_shout',

============================================================================================================================
=======
Step 7:
=======

Please run install.php from your forum directory.

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

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

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

"install.php", "shout.xmb"

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