WordPress.org

Plugin Directory

Changeset 513122


Ignore:
Timestamp:
03/01/12 19:48:42 (2 years ago)
Author:
bkmacdaddy
Message:

tagging version 1.4

Location:
pinterest-rss-widget
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • pinterest-rss-widget/tags/1.4/pinterest-rss-widget.php

    r498203 r513122  
    55Description: 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> 
    66Author: bkmacdaddy designs 
    7 Version: 1.3.2 
     7Version: 1.4 
    88Author URI: http://bkmacdaddy.com/ 
    99 
     
    3939} 
    4040 
    41 function get_pins_feed_list($username, $maxfeeds=25, $divname='standard', $printtext=NULL, $target='samewindow', $useenclosures='yes', $thumbwidth='150', $thumbheight='150', $showfollow='large') { 
     41function get_pins_feed_list($username, $boardname, $maxfeeds=25, $divname='standard', $printtext=NULL, $target='samewindow', $useenclosures='yes', $thumbwidth='150', $thumbheight='150', $showfollow='large') { 
    4242 
    4343                // 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. 
     
    4545        // Get Pinterest Feed(s) 
    4646        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'; 
    4751 
    4852                // Get a SimplePie feed object from the Pinterest feed source 
    49                 $pinsfeed = 'http://pinterest.com/'.$username.'/feed.rss'; 
    5053                $rss = fetch_feed($pinsfeed); 
    5154 
     
    123126    extract( shortcode_atts( array( 
    124127                'username' => '', 
     128                'boardname' => '', 
    125129                'maxfeeds' => 25, 
    126130                'divname' => 'standard', 
     
    135139    ); 
    136140    // 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); 
    138142    return $prwsc; 
    139143  
     
    154158    $title = empty($instance['title']) ? '&nbsp;' : apply_filters('widget_title', $instance['title']); 
    155159    $user_name = empty($instance['user_name']) ? '&nbsp;' : $instance['user_name']; 
     160    $board_name = empty($instance['board_name']) ? '' : $instance['board_name']; 
    156161    $maxnumber = empty($instance['maxnumber']) ? '&nbsp;' : $instance['maxnumber']; 
    157162    $thumb_height = empty($instance['thumb_height']) ? '&nbsp;' : $instance['thumb_height']; 
     
    164169    if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; 
    165170 
     171    if ( empty( $board_name ) ) { $board_name = ''; }; 
     172 
    166173    if ( empty( $target ) ) { $target = 'samewindow'; }; 
    167174 
     
    178185    if ( !empty( $user_name ) ) { 
    179186 
    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); ?> 
    181188 
    182189                <div style="clear:both;"></div> 
     
    191198    $instance['title'] = strip_tags($new_instance['title']); 
    192199    $instance['user_name'] = strip_tags($new_instance['user_name']); 
     200    $instance['board_name'] = strip_tags($new_instance['board_name']); 
    193201    $instance['maxnumber'] = strip_tags($new_instance['maxnumber']); 
    194202    $instance['thumb_height'] = strip_tags($new_instance['thumb_height']); 
     
    203211  
    204212  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' => '') ); 
    206214    $title = strip_tags($instance['title']); 
    207215    $user_name = strip_tags($instance['user_name']); 
     216    $board_name = strip_tags($instance['board_name']); 
    208217    $maxnumber = strip_tags($instance['maxnumber']); 
    209218    $thumb_height = strip_tags($instance['thumb_height']); 
     
    217226                                     
    218227      <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> 
    219230              
    220231      <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  
    11=== Pinterest RSS Widget === 
    2 Contributors: bkmacdaddy, AidaofNubia, thewebprincess 
     2Contributors: bkmacdaddy, AidaofNubia, thewebprincess, leepettijohn 
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SXTEL7YLUSFFC 
    44Tags: Pinterest, rss, feed, widget 
     
    1717Starting 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). 
    1818 
     19Version 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 
    1921Note: 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/) 
    2022 
     
    3133While 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: 
    3234 
    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"]` 
    3436 
    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. 
     37The 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. 
    3638 
    3739If you leave out any of the parameters they will revert to the defaults listed below. 
     
    4143Anywhere in your theme templates, you can display the list of latest Pins thumbnails by placing the following code where you want them to appear: 
    4244 
    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); ?>` 
    4446 
    4547Where: 
    4648 
    4749* **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) 
    4851* **maxfeeds** is the maximum number of Pins to display (optional, default = 25) 
    4952* **divname** is a name suffix for the list class. "myList" will become "pins-feed-myList" (optional) 
     
    5760Example: 
    5861 
    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'); ?>`  
    6063 
    6164= The images are not showing. What went wrong? = 
     
    7477 
    7578== Changelog == 
     79 
     80= 1.4 = 
     81* Added the capability to show pins from a specific board 
    7682 
    7783= 1.3.2 = 
     
    114120== Upgrade Notice == 
    115121 
    116 = 1.3.2 = 
     122= 1.4 = 
  • pinterest-rss-widget/trunk/pinterest-rss-widget.php

    r498203 r513122  
    55Description: 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> 
    66Author: bkmacdaddy designs 
    7 Version: 1.3.2 
     7Version: 1.4 
    88Author URI: http://bkmacdaddy.com/ 
    99 
     
    3939} 
    4040 
    41 function get_pins_feed_list($username, $maxfeeds=25, $divname='standard', $printtext=NULL, $target='samewindow', $useenclosures='yes', $thumbwidth='150', $thumbheight='150', $showfollow='large') { 
     41function get_pins_feed_list($username, $boardname, $maxfeeds=25, $divname='standard', $printtext=NULL, $target='samewindow', $useenclosures='yes', $thumbwidth='150', $thumbheight='150', $showfollow='large') { 
    4242 
    4343                // 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. 
     
    4545        // Get Pinterest Feed(s) 
    4646        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'; 
    4751 
    4852                // Get a SimplePie feed object from the Pinterest feed source 
    49                 $pinsfeed = 'http://pinterest.com/'.$username.'/feed.rss'; 
    5053                $rss = fetch_feed($pinsfeed); 
    5154 
     
    123126    extract( shortcode_atts( array( 
    124127                'username' => '', 
     128                'boardname' => '', 
    125129                'maxfeeds' => 25, 
    126130                'divname' => 'standard', 
     
    135139    ); 
    136140    // 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); 
    138142    return $prwsc; 
    139143  
     
    154158    $title = empty($instance['title']) ? '&nbsp;' : apply_filters('widget_title', $instance['title']); 
    155159    $user_name = empty($instance['user_name']) ? '&nbsp;' : $instance['user_name']; 
     160    $board_name = empty($instance['board_name']) ? '' : $instance['board_name']; 
    156161    $maxnumber = empty($instance['maxnumber']) ? '&nbsp;' : $instance['maxnumber']; 
    157162    $thumb_height = empty($instance['thumb_height']) ? '&nbsp;' : $instance['thumb_height']; 
     
    164169    if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; 
    165170 
     171    if ( empty( $board_name ) ) { $board_name = ''; }; 
     172 
    166173    if ( empty( $target ) ) { $target = 'samewindow'; }; 
    167174 
     
    178185    if ( !empty( $user_name ) ) { 
    179186 
    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); ?> 
    181188 
    182189                <div style="clear:both;"></div> 
     
    191198    $instance['title'] = strip_tags($new_instance['title']); 
    192199    $instance['user_name'] = strip_tags($new_instance['user_name']); 
     200    $instance['board_name'] = strip_tags($new_instance['board_name']); 
    193201    $instance['maxnumber'] = strip_tags($new_instance['maxnumber']); 
    194202    $instance['thumb_height'] = strip_tags($new_instance['thumb_height']); 
     
    203211  
    204212  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' => '') ); 
    206214    $title = strip_tags($instance['title']); 
    207215    $user_name = strip_tags($instance['user_name']); 
     216    $board_name = strip_tags($instance['board_name']); 
    208217    $maxnumber = strip_tags($instance['maxnumber']); 
    209218    $thumb_height = strip_tags($instance['thumb_height']); 
     
    217226                                     
    218227      <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> 
    219230              
    220231      <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  
    11=== Pinterest RSS Widget === 
    2 Contributors: bkmacdaddy, AidaofNubia, thewebprincess 
     2Contributors: bkmacdaddy, AidaofNubia, thewebprincess, leepettijohn 
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SXTEL7YLUSFFC 
    44Tags: Pinterest, rss, feed, widget 
     
    1717Starting 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). 
    1818 
     19Version 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 
    1921Note: 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/) 
    2022 
     
    3133While 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: 
    3234 
    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"]` 
    3436 
    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. 
     37The 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. 
    3638 
    3739If you leave out any of the parameters they will revert to the defaults listed below. 
     
    4143Anywhere in your theme templates, you can display the list of latest Pins thumbnails by placing the following code where you want them to appear: 
    4244 
    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); ?>` 
    4446 
    4547Where: 
    4648 
    4749* **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) 
    4851* **maxfeeds** is the maximum number of Pins to display (optional, default = 25) 
    4952* **divname** is a name suffix for the list class. "myList" will become "pins-feed-myList" (optional) 
     
    5760Example: 
    5861 
    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'); ?>`  
    6063 
    6164= The images are not showing. What went wrong? = 
     
    7477 
    7578== Changelog == 
     79 
     80= 1.4 = 
     81* Added the capability to show pins from a specific board 
    7682 
    7783= 1.3.2 = 
     
    114120== Upgrade Notice == 
    115121 
    116 = 1.3.2 = 
     122= 1.4 = 
Note: See TracChangeset for help on using the changeset viewer.