XPressME Integration Kit

Trac


Ignore:
Timestamp:
Jun 4, 2009, 2:02:54 PM (15 years ago)
Author:
toemon
Message:

WordPressME2.0.11への対応,(ブロック周りは未完)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments.php

    r232 r252  
    88                return; 
    99        } 
     10         
     11        if (function_exists('have_comments')) 
     12                $have_comments= have_comments(); 
     13        else 
     14                $have_comments= $comments; 
     15 
    1016?> 
    1117 
    1218<!-- You can start editing here. --> 
    13  
    14 <?php if ( have_comments() ) : ?> 
     19<?php if ( $have_comments ) : ?> 
    1520        <?php if ( ! empty($comments_by_type['comment']) ) : ?> 
    1621                <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> 
    1722                <div id="xpress_commentlist"> 
    18                         <?php wp_list_comments('type=comment&style=div'); ?> 
     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> 
     38                                <?php 
     39                                        /* Changes every other comment to a different class */ 
     40                                        $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : ''; 
     41                                ?> 
     42                                <?php endforeach; /* end for each comment */ ?> 
     43                                </ol> 
     44                        <?php endif; ?> 
    1945                </div> 
    2046        <?php endif; ?> 
    21          
    22         <div class="navigation"> 
    23                 <div class="alignleft"><?php previous_comments_link() ?></div> 
    24                 <div class="alignright"><?php next_comments_link() ?></div> 
    25         </div> 
     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                                 
    2654<?php else : // this is displayed if there are no comments so far ?> 
    2755 
     
    3967        </div> 
    4068                         
    41         <div id="cancel-comment-reply">  
    42                 <small><?php cancel_comment_reply_link() ?></small> 
    43         </div>  
     69        <?php if ( function_exists('cancel_comment_reply_link') ): ?> 
     70                <div id="cancel-comment-reply">  
     71                        <small><?php cancel_comment_reply_link() ?></small> 
     72                </div>  
     73        <?php endif; ?> 
    4474         
    4575        <?php if ( get_option('comment_registration') && !$user_ID ) : ?> 
     
    4979                        <div id="xpress-comment-user"> 
    5080                                <?php if ( $user_ID ) : ?> 
    51                                         <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p> 
     81                                        <?php if ( function_exists('wp_logout_url') ): ?> 
     82                                                <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p> 
     83                                        <?php else : ?> 
     84                                                <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p> 
     85                                        <?php endif; ?> 
    5286                                <?php else : ?> 
    5387                                        <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /> 
     
    69103                                        <input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'xpress'); ?>" /> 
    70104                                </div> 
    71                                 <?php comment_id_fields(); ?>    
     105                                <?php if (function_exists('comment_id_fields')) : ?> 
     106                                        <?php comment_id_fields(); //@since 2.7.0 ?>   
     107                                <?php else : ?> 
     108                                        <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> 
     109                                <?php endif; ?> 
    72110                                <?php do_action('comment_form', $post->ID); ?> 
    73111                        </div> 
Note: See TracChangeset for help on using the changeset viewer.