Compete released it’s API today, so I decided to make a widget for WordPress using it.
SVN Checkout
svn co http://svn.wp-plugins.org/compete-widget/trunk
This adds a link, your current rank, the amount of visitors, and your rank image to the sidebar.
By default, it looks like:
In the widget admin panel, you can completely edit the title, your api key, your host (by default, it’s the current host), the amount of time before the cache expires, and the ability to completely edit the display (see below)
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
Installation
- Download compete.zip
- Extract and upload compete.php to the plugins/ directory
- Enable Compete Rankings in the Plugin admin panel
- In widget admin panel, place Compete in the sidebar, and edit it to enter your API Key
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
Editting display
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%
is there any update to this widget, that is, for WP 2.3.1?
is there any update to this widget, that is, for WP 2.3.1? that would be a lot better if it’s updated