Title: Display Guests In Who's Online v1.0

Author: John Briggs

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

Copyright:  2009 John Briggs. All rights reserved.

Compatability: XMB 1.9.8 SP3

Updated for 1.9.8 by: WormHole @ XMB Garage

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="'.$THEME['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="'.$THEME['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 v4.0 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
    $SETTINGS['whosguest_status'] = '';
    $guests = ' - <img src="'.$THEME['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="'.$THEME['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
    $SETTINGS['whosguest_status'] = '';
    $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;
        } else if (!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:
==========

        $onlinetoday_statusnew = formOnOff('onlinetoday_statusnew');

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

        // Display Guests In Who's Online Mod Begin
        $whosguest_statusnew = formOnOff('whosguest_statusnew');
        // Display Guests In Who's Online Mod End

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

        $db->query("UPDATE ".X_PREFIX."settings SET

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

        $db->query("UPDATE ".X_PREFIX."settings SET
            whosguest_status='$whosguest_statusnew',

=======================================================================================================================================
=======
Step 5:
=======
=======================
Edit File: lang/English.lang.php
=======================
==================================
Add Code At Very Bottom 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!