Title: [Plugin: Simple Facebook Connect] Comments.php &#8211; So different from your example &#8211; Please Help me
Last modified: August 20, 2016

---

# [Plugin: Simple Facebook Connect] Comments.php – So different from your example – Please Help me

 *  [Luca75](https://wordpress.org/support/users/luca75/)
 * (@luca75)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-commentsphp-so-different-from-your-example-please-help-me/)
 * Hi Otto,
 * my best congratulations for your so cool plugin.
 * I find some problem to recognize where putting your comments code.
 * This is the **comments.php** file:
 *     ```
       <?php
       if ( !empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) ) {
       	die( __('Please do not load this page directly. Thanks!', 'arras') );
       }
   
       if ( post_password_required() ) {
       	?> <h4 class="module-title"><?php _e('Password Required', 'arras') ?></h4> <?php
       	_e('<p class="nocomments">This post is password protected. Enter the password to view comments.</p>', 'arras');
       	return;
       }
   
       $comments_by_type = &separate_comments($comments);   
   
       if ( have_comments() ) : ?>
   
       	<?php if ( !empty($comments_by_type['comment']) ) : ?>
       	<h4 class="module-title"><?php comments_number( __('No Comments', 'arras'), __('1 Comment', 'arras'), _n('% Comment', '% Comments', get_comments_number(), 'arras') ); ?></h4>
       		<ol id="commentlist" class="clearfix">
       			<?php wp_list_comments('type=comment&callback=arras_list_comments'); ?>
       		</ol>
       	<?php endif; ?>
   
       	<div class="comments-navigation clearfix">
       		<?php paginate_comments_links() ?>
       	</div>
   
       	<?php if ( !empty($comments_by_type['pings']) ) : ?>
       	<h4 class="module-title"><?php _e('Trackbacks / Pings', 'arras') ?></h4>
       	<ol class="pingbacks"><?php wp_list_comments('type=pings&callback=arras_list_trackbacks'); ?></ol>
       	<?php endif; ?>
   
       <?php else: ?>
       		<?php if ('open' == $post->comment_status) : ?>
       		<h4 class="module-title"><?php _e('No Comments', 'arras') ?></h4>
       		<p class="nocomments"><?php _e('Start the ball rolling by posting a comment on this article!', 'arras') ?></p>
       		<?php endif ?>
       <?php endif; ?>
   
       <?php if ('closed' == $post->comment_status) :  if (!is_page()) : ?>
       	<h4 class="module-title"><?php _e('Comments Closed', 'arras') ?></h4>
       	<p class="nocomments"><?php _e('Comments are closed. You will not be able to post a comment in this post.', 'arras') ?></p>
       <?php endif; else: ?>
   
       	<?php
       	$req = get_option('require_name_email');
       	$aria_req = ( $req ? ' aria-required="true"' : '' );
       	$commenter = wp_get_current_commenter();
   
       	comment_form(
       		array(
       			'fields' => array(
       				'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
       				'<input id="author" class="required" 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' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
       				'<input id="email" class="required 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' ) . '</label>' .
       				'<input id="url" class="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>'
       		),
       			'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" class="required"></textarea></p>'
       		)
       	);
       	?>
   
       <?php endif ?>
       ```
   
 * Where do I have to insert the comment part to let it work?
 * [http://wordpress.org/extend/plugins/simple-facebook-connect/](http://wordpress.org/extend/plugins/simple-facebook-connect/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-commentsphp-so-different-from-your-example-please-help-me/#post-2335148)
 * That code is using the comment_form() call. You don’t have to insert anything,
   it’s automatic.
 *  Thread Starter [Luca75](https://wordpress.org/support/users/luca75/)
 * (@luca75)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-commentsphp-so-different-from-your-example-please-help-me/#post-2335179)
 * Oh! Well, but it does not work at all!
    [http://www.convivendo.net](http://www.convivendo.net)
   🙁
 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-commentsphp-so-different-from-your-example-please-help-me/#post-2335256)
 * Looks like it works fine to me:
    [http://www.convivendo.net/2011/02/un-pensiero-semplice-sulla-convivenza-e-sulla-coppia/](http://www.convivendo.net/2011/02/un-pensiero-semplice-sulla-convivenza-e-sulla-coppia/)
 * However, the button isn’t working because it’s throwing JS errors. There’s nothing
   wrong with the JS code, it appears that this is an issue on Facebook’s side. 
   They’ve been having problems since switching to OAuth2 last weekend.
 * Not much I can do to fix problems on their end. Have to wait until they fix their
   bugs.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Simple Facebook Connect] Comments.php – So different from your
example – Please Help me’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-facebook-connect_a9b9c1.svg)
 * [Simple Facebook Connect](https://wordpress.org/plugins/simple-facebook-connect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-facebook-connect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-facebook-connect/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-facebook-connect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-facebook-connect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-facebook-connect/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [Comments](https://wordpress.org/support/topic-tag/comments/)

 * 3 replies
 * 2 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-commentsphp-so-different-from-your-example-please-help-me/#post-2335256)
 * Status: not resolved