Changeset 793 for branches/Ver2.5/xpressme_integration_kit/wp-content
- Timestamp:
- Oct 7, 2011, 9:03:08 AM (13 years ago)
- Location:
- branches/Ver2.5/xpressme_integration_kit/wp-content
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver2.5/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r688 r793 891 891 } 892 892 893 function xpress_grobal_recent_posts($num = 10,$ post_list='')893 function xpress_grobal_recent_posts($num = 10,$exclusion_blog = 0, $shown_for_each_blog = false) 894 894 { 895 895 global $wpdb, $wp_rewrite , $switched , $blog_id; 896 896 if (empty($date_format)) $date_format = get_settings('date_format'); 897 897 if (empty($time_format)) $time_format = get_settings('time_format'); 898 $exclusion = explode(',' , $exclusion_blog); 899 898 900 899 901 $first_blogid = $blog_id; … … 904 906 $blogs = get_blog_list(0,'all'); 905 907 foreach ($blogs AS $blog) { 908 if (!in_array(0, $exclusion) && in_array($blog['blog_id'], $exclusion)) continue; 906 909 switch_to_blog($blog['blog_id']); 907 910 $wp_rewrite->init(); // http://core.trac.wordpress.org/ticket/12040 is solved, it is unnecessary. … … 922 925 ob_end_clean(); 923 926 924 $data->b rog_id = $blog['blog_id'];927 $data->blog_id = $blog['blog_id']; 925 928 $data->blog_name = get_bloginfo('name'); 926 929 $data->blog_url = get_bloginfo('url'); … … 995 998 996 999 $data->post_views = xpress_post_views_count('post_id=' . $data->post_id . '&blogid=' . $data->brog_id . '&format=' . __('Views :%d', 'xpress'). '&echo=0'); 1000 if (function_exists('the_qf_get_thumb_one')){ 1001 $data->post_thumbnail = the_qf_get_thumb_one("num=0&width=120&tag=1","",$data->the_full_content); 1002 } else { 1003 $data->post_thumbnail = get_the_post_thumbnail(null,'thumbnail'); 1004 } 1005 $data->author_avatar =get_avatar(get_the_author_meta('ID'),$size = '32'); 997 1006 998 1007 $data_array[] = $data; … … 1006 1015 1007 1016 restore_current_blog(); 1017 } 1018 if (!$shown_for_each_blog){ 1008 1019 usort($data_array, "the_time_cmp"); 1009 } 1010 1011 if (!empty($num)){ 1012 $data_array = array_slice($data_array,0,$num); 1020 if (!empty($num)){ 1021 $data_array = array_slice($data_array,0,$num); 1022 } 1013 1023 } 1014 1024 return $data_array; -
branches/Ver2.5/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/global_popular_posts_block_theme.php
r555 r793 4 4 { 5 5 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 6 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_ block_popular.html' : trim( $options[1] );6 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_grobal_popular_posts_block.html' : trim( $options[1] ); 7 7 $disp_count = empty( $options[2] ) ? '10' : $options[2] ; 8 8 $show_month_range = empty( $options[3] ) ? '0' : $options[3] ; -
branches/Ver2.5/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/global_recent_comments_block_theme.php
r554 r793 4 4 { 5 5 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 6 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_ recent_comments_block.html' : trim( $options[1] );6 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_global_recent_comments_block.html' : trim( $options[1] ); 7 7 $disp_count = empty( $options[2] ) ? '10' : $options[2] ; 8 8 $disp_length = empty( $options[3] ) ? '30' : $options[3] ; -
branches/Ver2.5/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/global_recent_posts_list_block_theme.php
r545 r793 4 4 { 5 5 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 6 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_ recent_posts_list_block.html' : trim( $options[1] );6 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_global_recent_posts_list_block.html' : trim( $options[1] ); 7 7 $disp_count = empty( $options[2] ) ? '10' : $options[2] ; 8 8 $disp_red = empty( $options[3] ) ? '1' : $options[3] ; … … 10 10 $date_format = empty( $options[5] ) ? '' : $options[5] ; 11 11 $time_format = empty( $options[6] ) ? '' : $options[6] ; 12 $shown_for_each_blog = empty( $options[7] ) ? false : true ; 13 $exclusion_blog = empty( $options[8] ) ? '0' : $options[8] ; 14 12 15 $mydirpath = get_xpress_dir_path(); 13 16 … … 20 23 $block = array(); 21 24 22 $data_array = xpress_grobal_recent_posts($disp_count );25 $data_array = xpress_grobal_recent_posts($disp_count,$exclusion_blog,$shown_for_each_blog); 23 26 $item_no = 0; 24 27 $red_sec = $disp_red *60*60*24; … … 41 44 } 42 45 $block['data_count'] = $item_no; //xml unserialise error 46 $block['shown_for_each_blog'] = $shown_for_each_blog; 43 47 } else { 44 48 $block['err_message'] = __('This blog is not set to the multi blog.', 'xpress');
Note: See TracChangeset
for help on using the changeset viewer.