Changeset 536
- Timestamp:
- Mar 11, 2010, 11:49:11 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/extras/xpress_i18n/portuguese-br/xpressme_modules_root/language/pt-br_utf8/modinfo.php
r533 r536 50 50 define("_MI_XP2_BLOCK_ENHANCED","Bloco avançado"); 51 51 define("_MI_XP2_BLOCK_BLOG_LIST","Blogs Lista"); 52 define("_MI_XP2_BLOCK_GLOBAL_POSTS","Posts recentes(Todo o blog)"); 52 53 53 54 // Notify Categories -
trunk/extras/xpress_i18n/template/xpressme_modules_root/language/english/modinfo.php
r533 r536 50 50 define("_MI_XP2_BLOCK_ENHANCED","Enhanced"); 51 51 define("_MI_XP2_BLOCK_BLOG_LIST","Blogs List"); 52 define("_MI_XP2_BLOCK_GLOBAL_POSTS","Recent Posts(All blogs)"); 52 53 53 54 // Notify Categories -
trunk/xpressme_integration_kit/include/xpress_templates_make.php
r533 r536 108 108 'enhanced_block.html' , 109 109 'blog_list_block.html' , 110 'global_recent_posts_list_block.html' , 110 111 'index.html', 111 112 ); -
trunk/xpressme_integration_kit/language/english/modinfo.php
r533 r536 50 50 define("_MI_XP2_BLOCK_ENHANCED","Enhanced"); 51 51 define("_MI_XP2_BLOCK_BLOG_LIST","Blogs List"); 52 define("_MI_XP2_BLOCK_GLOBAL_POSTS","Recent Posts(All blogs)"); 52 53 53 54 // Notify Categories -
trunk/xpressme_integration_kit/language/ja_utf8/modinfo.php
r533 r536 50 50 define("_MI_XP2_BLOCK_ENHANCED","拡張ブロック"); 51 51 define("_MI_XP2_BLOCK_BLOG_LIST","ブログリスト"); 52 define("_MI_XP2_BLOCK_GLOBAL_POSTS","最近の記事(全ブログ)"); 52 53 53 54 // Notify Categories -
trunk/xpressme_integration_kit/language/japanese/modinfo.php
r533 r536 50 50 define("_MI_XP2_BLOCK_ENHANCED","³ÈÄ¥¥Ö¥í¥Ã¥¯"); 51 51 define("_MI_XP2_BLOCK_BLOG_LIST","¥Ö¥í¥°¥ê¥¹¥È"); 52 define("_MI_XP2_BLOCK_GLOBAL_POSTS","ºÇ¶á¤Îµ»ö(Á´¥Ö¥í¥°)"); 52 53 53 54 // Notify Categories -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r534 r536 28 28 } 29 29 } 30 31 32 30 33 31 function xpress_is_contributor() … … 857 855 return $calendar; 858 856 } 857 858 function xpress_grobal_recent_posts($num = 10,$post_list='') 859 { 860 global $wpdb, $wp_rewrite , $switched , $blog_id; 861 if (empty($date_format)) $date_format = get_settings('date_format'); 862 if (empty($time_format)) $time_format = get_settings('time_format'); 863 864 $first_blogid = $blog_id; 865 $num = (int)$num; 866 // $wp_query->in_the_loop = true; //for use the_tags() in multi lopp 867 $data_array = array(); 868 if (xpress_is_multiblog()){ 869 $blogs = get_blog_list(0,'all'); 870 foreach ($blogs AS $blog) { 871 switch_to_blog($blog['blog_id']); 872 $wp_rewrite->init(); 873 874 if (empty($num)){ 875 query_posts("post_status=publish"); 876 } else { 877 query_posts("showposts=$num&post_status=publish"); 878 } 879 if (have_posts()){ 880 while(have_posts()){ 881 $data = new stdClass(); 882 883 the_post(); 884 ob_start(); 885 the_ID(); 886 $data->post_id = ob_get_contents(); 887 ob_end_clean(); 888 889 $data->brog_id = $blog['blog_id']; 890 $data->blog_name = get_bloginfo('name'); 891 $data->blog_url = get_bloginfo('url'); 892 $data->blog_link = '<a href="' . $data->blog_url . '">' . $data->blog_name . '</a>' ; 893 894 895 ob_start(); 896 the_title(); 897 $data->title = ob_get_contents(); 898 ob_end_clean(); 899 $data->post_permalink = get_blog_permalink($data->brog_id, $data->post_id); 900 $data->title_link = '<a href="' . $data->post_permalink . '">' . $data->title . '</a>' ; 901 902 ob_start(); 903 the_author_posts_link(); 904 $data->post_author = ob_get_contents(); 905 ob_end_clean(); 906 907 ob_start(); 908 the_category(' • '); 909 $data->post_category = ob_get_contents(); 910 ob_end_clean(); 911 912 if (function_exists('the_tags')){ 913 ob_start(); 914 the_tags(__('Tags:', 'xpress') . ' ',' • ',''); 915 $data->post_tags = ob_get_contents(); 916 ob_end_clean(); 917 } else { 918 $data->tags = ''; 919 } 920 921 $data->the_content = xpress_the_content('echo=0'); 922 923 ob_start(); 924 the_content(); 925 $data->the_full_content = ob_get_contents(); 926 ob_end_clean(); 927 928 ob_start(); 929 the_modified_date($date_format); 930 $data->post_modified_date = ob_get_contents(); 931 ob_end_clean(); 932 933 ob_start(); 934 the_modified_date($time_format); 935 $data->post_modified_time = ob_get_contents(); 936 ob_end_clean(); 937 $data->post_modified_date_time = $data->post_modified_date . ' ' . $data->post_modified_time; 938 939 $data->post_unix_time = xpress_get_post_unix_time($data->post_id, $data->brog_id); 940 941 ob_start(); 942 the_time($date_format); 943 $data->post_date = ob_get_contents(); 944 ob_end_clean(); 945 946 ob_start(); 947 the_time($time_format); 948 $data->post_time = ob_get_contents(); 949 ob_end_clean(); 950 951 $data->post_date_time = $data->post_date . ' ' . $data->post_time; 952 953 ob_start(); 954 comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); 955 $data->comments_link = ob_get_contents(); 956 ob_end_clean(); 957 $data_array[] = $data; 958 } // end whilwe 959 } // end if 960 restore_current_blog(); 961 // $wp_rewrite->init(); 962 } // end foreach 963 // switch_to_blog($first_blogid); 964 $wp_rewrite->init(); 965 966 restore_current_blog(); 967 usort($data_array, "the_time_cmp"); 968 } 969 970 if (!empty($num)){ 971 $data_array = array_slice($data_array,0,$num); 972 } 973 return $data_array; 974 } 975 function the_time_cmp($a, $b) 976 { 977 return - strcasecmp($a->post_unix_time, $b->post_unix_time); 978 } 979 980 function xpress_get_post_unix_time($post_id=0,$b_id=1) 981 { 982 global $wpdb; 983 $post_id= (int)$post_id; 984 $b_id = (int)$b_id; 985 986 $db_prefix = get_wp_prefix(); 987 988 if (empty($b_id)) $b_id =1; 989 $blog_prefix = ''; 990 if ($b_id >1) $blog_prefix = $b_id . '_'; 991 $post_tb = $db_prefix . $blog_prefix .'posts'; 992 993 $sql = "SELECT UNIX_TIMESTAMP(post_date) AS post_timestamp FROM $post_tb WHERE ID = $post_id"; 994 $post_timestamp = $wpdb->get_var($sql); 995 return $post_timestamp; 996 } 997 function xpress_get_blog_option($option_name,$b_id = 1) 998 { 999 global $wpdb; 1000 $db_prefix = get_wp_prefix(); 1001 1002 if (empty($b_id)) $b_id =1; 1003 $blog_prefix = ''; 1004 if ($b_id >1) $blog_prefix = $b_id . '_'; 1005 $options_tb = $db_prefix . $blog_prefix .'options'; 1006 1007 $sql = "SELECT option_value FROM $options_tb WHERE option_name = $option_name"; 1008 $ret_val = $wpdb->get_var($sql); 1009 return $ret_val; 1010 } 1011 1012 859 1013 ?> -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/blog_list_block_theme.php
r533 r536 3 3 function blog_list_block($options) 4 4 { 5 if(is_admin()) return; // wp-admin page is not exists 5 6 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 6 7 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_category.html' : trim( $options[1] ); … … 8 9 $order = empty( $options[3] ) ? 'ASC' : $options[3] ; 9 10 10 $blogs = get_blog_list(0,'all'); 11 $data = array(); 12 foreach ($blogs AS $blog) { 13 $url = get_blog_option($blog['blog_id'],'siteurl'); 14 $blog_name = get_blog_option( $blog['blog_id'], 'blogname' ); 15 $blog_link = "<a href=\" $url \"> $blog_name </a>"; 16 $blog_id = $blog['blog_id']; 17 $post_count = $blog['postcount']; 18 $last_post_date = ''; 19 $last_post_time = ''; 20 $last_post_date_time = ''; 21 22 $row_data = array( 23 'blog_id' => $blog_id , 24 'blog_name' => $blog_link , 25 'last_post_date' => $last_post_date , 26 'last_post_time' => $last_post_time , 27 'post_date_time' => $last_post_date_time , 28 'last_post_date_time' => $post_modified_date , 29 'post_count' => $post_count 30 ); 31 $data[] = $row_data; 11 if (xpress_is_multiblog() && function_exists('get_blog_list')){ 12 $blogs = get_blog_list(0,'all'); 13 $data = array(); 14 foreach ($blogs AS $blog) { 15 $url = get_blog_option($blog['blog_id'],'siteurl'); 16 $blog_name = get_blog_option( $blog['blog_id'], 'blogname' ); 17 $blog_link = "<a href=\" $url \"> $blog_name </a>"; 18 $blog_id = $blog['blog_id']; 19 $post_count = $blog['postcount']; 20 $last_post_date = ''; 21 $last_post_time = ''; 22 $last_post_date_time = ''; 23 24 $row_data = array( 25 'blog_id' => $blog_id , 26 'blog_name' => $blog_link , 27 'last_post_date' => $last_post_date , 28 'last_post_time' => $last_post_time , 29 'post_date_time' => $last_post_date_time , 30 'last_post_date_time' => $post_modified_date , 31 'post_count' => $post_count 32 ); 33 $data[] = $row_data; 34 } 35 if (strcmp($order,'ASC') == 0){ 36 switch($orderby){ 37 case 'count': 38 usort($data, "r_post_count_cmp"); 39 break; 40 case 'ID' : 41 usort($data, "r_blog_id_cmp"); 42 break; 43 default : 44 usort($data, "r_blog_name_cmp"); 45 } 46 } else { 47 switch($orderby){ 48 case 'count': 49 usort($data, "post_count_cmp"); 50 break; 51 case 'ID' : 52 usort($data, "blog_id_cmp"); 53 break; 54 default : 55 usort($data, "blog_name_cmp"); 56 } 57 } 58 59 $block = array(); 60 $item_no = 0; 61 foreach ($data AS $row) { 62 $block['contents']['item'.$item_no] = $row; 63 $item_no++; 64 }// end of foreach 65 $block['data_count'] = $item_no; //xml unserialise error 66 } else { 67 $block['err_message'] = __('This blog is not set to the multi blog.', 'xpress'); 32 68 } 33 if (strcmp($order,'ASC') == 0){34 switch($orderby){35 case 'count':36 usort($data, "r_post_count_cmp");37 break;38 case 'ID' :39 usort($data, "r_blog_id_cmp");40 break;41 default :42 usort($data, "r_blog_name_cmp");43 }44 } else {45 switch($orderby){46 case 'count':47 usort($data, "post_count_cmp");48 break;49 case 'ID' :50 usort($data, "blog_id_cmp");51 break;52 default :53 usort($data, "blog_name_cmp");54 }55 }56 57 $block = array();58 $item_no = 0;59 foreach ($data AS $row) {60 $block['contents']['item'.$item_no] = $row;61 $item_no++;62 }// end of foreach63 $block['data_count'] = $item_no; //xml unserialise error64 69 return $block ; 65 70 } -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/ja.po
r354 r536 4 4 # toemon <info@toemon.com> 5 5 # 6 #, fuzzy7 6 msgid "" 8 7 msgstr "" 9 8 "Project-Id-Version: XPress_Default_themes\n" 10 9 "Report-Msgid-Bugs-To: \n" 11 "POT-Creation-Date: 20 09-07-03 01:27+0900\n"12 "PO-Revision-Date: 20 09-07-03 01:27+0900\n"10 "POT-Creation-Date: 2010-03-11 10:02+0900\n" 11 "PO-Revision-Date: 2010-03-11 10:05+0900\n" 13 12 "Last-Translator: toemon <info@toemon.com>\n" 14 13 "Language-Team: toemon <info@toemon.com>\n" … … 20 19 "X-Poedit-SourceCharset: utf-8\n" 21 20 "X-Poedit-KeywordsList: __;_e;_c\n" 22 "X-Poedit-Basepath: C:\\XPressME_Project\\ SVN\\trunk\\xpressme_integration_kit\\wp-content\\themes\\xpress_default\n"21 "X-Poedit-Basepath: C:\\XPressME_Project\\XPressME_SVN_Trunk\\xpressme_integration_kit\\wp-content\\themes\\xpress_default\n" 23 22 "Plural-Forms: nplurals=1; plural=0;\n" 24 23 "X-Poedit-SearchPath-0: .\n" … … 370 369 371 370 #: image.php:13 372 #: index.php:36373 371 #: single.php:32 374 372 msgid "Read the rest of this entry »" … … 480 478 msgstr "リンク:" 481 479 480 #: multi_blog.php:4 481 msgid "Site News" 482 msgstr "サイトニュース" 483 484 #: multi_blog.php:13 485 msgid "Blogs List" 486 msgstr "ブログリスト" 487 488 #: multi_blog.php:22 489 msgid "post count" 490 msgstr "投稿数" 491 492 #: multi_blog.php:32 493 msgid "New Entries" 494 msgstr "最近の投稿" 495 496 #: multi_blog.php:65 497 msgid "Updated Blogs" 498 msgstr "最近更新されたブログ" 499 500 #: multi_blog.php:86 501 #, php-format 502 msgid "Howdy %s" 503 msgstr "ようこそ %s さん" 504 505 #: multi_blog.php:92 506 msgid "Your Blogs list" 507 msgstr "あなたのブログリスト" 508 509 #: multi_blog.php:103 510 msgid "Create a new blog" 511 msgstr "新しいブログの作成" 512 482 513 #: page.php:27 483 514 msgid "Read the rest of this page »" … … 588 619 msgstr "トラックバック / ピンバックは現在受け付けていません。" 589 620 590 #: blocks/archives_block_theme.php:1 3621 #: blocks/archives_block_theme.php:14 591 622 msgid "Select Yearly" 592 623 msgstr "年を選択" 593 624 594 #: blocks/archives_block_theme.php:1 6595 #: blocks/archives_block_theme.php:2 8625 #: blocks/archives_block_theme.php:17 626 #: blocks/archives_block_theme.php:29 596 627 msgid "Select Monthly" 597 628 msgstr "月を選択" 598 629 599 #: blocks/archives_block_theme.php: 19630 #: blocks/archives_block_theme.php:20 600 631 msgid "Select Weekly" 601 632 msgstr "週を選択" 602 633 603 #: blocks/archives_block_theme.php:2 2634 #: blocks/archives_block_theme.php:23 604 635 msgid "Select Daily" 605 636 msgstr "日を選択" 606 637 607 #: blocks/archives_block_theme.php:2 5638 #: blocks/archives_block_theme.php:26 608 639 msgid "Select Post" 609 640 msgstr "記事を選択" 610 641 611 #: blocks/authors_block_theme.php:3 1642 #: blocks/authors_block_theme.php:32 612 643 msgid "All Authors" 613 644 msgstr "全ての投稿者" 614 645 615 #: blocks/enhanced_block_theme.php:11 646 #: blocks/blog_list_block_theme.php:66 647 msgid "This blog is not set to the multi blog." 648 msgstr "このブログはマルチブログに設定されていません。" 649 650 #: blocks/enhanced_block_theme.php:12 616 651 msgid "The include file name to display it is not set." 617 652 msgstr "表示を行うためのインクルードファイル名が設定されていません。" 618 653 619 #: blocks/enhanced_block_theme.php:1 3654 #: blocks/enhanced_block_theme.php:14 620 655 #, php-format 621 656 msgid "File %s not exist." 622 657 msgstr "ファイル %s が見つかりません。" 623 658 624 #: blocks/enhanced_block_theme.php: 19659 #: blocks/enhanced_block_theme.php:20 625 660 msgid "PHP code error" 626 661 msgstr "PHPコードにエラーがあります。" 627 662 628 #: blocks/meta_block_theme.php:2 4663 #: blocks/meta_block_theme.php:25 629 664 msgid "Posts RSS" 630 665 msgstr "投稿の RSS" 631 666 632 #: blocks/meta_block_theme.php:2 7667 #: blocks/meta_block_theme.php:28 633 668 msgid "Comments RSS" 634 669 msgstr "コメント のRSS" 635 670 636 #: blocks/meta_block_theme.php:4 0637 #: blocks/meta_block_theme.php:4 5671 #: blocks/meta_block_theme.php:41 672 #: blocks/meta_block_theme.php:46 638 673 msgid "Add New" 639 674 msgstr "新規投稿" 640 675 641 #: blocks/meta_block_theme.php:5 4676 #: blocks/meta_block_theme.php:55 642 677 msgid "Site Admin" 643 678 msgstr "WordPress管理" 644 679 645 #: blocks/meta_block_theme.php:6 0680 #: blocks/meta_block_theme.php:61 646 681 msgid "User Profile" 647 682 msgstr "ユーザープロファイル" 648 683 649 #: blocks/meta_block_theme.php:6 8650 #: blocks/meta_block_theme.php:7 3684 #: blocks/meta_block_theme.php:69 685 #: blocks/meta_block_theme.php:74 651 686 msgid "Subscription management" 652 687 msgstr "メール購読の設定" 653 688 654 #: blocks/meta_block_theme.php:8 1689 #: blocks/meta_block_theme.php:82 655 690 msgid "ReadMe" 656 691 msgstr "ReadMe表示" 657 692 658 #: blocks/meta_block_theme.php:8 6693 #: blocks/meta_block_theme.php:87 659 694 msgid "Themes" 660 695 msgstr "テーマ選択" 661 696 662 697 #: blocks/popular_posts_block_theme.php:122 663 #: blocks/recent_posts_content_block_theme.php: 66664 #: blocks/recent_posts_list_block_theme.php: 68698 #: blocks/recent_posts_content_block_theme.php:84 699 #: blocks/recent_posts_list_block_theme.php:70 665 700 msgid "Tags:" 666 701 msgstr "タグ:" 667 702 668 703 #: blocks/popular_posts_block_theme.php:151 669 #: blocks/recent_posts_content_block_theme.php:1 05670 #: blocks/recent_posts_list_block_theme.php:9 7704 #: blocks/recent_posts_content_block_theme.php:123 705 #: blocks/recent_posts_list_block_theme.php:99 671 706 msgid "Comments (0)" 672 707 msgstr "コメントはありません" 673 708 674 709 #: blocks/popular_posts_block_theme.php:151 675 #: blocks/recent_posts_content_block_theme.php:1 05676 #: blocks/recent_posts_list_block_theme.php:9 7710 #: blocks/recent_posts_content_block_theme.php:123 711 #: blocks/recent_posts_list_block_theme.php:99 677 712 msgid "Comments (1)" 678 713 msgstr "1件のコメント" 679 714 680 715 #: blocks/popular_posts_block_theme.php:151 681 #: blocks/recent_posts_content_block_theme.php:1 05682 #: blocks/recent_posts_list_block_theme.php:9 7716 #: blocks/recent_posts_content_block_theme.php:123 717 #: blocks/recent_posts_list_block_theme.php:99 683 718 msgid "Comments (%)" 684 719 msgstr "Comments (%)" 685 720 686 #: blocks/recent_comments_block_theme.php: 81721 #: blocks/recent_comments_block_theme.php:78 687 722 #, php-format 688 723 msgid "%1$s on %2$s" -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/multi_blog.php
r525 r536 27 27 28 28 <?php 29 $date_format = get_settings('date_format'); 30 $blog_count = get_blog_count(); 31 if ($blog_count > 1){ 32 echo '<h3>' . __('New Entries', 'xpress') . "</h3>\n"; 33 34 $blog_list = get_blog_list(); 35 echo "<ul>\n"; 36 for ($i = 0; $i < $blog_count; $i++){ 37 $blog_id = $blog_list[$i]['blog_id']; 38 if ($blog_id == 1) continue; 39 $output_blogs = '<li><a href="' . 40 get_blog_option($blog_id,'siteurl') . '">' . 41 get_blog_option($blog_id,'blogname') . 42 '</a></li>'; 43 echo $output_blogs; 44 45 $wpdb->set_blog_id($blog_id); 46 query_posts("showposts=3&post_status=publish"); 47 if (have_posts()){ 48 echo "<ul>\n"; 49 while(have_posts()){ 50 the_post(); 51 echo '<li>'; 52 echo '<a href="' . $post->guid . '">' . $post->post_title . "</a>\n("; 53 the_time($date_format); 54 echo ")</li>\n"; 55 } 56 echo "</ul>\n"; 57 } 58 } 59 $wpdb->set_blog_id(1); 60 61 echo "</ul>\n"; 29 echo '<h3>' . __('New Entries', 'xpress') . "</h3>\n"; 30 $data_array = xpress_grobal_recent_posts(); 31 echo "<ul>\n"; 32 foreach($data_array as $data){ 33 echo '<li>'; 34 printf(__('%1$s wrote %2$s in %3$s.','xpress'), $data->post_author,$data->title_link,$data->blog_link); 35 echo "</li>\n"; 62 36 } 37 echo "</ul>\n"; 63 38 ?> 64 39 … … 104 79 echo "</ul>\n"; 105 80 } 106 107 81 ?> 108 82 -
trunk/xpressme_integration_kit/xoops_version.php
r533 r536 359 359 'func_num' => $b_no, 360 360 ); 361 $b_no++; 362 $modversion['blocks'][$b_no] = array( 363 'file' => 'global_recent_posts_list_block.php' , 364 'name' => constant('_MI_XP2_BLOCK_GLOBAL_POSTS') , 365 'description' => '' , 366 'show_func' => "b_". $mydirname . "_global_posts_show" , 367 'edit_func' => "b_". $mydirname . "_global_posts_edit" , 368 'options' => $mydirname. '||10|1|7||' , 369 'can_clone' => true , 370 'func_num' => $b_no, 371 ); 372 361 373 } 362 374
Note: See TracChangeset
for help on using the changeset viewer.