Changeset 513122
- Timestamp:
- 03/01/2012 07:48:42 PM (14 years ago)
- Location:
- pinterest-rss-widget
- Files:
-
- 6 edited
- 1 copied
-
tags/1.4 (copied) (copied from pinterest-rss-widget/trunk)
-
tags/1.4/pinterest-rss-widget.php (modified) (11 diffs)
-
tags/1.4/readme.txt (modified) (7 diffs)
-
tags/1.4/screenshot-1.jpg (modified) (previous)
-
trunk/pinterest-rss-widget.php (modified) (11 diffs)
-
trunk/readme.txt (modified) (7 diffs)
-
trunk/screenshot-1.jpg (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
pinterest-rss-widget/tags/1.4/pinterest-rss-widget.php
r498203 r513122 5 5 Description: Display up to 25 of your latest Pinterest Pins in your sidebar. You are welcome to express your gratitude for this plugin by donating via <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SXTEL7YLUSFFC" target="_blank"><strong>PayPal</strong></a> 6 6 Author: bkmacdaddy designs 7 Version: 1. 3.27 Version: 1.4 8 8 Author URI: http://bkmacdaddy.com/ 9 9 … … 39 39 } 40 40 41 function get_pins_feed_list($username, $ maxfeeds=25, $divname='standard', $printtext=NULL, $target='samewindow', $useenclosures='yes', $thumbwidth='150', $thumbheight='150', $showfollow='large') {41 function get_pins_feed_list($username, $boardname, $maxfeeds=25, $divname='standard', $printtext=NULL, $target='samewindow', $useenclosures='yes', $thumbwidth='150', $thumbheight='150', $showfollow='large') { 42 42 43 43 // This is the main function of the plugin. It is used by the widget and can also be called from anywhere in your theme. See the readme file for example. … … 45 45 // Get Pinterest Feed(s) 46 46 include_once(ABSPATH . WPINC . '/feed.php'); 47 if( empty($boardname) ){ 48 $pinsfeed = 'http://pinterest.com/'.$username.'/feed.rss'; 49 } 50 else $pinsfeed = 'http://pinterest.com/'.$username.'/'.$boardname.'/rss'; 47 51 48 52 // Get a SimplePie feed object from the Pinterest feed source 49 $pinsfeed = 'http://pinterest.com/'.$username.'/feed.rss';50 53 $rss = fetch_feed($pinsfeed); 51 54 … … 123 126 extract( shortcode_atts( array( 124 127 'username' => '', 128 'boardname' => '', 125 129 'maxfeeds' => 25, 126 130 'divname' => 'standard', … … 135 139 ); 136 140 // this will display the latest pins 137 $prwsc = get_pins_feed_list($username, $ maxfeeds, $divname, $printtext, $target, $useenclosures, $thumbwidth, $thumbheight, $showfollow);141 $prwsc = get_pins_feed_list($username, $boardname, $maxfeeds, $divname, $printtext, $target, $useenclosures, $thumbwidth, $thumbheight, $showfollow); 138 142 return $prwsc; 139 143 … … 154 158 $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); 155 159 $user_name = empty($instance['user_name']) ? ' ' : $instance['user_name']; 160 $board_name = empty($instance['board_name']) ? '' : $instance['board_name']; 156 161 $maxnumber = empty($instance['maxnumber']) ? ' ' : $instance['maxnumber']; 157 162 $thumb_height = empty($instance['thumb_height']) ? ' ' : $instance['thumb_height']; … … 164 169 if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; 165 170 171 if ( empty( $board_name ) ) { $board_name = ''; }; 172 166 173 if ( empty( $target ) ) { $target = 'samewindow'; }; 167 174 … … 178 185 if ( !empty( $user_name ) ) { 179 186 180 echo get_pins_feed_list($user_name, $ maxnumber, 'small', $displaytitle, $target, $useenclosures, $thumb_width, $thumb_height, $showfollow); ?>187 echo get_pins_feed_list($user_name, $board_name, $maxnumber, 'small', $displaytitle, $target, $useenclosures, $thumb_width, $thumb_height, $showfollow); ?> 181 188 182 189 <div style="clear:both;"></div> … … 191 198 $instance['title'] = strip_tags($new_instance['title']); 192 199 $instance['user_name'] = strip_tags($new_instance['user_name']); 200 $instance['board_name'] = strip_tags($new_instance['board_name']); 193 201 $instance['maxnumber'] = strip_tags($new_instance['maxnumber']); 194 202 $instance['thumb_height'] = strip_tags($new_instance['thumb_height']); … … 203 211 204 212 function form($instance) { 205 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'user_name' => '', ' maxnumber' => '', 'thumb_height' => '', 'thumb_width' => '', 'target' => '', 'displaytitle' => '', 'useenclosures' => '', 'showfollow' => '') );213 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'user_name' => '', 'board_name' => '', 'maxnumber' => '', 'thumb_height' => '', 'thumb_width' => '', 'target' => '', 'displaytitle' => '', 'useenclosures' => '', 'showfollow' => '') ); 206 214 $title = strip_tags($instance['title']); 207 215 $user_name = strip_tags($instance['user_name']); 216 $board_name = strip_tags($instance['board_name']); 208 217 $maxnumber = strip_tags($instance['maxnumber']); 209 218 $thumb_height = strip_tags($instance['thumb_height']); … … 217 226 218 227 <p><label for="<?php echo $this->get_field_id('user_name__title'); ?>">Pinterest Username: <br /><input class="widefat" id="<?php echo $this->get_field_id('user_name'); ?>" name="<?php echo $this->get_field_name('user_name'); ?>" type="text" value="<?php echo attribute_escape($user_name); ?>" /></label></p> 228 229 <p><label for="<?php echo $this->get_field_id('user_name__board'); ?>">Username Board: (Optional) <br /><input class="widefat" id="<?php echo $this->get_field_id('board_name'); ?>" name="<?php echo $this->get_field_name('board_name'); ?>" type="text" value="<?php echo attribute_escape($board_name); ?>" /></label></p> 219 230 220 231 <p><label for="<?php echo $this->get_field_id('maxnumber'); ?>">Max number of pins to display: <br /><input class="widefat" id="<?php echo $this->get_field_id('maxnumber'); ?>" name="<?php echo $this->get_field_name('maxnumber'); ?>" type="text" value="<?php echo attribute_escape($maxnumber); ?>" /></label></p> -
pinterest-rss-widget/tags/1.4/readme.txt
r498203 r513122 1 1 === Pinterest RSS Widget === 2 Contributors: bkmacdaddy, AidaofNubia, thewebprincess 2 Contributors: bkmacdaddy, AidaofNubia, thewebprincess, leepettijohn 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SXTEL7YLUSFFC 4 4 Tags: Pinterest, rss, feed, widget … … 17 17 Starting with plugin version 1.3, you can also add a list of thumbnails of your Pins to a post or a page in the editor using the shortcode [prw username="Your Pinterest Username"]. (See FAQs for instructions). 18 18 19 Version 1.4 adds the capability of showing pins from a specific board in the widget or shortcode, rather than just all of the latest pins from a specific user. (See FAQs for instructions). 20 19 21 Note: This plugin is heavily based on the Image Feed Widget plugin created by Yorik van Havre (http://wordpress.org/extend/plugins/image-feed-widget/). It also utilizes the timthumb PHP script for image resizing (http://code.google.com/p/timthumb/) 20 22 … … 31 33 While editing the post or page that you want to add your Pins to, enter the shortcode [prw username="Your Pinterest Username"]. At the very minimum you have to include the username parameter, substituting "Your Pinterest Username" with your actual Pinterest username. The rest of the parameters are the same as listed below in the template tags explanation, and the defaults are also the same. Here's an example: 32 34 33 `[prw username="bkmacdaddy" maxfeeds="10" divname="myList" printtext="0" target="newwindow" useenclosures="yes" thumbwidth="100" thumbheight="100" showfollow="medium"]`35 `[prw username="bkmacdaddy" boardname="design-inspiration" maxfeeds="10" divname="myList" printtext="0" target="newwindow" useenclosures="yes" thumbwidth="100" thumbheight="100" showfollow="medium"]` 34 36 35 The above example will show the 10 latest Pins from bkmacdaddy's Pinterest account, in a div class titled "pins-feed-myList". Each thumbnail will be 100 x 100 pixels with no description below them. When clicked on, the Pin will open in a new tab/window, and the Follow Me On Pinterest button at the bottom will be the medium sized one.37 The above example will show the 10 latest Pins from bkmacdaddy's Design Inspiration board, in a div class titled "pins-feed-myList". Each thumbnail will be 100 x 100 pixels with no description below them. When clicked on, the Pin will open in a new tab/window, and the Follow Me On Pinterest button at the bottom will be the medium sized one. 36 38 37 39 If you leave out any of the parameters they will revert to the defaults listed below. … … 41 43 Anywhere in your theme templates, you can display the list of latest Pins thumbnails by placing the following code where you want them to appear: 42 44 43 `<?php get_pins_feed_list($username, $ maxfeeds, $divname, $printtext, $target, $useenclosures, $thumbwidth, $thumbheight, $showfollow); ?>`45 `<?php get_pins_feed_list($username, $boardname, $maxfeeds, $divname, $printtext, $target, $useenclosures, $thumbwidth, $thumbheight, $showfollow); ?>` 44 46 45 47 Where: 46 48 47 49 * **username** is the Pinterest username you wish to display Pins from (mandatory) 50 * **boardname** is the slug (URL) of a specific board. This must be the actual part of the URL that designates the board (i.e. http://pinterest.com/bkmacdaddy/**design-inspiration**/ - the portion in bold) (optional) 48 51 * **maxfeeds** is the maximum number of Pins to display (optional, default = 25) 49 52 * **divname** is a name suffix for the list class. "myList" will become "pins-feed-myList" (optional) … … 57 60 Example: 58 61 59 `<?php get_pins_feed_list('bkmacdaddy', 10, 'myList', 1, 'newwindow', 'yes', 125, 125, 'large'); ?>`62 `<?php get_pins_feed_list('bkmacdaddy', 'design-inspiration', 10, 'myList', 1, 'newwindow', 'yes', 125, 125, 'large'); ?>` 60 63 61 64 = The images are not showing. What went wrong? = … … 74 77 75 78 == Changelog == 79 80 = 1.4 = 81 * Added the capability to show pins from a specific board 76 82 77 83 = 1.3.2 = … … 114 120 == Upgrade Notice == 115 121 116 = 1. 3.2=122 = 1.4 = -
pinterest-rss-widget/trunk/pinterest-rss-widget.php
r498203 r513122 5 5 Description: Display up to 25 of your latest Pinterest Pins in your sidebar. You are welcome to express your gratitude for this plugin by donating via <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SXTEL7YLUSFFC" target="_blank"><strong>PayPal</strong></a> 6 6 Author: bkmacdaddy designs 7 Version: 1. 3.27 Version: 1.4 8 8 Author URI: http://bkmacdaddy.com/ 9 9 … … 39 39 } 40 40 41 function get_pins_feed_list($username, $ maxfeeds=25, $divname='standard', $printtext=NULL, $target='samewindow', $useenclosures='yes', $thumbwidth='150', $thumbheight='150', $showfollow='large') {41 function get_pins_feed_list($username, $boardname, $maxfeeds=25, $divname='standard', $printtext=NULL, $target='samewindow', $useenclosures='yes', $thumbwidth='150', $thumbheight='150', $showfollow='large') { 42 42 43 43 // This is the main function of the plugin. It is used by the widget and can also be called from anywhere in your theme. See the readme file for example. … … 45 45 // Get Pinterest Feed(s) 46 46 include_once(ABSPATH . WPINC . '/feed.php'); 47 if( empty($boardname) ){ 48 $pinsfeed = 'http://pinterest.com/'.$username.'/feed.rss'; 49 } 50 else $pinsfeed = 'http://pinterest.com/'.$username.'/'.$boardname.'/rss'; 47 51 48 52 // Get a SimplePie feed object from the Pinterest feed source 49 $pinsfeed = 'http://pinterest.com/'.$username.'/feed.rss';50 53 $rss = fetch_feed($pinsfeed); 51 54 … … 123 126 extract( shortcode_atts( array( 124 127 'username' => '', 128 'boardname' => '', 125 129 'maxfeeds' => 25, 126 130 'divname' => 'standard', … … 135 139 ); 136 140 // this will display the latest pins 137 $prwsc = get_pins_feed_list($username, $ maxfeeds, $divname, $printtext, $target, $useenclosures, $thumbwidth, $thumbheight, $showfollow);141 $prwsc = get_pins_feed_list($username, $boardname, $maxfeeds, $divname, $printtext, $target, $useenclosures, $thumbwidth, $thumbheight, $showfollow); 138 142 return $prwsc; 139 143 … … 154 158 $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); 155 159 $user_name = empty($instance['user_name']) ? ' ' : $instance['user_name']; 160 $board_name = empty($instance['board_name']) ? '' : $instance['board_name']; 156 161 $maxnumber = empty($instance['maxnumber']) ? ' ' : $instance['maxnumber']; 157 162 $thumb_height = empty($instance['thumb_height']) ? ' ' : $instance['thumb_height']; … … 164 169 if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; 165 170 171 if ( empty( $board_name ) ) { $board_name = ''; }; 172 166 173 if ( empty( $target ) ) { $target = 'samewindow'; }; 167 174 … … 178 185 if ( !empty( $user_name ) ) { 179 186 180 echo get_pins_feed_list($user_name, $ maxnumber, 'small', $displaytitle, $target, $useenclosures, $thumb_width, $thumb_height, $showfollow); ?>187 echo get_pins_feed_list($user_name, $board_name, $maxnumber, 'small', $displaytitle, $target, $useenclosures, $thumb_width, $thumb_height, $showfollow); ?> 181 188 182 189 <div style="clear:both;"></div> … … 191 198 $instance['title'] = strip_tags($new_instance['title']); 192 199 $instance['user_name'] = strip_tags($new_instance['user_name']); 200 $instance['board_name'] = strip_tags($new_instance['board_name']); 193 201 $instance['maxnumber'] = strip_tags($new_instance['maxnumber']); 194 202 $instance['thumb_height'] = strip_tags($new_instance['thumb_height']); … … 203 211 204 212 function form($instance) { 205 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'user_name' => '', ' maxnumber' => '', 'thumb_height' => '', 'thumb_width' => '', 'target' => '', 'displaytitle' => '', 'useenclosures' => '', 'showfollow' => '') );213 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'user_name' => '', 'board_name' => '', 'maxnumber' => '', 'thumb_height' => '', 'thumb_width' => '', 'target' => '', 'displaytitle' => '', 'useenclosures' => '', 'showfollow' => '') ); 206 214 $title = strip_tags($instance['title']); 207 215 $user_name = strip_tags($instance['user_name']); 216 $board_name = strip_tags($instance['board_name']); 208 217 $maxnumber = strip_tags($instance['maxnumber']); 209 218 $thumb_height = strip_tags($instance['thumb_height']); … … 217 226 218 227 <p><label for="<?php echo $this->get_field_id('user_name__title'); ?>">Pinterest Username: <br /><input class="widefat" id="<?php echo $this->get_field_id('user_name'); ?>" name="<?php echo $this->get_field_name('user_name'); ?>" type="text" value="<?php echo attribute_escape($user_name); ?>" /></label></p> 228 229 <p><label for="<?php echo $this->get_field_id('user_name__board'); ?>">Username Board: (Optional) <br /><input class="widefat" id="<?php echo $this->get_field_id('board_name'); ?>" name="<?php echo $this->get_field_name('board_name'); ?>" type="text" value="<?php echo attribute_escape($board_name); ?>" /></label></p> 219 230 220 231 <p><label for="<?php echo $this->get_field_id('maxnumber'); ?>">Max number of pins to display: <br /><input class="widefat" id="<?php echo $this->get_field_id('maxnumber'); ?>" name="<?php echo $this->get_field_name('maxnumber'); ?>" type="text" value="<?php echo attribute_escape($maxnumber); ?>" /></label></p> -
pinterest-rss-widget/trunk/readme.txt
r498203 r513122 1 1 === Pinterest RSS Widget === 2 Contributors: bkmacdaddy, AidaofNubia, thewebprincess 2 Contributors: bkmacdaddy, AidaofNubia, thewebprincess, leepettijohn 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SXTEL7YLUSFFC 4 4 Tags: Pinterest, rss, feed, widget … … 17 17 Starting with plugin version 1.3, you can also add a list of thumbnails of your Pins to a post or a page in the editor using the shortcode [prw username="Your Pinterest Username"]. (See FAQs for instructions). 18 18 19 Version 1.4 adds the capability of showing pins from a specific board in the widget or shortcode, rather than just all of the latest pins from a specific user. (See FAQs for instructions). 20 19 21 Note: This plugin is heavily based on the Image Feed Widget plugin created by Yorik van Havre (http://wordpress.org/extend/plugins/image-feed-widget/). It also utilizes the timthumb PHP script for image resizing (http://code.google.com/p/timthumb/) 20 22 … … 31 33 While editing the post or page that you want to add your Pins to, enter the shortcode [prw username="Your Pinterest Username"]. At the very minimum you have to include the username parameter, substituting "Your Pinterest Username" with your actual Pinterest username. The rest of the parameters are the same as listed below in the template tags explanation, and the defaults are also the same. Here's an example: 32 34 33 `[prw username="bkmacdaddy" maxfeeds="10" divname="myList" printtext="0" target="newwindow" useenclosures="yes" thumbwidth="100" thumbheight="100" showfollow="medium"]`35 `[prw username="bkmacdaddy" boardname="design-inspiration" maxfeeds="10" divname="myList" printtext="0" target="newwindow" useenclosures="yes" thumbwidth="100" thumbheight="100" showfollow="medium"]` 34 36 35 The above example will show the 10 latest Pins from bkmacdaddy's Pinterest account, in a div class titled "pins-feed-myList". Each thumbnail will be 100 x 100 pixels with no description below them. When clicked on, the Pin will open in a new tab/window, and the Follow Me On Pinterest button at the bottom will be the medium sized one.37 The above example will show the 10 latest Pins from bkmacdaddy's Design Inspiration board, in a div class titled "pins-feed-myList". Each thumbnail will be 100 x 100 pixels with no description below them. When clicked on, the Pin will open in a new tab/window, and the Follow Me On Pinterest button at the bottom will be the medium sized one. 36 38 37 39 If you leave out any of the parameters they will revert to the defaults listed below. … … 41 43 Anywhere in your theme templates, you can display the list of latest Pins thumbnails by placing the following code where you want them to appear: 42 44 43 `<?php get_pins_feed_list($username, $ maxfeeds, $divname, $printtext, $target, $useenclosures, $thumbwidth, $thumbheight, $showfollow); ?>`45 `<?php get_pins_feed_list($username, $boardname, $maxfeeds, $divname, $printtext, $target, $useenclosures, $thumbwidth, $thumbheight, $showfollow); ?>` 44 46 45 47 Where: 46 48 47 49 * **username** is the Pinterest username you wish to display Pins from (mandatory) 50 * **boardname** is the slug (URL) of a specific board. This must be the actual part of the URL that designates the board (i.e. http://pinterest.com/bkmacdaddy/**design-inspiration**/ - the portion in bold) (optional) 48 51 * **maxfeeds** is the maximum number of Pins to display (optional, default = 25) 49 52 * **divname** is a name suffix for the list class. "myList" will become "pins-feed-myList" (optional) … … 57 60 Example: 58 61 59 `<?php get_pins_feed_list('bkmacdaddy', 10, 'myList', 1, 'newwindow', 'yes', 125, 125, 'large'); ?>`62 `<?php get_pins_feed_list('bkmacdaddy', 'design-inspiration', 10, 'myList', 1, 'newwindow', 'yes', 125, 125, 'large'); ?>` 60 63 61 64 = The images are not showing. What went wrong? = … … 74 77 75 78 == Changelog == 79 80 = 1.4 = 81 * Added the capability to show pins from a specific board 76 82 77 83 = 1.3.2 = … … 114 120 == Upgrade Notice == 115 121 116 = 1. 3.2=122 = 1.4 =
Note: See TracChangeset
for help on using the changeset viewer.