Latest Posts »
Latest Comments »
Popular Posts »

Your Ad Here

WordPress StatPress plugin with empty table option

Written by Uthfull on September 21, 2008 – 4:32 pm

I use the StatPress plugin on this blog installation to gather some basic and live statistics of the visitors to my blog. I also use the WassUp plugin to capture some similar statistics. While both plugins have their own pros and cons, there is one thing that used to bother me about the StatPress plugin.

While there is an option to delete the older records from the table after a certain time, there is no option to empty the entire table of the stats. Why is this option required? Well, certain people like me host their blogs on servers which give a limited amount of database storage. Statistics plugins like WassUp and StatPress tend to accumulate a large amount of data and thereby take up a lot of database space.

WassUp has an option to empty the table whereas StatPress misses this functionality. I had to manually go into phpMyAdmin and empty the table. So, I decided to look into the plugin and try to add this functionality within it so that I could save myself from the hassle of going to a another software to manage the mess. I am no coder. I read through the entire code in statpress.php and made modifications as required.

I present to you, StatPress with empty table option.

statpress

As the above screenshot clearly shows, when you click on StatPress tab within your WordPress Dashboard, you will see an extra option called “Empty”. Clicking on it will delete all your stats from within the database and makes StatPress start afresh. However, please note that this action is permanent unless you have a previous backup. Once you click on Empty, it will empty your database without any further prompts or warnings.

DOWNLOAD : StatPress v 1.2.9.2 with Empty table option (79KB).

Those of you not wanting to undergo the exercise of downloading a new ZIP file of a plugin, deactivating the original StatPress 1.2.9.2 and reactivating this plugin may simply copy the entire code from the text file linked below.

DOWNLOAD : statpress.txt

Open the statpress.txt file. Either save it as statpress.php and overwrite the wp-content/plugins/wp-statpress/statpress.php file. Otherwise, from within your WordPress Dashboard, click on Plugins. Navigate to StatPress and click on Edit. Replace the entire text in the textbox on the next page with the text from the statpress.txt file you just downloaded.

Please note that I am in no way responsible to any damage or loss whatsoever the use of this modified plugin may cause to your installation. I am Jack of all trades, master of none. I don’t claim the code and modification is perfect. It is just a basic implementation. Take all precautions before you activate this plugin.

Finally, the development of StatPress seems to have stalled. There is another plugin StatPress Reloaded. Check it out.


Tags: , , , , , , ,
Posted in Technology | 2 Comments »