{"id":2690,"date":"2008-03-26T01:17:17","date_gmt":"2008-03-26T01:17:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/compete-widget\/"},"modified":"2009-01-06T06:25:11","modified_gmt":"2009-01-06T06:25:11","slug":"compete-widget","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/compete-widget\/","author":394519,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.3","stable_tag":"trunk","tested":"2.7","requires":"2.0.2","requires_php":"","requires_plugins":"","header_name":"Compete widget","header_author":"James Wilson","header_description":"","assets_banners_color":"","last_updated":"2009-01-06 06:25:11","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/ja.meswilson.com","header_plugin_uri":"http:\/\/ja.meswilson.com\/blog\/2007\/05\/24\/compete-wordpress-widget\/","header_author_uri":"http:\/\/ja.meswilson.com\/blog\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":3112,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1566825","resolution":"2","location":"plugin","width":462,"height":345},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566825","resolution":"1","location":"plugin","width":206,"height":74}},"screenshots":{"1":"Default Display","2":"Admin Panel"}},"plugin_section":[],"plugin_tags":[19217,521,522,162],"plugin_category":[36,43],"plugin_contributors":[80390],"plugin_business_model":[],"class_list":["post-2690","plugin","type-plugin","status-publish","hentry","plugin_tags-compete","plugin_tags-statistics","plugin_tags-stats","plugin_tags-widget","plugin_category-analytics","plugin_category-customization","plugin_contributors-sk33t","plugin_committers-sk33t"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/compete-widget.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/compete-widget\/trunk\/screenshot-1.png?rev=1566825","caption":"Default Display"},{"src":"https:\/\/ps.w.org\/compete-widget\/trunk\/screenshot-2.png?rev=1566825","caption":"Admin Panel"}],"raw_content":"<!--section=description-->\n<h4>Requirements<\/h4>\n\n<ul>\n<li>WordPress 2.2 or 2.0.x\/2.1.x with WordPress Widgets<\/li>\n<li>PHP 4.3.0 or greater (needed for function file&#095;get&#095;contents)<\/li>\n<li><a href=\"http:\/\/developer.compete.com\/\">API Key from Compete.com<\/a> (You can use the one supplied, but that is limited to 1000 requests a day)<\/li>\n<\/ul>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Displays data about your site or any site you choose<\/li>\n<li>Edit nearly all aspects of it via widget admin<\/li>\n<li>Caching for large traffic sites<\/li>\n<\/ul>\n\n<h3>Formatting<\/h3>\n\n<p>You can edit \u2018Widget Formatting\u2019 to change how the info is displayed. To access the variables, use this formatting:<\/p>\n\n<ul>\n<li>%rank% - Rank of the site<\/li>\n<li>%icon% - The icon relating to your traffic rank (large or small depending on options)<\/li>\n<li>%count% - People count<\/li>\n<li>%host% - Hostname used in lookup<\/li>\n<li>%link% - Link to the compete page for the host<\/li>\n<li>%compete% - The compete link - Compete.com<\/li>\n<\/ul>\n\n<p>The default formatting is:<\/p>\n\n<p>&lt;span style=\"float:right;\"&gt;&lt;img src=\"%icon%\" alt=\"%rank%\" \/&gt;&lt;\/span&gt;\n&lt;a href=\"%link%\"&gt;%host%&lt;\/a&gt;&lt;br \/&gt;<\/p>\n\n<p>Ranking: %rank%&lt;br \/&gt;\nPeople: %count%&lt;br \/&gt;\n%compete%<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download compete-widget.zip<\/li>\n<li>Extract and upload compete.php to the plugins\/ directory<\/li>\n<li>Enable Compete Rankings in the Plugin admin panel<\/li>\n<li>In widget admin panel, place Compete in the sidebar, and edit it to enter your API key (optional)<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Nothing shows up when I try it or I get an error that file_get_contents doesn't exist<\/dt>\n<dd><p>This script relies on the function file&#095;get&#095;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<\/p>\n\n<pre>$stories = file_get_contents($uri);<\/pre>\n\n<p>with<\/p>\n\n<pre>$ch = curl_init();\n$timeout = 5; \/\/ set to zero for no timeout\ncurl_setopt ($ch, CURLOPT_URL, $uri);\ncurl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);\ncurl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n$stories = curl_exec($ch);\ncurl_close($ch);<\/pre><\/dd>\n<dt>What does cache time mean?<\/dt>\n<dd><p>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.<\/p><\/dd>\n\n<\/dl>","raw_excerpt":"This widget adds a link, your current rank, the amount of visitors, and your rank image to the sidebar.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/2690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=2690"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sk33t"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=2690"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=2690"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=2690"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=2690"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=2690"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=2690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}