============================================================================================================================
Modification Title: Member Profile Views

Version: 2.0

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

Compatibility: XMB 1.9.8 SP3

Developed By: John Briggs

Copyright: Copyright:  2010 XMB Garage. All Rights Reserved.

Contributors: WormHole

Install Note: Before Installing this modification, you should back up all files and databases related to this modification.

License Note: This modification is released under the GPL v3 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 Administration Panel --> Insert Raw SQL
====================================

Upload provided file named "SQL.txt" and Submit Changes.

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

        $memberinfo = $db->fetch_array($db->query("SELECT * FROM $table_members WHERE username='$member'"));

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

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

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

) VALUES ('', '$username'

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

, views) VALUES ('', '$username'

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

)");

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

, 0)");

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

============================================================================================================================
=======
Step 4:
=======
===============================
Go To Administration Panel --> Templates
===============================
=======================
Edit Template: member_profile
=======================
==========
Find Code:
==========

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

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

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

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