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
Modifying Wordpress
Posted by Jonathan Ng | Filed under Technical
Don’t let the title fool you, I’m not WordPress “modder”. It’s just that WordPress’ post_nav_link() function needs a little tuning to work properly. According to WordPress’ codex documetation, post_nav_link() displays links for next and previous pages. Useful for providing “paged” navigation of index, category and archive pages.
To display “< View Newer Posts or View Older Posts >“, you simply enter the following wherever you want it the links to appear: Read the rest of this entry »
What Do You Blog About?
Posted by Jonathan Ng | Filed under Personal
I blog about web design, development and life. When I started creating this site, there were quite some stuff about web design to blog about. Not only were there links to online resources, but I also blog about my site’s development progress.
Lately, I’ve been a little tied up with studies and assignments. When I’m done with those, I’m already tired and hardly have time to do any further development of JNLS.Net, let alone blog. Hence the marked decrease in posts that are web-design related. I suddenly realize that I havn’t check stylegala for quite a while. Most of my recent blog posts, are general in nature. So general, that I even got fed up with categories and started tagging them. Read the rest of this entry »
Ultimate Tag Warrior
Posted by Jonathan Ng | Filed under Technical
As I find less time to do web development, I wander online and blog about a variety of things. I added a “tech” category, but obviously it didn’t suffice. So at last, I started tagging my posts.
First step was to find a tagging plug-in for wordpress. I simply Googled and found this: Ultimate Tag Warrior. The name itself is impressive enough. The plugin, certainly “ultimate”. Read the rest of this entry »
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