Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter cooper

    (@cooper)

    Hello,

    Thanks for your help, I pasted the comments.php file here:

    http://pastebin.com/376316

    Thanks so much!

    David

    Thread Starter cooper

    (@cooper)

    Please see the comments PHP information and offer some assitance as I cannot find the form action in there…maybe staring at code too much!

    Thanks!!!

    <?php // Do not delete these lines
    if (‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]))
    die (‘Please do not load this page directly. Thanks!’);

    if (!empty($post->post_password)) { // if there’s a password
    if ($_COOKIE[‘wp-postpass_’.$cookiehash] != $post->post_password) { // and it doesn’t match the cookie
    ?>

    <p class=”center”><?php _e(“This post is password protected. Enter the password to view comments.”); ?>

    <?php return; } }

    /* Function for seperating comments from track- and pingbacks. */
    function k2_comment_type_detection($commenttxt = ‘Comment’, $trackbacktxt = ‘Trackback’, $pingbacktxt = ‘Pingback’) {
    global $comment;
    if (preg_match(‘|trackback|’, $comment->comment_type))
    return $trackbacktxt;
    elseif (preg_match(‘|pingback|’, $comment->comment_type))
    return $pingbacktxt;
    else
    return $commenttxt;
    }
    ?>

    <script type=”text/javascript”>
    // Used for showing and hiding user information in the comment form
    function ShowUtils() {
    document.getElementById(“authorinfo”).style.display = “”;
    document.getElementById(“showinfo”).style.display = “none”;
    document.getElementById(“hideinfo”).style.display = “”;
    }

    function HideUtils() {
    document.getElementById(“authorinfo”).style.display = “none”;
    document.getElementById(“showinfo”).style.display = “”;
    document.getElementById(“hideinfo”).style.display = “none”;
    }
    </script>

    <!– You can start editing here. –>

    <?php if (($comments) or (‘open’ == $post-> comment_status)) { ?>

    <hr />

    <div class=”comments”>

    <div class=”second2″>

    <h4><?php comments_number(‘No Responses’, ‘One Response’, ‘% Responses’ );?> to “<?php the_title(); ?>”</h4>
    <div class=”metalinks”>
    <span class=”metalink”><?php comments_rss_link(‘RSS’); ?></span>
    <?php if (‘open’ == $post-> ping_status) { ?><span class=”metalink”>” title=”Copy this URI to trackback this entry.”>Trackback</span><?php } ?>
    </div>

    <?php if ($comments) { ?>

    <ol class=”commentlist”>

    <?php $count_pings = 1; foreach ($comments as $comment) {
    if (k2_comment_type_detection() == “Comment”) { ?>

    <li class=”<?php /* Style differently if comment author is blog author */ if ($comment->comment_author_email == get_the_author_email()) { echo ‘authorcomment’; } ?> item” id=”comment-<?php comment_ID() ?>”>
    “>
    <?php if (function_exists(‘gravatar’)) { ?><img src=”<?php gravatar(“X”, 32, “”); ?>” class=”gravatar” alt=”Gravatar Icon” /><?php } ?>
    ” class=”counter” title=”Permanent Link to this Comment”><? echo $count_pings; $count_pings++; ?>
    <span class=”commentauthor” style=”font-weight: bold;”><?php comment_author_link() ?></span> 
    <small class=”commentmetadata”>on ” title=”<?php if (function_exists(‘time_since’)) { $comment_datetime = strtotime($comment->comment_date); echo time_since($comment_datetime) ?> ago<?php } else { ?>Permalink to Comment<?php } ?>”><?php comment_date(‘M jS, Y’) ?> at <?php comment_time() ?> <?php edit_comment_link(‘edit’,”,”); ?></small>

    <div class=”itemtext”>

    <?php comment_text() ?>

    </div>

    <?php if ($comment->comment_approved == ‘0’) : ?>
    <p class=”alert”>Your comment is awaiting moderation.
    <?php endif; ?>

    <?php } } /* end for each comment */ ?>

    <?php
    $comments = $wpdb->get_results(“SELECT * FROM $wpdb->comments WHERE comment_post_ID = ‘$post->ID’ AND comment_approved = ‘1’ AND comment_type!= ” ORDER BY comment_date”);
    ?>
    <?php
    if ($comments) {
    ?>
    <ol class=”pinglist”>
    <?php $count_pings = 1; foreach ($comments as $comment) {
    if (k2_comment_type_detection() != “Comment”) { ?>
    <li class=”item” id=”comment-<?php comment_ID() ?>”>
    “>
    <?php if (function_exists(‘comment_favicon’)) { ?><span class=”favatar”><?php comment_favicon(); ?></span><?php } ?>
    ” title=”Permanent Link to this Comment” class=”counter”><? echo $count_pings; $count_pings++; ?>
    <span class=”commentauthor”><?php comment_author_link() ?></span>
    <small class=”commentmetadata”><span class=”pingtype”><?php comment_type(); ?></span> on ” title=”<?php if (function_exists(‘time_since’)) { $comment_datetime = strtotime($comment->comment_date); echo time_since($comment_datetime) ?> ago<?php } else { ?>Permalink to Comment<?php } ?>”><?php comment_date(‘M jS, Y’) ?> at <?php comment_time() ?> <?php edit_comment_link(‘edit’,”,”); ?></small>

    <?php } } /* end for each comment */ ?>
    <?php
    if ($comments) {
    ?>

    <?php }} ?>
    <?php } else { // this is displayed if there are no comments so far ?>

    <?php if (‘open’ == $post-> comment_status) { ?>
    <!– If comments are open, but there are no comments. –>
    <p class=”center” style=”margin-top: 40px;”>Leave a comment

    <?php } else { // comments are closed ?>

    <!– If comments are closed. –>

    <?php if (is_single) { // To hide comments entirely on Pages without comments ?>
    Comments are currently closed.
    <?php } ?>

    <?php } ?>

    <?php } ?>

    <?php if ($comments) { ?>
    <?php include (TEMPLATEPATH . ‘/navigation.php’); ?>
    <?php } ?>

    </div> <!– Close Primary –>

    <!– Reply Form –>
    <?php if (‘open’ == $post-> comment_status) : ?>
    <div class=”second2″>
    <h4>Post your message here</h4>

    <?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?>

    You must /wp-login.php?redirect_to=<?php the_permalink(); ?>”>log in to post a comment.

    <?php else : ?>

    <form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>

    <?php if ( $user_ID ) { ?>

    Logged in as /wp-admin/profile.php”><?php echo $user_identity; ?>. /wp-login.php?action=logout” title=”<?php _e(‘Log out of this account’) ?>”>Logout »

    <?php } elseif ($comment_author != “”) { ?>

    <small>Welcome back <?php echo $comment_author; ?>
    <span id=”showinfo”>(Change)</span>
    <span id=”hideinfo” style=”display:none;”>(Close)</span></small>

    <div id=”authorinfo”>
    <input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ />
    <label for=”author”><small>Name <?php if ($req) _e(‘(required)’); ?></small></label>

    <input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ tabindex=”2″ />
    <label for=”email”><small>Mail (will not be published) <?php if ($req) _e(‘(required)’); ?></small></label>

    <input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
    <label for=”url”><small>Website</small></label>
    </div>

    <?php } else { ?>

    <input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ />
    <label for=”author”><small>Name <?php if ($req) _e(‘(needed)’); ?></small></label>

    <input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ tabindex=”2″ />
    <label for=”email”><small>Mail <?php if ($req) _e(‘(needed)’); ?></small></label>

    <input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
    <label for=”url”><small>Website (optional)</small></label>

    <?php } ?>

    <!–<small>XHTML: You can use these tags: <?php echo allowed_tags(); ?></small>–>

    <textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″></textarea>

    <?php if (function_exists(‘show_subscription_checkbox’)) { ?><?php show_subscription_checkbox(); ?><?php } ?>

    <input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit” />
    <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
    <div class=”clear”></div>

    <?php do_action(‘comment_form’, $post->ID); ?>

    </form>

    </div><!– Close Reply Form .Primary –>

    <?php endif; // If registration required and not logged in ?>

    <?php endif; // if you delete this the sky will fall on your head ?>
    </div> <!– Close .comments container –>
    <?php } ?>

    Thread Starter cooper

    (@cooper)

    Please see the comments PHP information and offer some assitance as I cannot find the form action in there…maybe staring at code too much!

    Thanks!!!

    <?php // Do not delete these lines
    if (‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]))
    die (‘Please do not load this page directly. Thanks!’);

    if (!empty($post->post_password)) { // if there’s a password
    if ($_COOKIE[‘wp-postpass_’.$cookiehash] != $post->post_password) { // and it doesn’t match the cookie
    ?>

    <p class=”center”><?php _e(“This post is password protected. Enter the password to view comments.”); ?>

    <?php return; } }

    /* Function for seperating comments from track- and pingbacks. */
    function k2_comment_type_detection($commenttxt = ‘Comment’, $trackbacktxt = ‘Trackback’, $pingbacktxt = ‘Pingback’) {
    global $comment;
    if (preg_match(‘|trackback|’, $comment->comment_type))
    return $trackbacktxt;
    elseif (preg_match(‘|pingback|’, $comment->comment_type))
    return $pingbacktxt;
    else
    return $commenttxt;
    }
    ?>

    <script type=”text/javascript”>
    // Used for showing and hiding user information in the comment form
    function ShowUtils() {
    document.getElementById(“authorinfo”).style.display = “”;
    document.getElementById(“showinfo”).style.display = “none”;
    document.getElementById(“hideinfo”).style.display = “”;
    }

    function HideUtils() {
    document.getElementById(“authorinfo”).style.display = “none”;
    document.getElementById(“showinfo”).style.display = “”;
    document.getElementById(“hideinfo”).style.display = “none”;
    }
    </script>

    <!– You can start editing here. –>

    <?php if (($comments) or (‘open’ == $post-> comment_status)) { ?>

    <hr />

    <div class=”comments”>

    <div class=”second2″>

    <h4><?php comments_number(‘No Responses’, ‘One Response’, ‘% Responses’ );?> to “<?php the_title(); ?>”</h4>
    <div class=”metalinks”>
    <span class=”metalink”><?php comments_rss_link(‘RSS’); ?></span>
    <?php if (‘open’ == $post-> ping_status) { ?><span class=”metalink”>” title=”Copy this URI to trackback this entry.”>Trackback</span><?php } ?>
    </div>

    <?php if ($comments) { ?>

    <ol class=”commentlist”>

    <?php $count_pings = 1; foreach ($comments as $comment) {
    if (k2_comment_type_detection() == “Comment”) { ?>

    <li class=”<?php /* Style differently if comment author is blog author */ if ($comment->comment_author_email == get_the_author_email()) { echo ‘authorcomment’; } ?> item” id=”comment-<?php comment_ID() ?>”>
    “>
    <?php if (function_exists(‘gravatar’)) { ?><img src=”<?php gravatar(“X”, 32, “”); ?>” class=”gravatar” alt=”Gravatar Icon” /><?php } ?>
    ” class=”counter” title=”Permanent Link to this Comment”><? echo $count_pings; $count_pings++; ?>
    <span class=”commentauthor” style=”font-weight: bold;”><?php comment_author_link() ?></span> 
    <small class=”commentmetadata”>on ” title=”<?php if (function_exists(‘time_since’)) { $comment_datetime = strtotime($comment->comment_date); echo time_since($comment_datetime) ?> ago<?php } else { ?>Permalink to Comment<?php } ?>”><?php comment_date(‘M jS, Y’) ?> at <?php comment_time() ?> <?php edit_comment_link(‘edit’,”,”); ?></small>

    <div class=”itemtext”>

    <?php comment_text() ?>

    </div>

    <?php if ($comment->comment_approved == ‘0’) : ?>
    <p class=”alert”>Your comment is awaiting moderation.
    <?php endif; ?>

    <?php } } /* end for each comment */ ?>

    <?php
    $comments = $wpdb->get_results(“SELECT * FROM $wpdb->comments WHERE comment_post_ID = ‘$post->ID’ AND comment_approved = ‘1’ AND comment_type!= ” ORDER BY comment_date”);
    ?>
    <?php
    if ($comments) {
    ?>
    <ol class=”pinglist”>
    <?php $count_pings = 1; foreach ($comments as $comment) {
    if (k2_comment_type_detection() != “Comment”) { ?>
    <li class=”item” id=”comment-<?php comment_ID() ?>”>
    “>
    <?php if (function_exists(‘comment_favicon’)) { ?><span class=”favatar”><?php comment_favicon(); ?></span><?php } ?>
    ” title=”Permanent Link to this Comment” class=”counter”><? echo $count_pings; $count_pings++; ?>
    <span class=”commentauthor”><?php comment_author_link() ?></span>
    <small class=”commentmetadata”><span class=”pingtype”><?php comment_type(); ?></span> on ” title=”<?php if (function_exists(‘time_since’)) { $comment_datetime = strtotime($comment->comment_date); echo time_since($comment_datetime) ?> ago<?php } else { ?>Permalink to Comment<?php } ?>”><?php comment_date(‘M jS, Y’) ?> at <?php comment_time() ?> <?php edit_comment_link(‘edit’,”,”); ?></small>

    <?php } } /* end for each comment */ ?>
    <?php
    if ($comments) {
    ?>

    <?php }} ?>
    <?php } else { // this is displayed if there are no comments so far ?>

    <?php if (‘open’ == $post-> comment_status) { ?>
    <!– If comments are open, but there are no comments. –>
    <p class=”center” style=”margin-top: 40px;”>Leave a comment

    <?php } else { // comments are closed ?>

    <!– If comments are closed. –>

    <?php if (is_single) { // To hide comments entirely on Pages without comments ?>
    Comments are currently closed.
    <?php } ?>

    <?php } ?>

    <?php } ?>

    <?php if ($comments) { ?>
    <?php include (TEMPLATEPATH . ‘/navigation.php’); ?>
    <?php } ?>

    </div> <!– Close Primary –>

    <!– Reply Form –>
    <?php if (‘open’ == $post-> comment_status) : ?>
    <div class=”second2″>
    <h4>Post your message here</h4>

    <?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?>

    You must /wp-login.php?redirect_to=<?php the_permalink(); ?>”>log in to post a comment.

    <?php else : ?>

    <form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>

    <?php if ( $user_ID ) { ?>

    Logged in as /wp-admin/profile.php”><?php echo $user_identity; ?>. /wp-login.php?action=logout” title=”<?php _e(‘Log out of this account’) ?>”>Logout »

    <?php } elseif ($comment_author != “”) { ?>

    <small>Welcome back <?php echo $comment_author; ?>
    <span id=”showinfo”>(Change)</span>
    <span id=”hideinfo” style=”display:none;”>(Close)</span></small>

    <div id=”authorinfo”>
    <input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ />
    <label for=”author”><small>Name <?php if ($req) _e(‘(required)’); ?></small></label>

    <input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ tabindex=”2″ />
    <label for=”email”><small>Mail (will not be published) <?php if ($req) _e(‘(required)’); ?></small></label>

    <input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
    <label for=”url”><small>Website</small></label>
    </div>

    <?php } else { ?>

    <input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ />
    <label for=”author”><small>Name <?php if ($req) _e(‘(needed)’); ?></small></label>

    <input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ tabindex=”2″ />
    <label for=”email”><small>Mail <?php if ($req) _e(‘(needed)’); ?></small></label>

    <input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
    <label for=”url”><small>Website (optional)</small></label>

    <?php } ?>

    <!–<small>XHTML: You can use these tags: <?php echo allowed_tags(); ?></small>–>

    <textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″></textarea>

    <?php if (function_exists(‘show_subscription_checkbox’)) { ?><?php show_subscription_checkbox(); ?><?php } ?>

    <input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit” />
    <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
    <div class=”clear”></div>

    <?php do_action(‘comment_form’, $post->ID); ?>

    </form>

    </div><!– Close Reply Form .Primary –>

    <?php endif; // If registration required and not logged in ?>

    <?php endif; // if you delete this the sky will fall on your head ?>
    </div> <!– Close .comments container –>
    <?php } ?>

    Thread Starter cooper

    (@cooper)

    Thanks, I understand there is an error in the bar, and am looking into that one.

    Most importantly the links aren’t actually linking as mailto: For example, if you look at the latest post under sponser a family, you will see that the link is :http://www.beenthereclearinghouse.com/sponsor-a-family/tcklingensmith@yahoo.com
    not mailto: tcklingensmith@yahoo.com

    Any other advise you could give??

    Thank you so much.

    David

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