Integrating Google Analytics in Mediawiki

In this post, we will talk about how to hack the Mediawiki Template to include Google Analytics without tracking the sysop user. The better way is, obviously, to use the GoogleAnalytics Extension (which would be discussed in a later post). This hack applies to Mediawiki 1.9.3+ In the mediawiki/includes/skin.php file,

How to use HTTP_POST_VARS in php

HTTP_POST_VARS was a very useful global array, but we dont use it these days. I do not understand or i did not find time to research if it has been discontinued or had some problem. But it was quite a nice array which stored all the fields and their values

calculating time difference in PHP

Date and time is one function which is always like there in whatever website, project you create. The more simple they look like to start with the more complex they become. Complexity comes in when we put these functions into different loops conditions etc. Well Today i got a bug

Automating the Copyright year information

This trick is really basic but is useful for automating an important information for your blog. If you have a copyright information defined anywhere in your blog with the year in it(usually present at the footer), then you might have to change the year everytime and sometimes you just forget.

Using JSON with PHP, javascript |Tutorial 1

Hi Programmers, Heard about JSON, and wandering how the hell you gonna implement it with PHP. And why would one use JSON when you have ajax and other alternatives. Well first of to understand JSON, i would recommend you to go through the JSON introduction part which i covered in

Its a framework world!!

Gone are the days when you need to start writing you code from the scratch. I personally “used to be” a strong promoted of scratch coding, where in i used to do the following task to achieve better code development. Create proper folder structure Use a templating engine Define generic

Detect chrome using php

The other day i was coding arround and i found that i need to know if the user is using the new shiny browser chrome. So for that i wrote a small snippet and wanted to share with you guys. Here is how we do in php. function is_chrome() {

Reflection API support now in PHP 5.1.3

PHP is now no where treated as weak language, day after day and with every next release of php’s new version more of the robust features are being added. Now this time, i was going through the PHP’s RSS feeds and i realized that now reflection fuctionality is also supported

PHP 5.3 changes on Microsoft windows

PHP 5.3.0 is only in its first alpha release. But, if you run PHP in Microsoft Windows, you should talk a look at… Release Notes for Windows Binaries (for PHP 5.3.0) Here are the important changes: – Support for Windows versions prior to Windows 2000 have been dropped. If you