Title: WP-DownloadCounter
Author: r-win
Published: <strong>2008年12月2日</strong>
Last modified: 2009年4月22日

---

プラグインを検索

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

![](https://s.w.org/plugins/geopattern-icon/wp-downloadcounter.svg)

# WP-DownloadCounter

 作者: [r-win](https://profiles.wordpress.org/r-win/)

[ダウンロード](https://downloads.wordpress.org/plugin/wp-downloadcounter.1.1.zip)

 * [詳細](https://ja.wordpress.org/plugins/wp-downloadcounter/#description)
 * [レビュー](https://ja.wordpress.org/plugins/wp-downloadcounter/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/wp-downloadcounter/#installation)
 * [開発](https://ja.wordpress.org/plugins/wp-downloadcounter/#developers)

 [サポート](https://wordpress.org/support/plugin/wp-downloadcounter/)

## 説明

Since WordPress does offer attaching downloads to pages, but doesn’t keep track 
of statistical information about these downloads, I wrote this plugin.
 I should
mention statistical information is a big word for just another download counter,
since that is main purpose of this plugin.

Features:

 * Keeps track of the amount of downloads of a certain file.
 * Keeps track of the last download time
 * Allows you to reset the counter
 * Allows you to add counters to both internal and external urls
 * Can use fancy urls (like /downloads/file.zip)
 * Can print the amount of downloads, the filesize and the last modified date in
   a post.

### Arbitrary section

**Using tags in your posts**

When writing a post or a page, you may want to add the URL or the amount of downloads
in your post. Using [ download(downloadname) ] (without the spaces) will be replaced
with the download url, [ downloadcounter(downloadname) ] will be replaced with the
amount of downloads, [ downloadsize(downloadname) ] will print the size of the download(
in GB, MB, kB or B), [ downloadupdated(downloadname) ] will print the last modified
date, using the WordPress setting you’ve specified for the date format. When creating
a link, you could, for instance, use [Download](https://ja.wordpress.org/plugins/wp-downloadcounter/[ download(file.zip) ]?output_format=md)(
of course, again, without the spaces within the [] brackets).

Finally, when using downloadsize of downloadupdated, you can specify one extra argument.
With downloadsize, you can add ,false to prevent the usage of the GB, MB, kB or 
B postfixes. So, for example, using [ downloadsize(file.zip, false) ] will just 
display the size in bytes. With downloadupdated, you can enter a PHP date format
string as extra argument. For example, [ downloadupdated(file.zip, d-m-Y) ] will
display a date like 27-11-2008.

**Retrieving download information from PHP**

Since version 0.6 is it possible to get information about the downloads using PHP,
so you can use this information directly in your templates or in you own plugins.
Only one function is important at the moment:

    ```
    download_information($download_name, $return_information = DOWNLOAD_URL | DOWNLOAD_AMOUNT)
    ```

This function will return an array with the requested information. You can specify
what information to return by the argument $return_information. The file downloadcounter-
options.php contains the correct define statements which can be used. Currently 
only URL, Amount, Size and Last Modified Date are available.

Using the code

    ```
    $info = download_information(wp-downloadcounter.zip, DOWNLOAD_URL | DOWNLOAD_AMOUNT | DOWNLOAD_SIZE | DOWNLOAD_LASTMODIFIED);
    var_dump($info);
    ```

returns:

    ```
    array(4) { ["url"]=> string(73) "http://projects.bovendeur.org/downloads/wp-downloadcounter.zip" ["amount"]=> string(4) "1878" ["size"]=> int(11006) ["lastmodified"]=> int(1228157426) }
    ```

## スクリーンショット

[⌊Shows the download counter in action.⌉⌊Shows the download counter in action.⌉[

Shows the download counter in action.

[⌊The source code of the post shown at screenshot-1. The used post tags are clearly
visible in this screen.⌉⌊The source code of the post shown at screenshot-1. The 
used post tags are clearly visible in this screen.⌉[

The source code of the post shown at screenshot-1. The used post tags are clearly
visible in this screen.

[⌊Displays the configuration and a list of available downloads.⌉⌊Displays the configuration
and a list of available downloads.⌉[

Displays the configuration and a list of available downloads.

[⌊Displays a complete list of the downloads, including referrer, ip address, download
date and the logged in user (if any).⌉⌊Displays a complete list of the downloads,
including referrer, ip address, download date and the logged in user (if any).⌉[

Displays a complete list of the downloads, including referrer, ip address, download
date and the logged in user (if any).

## インストール

This section describes how to install the plugin and get it working.

 1. Upload the content of the zip-file to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Navigate to the Permalink Settings and press Save Changes or disable Pretty Links
    in the DownloadCounter Options (under Manage->Downloads)
 4. Add you downloads to the Downloads page under the Manage menu
 5. Alter you posts to use the tags as shown in the _Using tags in your posts_ section

## 評価

このプラグインにはレビューがありません。

## 貢献者と開発者

WP-DownloadCounter はオープンソースソフトウェアです。以下の人々がこのプラグインに
貢献しています。

貢献者

 *   [ r-win ](https://profiles.wordpress.org/r-win/)

[“WP-DownloadCounter” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/wp-downloadcounter)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/wp-downloadcounter/)する
か、[SVN リポジトリ](https://plugins.svn.wordpress.org/wp-downloadcounter/)をチェック
するか、[開発ログ](https://plugins.trac.wordpress.org/log/wp-downloadcounter/)を
[RSS](https://plugins.trac.wordpress.org/log/wp-downloadcounter/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## メタ

 *  バージョン **1.01**
 *  最終更新日 **17年前**
 *  有効インストール数 **100+**
 *  WordPress バージョン ** 2.0.2またはそれ以降 **
 *  検証済み最新バージョン: **2.7.3**
 *  言語
 * [English (US)](https://wordpress.org/plugins/wp-downloadcounter/)
 * タグ
 * [Counter](https://ja.wordpress.org/plugins/tags/counter/)[download](https://ja.wordpress.org/plugins/tags/download/)
   [download counter](https://ja.wordpress.org/plugins/tags/download-counter/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/wp-downloadcounter/advanced/)

## 評価

 5つ星中2.5つ星

 *  [  0 5-星レビュー     ](https://wordpress.org/support/plugin/wp-downloadcounter/reviews/?filter=5)
 *  [  0 4-星レビュー     ](https://wordpress.org/support/plugin/wp-downloadcounter/reviews/?filter=4)
 *  [  1 3-星レビュー     ](https://wordpress.org/support/plugin/wp-downloadcounter/reviews/?filter=3)
 *  [  1 2-星レビュー     ](https://wordpress.org/support/plugin/wp-downloadcounter/reviews/?filter=2)
 *  [  0 1-星レビュー     ](https://wordpress.org/support/plugin/wp-downloadcounter/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-downloadcounter/reviews/#new-post)

[すべてのレビューを見る](https://wordpress.org/support/plugin/wp-downloadcounter/reviews/)

## 貢献者

 *   [ r-win ](https://profiles.wordpress.org/r-win/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/wp-downloadcounter/)

## 寄付

このプラグインが今後も改善できるよう応援しませんか ?

 [ このプラグインに寄付 ](http://projects.bovendeur.org/2007/07/06/download-counter/)