Changeset 158 for trunk/wp-content/themes/xpress_default
- Timestamp:
- Apr 6, 2009, 6:29:42 PM (16 years ago)
- Location:
- trunk/wp-content/themes/xpress_default
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
r157 r158 26 26 $selected_author_id = xpress_selected_author_id(false); 27 27 28 global $wpdb,$wp_query ;28 global $wpdb,$wp_query,$xoops_db; 29 29 30 30 $db_prefix = get_wp_prefix(); … … 43 43 include ($mydirpath . '/wp-includes/version.php'); 44 44 45 $select = "SELECT $view_tb.post_views, $post_tb.ID, $post_tb.post_title, $post_tb.post_date , $user_tb.display_name";46 if ($wp_db_version >= 6124){ 47 $from = " FROM ((( (";45 $select = "SELECT $view_tb.post_views, $post_tb.ID, $post_tb.post_title, $post_tb.post_date"; 46 47 $from = " FROM ((("; 48 48 $from .= " $post_tb LEFT JOIN $view_tb ON $post_tb.ID = $view_tb.post_id)"; 49 49 $from .= " INNER JOIN $term_relationships_tb ON $post_tb.ID = $term_relationships_tb.object_id)"; 50 50 $from .= " INNER JOIN $term_taxonomy ON $term_relationships_tb.term_taxonomy_id = $term_taxonomy.term_taxonomy_id)"; 51 $from .= " INNER JOIN $terms_tb ON $term_taxonomy.term_id = $terms_tb.term_id)"; 52 $from .= " INNER JOIN $user_tb ON $post_tb.post_author = $user_tb.ID"; 51 $from .= " INNER JOIN $terms_tb ON $term_taxonomy.term_id = $terms_tb.term_id "; 53 52 54 $where = " WHERE ($post_tb.post_type = 'post') AND ($post_tb.post_status = 'publish')"; 55 if (!empty($selected_author_id)){ 56 $where .= " AND $post_tb.post_author = $selected_author_id "; 57 } 53 $where = " WHERE $post_tb.post_type = 'post' AND $post_tb.post_status = 'publish'"; 54 // if (!empty($selected_author_id)){ 55 // $where .= " AND ($post_tb.post_author = $selected_author_id) "; 56 // $where .= " AND ($post_tb.post_author = 2) "; 57 // } 58 58 59 59 if ($cat_select) { … … 67 67 } 68 68 69 } else { 70 $from = " FROM (("; 71 $from .= " $post_tb LEFT JOIN $view_tb ON $post_tb.ID = $view_tb.post_id)"; 72 $from .= " LEFT JOIN $post2cat_tb ON $post_tb.ID = $post2cat_tb.post_id)"; 73 $from .= " INNER JOIN $user_tb ON $post_tb.post_author = $user_tb.ID"; 74 75 $where = " WHERE ($post_tb.post_status = 'publish') AND (UNIX_TIMESTAMP($post_tb.post_date) <= UNIX_TIMESTAMP())" ; 76 77 if ($cat_select) { 78 $where .= " AND ($post2cat_tb.category_id IN ($cat_id))"; 79 } 80 if (!empty($selected_author_id)){ 81 $where .= " AND $post_tb.post_author = $selected_author_id "; 82 } 83 84 } 69 85 70 if ($show_month_range > 0) { 86 71 $where .= " AND (UNIX_TIMESTAMP($post_tb.post_date) >= UNIX_TIMESTAMP(DATE_ADD(CURRENT_DATE, INTERVAL -$show_month_range month)))"; 87 72 } 88 73 $order_limmit = " GROUP BY $post_tb.ID ORDER BY $view_tb.post_views DESC LIMIT 0, $disp_count"; 89 90 $populars = $wpdb->get_results($select . $from . $where . $order_limmit); 74 $sql = $select . $from . $where . $order_limmit; 75 76 $populars = $wpdb->get_results($sql); 91 77 92 78 foreach ($populars as $popular){ … … 156 142 $post_modified_date_time = $post_modified_date . ' ' . $post_modified_time ; 157 143 $trackback_url = trackback_url(false); 158 $post_viwes = xpress_post_views_count($post_id, 'views: %d',false);144 $post_viwes = xpress_post_views_count($post_id,__('views: %d','xpress') ,false); 159 145 // if (empty($tags)) $tags = __('Not Tag'); 160 146 -
trunk/wp-content/themes/xpress_default/ja.po
r150 r158 18 18 "Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com\n" 19 19 "POT-Creation-Date: 2008-08-15 21:16+0900\n" 20 "PO-Revision-Date: 2009-04-0 2 18:19+0900\n"20 "PO-Revision-Date: 2009-04-06 00:50+0900\n" 21 21 "Last-Translator: toemon <toychee@toemon.com>\n" 22 22 "Language-Team: toemon <info@toemon.com>\n" … … 631 631 msgstr "テーマ選択" 632 632 633 #: blocks/popular_posts_block_theme.php:1 14634 #: blocks/recent_posts_content_block_theme.php:6 2635 #: blocks/recent_posts_list_block_theme.php:6 0633 #: blocks/popular_posts_block_theme.php:125 634 #: blocks/recent_posts_content_block_theme.php:68 635 #: blocks/recent_posts_list_block_theme.php:67 636 636 msgid "Tags:" 637 637 msgstr "タグ:" 638 638 639 #: blocks/popular_posts_block_theme.php:1 40640 #: blocks/recent_posts_content_block_theme.php: 97641 #: blocks/recent_posts_list_block_theme.php: 86639 #: blocks/popular_posts_block_theme.php:151 640 #: blocks/recent_posts_content_block_theme.php:103 641 #: blocks/recent_posts_list_block_theme.php:93 642 642 msgid "Comments (0)" 643 643 msgstr "コメントはありません" 644 644 645 #: blocks/popular_posts_block_theme.php:1 40646 #: blocks/recent_posts_content_block_theme.php: 97647 #: blocks/recent_posts_list_block_theme.php: 86645 #: blocks/popular_posts_block_theme.php:151 646 #: blocks/recent_posts_content_block_theme.php:103 647 #: blocks/recent_posts_list_block_theme.php:93 648 648 msgid "Comments (1)" 649 649 msgstr "1件のコメント" 650 650 651 #: blocks/popular_posts_block_theme.php:1 40652 #: blocks/recent_posts_content_block_theme.php: 97653 #: blocks/recent_posts_list_block_theme.php: 86651 #: blocks/popular_posts_block_theme.php:151 652 #: blocks/recent_posts_content_block_theme.php:103 653 #: blocks/recent_posts_list_block_theme.php:93 654 654 msgid "Comments (%)" 655 655 msgstr "Comments (%)" 656 657 #: blocks/popular_posts_block_theme.php:160 658 #, php-format 659 msgid "views: %d" 660 msgstr "閲覧 :%d回" 656 661 657 662 #: blocks/recent_comments_block_theme.php:73 … … 660 665 msgstr "%1$s と %2$s" 661 666 662 #: blocks/recent_posts_content_block_theme.php:7 2667 #: blocks/recent_posts_content_block_theme.php:78 663 668 msgid "more" 664 669 msgstr "続きを読む"
Note: See TracChangeset
for help on using the changeset viewer.