Version Description
- Adding Total Posts, Total Pages, Total Comments, Total Spams*, Last Post Date, Feedburner Subscribe And Total Blog Hits.
- Adding English, Persian Language.
=
Download this release
Release Info
Developer | mostafa.s1990 |
Plugin | WP Statistics |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- readme.txt +56 -0
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- wp-statistics-fa_IR.mo +0 -0
- wp-statistics-fa_IR.po +62 -0
- wp-statistics.mo +0 -0
- wp-statistics.php +114 -0
- wp-statistics.po +62 -0
- wp-statistics.txt +1 -0
readme.txt
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WP-Statistics ===
|
2 |
+
Contributors: WP-Statistics
|
3 |
+
Donate link: http://iran98.org/
|
4 |
+
Tags: statistics, stats, blog, total, post, page, sidebar, widget, language, summary, feedburner, hits
|
5 |
+
Requires at least: 1.0
|
6 |
+
Tested up to: 3.1
|
7 |
+
Stable tag: 1.0
|
8 |
+
|
9 |
+
Summary statistics of blog.
|
10 |
+
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
A plugin for displaying Summary statistics of blog.
|
14 |
+
This plugin displays: Total Posts, Total Pages, Total Comments, Total Spams*, Last Post Date, Feedburner Subscribe And Total Blog Hits.
|
15 |
+
|
16 |
+
Language Support:
|
17 |
+
- English
|
18 |
+
- Persian (fa_IR) Mostafa Soufi
|
19 |
+
|
20 |
+
== Installation ==
|
21 |
+
|
22 |
+
1. Upload `wp-statistics.php` to the `/wp-content/plugins/` directory
|
23 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
24 |
+
3. Go to the themes > Sidebar And adding `Summary statistics` in the widget.
|
25 |
+
3. Or: The following functions to display in the theme:
|
26 |
+
|
27 |
+
Total Posts: <?php statistics_countposts(); ?>
|
28 |
+
Total Pages: <?php statistics_countpages(); ?>
|
29 |
+
Total Comments: <?php statistics_countcomment(); ?>
|
30 |
+
Total Spams: <?php statistics_countspam(); ?>
|
31 |
+
Total Users: <?php statistics_countusers(); ?>
|
32 |
+
Last Post Date: <?php statistics_lastpostdate(); ?>
|
33 |
+
Last Post Date (Persian): <?php statistics_lastpostdate('farsi'); ?>
|
34 |
+
Total Feedburner Subscribe: <?php statistics_countsubscrib('feedburnerurl'); ?> For Example: <?php statistics_countsubscrib('http://feeds2.feedburner.com/wpdelicious'); ?>
|
35 |
+
Total Blog Hits: <?php statistics_totalhits(); ?>
|
36 |
+
|
37 |
+
== Frequently Asked Questions ==
|
38 |
+
|
39 |
+
= What do the plugin? =
|
40 |
+
Summary statistics of blog.
|
41 |
+
|
42 |
+
== Screenshots ==
|
43 |
+
|
44 |
+
1. Screen shot (screenshot-1.png) Show the theme.
|
45 |
+
2. Screen shot (screenshot-2.png) Show the sidebar.
|
46 |
+
|
47 |
+
== Upgrade Notice ==
|
48 |
+
|
49 |
+
= 1.0 =
|
50 |
+
* Adding Total Posts, Total Pages, Total Comments, Total Spams*, Last Post Date, Feedburner Subscribe And Total Blog Hits.
|
51 |
+
* Adding English, Persian Language.
|
52 |
+
|
53 |
+
== Changelog ==
|
54 |
+
= 1.0 =
|
55 |
+
* Adding Total Posts, Total Pages, Total Comments, Total Spams*, Last Post Date, Feedburner Subscribe And Total Blog Hits.
|
56 |
+
* Adding English, Persian Language.
|
screenshot-1.png
ADDED
Binary file
|
screenshot-2.png
ADDED
Binary file
|
wp-statistics-fa_IR.mo
ADDED
Binary file
|
wp-statistics-fa_IR.po
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: wp-statistics\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-03-20 16:22+0330\n"
|
6 |
+
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: Mostafa <mst404@gmail.com>\n"
|
8 |
+
"Language-Team: <mat404@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: Persian\n"
|
15 |
+
"X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
|
18 |
+
#: F:\Program
|
19 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:15
|
20 |
+
msgid "Statistics"
|
21 |
+
msgstr "آمارهی وبلاگ"
|
22 |
+
|
23 |
+
#: F:\Program
|
24 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:18
|
25 |
+
msgid "Total Posts: "
|
26 |
+
msgstr "تعداد نوشتهها: "
|
27 |
+
|
28 |
+
#: F:\Program
|
29 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:23
|
30 |
+
msgid "Total Pages: "
|
31 |
+
msgstr "تعداد برگهها: "
|
32 |
+
|
33 |
+
#: F:\Program
|
34 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:28
|
35 |
+
msgid "Total Comments: "
|
36 |
+
msgstr "تعداد دیدگاهها: "
|
37 |
+
|
38 |
+
#: F:\Program
|
39 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:33
|
40 |
+
msgid "Total Spams: "
|
41 |
+
msgstr "تعداد جفنگها: "
|
42 |
+
|
43 |
+
#: F:\Program
|
44 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:38
|
45 |
+
msgid "Last Post Date: "
|
46 |
+
msgstr "تاریخ آخرین نوشته: "
|
47 |
+
|
48 |
+
#: F:\Program
|
49 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:43
|
50 |
+
msgid "Total Blog Hits: "
|
51 |
+
msgstr "تعداد کل بازدیدها: "
|
52 |
+
|
53 |
+
#: F:\Program
|
54 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:49
|
55 |
+
msgid "Summary statistics of blog"
|
56 |
+
msgstr "خلاصهای از آمار وبلاگ"
|
57 |
+
|
58 |
+
#~ msgid "Latest posts in wpdelicious"
|
59 |
+
#~ msgstr "آخرین ارسالی های وردپرس"
|
60 |
+
#~ msgid "Latest Delicious"
|
61 |
+
#~ msgstr "آخرین ارسالی ها"
|
62 |
+
|
wp-statistics.mo
ADDED
Binary file
|
wp-statistics.php
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: WP-Statistics
|
4 |
+
Plugin URI: http://iran98.org/category/wordpress/wp-statistics/
|
5 |
+
Description: Summary statistics of blog.
|
6 |
+
Version: 1.0
|
7 |
+
Author: Mostafa Soufi
|
8 |
+
Author URI: http://iran98.org/
|
9 |
+
License: GPL2
|
10 |
+
*/
|
11 |
+
load_plugin_textdomain('wp-statistics','wp-content/plugins/wp-statistics');
|
12 |
+
add_action("plugins_loaded", "statistics_admin_widget");
|
13 |
+
|
14 |
+
function statistics_widget() {
|
15 |
+
echo "<h2 class='widgettitle'>".__('Statistics', 'wp-statistics')."</h2>";
|
16 |
+
echo "<ul>";
|
17 |
+
echo "<li>";
|
18 |
+
echo __('Total Posts: ', 'wp-statistics');
|
19 |
+
statistics_countposts();
|
20 |
+
echo "</li>";
|
21 |
+
|
22 |
+
echo "<li>";
|
23 |
+
echo __('Total Pages: ', 'wp-statistics');
|
24 |
+
statistics_countpages();
|
25 |
+
echo "</li>";
|
26 |
+
|
27 |
+
echo "<li>";
|
28 |
+
echo __('Total Comments: ', 'wp-statistics');
|
29 |
+
statistics_countcomment();
|
30 |
+
echo "</li>";
|
31 |
+
|
32 |
+
echo "<li>";
|
33 |
+
echo __('Total Spams: ', 'wp-statistics');
|
34 |
+
statistics_countspam();
|
35 |
+
echo "</li>";
|
36 |
+
|
37 |
+
echo "<li>";
|
38 |
+
echo __('Last Post Date: ', 'wp-statistics');
|
39 |
+
statistics_lastpostdate();
|
40 |
+
echo "</li>";
|
41 |
+
|
42 |
+
echo "<li>";
|
43 |
+
echo __('Total Blog Hits: ', 'wp-statistics');
|
44 |
+
statistics_totalhits();
|
45 |
+
echo "</li>";
|
46 |
+
}
|
47 |
+
|
48 |
+
function statistics_admin_widget() {
|
49 |
+
register_sidebar_widget(__('Summary statistics of blog', 'wp-statistics'), 'statistics_widget'); }
|
50 |
+
|
51 |
+
function statistics_countposts($type=publish) {
|
52 |
+
$count_posts = wp_count_posts();
|
53 |
+
echo $count_posts->$type;
|
54 |
+
}
|
55 |
+
|
56 |
+
function statistics_countpages() {
|
57 |
+
$count_pages = wp_count_posts('page');
|
58 |
+
echo $count_pages->publish;
|
59 |
+
}
|
60 |
+
|
61 |
+
function statistics_countcomment() {
|
62 |
+
global $wpdb;
|
63 |
+
$countcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
|
64 |
+
if (0 < $countcomms) $countcomms = number_format($countcomms);
|
65 |
+
echo $countcomms;
|
66 |
+
}
|
67 |
+
|
68 |
+
function statistics_countspam() {
|
69 |
+
echo number_format_i18n(get_option('akismet_spam_count'));
|
70 |
+
}
|
71 |
+
|
72 |
+
function statistics_countusers() {
|
73 |
+
$result = count_users();
|
74 |
+
echo $result['total_users'];
|
75 |
+
}
|
76 |
+
|
77 |
+
function statistics_lastpostdate($type=english) {
|
78 |
+
global $wpdb;
|
79 |
+
$db_date = $wpdb->get_var("SELECT post_date FROM $wpdb->posts WHERE post_type='post' AND post_status='publish' ORDER BY ID DESC LIMIT 1");
|
80 |
+
$date_format = get_option('date_format');
|
81 |
+
if ( $type == 'farsi' ) {
|
82 |
+
echo jdate($date_format, strtotime($db_date));
|
83 |
+
} else
|
84 |
+
echo date($date_format, strtotime($db_date));
|
85 |
+
}
|
86 |
+
|
87 |
+
// Show Count Feedburner Subscribe by Affiliate Marketer
|
88 |
+
function statistics_countsubscrib($feed_url) {
|
89 |
+
$feedcount = get_option("feedrsscount");
|
90 |
+
if ($feedcount['lastcheck'] < (mktime()-3600)) {
|
91 |
+
$whaturl='https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri='.$feed_url;
|
92 |
+
$ch = curl_init();
|
93 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
94 |
+
curl_setopt($ch, CURLOPT_URL, $whaturl);
|
95 |
+
$data = curl_exec($ch);
|
96 |
+
curl_close($ch);
|
97 |
+
$xml = new SimpleXMLElement($data);
|
98 |
+
$fb = $xml->feed->entry['circulation'];
|
99 |
+
$feedcount['count'] = number_format($fb);
|
100 |
+
$feedcount['lastcheck'] = mktime();
|
101 |
+
update_option("feedrsscount",$feedcount);}
|
102 |
+
echo $feedcount['count'];
|
103 |
+
}
|
104 |
+
|
105 |
+
function statistics_totalhits() {
|
106 |
+
$file_counter = ("wp-content/plugins/wp-statistics/wp-statistics.txt");
|
107 |
+
$hits = file($file_counter);
|
108 |
+
$hits[0] ++;
|
109 |
+
$fp = fopen($file_counter , "w");
|
110 |
+
fwrite($fp, "$hits[0]");
|
111 |
+
fclose($fp);
|
112 |
+
echo $hits[0];
|
113 |
+
}
|
114 |
+
?>
|
wp-statistics.po
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: wp-statistics\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-03-20 16:22+0330\n"
|
6 |
+
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: Mostafa <mst404@gmail.com>\n"
|
8 |
+
"Language-Team: <mat404@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: English\n"
|
15 |
+
"X-Poedit-Country: UNITED KINGDOM\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
|
18 |
+
#: F:\Program
|
19 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:15
|
20 |
+
msgid "Statistics"
|
21 |
+
msgstr "Statistics"
|
22 |
+
|
23 |
+
#: F:\Program
|
24 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:18
|
25 |
+
msgid "Total Posts: "
|
26 |
+
msgstr "Total Posts: "
|
27 |
+
|
28 |
+
#: F:\Program
|
29 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:23
|
30 |
+
msgid "Total Pages: "
|
31 |
+
msgstr "Total Pages: "
|
32 |
+
|
33 |
+
#: F:\Program
|
34 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:28
|
35 |
+
msgid "Total Comments: "
|
36 |
+
msgstr "Total Comments: "
|
37 |
+
|
38 |
+
#: F:\Program
|
39 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:33
|
40 |
+
msgid "Total Spams: "
|
41 |
+
msgstr "Total Spams: "
|
42 |
+
|
43 |
+
#: F:\Program
|
44 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:38
|
45 |
+
msgid "Last Post Date: "
|
46 |
+
msgstr "Last Post Date: "
|
47 |
+
|
48 |
+
#: F:\Program
|
49 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:43
|
50 |
+
msgid "Total Blog Hits: "
|
51 |
+
msgstr "Total Blog Hits: "
|
52 |
+
|
53 |
+
#: F:\Program
|
54 |
+
#: Files\wamp\www\wordpress\wp-content\plugins\wp-statistics/wp-statistics.php:49
|
55 |
+
msgid "Summary statistics of blog"
|
56 |
+
msgstr "Summary statistics of blog"
|
57 |
+
|
58 |
+
#~ msgid "Latest posts in wpdelicious"
|
59 |
+
#~ msgstr "آخرین ارسالی های وردپرس"
|
60 |
+
#~ msgid "Latest Delicious"
|
61 |
+
#~ msgstr "آخرین ارسالی ها"
|
62 |
+
|
wp-statistics.txt
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
81
|