Title: Compete widget
Author: sk33t
Published: <strong>2008 年 3 月 26 日</strong>
Last modified: 2009 年 1 月 6 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

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

# Compete widget

 作者：[sk33t](https://profiles.wordpress.org/sk33t/)

[下载](https://downloads.wordpress.org/plugin/compete-widget.zip)

 * [详情](https://cn.wordpress.org/plugins/compete-widget/#description)
 * [评价](https://cn.wordpress.org/plugins/compete-widget/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/compete-widget/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/compete-widget/#developers)

 [支持](https://wordpress.org/support/plugin/compete-widget/)

## 描述

#### Requirements

 * WordPress 2.2 or 2.0.x/2.1.x with WordPress Widgets
 * PHP 4.3.0 or greater (needed for function file_get_contents)
 * [API Key from Compete.com](http://developer.compete.com/) (You can use the one
   supplied, but that is limited to 1000 requests a day)

#### Features

 * Displays data about your site or any site you choose
 * Edit nearly all aspects of it via widget admin
 * Caching for large traffic sites

### Formatting

You can edit ‘Widget Formatting’ to change how the info is displayed. To access 
the variables, use this formatting:

 * %rank% – Rank of the site
 * %icon% – The icon relating to your traffic rank (large or small depending on 
   options)
 * %count% – People count
 * %host% – Hostname used in lookup
 * %link% – Link to the compete page for the host
 * %compete% – The compete link – Compete.com

The default formatting is:

<span style=”float:right;”><img src=”%icon%” alt=”%rank%” /></span>
 <a href=”%link%”
>%host%</a><br />

Ranking: %rank%<br />
 People: %count%<br /> %compete%

## 屏幕截图

[⌊Default Display⌉⌊Default Display⌉[

Default Display

[⌊Admin Panel⌉⌊Admin Panel⌉[

Admin Panel

## 安装

 1. Download compete-widget.zip
 2. Extract and upload compete.php to the plugins/ directory
 3. Enable Compete Rankings in the Plugin admin panel
 4. In widget admin panel, place Compete in the sidebar, and edit it to enter your 
    API key (optional)

## 常见问题

  Nothing shows up when I try it or I get an error that file_get_contents doesn’t
exist

This script relies on the function file_get_contents to fetch the RSS feed. If your
host doesn’t allow the use of it, but allows the use of curl, you can replace

    ```
    $stories = file_get_contents($uri);
    ```

with

    ```
    $ch = curl_init();
    $timeout = 5; // set to zero for no timeout
    curl_setopt ($ch, CURLOPT_URL, $uri);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $stories = curl_exec($ch);
    curl_close($ch);
    ```

  What does cache time mean?

It’s the number of seconds before the content will be requested again. You can set
this to be 0 or -1 to not use the caching system. If you edit any of the widgets
in the widget admin panel, the cache is cleared.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Compete widget」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ sk33t ](https://profiles.wordpress.org/sk33t/)

[帮助将「Compete widget」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/compete-widget)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/compete-widget/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/compete-widget/)，或通过[RSS](https://plugins.trac.wordpress.org/log/compete-widget/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/compete-widget/)。

## 额外信息

 *  版本 **1.3**
 *  最后更新：**18 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 2.0.2 或更高版本 **
 *  已测试的最高版本为 **2.7**
 *  语言
 * [English (US)](https://wordpress.org/plugins/compete-widget/)
 * 标签
 * [statistics](https://cn.wordpress.org/plugins/tags/statistics/)[stats](https://cn.wordpress.org/plugins/tags/stats/)
   [widget](https://cn.wordpress.org/plugins/tags/widget/)
 *  [高级视图](https://cn.wordpress.org/plugins/compete-widget/advanced/)

## 评级

尚未提交反馈。

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

[查看全部评论](https://wordpress.org/support/plugin/compete-widget/reviews/)

## 贡献者

 *   [ sk33t ](https://profiles.wordpress.org/sk33t/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/compete-widget/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://ja.meswilson.com)