WP plugin: wp-zwq-statistics-EN
- Plugin Name: wp-zwq-statistics-EN
- Version: 0.9b
- Plugin URI: http://www.zwuq.net/?p=19
- Description: Count total visits, visits today, number of online visitors , visitor’s ip, visiter’s browser and you can decide which part to display manually;please read README first carefully!
- Author: ZWQ
- Author URI: http://www.zwuq.net
- Copyright: Copyright 2006 ZWQ , you can use and modify it freely but Any modification or improvement of this plugin *MUST* send a copy to the author, just for study, zwuquan#want_no_spam#AT#gmail*com
**Installation**
step1: you should create database table yourself manually using the following sql
just copy the follow sql to your “sql window” and excute (such as phpmyadmin’s)
if you are familiar with sql , you can modify it yourself to determin the inital total_counter
and anything else , but DO NOT change anything you are not sure
/* you may need these if you want to know how it works
* flag = 1 : IP of online users (defult)
* flag = 2 : total visits
* flag = 3 : visits today
*/
CREATE TABLE `wp_zwq_statistics` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`counter` INT( 15 ) NOT NULL DEFAULT ‘0′,
`date` VARCHAR( 20 ) NOT NULL DEFAULT ‘0′,
`flag` TINYINT NOT NULL DEFAULT ‘1′,
`timestamp` INT( 15 ) NOT NULL DEFAULT ‘0′,
`ip` VARCHAR( 40 ) NOT NULL DEFAULT ‘0′
) ENGINE = MYISAM ;
INSERT INTO `wp_zwq_statistics` ( `id` , `counter` , `date` , `flag` , `timestamp` , `ip` )
VALUES (
‘1′, ‘0′, ‘0′, ‘2′, ‘0′, ‘0′
);
INSERT INTO `wp_zwq_statistics` ( `id` , `counter` , `date` , `flag` , `timestamp` , `ip` )
VALUES (
‘2′, ‘0′, ‘0′, ‘3′, ‘0′, ‘0′
);
step2: insert into your theme’s header.php(you can use theme editor in the wordpress itself)
!!!NOTE:you *MUST* put this code to the first line of header.php , means befor ANY other HTML or other code
step3: change the code below in the source code of the plugin to determine what to show, just del what you do not want
echo “online users: $online
visits today: $todaycount
total visits: $totalcount
your ip is :
$ip
your browser:
$browser
“;
step4: insert any place you like to show the statistics
enjoy :)
该日志共有 3 条评论
发表评论 | 展开/关闭评论 | RSS订阅 | 反项链接