Plugin Directory

Changeset 584654


Ignore:
Timestamp:
08/12/2012 08:14:55 PM (14 years ago)
Author:
codeext
Message:
 
Location:
network-shared-posts
Files:
12 added
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • network-shared-posts/trunk/net_shared_posts.css

    r581811 r584654  
    3333}
    3434
     35
     36.netsposts-post-titles-only {
     37font-size:22px;
     38font-weight:lighter;
     39margin-bottom:5px;
     40display:block;
     41
    3542.netsposts-excerpt{
    3643font-size:13px;
    37 font-family:Arial Narrow, Helvetica, Arial;
    3844text-align:justify;
    3945line-height:120%;
  • network-shared-posts/trunk/network-shared-posts.php

    r584143 r584654  
    44Plugin URI: http://code-ext.com/blog/2012/07/30/network-shared-posts/
    55Description: Network Shared Posts plugin enables you to share posts over WP Multi Site network.  You can display on any blog in your network the posts selected by taxanomy from any other blogs including that blog itself.
    6 Version: 1.1.1
     6Version: 1.1.2
    77Author: Code Ext
    88Author URI: https://code-ext.com
     
    5151    extract(shortcode_atts(array(
    5252    'limit' => '',
    53     'days' => '0',
     53    'days' => 0,
    5454    'titles_only' => false,
    5555    'wrap_start' => null,
     
    5959    'include_blog' => null,
    6060    'exclude_blog' => null,
    61     'taxonomy' => 'null',
     61    'taxonomy' => null,
    6262    'paginate' => false,
    6363    'pages' => null,
    6464    'list' => '10',
    65     'excerpt_length' => '400',
    66     'auto_excerpt' => 'null',
     65    'excerpt_length' => 400,
     66    'auto_excerpt' => false,
    6767    'show_author' => false,
    6868    'full_text' => false,
     
    7070    'image_class' => 'post-thumbnail',
    7171    'date_format' => 'n/j/Y',
     72    'prev_next' => false,
    7273    'end_size'     => '',
    7374    'mid_size'  => '',
     
    8384function get_net_shared_posts($limit, $days, $titles_only, $wrap_start, $wrap_end,  $thumbnail, $post_type, $include_blog, $exclude_blog, $taxonomy, $paginate, $pages, $list,  $excerpt_length, $auto_excerpt, $full_meta, $size , $image_class, $date_format, $full_text, $end_size, $mid_size, $prev, $next  )
    8485{
    85 
     86$titles_only = strtolower($titles_only) == 'true'? true: false;
     87$thumbnail = strtolower($thumbnail) == 'true'? true: false;
     88$paginate = strtolower($paginate) == 'true'? true: false;
     89$auto_excerpt = strtolower($auto_excerpt) == 'true'? true: false;
     90$show_author = strtolower($show_author) == 'true'? true: false;
     91$full_text = strtolower($full_text) == 'true'? true: false;
     92$prev_next = strtolower($prev_next) == 'true'? true: false;
    8693    global $wpdb;
    8794    global $table_prefix;
     
    149156                    if($tax_id) $taxonomy_arr[] = $tax_id;
    150157                }
    151             }
     158           
    152159            foreach($taxonomy_arr as $tax_id)
    153160            {
     
    160167                    }
    161168                }
    162             }
     169            }}
    163170 
    164171            if ($ids) { $ids = ' AND  ('. substr($ids,0,strlen($ids)-2).')'; }
     
    187194            foreach($postdata as $key => $the_post)
    188195            {
    189                  $blog_details = get_blog_details( $the_post['blog_id']);
     196                 $blog_details = get blog_details( $the_post['blog_id']);
    190197                      $blog_name = $blog_details->blogname;
    191198                      $blog_url = $blog_details->siteurl;   
    192199                if($titles_only) $title_class = 'netsposts-titles-only'; else $title_class = 'netsposts-title';
    193200                echo html_entity_decode($wrap_start).'<div class="netsposts-content"><span class="'.$title_class.'"><a href="'.$the_post['guid'].'">'.$the_post['post_title'].'</a></span>&nbsp;';
    194                 if(!$titles_only)
     201                if($titles_only == 'false')
    195202                {
    196203                    $date = new DateTime(trim($the_post['post_date']));
     
    200207                    if( $show_author)
    201208                    {
    202                     echo ' ' . __('Author','netsposts'). ' ' . '<a href="'.get_blog_permalink($the_post['blog_id']).'/?author='.  $the_post['post_author'] .'">'. get_the_author_meta( 'display_name' , $the_post['post_author'] ) . ' </a>';
     209                    echo ' ' . __('Author','netsposts'). ' ' . '<a href="'.$blog_url .'?author='.  $the_post['post_author'] .'">'. get_the_author_meta( 'display_name' , $the_post['post_author'] ) . ' </a>';
    203210                    }
    204211                    echo '</span>';
     
    207214                        $width = explode('X',$size);
    208215                        $width = $width[0] + 10;
    209                         echo '<a href="'.$thispermalink.'">'.get_thumbnail_by_blog($the_post['blog_id'],$the_post['ID'],$size, $image_class).'</a><p class="netsposts-excerpt">';
     216                        echo '<a href="'.$the_post['guid'].'">'.get_thumbnail_by_blog($the_post['blog_id'],$the_post['ID'],$size, $image_class).'</a><p class="netsposts-excerpt">';
    210217                        $the_post['post_content'] = preg_replace("/<img[^>]+\>/i", "", $the_post['post_content']);
    211218                    }
    212                     if($auto_excerpt) $exerpt  = get_excerpt($excerpt_length, $the_post['post_content'], $thispermalink);
     219                    if($auto_excerpt) $exerpt  = get_excerpt($excerpt_length, $the_post['post_content'], $the_post['guid']);
    213220                    else $exerpt  = $the_post['post_excerpt'];
    214221                    if($full_text) $text = $the_post['post_content']; else $text = $exerpt;
    215222                    echo strip_shortcodes( $text);
    216                 }
    217                 echo '</p></div>';
     223                    echo '</p>';
     224                }
     225                echo '</div>';
     226                if($titles_only) echo "<br />";
    218227                echo html_entity_decode($wrap_end);
    219228            }
  • network-shared-posts/trunk/readme.txt

    r584150 r584654  
    66Requires at least: 3.0
    77Tested up to: 3.4.1
    8 Stable tag: 1.1.1
     8Stable tag: 1.1.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2525== Screenshots ==
    26261. Network Shared Posts in demo action
     272. Admin Tool for short code (extended version only
     283. Network Shared Posts Ext  (extended version) in demo action (you can put custom menu on the left, content in 2 or more columns, custom title)
    2729
    2830== Frequently Asked Questions ==
     
    5153=1.1.1=<br />
    5254Bug fixed.<br />
     55=1.1.2=<br />
     56auuthor link  fixed.<br />
     57image and '..more' links  fixed.<br />
     58taxonomy fix<br />
     59Type of boolean arguments were sat<br />
     60Some html issues when titles_only in use were fixed<br />
     61prev_next ettribute was missed. Fixed.
    5362
    5463== Upgrade Notice ==
    55 = 1.1.1 =
    56 Bug fixed.
     64= 1.1.2=
     65Important update. Few bugs were fixed.
Note: See TracChangeset for help on using the changeset viewer.