XPressME Integration Kit

Trac


Ignore:
Timestamp:
Nov 20, 2009, 2:52:16 PM (15 years ago)
Author:
toemon
Message:

MUブランチにVer2.2.0RC1の変更内容をマージ

Location:
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/archives_block_theme.php

    r125 r451  
    11<?php 
     2// Block Version: 1.0 
    23function archives_block($options) 
    34{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/authors_block_theme.php

    r360 r451  
    11<?php 
     2// Block Version: 1.0 
    23function authors_block($options) 
    34{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/calender_block_theme.php

    r272 r451  
    11<?php 
     2// Block Version: 1.0 
    23function calender_block($options) 
    34{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php

    r362 r451  
    11<?php 
    2  
     2// Block Version: 1.0 
    33function category_block($options) 
    44{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/enhanced_block_theme.php

    r138 r451  
    11<?php 
     2// Block Version: 1.0 
    23function enhanced_block($options) 
    34{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/meta_block_theme.php

    r360 r451  
    11<?php 
     2// Block Version: 1.0 
    23function meta_block($options) 
    34{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php

    r360 r451  
    11<?php 
    2  
     2// Block Version: 1.0 
    33function page_block($options) 
    44{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php

    r418 r451  
    11<?php 
     2// Block Version: 1.0 
    23function popular_posts_block($options) 
    34{ 
     
    910        $time_format = empty( $options[5] ) ? '' : $options[5] ; 
    1011        $tag_select = $options[6] ; 
    11         $selected = array_slice($options, 7); // get allowed cats 
     12        $cat_select = empty( $options[7] ) ? '0' : $options[7] ; 
     13         
     14        $selected = explode(',' , $cat_select); 
    1215 
    1316        $mydirpath = get_xpress_dir_path(); 
     
    1518        if (empty($date_format)) $date_format = get_settings('date_format'); 
    1619        if (empty($time_format)) $time_format = get_settings('time_format'); 
    17         if (array_search(0,$selected)===0) { 
    18                 $cat_select = false; 
    19         }else { 
    20                 $cat_select = true;                      
    21         } 
    22         $cat_id = implode(',',$selected); 
     20        if (array_search(0,$selected)===0) $cat_select = 0; 
     21         
     22        $cat_select; 
    2323        $block = array(); 
    2424        $item_no = 0;    
     
    5858 
    5959                if ($cat_select) { 
    60                         $where .= " AND ($term_taxonomy.term_id IN ($cat_id))"; 
     60                        $where .= " AND ($term_taxonomy.term_id IN ($cat_select))"; 
    6161                } 
    6262                 
     
    7575                 
    7676                if ($cat_select) { 
    77                         $where .= " AND ($post2cat_tb.category_id IN ($cat_id))"; 
     77                        $where .= " AND ($post2cat_tb.category_id IN ($cat_select))"; 
    7878                } 
    7979        } 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php

    r360 r451  
    11<?php 
    2 //if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; 
    3  
     2// Block Version: 1.0 
    43function recent_comments_block($options) 
    54{ 
     
    109        $date_format = empty( $options[4] ) ? '' : $options[4] ; 
    1110        $time_format = empty( $options[5] ) ? '' : $options[5] ; 
    12     $selected = array_slice($options,6); // get allowed cats 
     11        $com_select = empty( $options[6] ) ? '0' : $options[6] ; 
     12 
     13        $selected = explode(',' , $com_select); 
    1314 
    1415        $mydirpath = get_xpress_dir_path(); 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php

    r425 r451  
    11<?php 
    2 //if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; 
    3  
     2// Block Version: 1.0 
    43function recent_posts_content_block($options) 
    54{ 
    65        $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    76        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 
    8         $day_select = ($options[2])?intval($options[2]):0; 
    9         $day_size = ($options[3])?intval($options[3]):0; 
    10         $disp_count =  ($options[4])?intval($options[4]):10; 
    11         $excerpt = empty( $options[5] ) ? false : true ; 
    12         $excerpt_size =  ($options[6])?intval($options[6]):100; 
    13         $date_format = empty( $options[7] ) ? '' : $options[7] ; 
    14         $time_format = empty( $options[8] ) ? '' : $options[8] ; 
    15         $tag_select = $options[9] ; 
    16     $selected = array_slice($options,10); // get allowed cats 
    17  
     7        $disp_count =  ($options[2])?intval($options[2]):10; 
     8        $excerpt = empty( $options[3] ) ? false : true ; 
     9        $excerpt_size =  ($options[4])?intval($options[4]):100; 
     10        $date_format = empty( $options[5] ) ? '' : $options[5] ; 
     11        $time_format = empty( $options[6] ) ? '' : $options[6] ; 
     12        $tag_select = $options[7] ; 
     13        $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 
     14        $day_select = ($options[9])?intval($options[9]):0; 
     15        $day_size = ($options[10])?intval($options[10]):0; 
     16 
     17        $selected = explode(',' , $cat_select); 
     18         
    1819        $mydirpath = get_xpress_dir_path(); 
    1920         
     
    2122        if (empty($time_format)) $time_format = get_settings('time_format'); 
    2223        if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 
    23          
     24        if (array_search(0,$selected)===0) $cat_select = 0; 
     25 
    2426        $selected_author_id = xpress_selected_author_id('echo=0');       
    2527        if (!empty($selected_author_id)){ 
     
    3739        if (!is_null($wpdb)){ 
    3840                $wp_query->in_the_loop = true;          //for use the_tags() in multi lopp  
    39                 if (array_search(0,$selected)===0) { 
     41                if ($cat_select) { 
     42                        $r = new WP_Query($author_where . $tag_where ."cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
     43                } else { 
    4044                        $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    41                 } else { 
    42                         $cat_id = implode(',',$selected); 
    43                         $r = new WP_Query($author_where . $tag_where ."cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    4445                } 
    4546                while($r->have_posts()){                         
     
    5253                        if ($day_select == 2){ 
    5354                                $post_date = mktime (0, 0, 0, get_the_time("m"), get_the_time("d"), get_the_time("Y")); 
    54                                 if (empty($lastes_date)) $lastes_date = $post_date; 
    55                                 $base_date = $lastes_date - $between_days; 
     55                                if (empty($latest_date)) $latest_date = $post_date; 
     56                                $base_date = $latest_date - $between_days; 
    5657                                if ($post_date < $base_date) continue; 
    5758                        } 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php

    r272 r451  
    11<?php 
     2// Block Version: 1.0 
    23function recent_posts_list_block($options) 
    34{ 
     
    1011        $time_format = empty( $options[6] ) ? '' : $options[6] ; 
    1112        $tag_select = $options[7] ; 
    12         $selected = array_slice($options,8); // get allowed cats 
     13        $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 
     14         
     15        $selected = explode(',' , $cat_select); 
    1316 
    1417        $mydirpath = get_xpress_dir_path(); 
     
    1720        if (empty($time_format)) $time_format = get_settings('time_format'); 
    1821        if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 
     22        if (array_search(0,$selected)===0) $cat_select = 0; 
    1923 
    2024        $selected_author_id = xpress_selected_author_id('echo=0');       
     
    3034        if (!is_null($wpdb)){ 
    3135                $wp_query->in_the_loop = true;          //for use the_tags() in multi lopp  
    32                 if (array_search(0,$selected)===0) { 
     36                if ($cat_select) { 
     37                        $r = new WP_Query($author_where . $tag_where . "cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
     38                } else { 
    3339                        $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    34  
    35                 } else { 
    36                         $cat_id = implode(',',$selected); 
    37                         $r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    3840                } 
    3941                while($r->have_posts()){                         
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/search_block_theme.php

    r121 r451  
    11<?php 
    2  
     2// Block Version: 1.0 
    33function search_block($options) 
    44{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/sidebar_block_theme.php

    r254 r451  
    11<?php 
     2// Block Version: 1.0 
    23function sidebar_block($options) 
    34{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php

    r252 r451  
    11<?php 
     2// Block Version: 1.0 
    23function tag_cloud_block($options) 
    34{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php

    r339 r451  
    11<?php 
     2// Block Version: 1.0 
    23function widget_block($options) 
    34{ 
     
    56        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_widget.html' : trim( $options[1] ); 
    67        $title_show = empty( $options[2] ) ? false : true ; 
    7     $selected = array_slice($options,3); // get allowed cats 
     8        $widget_select = empty( $options[3] ) ? '' : $options[3] ; 
     9 
     10        $selected = explode(',' , $widget_select); 
    811 
    912        $output = ''; 
Note: See TracChangeset for help on using the changeset viewer.