function cartoq_comment_template($comment, $args, $depth) { global $current_user; $GLOBALS['comment'] = $comment; $classes = array('comment', 'answer', 'clearfix'); switch ($comment->comment_type) { case '': ?> <li <?php comment_class($classes); ?> id="li-comment-<?php comment_ID(); ?> "> <?php if ($comment->user_id) { $user = get_userdata($comment->user_id); $username = $user->user_nicename; $profile_url = site_url('members/') . $username . '/'; } ?> <div id="comment-<?php comment_ID(); ?> " class="comment-body clearfix"> <figure class="comment-avatar"> <a href="<?php echo $profile_url; ?> "> <?php echo get_avatar($comment, 70); ?> </a> <figcaption> <span class="user-stats"> <span class="stat"><i class="fa fa-thumbs-up"></i> <?php echo cjtheme_user_likes_count($user->ID, 'likes'); ?> </span> <span class="stat"><i class="fa fa-star"></i> <?php echo cjtheme_user_likes_count($user->ID, 'thanks'); ?> </span> <span class="stat"><i class="fa fa-crown"></i> <span class="label label-info"><?php echo cjtheme_user_role_display($user->ID); ?> </span></span> </span> </figcaption> </figure> <div class="comment-main"> <header class="vcard clearfix"> <?php printf(__('<cite class="fn">%s answers:</cite>', 'cartoq'), get_comment_author_link()); ?> <aside class="comm-edit"> <a class="comment-date" href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "> <?php echo cjtheme_time_ago(strtotime($comment->comment_date)); ?> </a> <?php edit_comment_link(__('Edit', 'cartoq'), ' ', ''); ?> </aside> </header> <div class="comment-text"> <?php comment_text(); ?> <?php if ($comment->comment_approved == '0') { ?> <em><?php _e('Your comment is awaiting moderation.', 'cartoq'); ?> </em> <br /> <?php } ?> </div> <?php $likes = cjtheme_activity_comment_likes($comment->comment_ID); $thanks = cjtheme_activity_comment_thanks($comment->comment_ID); ?> <a href="#" class="like-thanks btn btn-link <?php echo cjtheme_login_class('like-comment', 'cjfm-show-login-form'); ?> " data-redirect="<?php echo cjtheme_current_url(); ?> " id="like-<?php echo $comment->comment_ID; ?> " data-comment-id="<?php echo $comment->comment_ID; ?> " data-user-id="<?php echo $current_user->ID; ?> "> <i class="fa fa-thumbs-up"></i> <span class="likes-value"> <?php echo $likes > 0 ? $likes : '0'; ?> </span> </a> <a href="#" class="like-thanks btn btn-link <?php echo cjtheme_login_class('thank-comment', 'cjfm-show-login-form'); ?> " data-redirect="<?php echo cjtheme_current_url(); ?> " id="thanks-<?php echo $comment->comment_ID; ?> " data-comment-id="<?php echo $comment->comment_ID; ?> " data-user-id="<?php echo $current_user->ID; ?> "> <i class="fa fa-heart"></i> <span class="thanks-value"> <?php echo $thanks > 0 ? $thanks : '0'; ?> </span> </a> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'before' => '<footer class="reply">', 'after' => '</footer>', 'max_depth' => $args['max_depth']))); ?> </div> </div><!-- #comment-<?php comment_ID(); ?> --> </li><?php break; case 'pingback': ?> <li <?php comment_class(); ?> id="li-pingback-<?php comment_ID(); ?> "> <?php _e('Pingback:', 'cartoq'); ?> <?php echo get_comment_author_link(); ?> <small class="ping-edit"><?php ac_icon('edit'); edit_comment_link(__('Edit', 'cartoq'), ' ', ''); ?> </small> </li><?php case 'trackback': ?> <li <?php comment_class(); ?> id="li-trackback-<?php comment_ID(); ?> "> <?php _e('Trackback:', 'cartoq'); ?> <?php echo get_comment_author_link(); ?> <small class="ping-edit"><?php ac_icon('edit'); edit_comment_link(__('Edit', 'cartoq'), ' ', ''); ?> </small> </li><?php } }
?> <header class="section-header"> <h1 class="section-title">Latest Questions</h1><!-- /.section-title --> </header><!-- /.section-header --> <div class="section-content"> <form action="" method="post" class="ask-question"> <fieldset> <legend>Ask A Question To CarToq.Com Experts!</legend> <div class="form"> <div class="message"></div> <div class="form-group"> <textarea class="form-control _question <?php echo cjtheme_login_class('', 'cjfm-show-login-form'); ?> " data-redirect="<?php echo cjtheme_current_url(); ?> " name="question"></textarea> <input type="hidden" name="current_url" value="<?php echo cjtheme_current_url(); ?> "> </div><!-- /.form-group --> <div class="form-group"> <select class="form-control" name="category"> <option value="">Tag Question</option>
" id="like-<?php echo $answer->comment_ID; ?> " data-comment-id="<?php echo $answer->comment_ID; ?> " data-user-id="<?php echo $current_user->ID; ?> "><?php echo $user_like; echo $likes > 0 ? ' ' . $likes : ''; ?> </a> <a href="#" class="btn like-thanks btn-warning <?php echo cjtheme_login_class('thank-comment', 'cjfm-show-login-form'); ?> " data-redirect="<?php echo cjtheme_current_url(); ?> " id="thanks-<?php echo $answer->comment_ID; ?> " data-comment-id="<?php echo $answer->comment_ID; ?> " data-user-id="<?php echo $current_user->ID; ?> "><?php echo $user_thank;