{"id":2695,"date":"2008-03-21T17:53:29","date_gmt":"2008-03-21T17:53:29","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/reddit-widget\/"},"modified":"2009-01-06T06:31:59","modified_gmt":"2009-01-06T06:31:59","slug":"reddit-widget","status":"publish","type":"plugin","link":"https:\/\/scn.wordpress.org\/plugins\/reddit-widget\/","author":394519,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.2","stable_tag":"trunk","tested":"2.7","requires":"2.0.2","requires_php":"","requires_plugins":"","header_name":"Reddit Widget","header_author":"James Wilson","header_description":"","assets_banners_color":"","last_updated":"2009-01-06 06:31:59","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/ja.meswilson.com\/blog\/","header_plugin_uri":"http:\/\/ja.meswilson.com\/blog\/2007\/06\/01\/wordpress-reddit-widget\/","header_author_uri":"http:\/\/ja.meswilson.com\/blog\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":3039,"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"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566825","resolution":"1","location":"plugin"}},"screenshots":{"1":"Default Display","2":"Admin Panel"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1552,162],"plugin_category":[43,56],"plugin_contributors":[80390],"plugin_business_model":[],"class_list":["post-2695","plugin","type-plugin","status-publish","hentry","plugin_tags-reddit","plugin_tags-widget","plugin_category-customization","plugin_category-social-and-sharing","plugin_contributors-sk33t","plugin_committers-sk33t"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/reddit-widget.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/reddit-widget\/trunk\/screenshot-1.png?rev=1566825","caption":"Default Display"},{"src":"https:\/\/ps.w.org\/reddit-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<\/ul>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Displays your latest liked items (on reddit.com)<\/li>\n<li>Completely customizable display<\/li>\n<li>Caching for large traffic sites<\/li>\n<\/ul>\n\n<h3>Formatting<\/h3>\n\n<p>There are 3 parts needed to format the output.<\/p>\n\n<p>The first part, called items start in the admin panel, is the first part of the widget after the title. For the default formatting, this is just &lt;ul&gt;.<\/p>\n\n<p>The second part, called items end, is the ending of the widget. By default, this is:\n&lt;\/ul&gt;\n&lt;a href=\"%profile%\" style=\"float:right;\"&gt;%username%&lt;\/a&gt;<\/p>\n\n<p>The third part is what is called for each item. By default, this is:\n&lt;li style=\"list-style-type: none;\"&gt;&lt;a href=\"%link%\"&gt;%title%&lt;\/a&gt; (&lt;a href=\"%more%\"&gt;more&lt;\/a&gt;)&lt;\/li&gt;<\/p>\n\n<p>The premise of calling each value is this:<\/p>\n\n<ol>\n<li>start<\/li>\n<li>item<\/li>\n<li>item<\/li>\n<li>...<\/li>\n<li>item<\/li>\n<li>end<\/li>\n<\/ol>\n\n<p>The formatting for items is:<\/p>\n\n<ul>\n<li>%title% - Title of the item<\/li>\n<li>%link% - Link to the item<\/li>\n<li>%desc% - Description of the item - Just [link] [more] links<\/li>\n<li>%date% - Date the item was submitted (ISO)<\/li>\n<li>%more% - More link - The link to the comments<\/li>\n<li>%number% - The number of the current item<\/li>\n<\/ul>\n\n<p>The formatting for start and end is:<\/p>\n\n<ul>\n<li>%username% - Your username<\/li>\n<li>%profile% - Link to your profile<\/li>\n<li>%rss% - Link to your profile\u2019s RSS feed<\/li>\n<li>%count% - Number of items shown<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Download reddit-widget.zip<\/li>\n<li>Extract and upload reddit.php to the plugins\/ directory<\/li>\n<li>Enable reddit Widget in the Plugin admin panel<\/li>\n<li>In widget admin panel, place reddit in the sidebar, and edit it to enter your username<\/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 will display your latest shared stories. You can change the amount of stories to display and how to display them.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/2695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=2695"}],"author":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sk33t"}],"wp:attachment":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=2695"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=2695"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=2695"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=2695"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=2695"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=2695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}