XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 30, 2009, 2:01:07 PM (15 years ago)
Author:
toemon
Message:

ブロックオプションで日付スタイルをカスタマイズできるオプションを追加 bump Ver0.19

Location:
trunk/wp-content/themes/xpress_default/blocks
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php

    r120 r142  
    66        $disp_count = empty( $options[2] ) ? '10' : $options[2] ; 
    77        $show_month_range = empty( $options[3] ) ? '0' : $options[3] ; 
    8         $tag_select = $options[4] ; 
    9         $selected = array_slice($options,5); // get allowed cats 
     8        $date_format = empty( $options[4] ) ? '' : $options[4] ; 
     9        $time_format = empty( $options[5] ) ? '' : $options[5] ; 
     10        $tag_select = $options[6] ; 
     11        $selected = array_slice($options, 7); // get allowed cats 
     12 
    1013        $mydirpath = get_xpress_dir_path(); 
    1114         
     15        if (empty($date_format)) $date_format = get_settings('date_format'); 
     16        if (empty($time_format)) $time_format = get_settings('time_format'); 
    1217        if (array_search(0,$selected)===0) { 
    1318                $cat_select = false; 
     
    112117                         
    113118                        ob_start(); 
    114                                 the_modified_date(get_settings('date_format')); 
     119                                the_modified_date($date_format); 
    115120                                $post_modified_date = ob_get_contents(); 
    116121                        ob_end_clean(); 
    117122                         
    118123                        ob_start(); 
    119                                 the_modified_date(get_settings('time_format')); 
     124                                the_modified_date($time_format); 
    120125                                $post_modified_time = ob_get_contents(); 
    121126                        ob_end_clean(); 
    122127                         
    123128                        ob_start(); 
    124                                 the_time(get_settings('date_format')); 
     129                                the_time($date_format); 
    125130                                $post_date = ob_get_contents(); 
    126131                        ob_end_clean(); 
    127132                         
    128133                        ob_start(); 
    129                                 the_time(get_settings('time_format')); 
     134                                the_time($time_format); 
    130135                                $post_time = ob_get_contents(); 
    131136                        ob_end_clean(); 
  • trunk/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php

    r120 r142  
    88        $disp_count = empty( $options[2] ) ? '10' : $options[2] ; 
    99        $disp_length = empty( $options[3] ) ? '30' : $options[3] ; 
    10         $selected = array_slice($options,4); // get allowed cats 
    11 //      $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     10        $date_format = empty( $options[4] ) ? '' : $options[4] ; 
     11        $time_format = empty( $options[5] ) ? '' : $options[5] ; 
     12    $selected = array_slice($options,6); // get allowed cats 
     13 
    1214        $mydirpath = get_xpress_dir_path(); 
    13         $this_url = '/modules/'. $mydirname; 
    14         $call_url = $_SERVER['REQUEST_URI']; 
     15         
     16        if (empty($date_format)) $date_format = get_settings('date_format'); 
     17        if (empty($time_format)) $time_format = get_settings('time_format'); 
    1518         
    1619        $disp_all = in_array('0',$selected); 
     
    4750 
    4851                $comments = $wpdb->get_results($comment_sql); 
    49                 $format = get_settings('date_format') . ' ' . get_settings('time_format');                               
    5052                 
    5153                if ( $comments ) { 
     
    7476                                        'comment_ID'            => $comment->comment_ID , 
    7577                                        'comment_post_ID'       => $comment->comment_post_ID , 
    76                                         'comment_date'          => date(get_settings('date_format'),$comment->comment_unix_time) , 
    77                                         'comment_date_time' => date(get_settings('date_format') . ' ' . get_settings('time_format'),$comment->comment_unix_time) , 
     78                                        'comment_date'          => date($date_format,$comment->comment_unix_time) , 
     79                                        'comment_date_time' => date($date_format . ' ' . $time_format,$comment->comment_unix_time) , 
    7880                                        'comment_content'       => $comment_content , 
    7981                                        'comment_excerpt'       => $comment_excerpt , 
  • trunk/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php

    r120 r142  
    99        $except = empty( $options[3] ) ? false : true ; 
    1010        $except_size =  ($options[4])?intval($options[4]):100; 
    11         $tag_select = $options[5] ; 
    12     $selected = array_slice($options,6); // get allowed cats 
    13 //      $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     11        $date_format = empty( $options[5] ) ? '' : $options[5] ; 
     12        $time_format = empty( $options[6] ) ? '' : $options[6] ; 
     13        $tag_select = $options[7] ; 
     14    $selected = array_slice($options,8); // get allowed cats 
     15 
    1416        $mydirpath = get_xpress_dir_path(); 
    1517         
    16         $this_url = '/modules/'. $mydirname; 
    17         $call_url = $_SERVER['REQUEST_URI']; 
    18          
     18        if (empty($date_format)) $date_format = get_settings('date_format'); 
     19        if (empty($time_format)) $time_format = get_settings('time_format'); 
    1920        if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 
    2021         
     
    7071 
    7172                        ob_start(); 
    72                                 the_modified_date(get_settings('date_format')); 
     73                                the_modified_date($date_format); 
    7374                                $post_modified_date = ob_get_contents(); 
    7475                        ob_end_clean(); 
    7576                         
    7677                        ob_start(); 
    77                                 the_modified_date(get_settings('time_format')); 
     78                                the_modified_date($time_format); 
    7879                                $post_modified_time = ob_get_contents(); 
    7980                        ob_end_clean(); 
    8081                         
    8182                        ob_start(); 
    82                                 the_time(get_settings('date_format')); 
     83                                the_time($date_format); 
    8384                                $post_date = ob_get_contents(); 
    8485                        ob_end_clean(); 
    8586                         
    8687                        ob_start(); 
    87                                 the_time(get_settings('time_format')); 
     88                                the_time($time_format); 
    8889                                $post_time = ob_get_contents(); 
    8990                        ob_end_clean(); 
  • trunk/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php

    r121 r142  
    77        $disp_red = empty( $options[3] ) ? '1' : $options[3] ; 
    88        $disp_green = empty( $options[4] ) ? '7' : $options[4] ; 
    9         $tag_select = $options[5] ; 
    10         $selected = array_slice($options,6); // get allowed cats 
    11 //      $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     9        $date_format = empty( $options[5] ) ? '' : $options[5] ; 
     10        $time_format = empty( $options[6] ) ? '' : $options[6] ; 
     11        $tag_select = $options[7] ; 
     12        $selected = array_slice($options,8); // get allowed cats 
     13 
    1214        $mydirpath = get_xpress_dir_path(); 
    1315 
     16        if (empty($date_format)) $date_format = get_settings('date_format'); 
     17        if (empty($time_format)) $time_format = get_settings('time_format'); 
    1418        if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 
    1519         
     
    5963                         
    6064                        ob_start(); 
    61                                 the_modified_date(get_settings('date_format')); 
     65                                the_modified_date($date_format); 
    6266                                $post_modified_date = ob_get_contents(); 
    6367                        ob_end_clean(); 
    6468                         
    6569                        ob_start(); 
    66                                 the_modified_date(get_settings('time_format')); 
     70                                the_modified_date($time_format); 
    6771                                $post_modified_time = ob_get_contents(); 
    6872                        ob_end_clean(); 
    6973                         
    7074                        ob_start(); 
    71                                 the_time(get_settings('date_format')); 
     75                                the_time($date_format); 
    7276                                $post_date = ob_get_contents(); 
    7377                        ob_end_clean(); 
    7478                         
    7579                        ob_start(); 
    76                                 the_time(get_settings('time_format')); 
     80                                the_time($time_format); 
    7781                                $post_time = ob_get_contents(); 
    7882                        ob_end_clean(); 
Note: See TracChangeset for help on using the changeset viewer.