• I wanted to be able to use the lists to link to the authors posts, so I added one more field (%pageurl%) to the list of template codes. Here’s the diff:

    index 28b24e1..e4b939c 100644
    --- people-lists.php
    +++ people-lists.php
    @@ -8,7 +8,7 @@
      *                             using the People Lists template (which can be styled using HTML) that provides codes for every field that is
      *                             desired to be displayed.
      * Author: Gagan Sandhu / Enej Bajgoric / CTLT DEV
    - * Version: 1.2
    + * Version: 1.2.1
      * Author URI: http://www.ctlt.ubc.ca
      *
      * GNU General Public License, Free Software Foundation <http://creativecommons.org/licenses/GPL/2.0/>
    @@ -472,6 +472,7 @@ function people_list_form($list_id=false,$list=false)
                                                            <li>%aim% - To Display User's Website </li>
                                                            <li>%yahooim% - To Display User's Website </li>
                                                            <li>%jabbergoogle% - To Display User's Website </li>
    +                                                       <li>%pageurl% - URL to Users's Archives</li>
                                                    </ul>
                                            </div>
                                            <div id="added_fields" class="template-content">
    @@ -634,8 +635,9 @@ function people_lists_shortcode($atts) {
            $input_template[8] = "%aim%";
            $input_template[9] = "%yahooim%";
            $input_template[10] = "%jabbergoogle%";
    +       $input_template[11] = "%pageurl%";
    
    -       $counter = 11;
    +       $counter = 12;
            if( is_array($people_list_option['settings']) ):
                    foreach($people_list_option['settings'] as $index => $field_slug):
                            $input_template[$counter] = "%".$index."%";
    @@ -658,9 +660,10 @@ function people_lists_shortcode($atts) {
                            $replacements[7] = $user_data->user_url;
                            $replacements[8] = $user_data->aim;
                            $replacements[9] = $user_data->yim;
    -                       $replacements[10] = $user_data->jabber;
    +                       $replacements[10] = $user_data->jabber;
    +                       $replacements[11] = get_author_posts_url($id);
    
    -                       $counter = 11;
    +                       $counter = 12;
                            if( is_array($people_list_option['settings']) ):
                                    foreach($people_list_option['settings'] as $index => $field_slug):
                                            $replacements[$counter] =  $user_data->$index;

    http://wordpress.org/extend/plugins/people-lists/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: People Lists] Patch’ is closed to new replies.