Plugin Directory

Changeset 581811


Ignore:
Timestamp:
08/04/2012 07:39:07 PM (14 years ago)
Author:
codeext
Message:

update 1.1

Location:
network-shared-posts/trunk
Files:
3 edited

Legend:

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

    r579559 r581811  
    5151    color: #000080;
    5252}
    53 #netsposts-paginate a:hover, .paginate a:active {
    54     color: #800000;
     53#netsposts-paginate a:hover {
     54       background-color: #800000;
    5555}
    5656#netsposts-paginate span.current {
     57        padding:2px 5px 2px 5px;
     58    background-color: #d0dff2;
     59    color:#000080;
     60  margin: 2px;
     61    }
     62
     63#netsposts-paginate  a.next , #netsposts-paginate  a.prev  {
     64
     65}
     66
     67 #netsposts-paginate .page-numbers {
    5768    padding: 2px 5px 2px 5px;
    58     background-color: #d0dff2;
    59     color: #FFF;
     69        color:#fffbf0;
     70   background-color: #7d99c4;
     71
    6072 margin: 2px;
    6173    }
    62 #netsposts-paginate span.disabled {
    63         padding:2px 5px 2px 5px;
    64         color:#fffbf0;
    65    background-color: #c0c0c0;
    66   margin: 2px;
    67     }
    68  
  • network-shared-posts/trunk/network-shared-posts.php

    r579559 r581811  
    5353    'thumbnail' => false,
    5454    'post_type' => 'post',
    55     'include_blog' => 'null',
     55    'include_blog' => null,
     56    'exclude_blog' => null,
    5657    'taxonomy' => 'null',
    5758    'paginate' => false,
     59    'pages' => null,
    5860    'list' => '10',
    5961    'excerpt_length' => '400',
     
    6466    'image_class' => 'post-thumbnail',
    6567    'date_format' => 'n/j/Y',
     68    'end_size'     => '',
     69    'mid_size'  => '',
     70    'prev' => '« Previous',
     71    'next' =>  'Next »'
    6672    ), $atts));
    67     get_net_shared_posts($limit, $days, $titles_only, $wrap_start, $wrap_end, $thumbnail, $post_type, $include_blog, $taxonomy,$paginate, $excerpt_length, $auto_excerpt, $full_meta, $size, $image_class, $list, $date_format, $full_text);
     73    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 );
    6874}
    6975
     
    7177########  OUTPUT FUNCTIONS  ####################
    7278
    73 function get_net_shared_posts($limit, $days, $titles_only, $wrap_start, $wrap_end,  $thumbnail, $post_type, $include_blog, $taxonomy, $paginate, $excerpt_length, $auto_excerpt, $full_meta, $size , $image_class, $list, $date_format, $full_text )
     79function 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 )
    7480{
    7581
     
    95101    $include = substr($include,0,strlen($include)-2);
    96102    $include .= ")";
    97     }
     103    } else {  if($exclude_blog)   {$exclude_arr = explode(",",$exclude_blog); foreach($exclude_arr as $exclude_blog)    {$exclude .= "AND blog_id != $exclude_blog  "; }}}
    98104    $BlogsTable = $wpdb->base_prefix.'blogs';
    99105    $blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM $BlogsTable WHERE
    100106    public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0'
    101     $include "));
     107    $include $exclude"));
    102108    ## Getting posts
    103109    $postdata = array();
     
    219225        {
    220226            echo '<div id="netsposts-paginate">';
    221             for($i=1; $i <= $total_pages; ++$i)
    222             {
    223                 ?>
    224                 <?   if($i != $page)
    225                 {
    226                     ?><span class="current"><a  href="<? echo get_pagenum_link($i); ?>"><? echo $i; ?></a></span><? } else echo '<span class="disabled">'.$i.'</span>';
    227             }
    228             echo  '</div>';
    229         }
    230         echo  '</div>';
     227            $big = 999999999;
     228            echo paginate_links( array(
     229                      'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
     230                       'format' => '?paged=%#%',
     231                         'current' => $page,
     232                         'total' => $total_pages,
     233                'prev_text'    => __($prev),
     234                              'next_text'    => __($next),
     235                'end_size'     => $end_size,
     236                               'mid_size'     =>  $mid_size
     237) );
     238           
     239            echo '</div>';
     240           
     241        }
     242       
    231243    }
    232244}
     
    267279    return $a['post_date']<$b['post_date'];
    268280}
    269 /*
    270 * TODO
    271 */
     281
    272282?>
  • network-shared-posts/trunk/readme.txt

    r579591 r581811  
    66Requires at least: 3.0
    77Tested up to: 3.4.1
    8 Stable tag: 1.0.0
     8Stable tag: 1.1.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1717== Description ==
    1818
    19 Network Shared Posts is a plugin for WordPress that enables you to share posts over WP Multi Site network. You can display  the posts from all blogs in your network on any blog or you can select blogs to display posts from. This plugin is very useful for multi level network. For example city.state.country.com :  ’state’ level site can collect posts from ‘city‘ level sites and/or its own posts, ‘country‘ level site can collect posts from ‘state‘ level sites  and/or  ’city‘ level sites  and/or  its own posts.<br />
     19With Network Shared Posts plugin  you can share posts over WP Multi Site network. You can display  the posts from all blogs in your network on any blog. You can select blogs to display posts from. <br />
     20This plugin is very useful for multi level network. For example city.state.country.com : 
     21* ’state’ level site can collect posts from ‘city‘ level sites and/or its own posts,
     22 * ‘country‘ level site can collect posts from ‘state‘ level sites  and/or  ’city‘ level sites  and/or  its own posts.<br />
    2023You can specify categories and tags. All posts will be shown in the latest date order no matter from what blog they were taken. You can specify how old (in days) the collected posts may be. Also you can specify how many posts should be displayed from each blog. You can set thumbnails image size  and style or disable  thumbnails at all.  You can adjust CSS styles editing CSS file.
    2124
     
    2629
    2730= How to use Network Shared Posts ? =
    28 Put a short code [netsposts ] into your page content .<br />
    29 Sample: [netsposts  include_blog=’1,2,5′ days=’30′  taxonomy=’news’ titles_only=false  show_author=true  thumbnail=true   size=’90,90′  image_class=’ alignleft’    auto_excerpt=true   excerpt_length=500   show_author=true paginate=true   list=5]
     31Craete post or page and put a short code [netsposts ] with desired arguments into your page content .<br />
     32Example: [netsposts  include_blog=’1,2,5′ days=’30′  taxonomy=’news’ titles_only=false  show_author=true  thumbnail=true   size=’90,90′  image_class=’ alignleft’    auto_excerpt=true   excerpt_length=500   show_author=true paginate=true   list=5]
    3033
    31 = What short code attributes i can use ? =
    32 Short code attributes:<br />
    33 ‘include_blog’ – list of blogs, with the posts which will be displayed (default all blogs).<br />
    34 ‘days’ – how old in days the post can be (default ’0′ – no limit).<br />
    35 ‘taxonomy’ – list of categories and/or tags for the posts selection (use slugs only) (default all).<br />
    36 ‘titles_only’ – if true shows titles only (default ‘false’).<br />
    37 ‘show_author’ – if true shows a post’s author (default ‘false’).<br />
    38 ‘thumbnail’  - if true shows thumbnails (default ‘false’).<br />
    39 ‘size’  - size of thumbnail (width, height) (default ‘thumbnail’).<br />
    40 ‘image_class’ – CSS class for image (default ‘post-thumbnail’).<br />
    41 ‘auto_excerpt’  - if true an excerpt will be taken from post content, if false a post excerpt will be used (default ‘true’).<br />
    42 ‘excerpt_length’ – the length of excerpt (auto_excerpt should be true)(default ’400′). <br />
    43 ‘paginate’ – if true the result will be paginated (default ‘false’). <br />
    44 ‘list’ – how many posts per page (default ’10′).<br />
    45 ‘post_type’ – type of posts (default ‘post’).<br />
    46 ‘full_text’ - full text instead of excerpt (default ‘false’).<br />
    47 ‘date_format’ – format of the post date (default  ’n/j/Y’).<br />
    48 ‘wrap_start’, ‘wrap_end’ - you can wrap the posts (for example wrap_start=’&#60;div class=myclass>’ wrap_end=’&#60;/div>)’<br />
     34= What short code arguments can I use ? =
     35You van get the full list of short code arguments on plugin's web site http://code-ext.com/blog/2012/07/30/network-shared-posts/   
     36<br />
    4937
    50 = What other options i can get ? =
    51 Network Shared Posts Ext (extended version) enables you :<br />
    52 1. To remove page title or change its style<br />
    53 2. Put your own title in content area.<br />
    54 2. To display a menu on the left site of content.<br />
    55 3. To display posts in multi column layout.<br />
    56 Visit plugin web site http://code-ext.com/blog/2012/07/30/network-shared-posts/  for more information.
     38= What other options can I get ? =
     39With Network Shared Posts Ext (extended version)  you can :<br />
     401. remove page title or change its style<br />
     412. put your own title in content area.<br />
     422. display a menu on the left site of content.<br />
     433. display posts in multi column layout.<br />
     444. use admin page to create a short code without need to look up blog id in database.
    5745
    5846== Changelog ==
     47=1.1 =
     48* Added 'exclude_blog' argument
     49* The pagination was enchanced with native WordPress pagination.
     50* Added argument foe pagination: 'end_size', 'mid_size', 'prev', 'next', 'prev_next'
Note: See TracChangeset for help on using the changeset viewer.