============================================================================================================================
Modification Title: Most Users Online v1.0

Author: John Briggs & Jonathon

Description: This modification will provide a text output of the time, date and total visits ever on index page.

Supported Version: XMB 1.9.5 SP1

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. 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 mod.
Downloading this modification from other sites could cause malicious code to enter into your XMB Forum software.
As such, xmbgarage.com will not offer support for modifications not offered in our Modification Request List.

NOTE: If you are using the Index Stats bar Modification then do not install this hack as it is incorporated in the Index Stats Bar code.
============================================================================================================================
=======
Step 1:
=======
====================================
Go To Administration Panel --> Insert Raw SQL
====================================

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

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

// Most Users Online Mod Begin
$lang['Most_Users'] = "Most users online ever was";
$lang['Most_On'] = "on";
$lang['Most_At'] = "at";
// Most Users Online Mod End

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

        $onlinetotal = $guestcount + $membercount;

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

        // Most Users Online Mod Begin
        $sql = $db->query("SELECT * FROM $table_mostonline");
        $mostonline = $db->fetch_array($sql);
        $db->free_result($sql);

        if ($onlinetotal > $mostonline['mostonlinecount']){
            $db->query("UPDATE $table_mostonline SET mostonlinetime = '".time()."', mostonlinecount = '".$onlinetotal."'");
        }

        $mostdate = gmdate($dateformat, $mostonline['mostonlinetime'] + ($timeoffset * 3600) + ($addtime * 3600));
        $mosttime = gmdate($timecode, $mostonline['mostonlinetime'] + ($timeoffset * 3600) + ($addtime * 3600));

        $mosttext = ''.$lang['Most_Users'].' <strong>'.$mostonline['mostonlinecount'].'</strong> '.$lang['Most_On'].' <strong>'.$mostdate.'</strong> '.$lang['Most_At'].' <strong>'.$mosttime.'</strong>.';
        // Most Users Online Mod End

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

,'members'

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

,'members','mostonline'

============================================================================================================================
=======
Step 5:
=======
===============================
Go To Administration Panel --> Templates
===============================
================
Edit Template: index
================
==========
Find Code:
==========

$memhtml

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

$memhtml<br />$mosttext

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