Title: Display Guests In Who's Online

Author: John Briggs

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

Copyright:  2009 John Briggs. All rights reserved.

Compatability: XMB 1.9.11

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.

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

===================================
Go To Admin Panel -> Insert Raw SQL
===================================

ALTER TABLE `$table_settings` ADD `whosguest_status` set('on','off') NOT NULL default 'on';

=======================================================================================================================================
=======
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.'/onlineGuest.gif" border="0" alt="'.$lang['textguests'].'" /><span class="status_Member">'.$lang['textguests'].'</span>';
        if ($SETTINGS['whosguest_status'] == 'on' && $guestcount > 0) {
            for($mani=0;$mani<$guestcount; $mani++) {
                $memtally[] = '<img src="./images/ricons/onlineGuest.gif" border="0" alt="'.$lang['textguest1'].'" /><span class="status_Member">'.$lang['textguest1'].'</span>';
                $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 = ' - <span class="status_Member">'.$lang['textguests'].'</span>';
        if ($SETTINGS['whosguest_status'] == 'on' && $guestcount > 0) {
            for($mani=0;$mani<$guestcount; $mani++) {
                $memtally[] = '<span class="status_Member">'.$lang['textguest1'].'</span>';
                $num++;
            }
        }
        // Display Guests In Who's Online Mod End

=======================================================================================================================================
=======
Step 3:
=======

=================
Edit File: cp.php
=================

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

        $remoteimageson = $remoteimagesoff = '';
        settingHTML('attach_remote_images', $remoteimageson, $remoteimagesoff);

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

        // Display Guests In Who's Online Mod Begin
        $whosgueston = $whosguestoff = '';
        settingHTML('whosguest_status', $whosgueston, $whosguestoff);
        // Display Guests In Who's Online Mod End

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

        printsetting1($lang['textcatsonly'], 'catsonlynew', $catsonlyon, $catsonlyoff);

===============
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:
==========

        $remoteimages = formOnOff('remoteimages');

===============
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:
==========

        $sql = "UPDATE ".X_PREFIX."settings SET

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

            whosguest_status='$whosguest_statusnew',

=======================================================================================================================================
=======
Step 4:
=======

=====================
Edit File: header.php
=====================

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

/* Set Up HTML Templates and Themes */

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

// Display Guests In Who's Online Mod Begin
// Assert Display Guests In Whosonline Translation
if (!isset($lang['whosgueststatus'])) {
    require_once(ROOT.'include/translation.inc.php');
    setNewLangValue('whosgueststatus', 'Display guests in whosonline:');
    loadLang($langfile);
}
// Display Guests In Who's Online Mod End

=======================================================================================================================================
=======
Step 5:
=======

==================================================
Go To Admin Panel -> Templates -> index_whosonline
==================================================

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

$hidden

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

$guests$hidden

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

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

=======================================================================================================================================