-
Help me to integrate profiles userpro in this code?
PHP12345678910111213141516171819202122232425262728293031323334353637383940414243<?php if ( ! function_exists( 'et_custom_comments_display' ) ) :function et_custom_comments_display($comment, $args, $depth) {$GLOBALS['comment'] = $comment; ?><li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>"><article id="comment-<?php comment_ID(); ?>" class="comment-body clearfix"><div class="comment_avatar"><?php echo get_avatar( $comment, $size = '80' ); ?></div><div class="comment_postinfo"><?php printf( '<span class="fn">%s</span>', get_comment_author_link() ); ?><span class="comment_date"><?php/* translators: 1: date, 2: time */printf( __( 'on %1$s at %2$s', 'Divi' ), get_comment_date(), get_comment_time() );?></span><?php edit_comment_link( esc_html__( '(Edit)', 'Divi' ), ' ' ); ?><?php$et_comment_reply_link = get_comment_reply_link( array_merge( $args, array('reply_text' => esc_attr__( 'Reply', 'Divi' ),'depth' => (int) $depth,'max_depth' => (int) $args['max_depth'],) ) );?></div> <!-- .comment_postinfo --><div class="comment_area"><?php if ( '0' == $comment->comment_approved ) : ?><em class="moderation"><?php esc_html_e('Your comment is awaiting moderation.','Divi') ?></em><br /><?php endif; ?><div class="comment-content clearfix"><?phpcomment_text();if ( $et_comment_reply_link ) echo '<span class="reply-container">' . $et_comment_reply_link . '</span>';?></div> <!-- end comment-content--></div> <!-- end comment_area--></article> <!-- .comment-body --><?php }endif;This is just ridiculous! What kind of support is this where you selectively help people. I have been waiting for support for over 3 months now… Is this what I paid for? Because honestly, if I cannot integrate UserPro with my theme comments, what’s the point of even having it!?
I expect to receive adequate response ASAP. Thank you.
Hello, I am using the plugin commentator which now claims to be compatible with userpro however it still does not show badges the user has earned next to their name. Does anybody know if this is possible now?
Thanks
i use sahifa theme, in my comment.php nothing looks similar to these, here is my comment php, can anyone please help me?
PHP123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566<div id="comments"><?php if ( post_password_required() ) : ?><p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'tie' ); ?></p></div><!-- #comments --><?phpreturn;endif;?><?php if ( have_comments() ) : ?><h3 id="comments-title"><?php comments_number(__('No comments','tie'), __('One comment','tie'), '% '.__('comments','tie') );?></h3><?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?><div class="navigation"><div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'tie' ) ); ?></div><div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'tie' ) ); ?></div></div> <!-- .navigation --><?php endif; ?><?php $comments_by_type = &separate_comments($comments); ?><?php if ( !empty($comments_by_type['comment']) ) : ?><ol class="commentlist"><?php wp_list_comments('type=comment&callback=custom_comments'); ?></ol><?php endif; ?><?php $comment_counter = 0 ; ?><?php if ( !empty($comments_by_type['pings']) ) : ?><div id="pings" class="commentlist"><ol class="pinglist"><?php wp_list_comments('type=pings&trackback&pingback&callback=custom_pings'); ?></ol></div><?php endif; ?><?php else :if ( ! comments_open() ) :?><?php __( 'Comments are closed.', 'tie' ); ?><?php endif; ?><?php endif; ?><?php$commenter = wp_get_current_commenter();$req = get_option( 'require_name_email' );$aria_req = ( $req ? " aria-required='true'" : '' );$fields = array('author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name', 'tie' ) . '</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"><label for="email">' . __( 'Email', 'tie' ) . '</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"><label for="url">' . __( 'Website', 'tie' ) . '</label>' .'<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',);$required_text = __(' Required fields are marked', 'tie').' <span class="required">*</span>';?><?php comment_form( array('fields' => apply_filters( 'comment_form_default_fields', $fields ),'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' , 'tie' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( ) ) ) ) . '</p>','logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' , 'tie' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( ) ) ) ) . '</p>','comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' , 'tie' ) . ( $req ? $required_text : '' ) . '</p>','title_reply' => __( 'Leave a Reply' , 'tie' ),'title_reply_to' => __( 'Leave a Reply to %s' , 'tie' ),'cancel_reply_link' => __( 'Cancel reply' , 'tie' ),'label_submit' => __( 'Post Comment' , 'tie' ))); ?></div><!-- #comments -->If use the “sabaidiscuss” plugin
how to integrating UserPro with question & answer ?Hi there, please do not post codes directly here. Use an attachment/download link or pastebin. The bbpress screws up coding added to your replies.
i followed your instructions on integrating userpro with my theme’s comments and it worked out great I guess my questions would be:
1. the only part I cant figure out is how to style the css to match the one you have running on your site, it’s really gorgeous and i’d love to have the similar circular profile pictures, i’m running the Duena theme. (everything else worked like a charm, profile links etc)
2. bbpress is not responsive on mobile after i integrated userpro with it on my sitewould you be able to help me with these issues?
I’ll add this code where? function presscore_comment( $comment, $args, $depth ) {
global $userpro;
Please help me!
` <div id=”comments”>
<?php if ( post_password_required() ) : ?>
<p class=”nopassword”><?php _e( ‘This post is password protected. Enter the password to view any comments.’, ‘tie’ ); ?></p>
</div><!– #comments –>
<?php
return;
endif;
?><?php if ( have_comments() ) : ?>
<h3 id=”comments-title”>
<?php comments_number(__(‘No comments’,’tie’), __(‘One comment’,’tie’), ‘% ‘.__(‘comments’,’tie’) );?>
</h3><?php if ( get_comment_pages_count() > 1 && get_option( ‘page_comments’ ) ) : ?>
<div class=”navigation”>
<div class=”nav-previous”><?php previous_comments_link( __( ‘<span class=”meta-nav”>←</span> Older Comments’, ‘tie’ ) ); ?></div>
<div class=”nav-next”><?php next_comments_link( __( ‘Newer Comments <span class=”meta-nav”>→</span>’, ‘tie’ ) ); ?></div>
</div> <!– .navigation –>
<?php endif; ?><?php echo userpro_show_badges( $comment->user_id, $inline=true ); ?>
<?php if ($comment->user_id) { ?>
<?php printf( ‘<cite class=”fn”>%s</cite>’, ‘permalink( $comment->user_id ).'”>’.userpro_profile_data(‘display_name’, $comment->user_id) . ‘‘); ?>
<?php } else { ?>
<?php printf( ‘<cite class=”fn”>%s</cite>’, get_comment_author_link() ); ?>
<?php } ?>
<?php if ( !empty($comments_by_type[‘comment’]) ) : ?>
- <?php wp_list_comments(‘type=comment&callback=custom_comments’); ?>
<?php endif; ?>
<?php $comment_counter = 0 ; ?>
<?php if ( !empty($comments_by_type[‘pings’]) ) : ?>
<div id=”pings” class=”commentlist”>- <?php wp_list_comments(‘type=pings&trackback&pingback&callback=custom_pings’); ?>
</div>
<?php endif; ?>
<?php else :
if ( ! comments_open() ) :endif; ?>
<?php endif; ?><?php
$commenter = userpro();
$req = get_option( ‘require_name_email’ );
$aria_req = ( $req ? ” aria-required=’true'” : ” );$fields = array(
‘author’ => ‘<p class=”comment-form-author”>’ . ‘<label for=”author”>’ . __( ‘Name’, ‘tie’ ) . ‘</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”><label for=”email”>’ . __( ‘Email’, ‘tie’ ) . ‘</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”><label for=”url”>’ . __( ‘Website’, ‘tie’ ) . ‘</label>’ .
‘<input id=”url” name=”url” type=”text” value=”‘ . esc_attr( $commenter[‘comment_author_url’] ) . ‘” size=”30″ /></p>’,
);
$required_text = __(‘ Required fields are marked’, ‘tie’).’ <span class=”required”>*</span>’;
?>
<?php comment_form( array(
‘fields’ => apply_filters( ‘comment_form_default_fields’, $fields ),
‘must_log_in’ => ‘<p class=”must-log-in”>’ . sprintf( __( ‘You must be logged in to post a comment.’ , ‘tie’ ), wp_login_url( apply_filters( ‘the_permalink’, get_permalink( ) ) ) ) . ‘</p>’,
‘logged_in_as’ => ‘<p class=”logged-in-as”>’ . sprintf( __( ‘Logged in as %2$s. Log out?‘ , ‘tie’ ), admin_url( ‘profile.php’ ), $user_identity, wp_logout_url( apply_filters( ‘the_permalink’, get_permalink( ) ) ) ) . ‘</p>’,
‘comment_notes_before’ => ‘<p class=”comment-notes”>’ . __( ‘Your email address will not be published.’ , ‘tie’ ) . ( $req ? $required_text : ” ) . ‘</p>’,
‘title_reply’ => __( ‘Leave a Reply’ , ‘tie’ ),
‘title_reply_to’ => __( ‘Leave a Reply to %s’ , ‘tie’ ),
‘cancel_reply_link’ => __( ‘Cancel reply’ , ‘tie’ ),
‘label_submit’ => __( ‘Post Comment’ , ‘tie’ )
)); ?></div><!– #comments –>
Hi All!
Ahmed, I am currently working with the theme Enfold. Have you ever done an integration with this theme?
if not then I send you the theme?Thank! Cheers!
Hi All
Ahmed, I sent you an email yesterday with the comment.php file. Can you check your email and take a look at it?
I’m using Salient theme, if anyone else know how to integrating userpro with this theme, please share the info.Thanks,
BeauNew to userpro here. How can I integrate comments.php?
I’m using Newspaper template .
http://themeforest.net/item/newspaper/5489609Many Thanks
PHP123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139<?php//removing the comments sidewideif(td_util::get_option('tds_disable_comments_sidewide') == '') {?><div class="comments" id="comments"><?php if (post_password_required()) { ?><?php } else { ?><?php if (comments_open() ) { ?><div class="comments-title-wrap"><?php$num_comments = get_comments_number(); // get_comments_number returns only a numeric valueif ( $num_comments == 0 ) {$td_comments_no_text = __td('NO COMMENTS');} elseif ( $num_comments > 1 ) {$td_comments_no_text = $num_comments . ' ' . __td('COMMENTS');} else {$td_comments_no_text = __td('1 COMMENT');}?><h4 class="block-title"><span><?php echo $td_comments_no_text?></span></h4></div><?php if (have_comments()) { ?><ol class="comment-list"><?php wp_list_comments( array( 'callback' => 'td_comment' ) ); ?></ol><div class="comment-pagination"><?php paginate_comments_links(); ?></div><?php } ?><?php } ?><?php$commenter = wp_get_current_commenter();if (empty($aria_req)) {$aria_req = '';}$fields = array('author' =>'<p class="comment-form-input-wrap"><span class="comment-req-wrap needsclick"><input class="" id="author" name="author" placeholder="' . __td('Name:', TD_THEME_NAME) . '" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' />' . ( $req ? '</span>' : '' ) .'</p>','email' =>'<p class="comment-form-input-wrap"><span class="comment-req-wrap needsclick"><input class="" id="email" name="email" placeholder="' . __td('Email:', TD_THEME_NAME) . '" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' />' . ( $req ? '</span>' : '' ) .'</p>','url' =>'<p class="comment-form-input-wrap needsclick"><input class="" id="url" name="url" placeholder="' . __td('Website:', TD_THEME_NAME) . '" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" />' .'</p>',);$defaults = array('fields' => apply_filters('comment_form_default_fields', $fields ),);$defaults['comment_field'] = '<div class="clearfix"></div><p class="comment-form-input-wrap"><textarea class="needsclick" placeholder="' . __td('Comment:', TD_THEME_NAME) . '" id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>';$defaults['comment_notes_before'] = '';$defaults['comment_notes_after'] = '';$defaults['title_reply'] = __td('Leave a Reply');$defaults['label_submit'] = __td('Post Comment');$defaults['cancel_reply_link'] = __td('Cancel reply');comment_form($defaults);//comment_form();?><?php } ?></div> <!-- /.content --><?php}//end removing the comments sidewide/*** Custom callback for outputting comments** @return void* @author tagdiv*/function td_comment( $comment, $args, $depth ) {$GLOBALS['comment'] = $comment;$td_isPingTrackbackClass = '';if($comment->comment_type == 'pingback') {$td_isPingTrackbackClass = 'pingback';}if($comment->comment_type == 'trackback') {$td_isPingTrackbackClass = 'trackback';}if (!empty($comment->comment_author_email)) {$td_comment_auth_email = $comment->comment_author_email;} else {$td_comment_auth_email = '';}$td_article_date_unix = @strtotime("{$comment->comment_date_gmt} GMT");//print_r($td_article_date_unix);?><?php if ( $comment->comment_approved == '1' ) { ?><li class="comment <?php echo $td_isPingTrackbackClass ?>" id="li-comment-<?php comment_ID() ?>"><article><footer><?php//echo get_template_directory_uri() . "/images/avatar.jpg";//echo get_avatar($td_comment_auth_email, 50, get_template_directory_uri() . "/images/avatar.jpg");echo get_avatar($td_comment_auth_email, 50); ?><cite><?php comment_author_link() ?></cite><a class="comment-link" href="#li-comment-<?php comment_ID() ?>"><time pubdate="<?php echo $td_article_date_unix ?>"><?php comment_date() ?> at <?php comment_time() ?></time></a></footer><div class="comment-content"><?php comment_text() ?></div><div class="comment-meta" id="comment-<?php comment_ID() ?>"><?php comment_reply_link(array_merge( $args, array('depth' => $depth,'max_depth' => $args['max_depth'],'reply_text' => __td('Reply', TD_THEME_NAME),'login_text' => __td('Log in to leave a comment', TD_THEME_NAME))))?></div></article></li><?php}}?>
You must be logged in to reply to this topic.