Firstly, micxuy must mean user.php, out.php, story.php and libs/pageview.php.
Secondly, when he said "delete the database", I'm sure he meant "delete the pageviews table", which you can do by dropping it in phpmyadmin.
Thirdly, although micxuy said to comment out the functions in libs.pageview.php, I didn't find that was necessary because those functions are never called anyway once you've commented out the code in the other files.
So, I'll go step-by-step through what I did (using 9.8.2), highlighting the lines I commented out in red:
* Please backup your files and database before following anything I say. I'm just a novice. *
1. /user.php
Code:
// find out who last viewed this users profile
// $pageview = new Pageview;
// insert a pageview for the current viewer
// $pageview->type='profile';
// $pageview->page_id=$user->id;
// $pageview->user_id=$current_user->user_id;
require_once(mnminclude.'check_behind_proxy.php');
// $pageview->user_ip=check_ip_behind_proxy();
// $pageview->insert();
if(ShowProfileLastViewers == true){
$main_smarty->assign('ShowProfileLastViewers', true);
// setup some arrays
$last_viewers_names = array();
$last_viewers_profile = array();
$last_viewers_avatar = array();
// get the last 5 viewers
$last_viewers = $pageview->last_viewers(5);
// for each viewer, get their name, profile link and avatar and put it in an array
$viewers=new User();
if ($last_viewers) {
foreach($last_viewers as $viewer_id) {
$viewers->id=$viewer_id;
$viewers->read();
$last_viewers_names[] = $viewers->username;
$last_viewers_profile[] = getmyurl('user2', $viewers->username, 'profile');
$last_viewers_avatar[] = get_avatar('small', "", $viewers->username, $viewers->email);
}
}
// tell smarty about our arrays
$main_smarty->assign('last_viewers_names', $last_viewers_names);
$main_smarty->assign('last_viewers_profile', $last_viewers_profile);
$main_smarty->assign('last_viewers_avatar', $last_viewers_avatar);
} else {
// $main_smarty->assign('ShowProfileLastViewers', false);
}
2. /out.php
Code:
// $pageview = new Pageview; // $pageview->type='out'; // $pageview->page_id=$link->id; // $pageview->user_id=$current_user->user_id; require_once(mnminclude.'check_behind_proxy.php'); // $pageview->user_ip=check_ip_behind_proxy(); // $pageview->insert();
Code:
// log the pageview
// $pageview = new Pageview;
// $pageview->type='story';
// $pageview->page_id=$link->id;
// $pageview->user_id=$current_user->user_id;
require_once(mnminclude.'check_behind_proxy.php');
// $pageview->user_ip=check_ip_behind_proxy();
// find the last pageview
// $last_visit = $pageview->last_visit();
// if($last_visit != 0){$last_visit = txt_time_diff($pageview->last_visit(), time());}
// $main_smarty->assign('last_visit', $last_visit);
// $pageview->insert(); - Upload the above three files.
- Click on some links and view some profiles.
- If there are no errors, go into phpmyadmin and look at the last few entries in your pageviews table. If your recent testing is not in the table then everything worked.
5. Drop the pageviews table
In phpmyadmin, click on the link to the pageviews table and you should see a "Drop" tab. Clicking that will delete the table.
That should be all, and everything should still be working without the pageviews table. The last thing you might want to do is remove the "Last 5 people to view this profile" text from the profile page...
6. Edit /templates/your_template/user_center.tpl
Code:
<!-- <tr><td style='padding-top: 10px;'><strong>{#PLIGG_Visual_User_Profile_Last_5_Title#}:</strong></td></tr>
<tr><td>
{section name=customer loop=$last_viewers_names}
{if $UseAvatars neq "0"}<img style="padding-left:12px;" src="{$last_viewers_avatar[customer]}" align="absmiddle">{/if} <a href = "{$last_viewers_profile[customer]}">{$last_viewers_names[customer]}</a><br />
{/section}
</td></tr> --> 





Linear Mode
