============================================================================================================================
Title: Display Guests In Whosonline v1.0

Author: John Briggs

Description:
This modification will provide the ability to display guests in the Who's Online like display.
This modification provides an On/Off control switch in admin/settings panel for displaying guests in Who's Online.

Copyright:  2009 John Briggs. All rights reserved.

Compatability: XMB 1.9.5

Install 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. A copy is provided with this software package.

Author Note:
You downloaded this modification from XMBGarage.com, the #1 source for XMB related downloads.
Please visit http://www.xmbgarage.com/ for support.

============================================================================================================================
=======
Step 1:
=======
==============================
Go To Admin Panel --> Insert Raw SQL
==============================

Upload provided file named "SQL.txt" & click "Submit Changes" button.

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

        if (X_ADMIN || $show_inv_key === true) {
            $hidden = ' - <strike>'.$lang['texthmem'].'</strike>';
        } else {
            $hidden = '';
        }

===========================================
Add Code Below If You Want The User Rank Icon Version:
===========================================

        // Display Guests In Who's Online Mod Begin
        $guests = ' - <img src="'.$imgdir.'/online_guest.gif" border="0" alt="'.$lang['textguests'].'" title="'.$lang['textguests'].'" />'.$lang['textguests'];
        if ($SETTINGS['whosguest_status'] == 'on' && $guestcount > 0) {
            for ($mani = 0; $mani < $guestcount; $mani++) {
                $memtally[] = '<img src="'.$imgdir.'/online_guest.gif" border="0" alt="'.$lang['textguest1'].'" title="'.$lang['textguest1'].'" />'.$lang[textguest1];
                $num++;
            }
        }
        // Display Guests In Who's Online Mod End

====================================
Add Code Below If You Want The Text Version:
====================================

        // Display Guests In Who's Online Mod Begin
        $guests = ' - '.$lang['textguests'];
        if ($SETTINGS['whosguest_status'] == 'on' && $guestcount > 0) {
            for ($mani = 0; $mani < $guestcount; $mani++) {
                $memtally[] = $lang['textguest1'];
                $num++;
            }
        }
        // Display Guests In Who's Online Mod End

============================================================================================================================
=======
Step 3:
=======
=========================================
Edit File: portal.php (If the Portal System v2.4 is installed)
=========================================
==========
Find Code:
==========

    if (X_ADMIN || $show_inv_key === true) {
        $hidden = ' - <strike>'.$lang['texthmem'].'</strike>';
    } else {
        $hidden = '';
    }

===========================================
Add Code Below If You Want The User Rank Icon Version:
===========================================

    // Display Guests In Who's Online Mod Begin
    $guests = ' - <img src="'.$imgdir.'/online_guest.gif" border="0" alt="'.$lang['textguests'].'" title="'.$lang['textguests'].'" />'.$lang['textguests'];
    if ($SETTINGS['whosguest_status'] == 'on' && $guestcount > 0) {
        for ($mani = 0; $mani < $guestcount; $mani++) {
            $memtally[] = '<img src="'.$imgdir.'/online_guest.gif" border="0" alt="'.$lang['textguest1'].'" title="'.$lang['textguest1'].'" />'.$lang[textguest1];
            $num++;
        }
    }
    // Display Guests In Who's Online Mod End

====================================
Add Code Below If You Want The Text Version:
====================================

    // Display Guests In Who's Online Mod Begin
    $guests = ' - '.$lang['textguests'];
    if ($SETTINGS['whosguest_status'] == 'on' && $guestcount > 0) {
        for ($mani = 0; $mani < $guestcount; $mani++) {
            $memtally[] = $lang['textguest1'];
            $num++;
        }
    }
    // Display Guests In Who's Online Mod End

============================================================================================================================
=======
Step 4:
=======
==============
Edit File: cp.php
==============
==========
Find Code:
==========

        $avchecked[0] = $avchecked[1] = $avchecked[2] = false;
        if (!empty($avatarlist)) {
            $avchecked[1] = true;
        } elseif (!empty($avataroff)) {
            $avchecked[2] = true;
        } else {
            $avchecked[0] = true;
        }

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

        // Display Guests In Who's Online Mod Begin
        $whosgueston = $whosguestoff = '';
        switch ($SETTINGS['whosguest_status']) {
            case 'on':
                $whosgueston  = $selHTML;
                break;
            default:
                $whosguestoff = $selHTML;
                break;
        }
        // Display Guests In Who's Online Mod End

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

        printsetting1($lang['reportpoststatus'], 'reportpostnew', $reportposton, $reportpostoff);

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

        // Display Guests In Who's Online Mod Begin
        printsetting1($lang['whosgueststatus'], 'whosguest_statusnew', $whosgueston, $whosguestoff);
        // Display Guests In Who's Online Mod End

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

        $resetSigNew = ($resetSigNew == 'on') ? 'on' : 'off';

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

        // Display Guests In Who's Online Mod Begin
        $whosguest_statusnew = ($whosguest_statusnew == 'on') ? 'on' : 'off';
        // Display Guests In Who's Online Mod End

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

$db->query("UPDATE $table_settings SET langfile='$langfilenew'

====================================
Find Code At End Of Above Statement:
====================================

");

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

, whosguest_status='$whosguest_statusnew'");

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

// Display Guests In Who's Online Mod Begin
$lang['whosgueststatus'] = "Display Guests in Who's Online:";
// Display Guests In Who's Online Mod End

============================================================================================================================
=======
Step 6:
=======
==========================
Go To Admin Panel --> Templates
==========================
=========================
Edit Template: index_whosonline
=========================
==========
Find Code:
==========

$hidden

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

$guests$hidden

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

If you chose to use the User Rank Icon version then please upload the provided image named "online_guest.gif" to all theme folders.

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