Quote:
Originally Posted by paul41598
Id like to see the ability to reset profile views
|
I hope I'm not stepping on any toes, I think Andreas does some wonderful work. I added a little cron job to reset the profile views at the beginning of each month. Just copy this code to a file and upload it to your
/forum/includes/cron folder as:
profileviewreset.php
Code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($DB_site))
{
exit;
}
// Who Viewed Profile in last month reset
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET whol = '6772'");
?>
Then go to your AdminCP to your Scheduled Task and add a new Scheduled Task
Quote:
Varname: profileviewsreset
Title: Reset Profile Views
Description: resets profile view log each month
Log Phrase:
Day of the week: *
Day of the Month: 1
Hour: 4 (I use 4 but you can enter any hour just not *)
Minute: 0 1 - - - -
Active: Yes
Log Entries: No
File Name: ./includes/cron/profileviewreset.php
Product: Vbulletin
|
Click "Save"
That should do it. I'm not much of a coder so if you have a problem with this I may not be of much help; however, there are lots of good coders here who I am sure can fix anything I've messed up. You do this at your own risk (had to add the disclaimer, lol)