XPressME Integration Kit

Trac

Changeset 253


Ignore:
Timestamp:
Jun 5, 2009, 5:09:39 PM (15 years ago)
Author:
toemon
Message:

fixed #140 WordPressME2.0.11への対応でデフォルトテーマのコメントにバグ修正

Location:
trunk/xpressme_integration_kit/wp-content
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php

    r252 r253  
    4141} 
    4242 
     43function xpress_is_wp20() { 
     44        global $xoops_config; 
     45         
     46        return $xoops_config->is_wp20; 
     47} 
     48 
    4349function xpress_selected_author($show=true ) { 
    4450        $output = ''; 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments.php

    r252 r253  
    88                return; 
    99        } 
    10          
    11         if (function_exists('have_comments')) 
    12                 $have_comments= have_comments(); 
    13         else 
    14                 $have_comments= $comments; 
    1510 
    1611?> 
    1712 
    1813<!-- You can start editing here. --> 
    19 <?php if ( $have_comments ) : ?> 
    20         <?php if ( ! empty($comments_by_type['comment']) ) : ?> 
     14<?php if (! xpress_is_wp20() ) : ?> 
     15        <?php if ( have_comments() ) : ?> 
     16                <?php if ( ! empty($comments_by_type['comment']) ) : ?> 
     17                        <h3 id="xpress_comments"><?php comments_number(__('No Responses', 'xpress'), __('One Response', 'xpress'), __('% Responses', 'xpress'));?> <?php printf(__('to &#8220;%s&#8221;', 'xpress'), the_title('', '', false)); ?></h3> 
     18                        <div id="xpress_commentlist"> 
     19                                <?php wp_list_comments('type=comment&style=div'); ?> 
     20                        </div> 
     21                <?php endif; ?> 
     22                 
     23                <div class="navigation"> 
     24                        <div class="alignleft"><?php previous_comments_link() ?></div> 
     25                        <div class="alignright"><?php next_comments_link() ?></div> 
     26                </div> 
     27        <?php else : // this is displayed if there are no comments so far ?> 
     28 
     29                <?php if ('open' == $post->comment_status) : ?> 
     30                        <!-- If comments are open, but there are no comments. --> 
     31                <?php else : // comments are closed ?> 
     32                        <!-- If comments are closed. --> 
     33                        <p class="nocomments"><?php _e('Comments are closed.' , 'xpress'); ?></p> 
     34                <?php endif; ?> 
     35        <?php endif; ?> 
     36<?php else : // is WordPress2.0 ?> 
     37        <?php if ( $comments ) : ?> 
    2138                <h3 id="xpress_comments"><?php comments_number(__('No Responses', 'xpress'), __('One Response', 'xpress'), __('% Responses', 'xpress'));?> <?php printf(__('to &#8220;%s&#8221;', 'xpress'), the_title('', '', false)); ?></h3> 
    2239                <div id="xpress_commentlist"> 
    23                         <?php if (function_exists('wp_list_comments')) : ?> 
    24                                 <?php wp_list_comments('type=comment&style=div'); ?> 
    25                                         <ol class="commentlist"> 
    26                         <?php else : ?> 
    27                                 <?php foreach ($comments as $comment) : ?> 
    28                                         <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"> 
    29                                                 <?php if (function_exists('get_avatar')) echo get_avatar( $comment, 32 ); ?>     
    30                                                 <?php printf(__('<cite>%s</cite> Says:', 'xpressme'), get_comment_author_link()); ?> 
    31                                                 <?php if ($comment->comment_approved == '0') : ?> 
    32                                                 <em><?php _e('Your comment is awaiting moderation.', 'xpressme'); ?></em> 
    33                                                 <?php endif; ?> 
    34                                                 <br /> 
    35                                                 <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php printf(__('%1$s at %2$s', 'xpressme'), get_comment_date(__('F jS, Y', 'xpressme')), get_comment_time()); ?></a> <?php edit_comment_link(__('Comment Edit', 'xpressme'),'&nbsp;&nbsp;',''); ?></small> 
    36                                                 <?php comment_text() ?> 
    37                                         </li> 
     40                        <?php foreach ($comments as $comment) : ?> 
     41                                <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"> 
     42                                        <?php if (function_exists('get_avatar')) echo get_avatar( $comment, 32 ); ?>     
     43                                        <?php printf(__('<cite>%s</cite> Says:', 'xpress'), get_comment_author_link()); ?> 
     44                                        <?php if ($comment->comment_approved == '0') : ?> 
     45                                        <em><?php _e('Your comment is awaiting moderation.', 'xpress'); ?></em> 
     46                                        <?php endif; ?> 
     47                                        <br /> 
     48                                        <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php printf(__('%1$s at %2$s', 'xpress'), get_comment_date(), get_comment_time()); ?></a> <?php edit_comment_link(__('Comment Edit', 'xpress'),'&nbsp;&nbsp;',''); ?></small> 
     49                                        <?php comment_text() ?> 
     50                                </li> 
    3851                                <?php 
    3952                                        /* Changes every other comment to a different class */ 
    4053                                        $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : ''; 
    4154                                ?> 
    42                                 <?php endforeach; /* end for each comment */ ?> 
    43                                 </ol> 
    44                         <?php endif; ?> 
     55                        <?php endforeach; /* end for each comment */ ?> 
     56                        </ol> 
    4557                </div> 
    46         <?php endif; ?> 
    47         <?php if (function_exists('wp_list_comments')) : ?> 
    48                 <div class="navigation"> 
    49                         <div class="alignleft"><?php previous_comments_link() ?></div> 
    50                         <div class="alignright"><?php next_comments_link() ?></div> 
    51                 </div> 
    52         <?php endif; ?> 
    53                                  
    54 <?php else : // this is displayed if there are no comments so far ?> 
    55  
    56         <?php if ('open' == $post->comment_status) : ?> 
    57                 <!-- If comments are open, but there are no comments. --> 
    58         <?php else : // comments are closed ?> 
    59                 <!-- If comments are closed. --> 
    60                 <p class="nocomments"><?php _e('Comments are closed.' , 'xpress'); ?></p> 
     58        <?php else : // this is displayed if there are no comments so far ?> 
     59                <?php if ('open' == $post->comment_status) : ?> 
     60                        <!-- If comments are open, but there are no comments. --> 
     61                <?php else : // comments are closed ?> 
     62                        <!-- If comments are closed. --> 
     63                        <p class="nocomments"><?php _e('Comments are closed.' , 'xpress'); ?></p> 
     64                <?php endif; ?> 
    6165        <?php endif; ?> 
    6266<?php endif; ?> 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/single.php

    r252 r253  
    6565                                                         
    6666                                        <div id ="xpress-comments-block"> 
    67                                                 <?php comments_template(); ?> 
     67                                                <?php 
     68                                                        if (xpress_is_wp20() ) 
     69                                                                comments_template(); 
     70                                                        else 
     71                                                                comments_template('',true); 
     72                                                ?> 
    6873                                        </div> 
    6974                                </div> 
Note: See TracChangeset for help on using the changeset viewer.