WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
Using a new theme and Comments Plugin still not Displaying or Work (2 posts)

  1. LCD-NYC
    Member
    Posted 2 years ago #

    This appears to be a powerful plugin, but I'm having problems with the Comments Plugin. I'm sure this has been addressed many times, and an explanation on http://ottopress.com/wordpress-plugins/simple-facebook-connect/ But i still can't find a solution.

    The only place I find the three inputs for the author, email, and url information is Not in the comments.php file, I see it in the wordpress-comments.php file:

    $comment_author       = ( isset($_POST['author']) )  ? trim(strip_tags($_POST['author'])) : null;
    $comment_author_email = ( isset($_POST['email']) )   ? trim($_POST['email']) : null;
    $comment_author_url   = ( isset($_POST['url']) )     ? trim($_POST['url']) : null;
    $comment_content      = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null;

    Even when I changed it (per instructions) too:

    <div id="comment-user-details">
    <?php do_action('alt_comment_login'); ?>
    $comment_author       = ( isset($_POST['author']) )  ? trim(strip_tags($_POST['author'])) : null;
    $comment_author_email = ( isset($_POST['email']) )   ? trim($_POST['email']) : null;
    $comment_author_url   = ( isset($_POST['url']) )     ? trim($_POST['url']) : null;
    </div>
    $comment_content      = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null;

    It still don't display the button to connect with FB to post a comment.

    Perhaps someone know the solution. Thanks in advance for any help.

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. LCD-NYC
    Member
    Posted 2 years ago #

    This is the contents of my comments.php file:

    ?>
    
    <?php if(!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) : ?>
        <?php die('You can not access this page directly!'); ?>
    <?php endif; ?>
    
    <?php if(!empty($post->post_password)) : ?>
          <?php if($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
            <p>This post is password protected. Enter the password to view comments.</p>
          <?php endif; ?>
    <?php endif; ?> 
    
     <?php
    
    function mytheme_comment($comment, $args, $depth)
    {
       global $post;
       $GLOBALS['comment'] = $comment; ?>
       <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
             <div id="comment-<?php comment_ID(); ?>">
    
         <div class="comment">
    
                <?php
                    $out = '';
    
                    $show_avatars = get_option('show_avatars') == 1 ? true : false;
                    if($show_avatars)
                    {
                        $out .= '<div class="gravatar">'; 
    
                       // $default_avatar = get_bloginfo('template_url').'/img/common_files/avatar1.jpg';
                        $website = get_comment_author_url($comment->comment_ID);
    
                        $out .= get_avatar($comment, '60');
                        if($website != '')
                        {
                            $out .= '<a href="'.$website.'">'.__('Visit site', 'dc_theme').'</a>';
                        } else
                        {
                            $out .= '<span class="author-url">'.__('Visit site', 'dc_theme').'</span>';
                        }
                        $out .= '</div>';
                        echo $out;
                    }
    
                    echo '<div class="content '.(!$show_avatars ? 'content-no-margin' : '').'">';
    
                    $format = 'F j, Y g:i a';
                    $out = '';
                    $out .= '<div class="date"><span>';
                    $out .= get_comment_time($format);
                    $out .= '</span><span class="when">'.dcf_calculatePastTime(__('Posted', 'dc_theme'), get_comment_time('H'), get_comment_time('i'),
                        get_comment_time('s'), get_comment_date('n'), get_comment_date('j'), get_comment_date('Y')).'</span></div>';
                    echo $out;
    
                    $out = '';
                    $out .= '<div class="author">'.get_comment_author($comment->comment_ID);
    
                    if($post->post_author == $comment->user_id)
                    {
                        if($post->post_author == $comment->user_id)
                        {
                            $out .= ' <span class="marked">('.__('Author', 'dc_theme').')</span>';
                        }
                    }
                    $out .= '</div>';
                    echo $out; 
    
                ?> 
    
                <div class="text">
                     <?php comment_text() ?>
                </div>
                <div class="clear-both"></div>
              <?php if ($comment->comment_approved == '0')
              {
                 echo '<div class="to-approve" ><em>Your comment is awaiting moderation</em></div>';
              } ?>
                <div class="clear-both"></div>
                <span class="reply"><?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?></span>                                             
    
                </div> <!-- content -->
                <div class="clear-both"></div>
         </div> <!-- comment -->           
    
             </div> <!-- comment-ID -->
    <?php
    }
    ?>
    
    <div id="comments-section">
    
        <?php if($post->comment_count > 0) { ?>
        <h2><?php
            $pi_general = GetDCCPInterface()->getIGeneral();
            comments_number(__('No comments', 'dc_theme'), __('One comment', 'dc_theme'), __('% comments', 'dc_theme')); 
    
            ?></h2><?php } 
    
            ?>
    <ul class="comment-list">
    <?php wp_list_comments('type=comment&callback=mytheme_comment'); ?>
    
       </div> <!-- comments-section -->
        <div class="clear-both"></div>
       <?php 
    
          if(is_singular() and get_option('page_comments'))
          {
    
              global $wp_rewrite;
              $comment_page = get_query_var('cpage');
              if(!$comment_page)
              {
                  $comment_page = 1;
              }
    
              $comment_max_page = get_comment_pages_count();
    
              if($comment_max_page > 1)
              {
                  $comment_defaults = array(
                      'base' => add_query_arg('cpage', '%#%'),
                      'format' => '',
                      'total' => $comment_max_page,
                      'current' => $comment_page,
                      'echo' => true,
                      'prev_next' => true,
                      'prev_text' => '« Prev',
                      'next_text' => 'Next »',
                      'add_fragment' => '#comments',
                      'end_size' => 3,
                      'mid_size' => 2
                  );
                  if ( $wp_rewrite->using_permalinks() )
                      $comment_defaults['base'] = user_trailingslashit(trailingslashit(get_permalink()) . 'comment-page-%#%', 'commentpaged');
    
                  $comment_args = wp_parse_args($comment_args, $comment_defaults);
                  $comment_page_links = paginate_links($comment_args);   
    
                  $out = '';
                  $out .= '<div class="comments-page-links">';
                    $out .= '<span class="before">Pages: </span>';
                    $out .= $comment_page_links;
                    $out .= '<div class="clear-both"></div>';
                  $out .= '</div>';
                  echo $out;
              }
          }
       ?>
    
    <?php
        global $post;
        $pi_general = GetDCCPInterface()->getIGeneral(); 
    
        if('open' == $post->comment_status)
        {
            if(get_option('comment_registration') && !$user_ID)
            {
                $out = '';
                $out .= '<span style="font-size:11px;color:#888888;">'.__('You must be', 'dc_theme').'<span> ';
                $out .= '<a href="'.get_bloginfo('url').'/wp-login.php?redirect_to='.urlencode(get_permalink()).'">'.__('logged in', 'dc_theme').'</a> ';
                $out .= '<span style="font-size:11px;color:#888888;">'.__('to post comment.', 'dc_theme').'</span>';
                echo $out;
            } else
            {
                $out  = '<div id="respond">';
                $out .= '<div class="common-form">';
                $out .= '<h3>'.__('Leave your comment', 'dc_theme').'</h3>';
                $out .= '<form action="'.get_option('siteurl').'/wp-comments-post.php" method="post" id="commentform" name="commentform">';
    
                if(!$user_ID) // ma byc !$user_ID
                {
                    $rne = (bool)get_option('require_name_email'); 
    
                    $out .= '<p>Your Name: <span class="required">('.($rne ? 'required' : 'not required').')</span></p>';
                    $out .= '<input class="text-ctrl" type="text" value="'.$comment_author.'" name="author" id="author" />';
    
                    $out .= '<p>E-Mail: <span class="required">('.($rne ? 'required' : 'not required').')</span></p>';
                    $out .= '<input class="text-ctrl" type="text" value="'.$comment_author_email.'" name="email" id="email" />';
    
                    $out .= '<p>Website: <span class="required">(not required)</span></p>';
                    $out .= '<input class="text-ctrl" type="text" value="'.$comment_author_url.'" name="url" id="url" />';
                } else
                {
                    $out .= '<span style="font-size:11px;color:#888888;">'.__('Loged in as', 'dc_theme').'</span> ';
                    $out .= '<a href="'.get_bloginfo('url').'/wp-admin/profile.php">'.$user_identity.'</a><span style="font-size:11px;color:#888888;">.</span> ';
                    $out .= '<span style="font-size:11px;color:#888888;">'.__('Here you can', 'dc_theme').'</span> ';
                    $out .= '<a href="'.get_bloginfo('url').'/wp-login.php?action=logout">'.__('log out', 'dc_theme').'</a> ';
                    $out .= '<span style="font-size:11px;color:#888888;">'.__('of this account.', 'dc_theme').'</span>';
                }
    
                $out .= '<p>Message: <span class="required">(required)</span></p>';
                $out .= '<textarea class="textarea-ctrl" rows="5" cols="10" name="comment" id="comment" ></textarea>';
                $out .= '<div class="clear-both"></div>';
                $out .= '<a href="#">'.__('Send comment', 'dc_theme').'</a>';
                $out .= '<div class="clear-both"></div>';
                echo $out;
    
                comment_id_fields();
                do_action('comment_form', $post->ID); 
    
                $out = '</form>';
                $out .= '<div class="cancel-respond" id="cancel-comment-reply">';
                echo $out;
    
                cancel_comment_reply_link(__('Cancel reply', 'dc_theme'));
    
                $out  = '</div>';
                $out .= '</div>'; // common-form
                $out .= '</div> <!-- respond -->';
                echo $out;
            }
    
        } else
        {
           echo 'The comments are closed.';
        }
    
    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic