XPressME Integration Kit

Trac


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 , 
Note: See TracChangeset for help on using the changeset viewer.