This plugin is made for WP plugin developers. It parses plugin stats page and can show download stats (today, yesterday, last week, total, as well as flash chart) in your WordPress page/post. Just place one of the following bbcodes in your page and it’ll get appropriate data: [today=plugin-name-slug] [yesterday=plugin-name-slug] [lastweek=plugin-name-slug] [total=plugin-name-slug] [stats=plugin-name-slug] or [chart=plugin-name-slug]
This plugin is using AJAX to get plugin stats (all but charts), but it can’t get two datums simultaneously so be careful not to use two bbcodes on same page ’cause it’ll get funny results or it’ll not get them at all. If you have two or more posts on your home page (as usually we do have), and these bbcode tags in them, that also counts as two (or more) bbcode tags on one page, so my personal suggestion is to use these on plugins’ WP powered pages, not in posts.
If ajax function can not be started (js code not loaded from external file) you’ll get a plus sign (which can be changed by replacing click.gif in plugin’s directory) and you need to click on it to get data.
- Upload contents of
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Enjoy your new plugin
- Which bbcode tag I need to use for… ?
This plugin supports six different tags to show six different types of data.
- Today’s downloads
To show how many times your plugin has been downloaded today, just place [today=plugin-name-slug]. For example: “My plugin has been downloaded [today=wp-plugin-stats] times today.”
- Yesterday’s downloads
To show how many times your plugin has been downloaded yesterday, just place [yesterday=plugin-name-slug].
- Last week’s downloads
To show how many times your plugin has been downloaded last week, just place [lastweek=plugin-name-slug].
- Total downloads
To show how many times your plugin has been downloaded since it is hosted on WordPress.org, just place [total=plugin-name-slug].
- All downloads
To show all data of above at once, just place [stats=plugin-name-slug].
- Download chart
To show Flash download chart which is displayed on your plugin’s stats page, just place [chart=plugin-name-slug]
- How to change dimensions of Flash chart?
In short: you can’t. You can resize flash applet, but chart will be cropped then, so I haven’t introduced possibility to change dimensions of flash chart. Default dimensions are 540×400 px
- How to disable automatic getting of data?
To disable automatic getting of data and force users to click on plus sign (
click.gif) find and open file
wp-content/plugins/wp-plugin-stats/wp-plugin-stats.phpand look for string
- How to change template of [stats] bbcode tag?
Go to Options -> Plugin Stats and change template in large text box. Following keywords will be replaced with actual data:
- %today% – will be replaced with number of today’s downloads
- %yesterday% – will be replaced with number of yesterday’s downloads
- %lastweek% – will be replaced with number of last week’s downloads
- %total% – will be replaced with total number of downloads
- Can I change styles of results?
Yes, you can style results with css styles. All styles are already placed in file
wp-content/plugins/wp-plugin-stats/wp-plugin-stats.cssand styles that apply to this plugin are:
- .wpstats_all – class of results’ DIV tag, used for [stats] bbcode
- .wpstats_loading – class of results’ SPAN tag, used for all bbcodes (except [chart]), applied when load.gif image is shown
- .wpstats_result – class of results’ SPAN tag, used for all bbcodes (except [chart] and [stats]), applied when results are fetched from WordPress.org
- My plugin won’t get data, but it displays chart well…?
Make sure that “Allow URL fopen” on your server is enabled. You can’t enable this manually if it is disabled, you’ll need to contact your webhost provider. Charts are directly embeded in page while other data is fetched from WordPress.org