-
๐ I did email you once man ๐ and u said go to forum to solve problem ๐ now this ๐ Oh come on :))
Hi,
Can you post all code? I mean, the complete code for insert only in comments.php ๐
i got the function send from author :D. It work well man ๐ Thanks.
I only have a question ๐ when i click on the author picture it doesn’t link to the author profile but link to the website URl ๐ So how can i redirect this ๐ and in author profile Am i able to set the recent post of that author ๐ . That’s will be AWESOME ๐
i’m using dw-argo themes, and want to do integrated my comment system using UserPro. I mean, i want users login first before post the comments. ca u help me?
Hi afit,
Please take a moment to verify your purchase here:
Hi @support please can you help me with this i can do it ;( i tried but im really bad, thanks in advanced. I put here the pages codes.
comments.php:
<?php
/* SETUP THE COMMENTS SECTION
================================================== */
?>
<div id=”comments”>
<?php
$req = get_option(‘require_name_email’); // Checks if fields are required.
if ( ‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]) )
die ( ‘Please do not load this page directly. Thanks!’ );
if ( ! empty($post->post_password) ) :
if ( $_COOKIE[‘wp-postpass_’ . COOKIEHASH] != $post->post_password ) :
?>
<div class=”nopassword”><?php _e(“This post is password protected. Enter the password to view any comments.”, “swiftframework”); ?></div>
</div><!– .comments –>
<?php
return;
endif;
endif;/* DISPLAY THE COMMENTS
================================================== */
?><div id=”comments-list” class=”comments”>
<h3 class=”spb-heading”><span><?php comments_number(__(‘0 Comments’, “swiftframework”), __(‘1 Comment’, “swiftframework”), __(‘% Comments’, “swiftframework”) ); ?></span></h3><?php if ( have_comments() ) :
$ping_count = $comment_count = 0;
foreach ( $comments as $comment )
get_comment_type() == “comment” ? ++$comment_count : ++$ping_count;
if ( ! empty($comments_by_type[‘comment’]) ) : ?>
<?php $total_pages = get_comment_pages_count(); if ( $total_pages > 1 ) : ?>
<div id=”comments-nav-above” class=”comments-navigation”>
<div class=”paginated-comments-links clearfix”><?php paginate_comments_links(array(‘type’=>’list’,’prev_text’=> __(‘<i class=”ss-navigateleft”></i> Previous’, ‘swiftframework’),
‘next_text’ => __(‘Next <i class=”ss-navigateright”></i>’, ‘swiftframework’))); ?></div>
</div><!– #comments-nav-above –>
<?php endif; ?>-
<?php wp_list_comments(‘type=comment&callback=sf_custom_comments’); ?>
<?php $total_pages = get_comment_pages_count(); if ( $total_pages > 1 ) : ?>
<div id=”comments-nav-below” class=”comments-navigation”>
<div class=”paginated-comments-links comments-links-after clearfix”><?php paginate_comments_links(array(‘type’=>’list’,’prev_text’=> __(‘<i class=”ss-navigateleft”></i> Previous’, ‘swiftframework’),
‘next_text’ => __(‘Next <i class=”ss-navigateright”></i>’, ‘swiftframework’))); ?></div>
</div><!– #comments-nav-below –>
<?php endif; ?>
<?php endif; /* if ( $comment_count ) */ ?><?php endif /* if ( $comments ) */ ?>
</div><!– #comments-list .comments –>
<?php
/* COMMENT ENTRY FORM
================================================== */
?><?php if ( ‘open’ == $post->comment_status ) : ?>
<div id=”respond-wrap”>
<?php
$commenter = wp_get_current_commenter();
$req = get_option( ‘require_name_email’ );
$aria_req = ( $req ? ” aria-required=’true'” : ” );
$fields = array(
‘author’ => ‘<div class=”row”><p class=”comment-form-author col-sm-4″><label for=”author”>’ . __( ‘Name’, ‘swiftframework’ ) . ‘</label> ‘ . ( $req ? ‘<span class=”required”>*</span>’ : ” ) . ‘<input id=”author” name=”author” type=”text” value=”‘ . esc_attr( $commenter[‘comment_author’] ) . ‘” size=”30″‘ . $aria_req . ‘ /></p>’,
’email’ => ‘<p class=”comment-form-email col-sm-4″><label for=”email”>’ . __( ‘Email’, ‘swiftframework’ ) . ‘</label> ‘ . ( $req ? ‘<span class=”required”>*</span>’ : ” ) . ‘<input id=”email” name=”email” type=”text” value=”‘ . esc_attr( $commenter[‘comment_author_email’] ) . ‘” size=”30″‘ . $aria_req . ‘ /></p>’,
‘url’ => ‘<p class=”comment-form-url col-sm-4″><label for=”url”>’ . __( ‘Website’, ‘swiftframework’ ) . ‘</label><input id=”url” name=”url” type=”text” value=”‘ . esc_attr( $commenter[‘comment_author_url’] ) . ‘” size=”30″ /></p></div>’
);
$comments_args = array(
‘fields’ => apply_filters( ‘comment_form_default_fields’, $fields ),
‘logged_in_as’ => ‘<p class=”logged-in-as”>’ . sprintf( __( ‘Logged in as %2$s. Log out?‘, ‘swiftframework’ ), admin_url( ‘profile.php’ ), $user_identity, wp_logout_url( apply_filters( ‘the_permalink’, get_permalink( ) ) ) ) . ‘</p>’,
‘title_reply’ => __( ‘Leave a reply’, ‘swiftframework’ ),
‘title_reply_to’ => __( ‘Leave a reply to %s’, ‘swiftframework’ ),
‘cancel_reply_link’ => __( ‘Click here to cancel the reply’, ‘swiftframework’ ),
‘label_submit’ => __( ‘Post comment’, ‘swiftframework’ ),
‘comment_field’ => ‘<p class=”comment-form-comment”><label for=”comment”>’ . __( ‘Comment’, ‘swiftframework’ ) . ‘</label><textarea id=”comment” name=”comment” cols=”45″ rows=”8″ aria-required=”true”></textarea></p>’,
‘must_log_in’ => ‘<p class=”must-log-in”>’ . sprintf( __( ‘You must be logged in to post a comment.’, ‘swiftframework’ ), wp_login_url( apply_filters( ‘the_permalink’, get_permalink( ) ) ) ) . ‘</p>’,
);
?><?php comment_form($comments_args); ?>
</div>
<?php endif /* if ( ‘open’ == $post->comment_status ) */ ?>
</div><!– #comments –>sf-comments.php
<?php
/*
* sf_custom_comments()
* custom_pings()
*
*//* COMMENTS
================================================== */
if (!function_exists(‘sf_custom_comments’)) {
function sf_custom_comments($comment, $args, $depth) {
$GLOBALS[‘comment’] = $comment;
$GLOBALS[‘comment_depth’] = $depth;
?>
<li id=”comment-<?php comment_ID() ?>” <?php comment_class(‘clearfix’) ?>>
<div class=”comment-wrap clearfix”>
<div class=”comment-avatar”>
<?php if(function_exists(‘get_avatar’)) { echo get_avatar($comment, ‘100’); } ?>
<?php if ($comment->comment_author_email == get_the_author_meta(’email’)) { ?>
<span class=”tooltip”><?php _e(“Author”, “swiftframework”); ?><span class=”arrow”></span></span>
<?php } ?>
</div>
<div class=”comment-content”>
<div class=”comment-meta”>
<?php
printf(‘<span class=”comment-author”>%1$s</span> <span class=”comment-date”>%2$s</span>’,
get_comment_author_link(),
human_time_diff( get_comment_time(‘U’), current_time(‘timestamp’) ) . ‘ ‘ . __(“ago”, “swiftframework”)
);
?>
<div class=”comment-meta-actions”>
<?php
edit_comment_link(__(‘Edit’, ‘swiftframework’), ‘<span class=”edit-link”>’, ‘</span><span class=”meta-sep”> |</span>’);
?>
<?php if($args[‘type’] == ‘all’ || get_comment_type() == ‘comment’) :
comment_reply_link(array_merge($args, array(
‘reply_text’ => __(‘Reply’,’swiftframework’),
‘login_text’ => __(‘Log in to reply.’,’swiftframework’),
‘depth’ => $depth,
‘before’ => ‘<span class=”comment-reply”>’,
‘after’ => ‘</span>’
)));
endif; ?>
</div>
</div>
<?php if ($comment->comment_approved == ‘0’) _e(“\t\t\t\t\t<span class=’unapproved’>Your comment is awaiting moderation.</span>\n”, ‘swiftframework’) ?>
<div class=”comment-body”>
<?php comment_text() ?>
</div>
</div>
</div>
<?php }
} // end sf_custom_comments// Custom callback to list pings
function custom_pings($comment, $args, $depth) {
$GLOBALS[‘comment’] = $comment;
?>
<li id=”comment-<?php comment_ID() ?>” <?php comment_class() ?>>
<div class=”comment-author”><?php printf(__(‘By %1$s on %2$s at %3$s’, ‘swiftframework’),
get_comment_author_link(),
get_comment_date(),
get_comment_time() );
edit_comment_link(__(‘Edit’, ‘swiftframework’), ‘ <span class=”meta-sep”>|</span> <span class=”edit-link”>’, ‘</span>’); ?></div>
<?php if ($comment->comment_approved == ‘0’) _e(‘\t\t\t\t\t<span class=”unapproved”>Your trackback is awaiting moderation.</span>\n’, ‘swiftframework’) ?>
<div class=”comment-content”>
<?php comment_text() ?>
</div>
<?php } // end custom_pings?>
Hi Mimo,
1. Please verify your purchase here.
http://userproplugin.com/userpro/profile/edit/
2. Send me your comments template and I’ll integrate userpro in it.
Hi,
can you integrate UserPro in my comments? this is my comments.php file http://www.firedrive.com/file/D228616AA79C4596 ๐
Hi @support i just verified my account this is my comments templates, thanks
https://drive.google.com/folderview?id=0BzIjEUCHtby8WFpXTFhPNV9RQzA&usp=sharing
hello, im new in this…
so i try to do like you but i dont found the function.. Here is my code can you helpe me? here is my code..
<?php if ( post_password_required() ) {
return;
}
?><div id=”comments” class=”clearfix”>
<?php if ( have_comments() ) : ?>
<?php echo do_shortcode(cloudfw_transfer_shortcode_attributes( ‘title’, array( ‘element’ => ‘h4’ ),
sprintf( cloudfw_translate(‘blog.single.comments_s’), number_format_i18n( get_comments_number() ), ‘<span>’ . get_the_title() . ‘</span>’ ) ));
?>-
<?php $blog_obj = cloudfw_module( ‘CloudFw_Page_Generator_Blog’ ); ?>
<?php wp_list_comments( array( ‘type’ => ‘comment’, ‘callback’ => array( $blog_obj, ‘comment_list’ ) ) ); ?><?php if ( get_comment_pages_count() > 1 && get_option( ‘page_comments’ ) ) : // are there comments to navigate through ?>
<nav id=”comment-nav-below”>
<h1 class=”assistive-text”><?php echo cloudfw_translate(‘blog.single.comment_navigation’); ?></h1>
<div class=”nav-previous”><?php previous_comments_link( cloudfw_translate(‘blog.single.older_comments’) ); ?></div>
<div class=”nav-next”><?php next_comments_link( cloudfw_translate(‘blog.single.newer_comments’) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?><?php elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), ‘comments’ ) ) :?>
<?php echo do_shortcode(cloudfw_transfer_shortcode_attributes( ‘title’, array( ‘element’ => ‘h4’ ),
cloudfw_translate(‘blog.single.comments’) ));
?>
<p class=”ui–notfound muted”><?php echo cloudfw_translate(‘blog.single.comments_closed’); ?></p>
<?php else:?>
<?php echo do_shortcode(cloudfw_transfer_shortcode_attributes( ‘title’, array( ‘element’ => ‘h4’ ),
cloudfw_translate(‘blog.single.comments’) ));
?>
<p class=”ui–notfound muted”><?php echo cloudfw_translate(‘blog.single.no_comment_yet’); ?></p>
<?php endif; ?><?php /** Get Comments Form */
cloudfw(‘comment_form’); ?></div><!– #comments –>
You must be logged in to reply to this topic.