Wassup WP plugin - how to show Today’s hits in stead of last 24 hours

June 22, 2014 23:01 CEST, under technicalities category
last updated Jun 22nd, 2014 23:04 CEST

The feature missed was within the Visitors Details sub-menu. There we wanted the system to behave differently in two aspects:

  • show the NO Spider by default
  • show only Today’s hits in stead of the last 24 hours (the information of the ‘last 24 hours’ option was confusing - as it contains the data also from the previous day)

The changes are quite easy .. modify the line 154:

<li><a href=’?page=wassup&type=nospider’>Visitors Details</a></li>

and replace the lines 344-345 with this:

if ($_GET[’last’] == “”) $last = 1; else $last = $_GET[’last’];
if ($last == 1)
{
$from_date = strtotime(’+1 hours’, mktime(0,0,0));
}
else
{
$from_date = strtotime(’-’.$last.’ day’, $to_date);
}

Please mind that this article refers to the specific versions of the WP and the plugins (2.3 and 1.2b). Similar principle might be applied for older or newer versions.


We value your interest and opinions ...
  1.  (required)
  2. please, share your email or web address to get in touch (not required) this form delivers the message to us, does not leave a comment below
  3. Captcha