Title: Member Profile Views v1.0

Author: John Briggs

Description:
This modification will display the total number of times a member's profile has been viewed.

Compatability: XMB 1.9.11

Install Note: Before adding this modificatioin 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.

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

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

=======================================================================================================================================
=======
Step 2:
=======
=====================
Edit File: member.php
=====================

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

        $query = $db->query("SELECT * FROM ".X_PREFIX."members WHERE username='$member'");
        if ($db->num_rows($query) != 1) {
            header('HTTP/1.0 404 Not Found');
            error($lang['nomember']);
        }
        $memberinfo = $db->fetch_array($query);
        $memberinfo['password'] = '';
        $db->free_result($query);

===============
Add Code Above:
===============

        // Member Profile Views Mod Begin
        $db->query("UPDATE ".X_PREFIX."members SET views=views+1 WHERE username='$member'");
        // Member Profile Views Mod End

=================
Find Code (2 Times):
=================

$db->query("INSERT INTO ".X_PREFIX."members (username,

=====================
Find Code Inline (2 Times):
=====================

) VALUES ('$username',

=======================
Replace Code With (2 Times):
=======================

, views) VALUES ('',

====================================
Find Code At End Of Above Statement (2 Times):
====================================

)");

=======================
Replace Code With (2 Times):
=======================

, '$views')");

=======================================================================================================================================
=======
Step 3:
=======
==============================================
Go To Admin Panel -> Translations & Download Language File:
==============================================
=======================
Edit File: lang/English.lang.php
=======================

============================
Add Code To End Of File Above ?>
============================

// Member Profile Views Mod Begin
$lang['total_profile_view'] = "Total Views:";
// Member Profile Views Mod End

============================================
Go To Admin Panel -> Translations & Upload Language File:
============================================
=======================================================================================================================================
=======
Step 4:
=======
=========================
Go To Admin Panel -> Templates
=========================
=======================
Edit Template: member_profile
=======================
=======
Find Code :
=======

<td colspan="2" class="category"><font color="$cattext"><strong>$lang[textprofor] $member</strong></font></td>

===============
Replace with :
===============

<td colspan="2" class="category"><font color="$THEME[cattext]"><strong>$lang[textprofor] $member ($lang[total_profile_view] $memberinfo[views])</strong></font></td>

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