[44] | 1 | <?php /* Fusion/digitalnature */
|
---|
| 2 | $options = get_option('fusion_options');
|
---|
| 3 | ?>
|
---|
| 4 | <?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
|
---|
| 5 | <p class="error"><?php _e('Enter your password to view comments','fusion'); ?></p>
|
---|
| 6 | <?php return; endif; ?>
|
---|
| 7 | <?php if ($comments || comments_open()) : ?>
|
---|
| 8 | <?php
|
---|
| 9 | /* Count the totals */
|
---|
| 10 | $numPingBacks = 0;
|
---|
| 11 | $numComments = 0;
|
---|
| 12 |
|
---|
| 13 | /* Loop throught comments to count these totals */
|
---|
| 14 | foreach ($comments as $comment)
|
---|
| 15 | if (get_comment_type() != "comment") $numPingBacks++; else $numComments++;
|
---|
| 16 | ?>
|
---|
| 17 | <div id="secondary-tabs">
|
---|
| 18 | <?php if(!$options['nojquery']) { ?>
|
---|
| 19 | <!-- comments and trackback tabs -->
|
---|
| 20 | <ul class="menu">
|
---|
| 21 | <li><a href="#tab-1"><span><span><?php _e('Comments','fusion'); echo ' ('.$numComments.')'; ?></span></span></a></li>
|
---|
| 22 | <li><a href="#tab-2"><span><span><?php _e('Trackbacks','fusion'); echo ' ('.$numPingBacks.')';?></span></span></a></li>
|
---|
| 23 | </ul>
|
---|
| 24 | <!-- /comments and trackback tabs -->
|
---|
| 25 | <?php } ?>
|
---|
| 26 | <!-- comments -->
|
---|
| 27 | <div id="tab-1">
|
---|
| 28 | <ol id="comments">
|
---|
| 29 | <?php
|
---|
| 30 | if ($numComments > 0) {
|
---|
| 31 |
|
---|
| 32 | // for WordPress 2.7 or higher
|
---|
| 33 | if (function_exists('wp_list_comments')) { wp_list_comments('type=comment&callback=list_comments'); }
|
---|
| 34 | else
|
---|
| 35 | { // for WordPress 2.6.3 or lower
|
---|
| 36 | foreach ($comments as $comment)
|
---|
| 37 | if($comment->comment_type != 'pingback' && $comment->comment_type != 'trackback') list_comments($comment, null, null);
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
| 40 | else { ?>
|
---|
| 41 | <li><?php _e('No comments yet.','fusion'); ?></li>
|
---|
| 42 | <?php } ?>
|
---|
| 43 | </ol>
|
---|
| 44 | <?php
|
---|
| 45 | if (get_option('page_comments')) {
|
---|
| 46 | $comment_pages = paginate_comments_links('echo=0');
|
---|
| 47 | if ($comment_pages) { ?>
|
---|
| 48 | <div class="commentnavi">
|
---|
| 49 | <div class="commentpager">
|
---|
| 50 | <?php echo $comment_pages; ?>
|
---|
| 51 | </div>
|
---|
| 52 | </div>
|
---|
| 53 | <?php
|
---|
| 54 | }
|
---|
| 55 | }
|
---|
| 56 | ?>
|
---|
| 57 | <?php
|
---|
| 58 | if (comments_open()) :
|
---|
| 59 | if (get_option('comment_registration') && !$user_ID ) { // If registration required and not logged in. ?>
|
---|
| 60 | <div id="comment_login" class="messagebox">
|
---|
| 61 | <?php if (function_exists('wp_login_url')) $login_link = wp_login_url(); else $login_link = get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink()); ?>
|
---|
| 62 | <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'fusion'), $login_link); ?></p>
|
---|
| 63 | </div>
|
---|
| 64 |
|
---|
| 65 | <?php } else { ?>
|
---|
| 66 |
|
---|
| 67 | <div id="respond">
|
---|
| 68 | <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" name="tcommentform">
|
---|
| 69 | <div class="cancel-comment-reply"><?php cancel_comment_reply_link(__('Cancel Reply','fusion')); ?></div>
|
---|
| 70 | <?php if ($user_ID) : ?>
|
---|
| 71 | <?php if (function_exists('wp_logout_url')) $logout_link = wp_logout_url(); else $logout_link = get_option('siteurl') . '/wp-login.php?action=logout'; ?>
|
---|
| 72 | <p>
|
---|
| 73 | <?php
|
---|
| 74 | $login_link = get_option('siteurl')."/wp-admin/profile.php";
|
---|
| 75 | printf(__('Logged in as %s.', 'fusion'), '<a href="'.$login_link.'"><strong>'.$user_identity.'</strong></a>');
|
---|
| 76 | ?>
|
---|
| 77 | <a href="<?php echo $logout_link; ?>" title="<?php _e('Log out of this account', 'fusion'); ?>"><?php _e('Logout »', 'fusion'); ?></a>
|
---|
| 78 | </p>
|
---|
| 79 | <?php else : ?>
|
---|
| 80 | <?php if ($comment_author != "") : ?>
|
---|
| 81 | <p><?php printf(__('Welcome back <strong>%s</strong>.', 'fusion'), $comment_author) ?> <span id="show_author_info"><a href="javascript:void(0);" onclick="MGJS.setStyleDisplay('author_info','');MGJS.setStyleDisplay('show_author_info','none');MGJS.setStyleDisplay('hide_author_info','');"> <?php _e('Change »','fusion'); ?></a></span> <span id="hide_author_info"><a href="javascript:void(0);" onclick="MGJS.setStyleDisplay('author_info','none');MGJS.setStyleDisplay('show_author_info','');MGJS.setStyleDisplay('hide_author_info','none');"><?php _e('Close »','fusion'); ?></a></span></p>
|
---|
| 82 | <?php endif; ?>
|
---|
| 83 | <div id="author_info">
|
---|
| 84 | <div class="row">
|
---|
| 85 | <input type="text" name="author" id="author" class="textfield" value="<?php echo $comment_author; ?>" size="24" tabindex="1" />
|
---|
| 86 | <label for="author" class="small"><?php _e("Name","fusion"); ?> <?php if ($req) _e("(required)","fusion"); ?></label>
|
---|
| 87 | </div>
|
---|
| 88 | <div class="row">
|
---|
| 89 | <input type="text" name="email" id="email" class="textfield" value="<?php echo $comment_author_email; ?>" size="24" tabindex="2" />
|
---|
| 90 | <label for="email" class="small"><?php _e("E-Mail","fusion"); ?> <?php if ($req) _e("(required)","fusion"); ?></label> <em><?php _e("(will not be published)","fusion"); ?></em>
|
---|
| 91 | </div>
|
---|
| 92 | <div class="row">
|
---|
| 93 | <input type="text" name="url" id="url" class="textfield" value="<?php echo $comment_author_url; ?>" size="24" tabindex="3" />
|
---|
| 94 | <label for="url" class="small"><?php _e("Website","fusion"); ?></label>
|
---|
| 95 | </div>
|
---|
| 96 | </div>
|
---|
| 97 | <?php if ( $comment_author != "" ) : ?>
|
---|
| 98 | <script type="text/javascript">MGJS.setStyleDisplay('hide_author_info','none');MGJS.setStyleDisplay('author_info','none');</script>
|
---|
| 99 | <?php endif; ?>
|
---|
| 100 | <?php endif; ?>
|
---|
| 101 |
|
---|
| 102 | <!-- comment input -->
|
---|
| 103 | <div class="row">
|
---|
| 104 | <textarea name="comment" id="comment" tabindex="4" rows="8" cols="50"></textarea>
|
---|
| 105 | <?php if (function_exists('highslide_emoticons')) : ?><div id="emoticon"><?php highslide_emoticons(); ?></div><?php endif; ?>
|
---|
| 106 | <?php comment_id_fields();do_action('comment_form', $post->ID); ?>
|
---|
| 107 | </div>
|
---|
| 108 | <!-- /comment input -->
|
---|
| 109 |
|
---|
| 110 | <!-- comment submit and rss -->
|
---|
| 111 | <div id="submitbox" class="left">
|
---|
| 112 | <span class="button submit"><a title="<?php _e("Submit Comment","fusion"); ?>" href="javascript:document.tcommentform.submit();"><span><span><?php _e("Submit Comment","fusion"); ?></span></span></a></span>
|
---|
| 113 | <input type="hidden" name="formInput" />
|
---|
| 114 | </div>
|
---|
| 115 | <div class="clear"></div>
|
---|
| 116 | </form>
|
---|
| 117 | </div>
|
---|
| 118 | <?php } ?>
|
---|
| 119 | <?php endif; ?>
|
---|
| 120 | </div>
|
---|
| 121 | <!-- /comments -->
|
---|
| 122 |
|
---|
| 123 | <?php if(!$options['nojquery']) { ?>
|
---|
| 124 | <!-- trackbacks -->
|
---|
| 125 | <div id="tab-2">
|
---|
| 126 | <ol id="trackbacks">
|
---|
| 127 | <?php
|
---|
| 128 | if ($numPingBacks > 0) wp_list_comments('type=pings&callback=list_pings'); else { ?>
|
---|
| 129 | <li><?php _e("No trackbacks yet.","fusion"); ?></li>
|
---|
| 130 | <?php } ?>
|
---|
| 131 | </ol>
|
---|
| 132 | </div>
|
---|
| 133 | <!-- /trackbacks -->
|
---|
| 134 | <?php } ?>
|
---|
| 135 |
|
---|
| 136 | </div>
|
---|
| 137 | <?php endif; ?>
|
---|
| 138 |
|
---|
| 139 | <?php if (!comments_open()): // If comments are closed. ?>
|
---|
| 140 | <?php if (is_page() && (!$comments)):
|
---|
| 141 | else: ?>
|
---|
| 142 | <p><?php _e("Comments are closed.","fusion"); ?></p>
|
---|
| 143 | <?php endif; ?>
|
---|
| 144 | <?php endif; ?>
|
---|