Giving Up on ShortStat
Posted by Jonathan Ng | Filed under Technical
ShortStat is a simple statistics plugin for Wordpress. I’ve tried customizing it to suit my needs, by adding some SQL to extract more data out. But I just realized lately that there were some bugs with the extracted data. They sorta didn’t glue. I tried modifying and debugging it but it’s still the same. I guess I’m just not good at programming dates and such. Sigh..
Since the exams are already round the corner, I gave up on ShortStat. I just don’t have the time to make it work. After some Googling, I found Tracewatch. It’s PHP/MySQL based so you have to host it yourself. You can find a working demo here. It’s pretty neat though the graphs don’t seem to work in Firefox and Opera. Read the rest of this entry »
Custom Email Domains with Gmail
Posted by Jonathan Ng | Filed under Personal
It’s no big deal, but I finally figured out how to check me@jnls.net mails with Gmail, or as a matter of fact, any other web-based mail services. However, Gmail would be the choice for a particular reason that I’ll explain later.
I created a me@jnls.net address at my cPanel’s Mail Manager Menu. Next, I added my Gmail address to the “forwarders” list. Hence, any mail sent to me@jnls.net would be automatically fowarded to my Gmail account. The keyword here is “forwarded”, meaning there will still be a copy at my jnls.net servers. Aging only works with pop3 sessions. So I guess the only is to check on it with pop3 once in a while.
The reason Gmail was my choice, other than being one of the best mail services now, is that you can add an “account” so that mails are sent as “Jonathan Ng from me@jnls.net”. Yahoo only allows you to set a reply-to address, but Gmail allows modification to the whole from/sender thingy.
So I’m proud to announce, contact me at me@jnls.net!! Hm, I wonder if the spam would be so bad that I’ll need to turn on SpamAssassin…
Tags: web_apps
Fixing ShortStat
Posted by Jonathan Ng | Filed under Technical
After struggling for a couple of days trying to make ShortStat work (under stress and fatigue) to no avail, some prodding today revealed a simple (but unexplainable) workaround. The original ShortStat code uses the following to get the time (in seconds past, whenever it was) for 12:00 AM, today.
$dt = strtotime(gmdate("j F Y",time()+(((gmdate('I'))?($this->tz_offset+1):$this->tz_offset)*3600)));
$dt = $dt-(3600*2); // The above is off by two hours. Don't know why yet...
$dt = $dt-(3600*24);
Perhaps it worked in an older version of PHP 4.3.x, or maybe when time passes a certain point it wouldn’t work. I’m not a PHP guru so I have no idea. Heck, even the author had no idea. So when that code broke, the “number of visitors today” showed funny numbers. After much trial and error, I finally fixed mine. However, I’m not sure whether it’ll work on all servers, so here’s the logical steps to debug, and fix ShortStat. Read the rest of this entry »
Tags: web_apps
Pimp My Mail
Posted by Jonathan Ng | Filed under Technical
That’s the unofficial slogan for the next generation Hotmail code named “Kahuna”, currently under development. It’s okay if you’re clueless as to what “Kahuna” is, but if you still havn’t heard of Windows Live, then you might as well check out the next generation ideas from Microsoft.
I read an article about a couple of years back about Google. The author predicted that in the near future (right about now), everything would be web based. Your operating system matters less, as everything moves online. Google’s services such as Gmail and Google Maps arguably sparked that revolution. But now, Microsoft is realizing the importance of the internet. Start.com blew those table layouts away, Windows Live further cemented the direction Microsoft was heading, and there were even rumours of Microsoft considering an ad-based model for Windows and Office.
So what’s Kahuna? Read the rest of this entry »
Tags: web_apps
ShortStats
Posted by Jonathan Ng | Filed under Technical
Ever since the very day I started my own site, I’ve always wanted to track my visitors. AwStats doesn’t really work for me as I would need to wait for it to be refreshed by my host, and most importantly, it logs my visits too!!
So I went in search of a PHP-based alternative that would not log my own visits. TraceWatch particualaly impressed me as it was able to track visitors, one by one. And of course, it uses cookies so that I wont be part of “statistics”. But it needs FOUR queries to log each visitor, making it sorta “heavy”.
Then Danny introduced ShortStat to me. A simple Wordpress plugin that logs some simple statistics. However, it also logs my visits. Here’s the best part: I’m on static IP! Unlike Streamyx users who use dynamic IPs, I connect via a network provided at hostel. Thus, I’m assigned a static IP through the NAT protocol on the network (I’m no whiz at network stuff, so excuse the mis-information, if any).
Simply put, I just need to add 2 lines of codes (if you don’t count the curly braces) to stop ShortStat from logging my visits:
if ($ip == "218.208.66.170") {
return; // i'm checking my own pages.. don't log me!
}
Ain’t that wonderful?? Hehe… I guess I’ll work on a cookie based mod when I have the time next time. So the next time you visit this page, you’re (meaningful) statistic!