function fauna_trackback($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>
	<? if ($comment->comment_type == "trackback" || $comment->comment_type == "pingback") { ?>

<? if (!$runonce) { $runonce = true; ?>
<h2 id="trackbacks"><?php 
    _e('Trackbacks &amp; Pingbacks');
    ?>
</h2>
<? } ?>

	<li><a name="comment-<?php 
    comment_ID();
    ?>
" href="<? echo($comment->comment_author_url); ?>" title="Visit <? echo($comment->comment_author); ?>">
		<? if (function_exists('comment_favicon')) { comment_favicon($before='<img src="', $after='" alt="" class="trackback-avatar" />'); }; ?>
		<strong><u><? echo($comment->comment_author); ?></u></strong>
		<small>
		<?php 
    comment_type(__('commented'), __('trackbacked'), __('pingbacked'));
    ?>
 <?php 
    _e('on');
    ?>
 
		<?php 
    if (function_exists('time_since')) {
        echo time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time()) . " ago";
    } else {
        ?>
		<?php 
        comment_date();
        ?>
, <?php 
        comment_time();
    }
    ?>
		</small>
		<?php 
    /* Trackback body text is disabled by default. To enable it, remove lines 22 and 24 of this file.
    		comment_text()
    		*/
    ?>
		</a>
	</li>
	<?php 
    edit_comment_link(__("<li>Edit This</li>"));
    ?>
	<? } ?>
<?php 
}
function fauna_comment($comment, $args, $depth) {
	$GLOBALS['comment'] = $comment;
	
	if ($comment->comment_type != "trackback" && $comment->comment_type != "pingback") {
		if($odd == $bgcolor) { $bgcolor = $even; } else { $bgcolor = $odd; }

		/* Assign .comment-author CSS class to weblog administrator */
		$is_author = false;
		if($comment->comment_author_email == get_settings(admin_email)) {
			$is_author = true;
		}
		?>	
	
		<li id="comment-<?php comment_ID() ?>" <?php if ($is_author == true) { $class .= ' '.$author; } else { $class .= ' '.$bgcolor; }?> <?php post_class($class); ?>>
			<div class="comment-body">
				<div class="comment-header">
					<?php if (function_exists('comment_favicon')) { ?><a href="<? echo($comment->comment_author_url); ?>" title="Visit <? echo($comment->comment_author); ?>"><? comment_favicon($before='<img src="', $after='" alt="" class="comment-avatar" />'); ?></a><?php } ?>
						<?php echo get_avatar( $comment, 48 ); ?>
						<em><a href="#comment-<? echo($comment->comment_ID) ?>" title="<?php _e('Permanent link to this comment') ?>"><? echo($comment_number) ?></a></em>
						<strong><? comment_author_link(); ?></strong> 
						<?php if ( function_exists(comment_subscription_status) ) { if (comment_subscription_status()) { ?><?php _e('(subscribed to comments)') ?><? }} ?>
						<?php _e('says:') ?>
						<?php if ($comment->comment_approved == '0') : ?>
							<small><?php _e('Your comment is awaiting moderation. This is just a spam counter-measure, and will only happen the first time you post here. Your comment will be approved as soon as possible.') ?></small>
						<?php endif; ?>
				</div>
				<?php comment_text() ?>
				<?php echo comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => ' | ')) ?>
				<small>
					<?php _e('Posted') ?> 
					<?php 
					if (function_exists('time_since')) {
						echo time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time()) . " ago";
					} else { ?>
						<?php comment_date(); ?>, <?php comment_time(); } ?> 
					<? } ?>
					<?php edit_comment_link(__("Edit This"), ' | '); ?>
				</small>
		</div>
	</li> 
	<?php
}
Ejemplo n.º 3
0
/**
 * Displays current pingback/trackback
 *
 * @since 1.0
 *
 * @param object $comment Comment data object.
 * @param array $args
 * @param int $depth Depth of comment in reference to parents.
 */
function k2_ping_start_el($comment, $args = array(), $depth = 1)
{
    global $user_ID;
    $GLOBALS['comment'] = $comment;
    ?>

	<li id="comment-<?php 
    comment_ID();
    ?>
" <?php 
    comment_class();
    ?>
>
		<?php 
    if (function_exists('comment_favicon')) {
        ?>
			<span class="favatar"><?php 
        comment_favicon();
        ?>
</span>
		<?php 
    }
    ?>

		<span class="comment-author"><?php 
    comment_author_link();
    ?>
</span>

		<div class="comment-meta">				
		<?php 
    printf(_x('%1$s on %2$s', 'k2_comments', 'unwakeable'), '<span class="pingtype">' . comment_type(__('Comment', 'unwakeable'), __('Trackback', 'unwakeable'), __('Pingback', 'unwakeable')) . '</span>', sprintf('<a href="#comment-%1$s" title="%2$s">%3$s</a>', get_comment_ID(), function_exists('time_since') ? sprintf(__('%s ago.', 'unwakeable'), time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time())) : __('Permanent Link to this Comment', 'unwakeable'), sprintf(_x('%1$s at %2$s', 'k2_comments', 'unwakeable'), get_comment_date(__('M jS, Y', 'unwakeable')), get_comment_time())));
    if ($user_ID) {
        edit_comment_link(__('Edit', 'unwakeable'), '<span class="comment-edit">', '</span>');
    }
    ?>
		</div><!-- .comment-meta -->
<?php 
}
Ejemplo n.º 4
0
			<?php 
        foreach ($k2_ping_list as $ping_index => $comment) {
            ?>

			<li id="comment-<?php 
            comment_ID();
            ?>
" class="<?php 
            k2_comment_class($ping_index);
            ?>
">
				<?php 
            if (function_exists('comment_favicon')) {
                ?>
<span class="favatar"><?php 
                comment_favicon();
                ?>
</span><?php 
            }
            ?>
				<a href="#comment-<?php 
            comment_ID();
            ?>
" title="<?php 
            _e('Permanent Link to this Guestbook Entry', 'k2_domain');
            ?>
" class="counter"><?php 
            echo $ping_index;
            ?>
</a>
				<span class="commentauthor"><?php 
Ejemplo n.º 5
0
    function k2_comment_type_switch($comment, $args, $depth = 1)
    {
        $GLOBALS['comment'] = $comment;
        switch ($comment->comment_type) {
            case '':
                ?>
		<li id="comment-<?php 
                comment_ID();
                ?>
">
			<div <?php 
                comment_class();
                ?>
>
				<div class="comment-head">
				<?php 
                if (get_option('show_avatars')) {
                    ?>
					<span class="gravatar"><?php 
                    echo get_avatar($comment, 32);
                    ?>
</span>
				<?php 
                }
                ?>
					<span class="comment-author"><?php 
                comment_author_link();
                ?>
</span>

					<div class="comment-meta">
						<a href="<?php 
                echo esc_url(get_comment_link($comment->comment_ID));
                ?>
" title="<?php 
                _e('Permalink to this Comment', 'k2');
                ?>
">
						<?php 
                if (function_exists('time_since')) {
                    printf(__('%s ago.', 'k2'), time_since(abs(strtotime($comment->comment_date_gmt . ' GMT')), time()));
                } else {
                    /* translators: 1: comment date, 2: comment time */
                    printf(__('%1$s at %2$s', 'k2'), get_comment_date(), get_comment_time());
                }
                ?>
						</a>
					</div> <!-- .comment-meta -->

				</div> <!-- .comment-head -->

				<div class="comment-content">
				<?php 
                if ($comment->comment_approved == '0') {
                    ?>
					<p class="comment-moderation alert"><?php 
                    _e('Your comment is awaiting moderation.', 'k2');
                    ?>
</p>
				<?php 
                }
                ?>

					<?php 
                comment_text();
                ?>
				</div> <!-- .comment-content -->

				<div class="buttons">
					<?php 
                if (function_exists('quoter_comment')) {
                    quoter_comment();
                }
                ?>

					<?php 
                if (function_exists('jal_edit_comment_link')) {
                    jal_edit_comment_link(__('Edit', 'k2'), '<span class="comment-edit">', '</span>', '<em>(Editing)</em>');
                } else {
                    edit_comment_link(__('Edit', 'k2'), '<span class="comment-edit">', '</span>');
                }
                ?>

					<div id="comment-reply-<?php 
                comment_ID();
                ?>
" class="comment-reply">
						<?php 
                comment_reply_link(array_merge($args, array('add_below' => 'comment-reply', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
                ?>
					</div> <!-- .comment-reply -->

				</div> <!-- .buttons -->

			</div> <!-- .comment -->
		<?php 
                break;
            case 'pingback':
            case 'trackback':
                ?>
		<li id="comment-<?php 
                comment_ID();
                ?>
">
			<div <?php 
                comment_class();
                ?>
>

				<?php 
                if (function_exists('comment_favicon')) {
                    ?>
					<span class="favatar"><?php 
                    comment_favicon();
                    ?>
</span>
				<?php 
                }
                ?>

					<span class="comment-author"><?php 
                comment_author_link();
                ?>
</span>

					<div class="comment-meta">
					<?php 
                /* translators: 1: comment type (Pingback or Trackback), 2: datetime */
                printf(__('%1$s on %2$s', 'k2'), $comment->comment_type == 'pingback' ? '<span class="pingback">' . __('Pingback', 'k2') . '</span>' : '<span class="trackback">' . __('Trackback', 'k2') . '</span>', sprintf('<a href="%1$s" title="%2$s">%3$s</a>', esc_url(get_comment_link($comment->comment_ID)), function_exists('time_since') ? sprintf(esc_attr__('%s ago.', 'k2'), time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time())) : esc_attr__('Permalink to this Comment', 'k2'), sprintf(__('%1$s at %2$s', 'k2'), get_comment_date(__('M jS, Y', 'k2')), get_comment_time())));
                edit_comment_link(__('Edit', 'k2'), '<span class="comment-edit">', '</span>');
                ?>
					</div> <!-- .comment-meta -->

			</div> <!-- .comment -->
		<?php 
                break;
        }
    }
Ejemplo n.º 6
0
function k2_ping($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    global $ping_index;
    $ping_index++;
    extract($args, EXTR_SKIP);
    ?>
<li <?php 
    comment_class(empty($args['has_children']) ? '' : 'parent');
    ?>
 id="comment-<?php 
    comment_ID();
    ?>
">
	<?php 
    if (function_exists('comment_favicon')) {
        ?>
<span class="favatar"><?php 
        comment_favicon();
        ?>
</span><?php 
    }
    ?>
	<a href="#comment-<?php 
    comment_ID();
    ?>
" title="<?php 
    _e('Permanent Link to this Comment', 'k2_domain');
    ?>
" class="counter"><?php 
    echo $ping_index;
    ?>
</a>
	<span class="commentauthor"><?php 
    comment_author_link();
    ?>
</span>
	<small class="comment-meta">				
	<?php 
    printf(__('%1$s on %2$s', 'k2_domain'), '<span class="pingtype">' . __('Trackback', 'k2_domain') . '</span>', sprintf('<a href="#comment-%1$s" title="%2$s">%3$s</a>', get_comment_ID(), function_exists('time_since') ? sprintf(__('%s ago.', 'k2_domain'), time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time())) : __('Permanent Link to this Comment', 'k2_domain'), sprintf(__('%1$s at %2$s', 'k2_domain'), get_comment_date(), get_comment_time())));
    ?>
				
	<?php 
    if ($user_ID) {
        edit_comment_link(__('Edit', 'k2_domain'), '<span class="comment-edit">', '</span>');
    }
    ?>
	</small>
<?php 
}