انجمن


خرابی و کامل نبودن ارسال کامنت پوسته  (۳ نوشته)

  • HaMeD KinG

    آفلاین
    عضو
    تعداد نوشته‌ها: ۵
    # نوشته شده: ۱۲ سال پیش
    ۱۶ مهر ۱۳۹۰ - ۱۷:۴۱

    سلام
    یه پوسته جدید نصب کردم اما کامنت کامل نیست! باید چیکار کنم؟
    این آدرس سایت هست http://bia2games.ir
    اینم کد commends.php`

    <?php
    /**
    * @package WordPress
    * @subpackage Default_Theme
    */

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

    if ( post_password_required() ) { ?>
    <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
    <?php
    return;
    }
    ?>

    <!-- You can start editing here. -->

    <?php if ( have_comments() ) : ?>
    <h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> به “<?php the_title(); ?>”</h3>

    <ol class="commentlist">
    <?php wp_list_comments(); ?>
    </ol>

    <div class="navigation">
    <div class="alignleft"><?php previous_comments_link() ?></div>
    <div class="alignright"><?php next_comments_link() ?></div>
    </div>
    <?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. -->

    <?php else : // comments are closed ?>
    <!-- If comments are closed. -->
    <p class="nocomments">ديدگاه بسته.</p>

    <?php endif; ?>
    <?php endif; ?>

    <?php if ('open' == $post->comment_status) : ?>

    <div id="respond">

    <h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>

    <div class="cancel-comment-reply">
    <small><?php cancel_comment_reply_link(); ?></small>
    </div>

    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p>ابتدا <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">وارد شويد</a> بعد اقدام به ارسال نظر كنيد.</p>
    <?php else : ?>

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

    <?php if ( $user_ID ) : ?>

    <p>وارد شده با عنوان <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">خروج »</a></p>

    <?php else : ?>

    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="author"><small>نام <?php if ($req) echo "(الزامي)"; ?></small></label>
    </p>

    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="email"><small>پست الكترونيك (نمايش داده نمي شود) <?php if ($req) echo "(الزامي)"; ?></small></label>
    </p>

    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small>وب سايت</small></label>
    </p>

    <?php endif; ?>

    <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->

    <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>

    <p><input name="submit" type="submit" id="submit" tabindex="5" value="ارسال ديدگاه" />
    <?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>

    </form>

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

    <?php endif; // if you delete this the sky will fall on your head ?>
    `

  • HaMeD KinG

    آفلاین
    عضو
    تعداد نوشته‌ها: ۵
    # نوشته شده: ۱۲ سال پیش
    ۱۹ مهر ۱۳۹۰ - ۲۰:۴۰

    دوستان کسی نمیدونه باید چه راه حلی واسش انجام داد؟

  • omid0098

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳۵۳
    تشکر شده: ۱۱۹۴ بار
    # نوشته شده: ۱۲ سال پیش
    ۲۰ مهر ۱۳۹۰ - ۱۰:۵۰

    سلام دوست من
    کد زیر رو بطور کامل جایگزین کنید :

    <!--
    Theme Name: CMSTalk
    Theme URI: http://www.cmstalk.ir/
    Description: The template designed especially for CMS Talk .
    Version: 3.01
    Author: H.Hemmatyar & M.Darvishi
    Author URI: http://www.emperatoor.org/

    --><?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
    ?>

    <h2><?php _e('Password Protected'); ?></h2>
    <p><?php _e('Enter the password to view comments.'); ?></p>

    <?php return;
    }
    }

    /* This variable is for alternating comment background */

    $oddcomment = 'alt';

    ?>

    <!-- You can start editing here. -->

    <?php if ($comments) : ?>

    <?php foreach ($comments as $comment) : ?>

    <div class="tags"> ارسال شده توسط : "><?php comment_author_link() ?> </div>
    <?php comment_text() ?>
    <div class="line"><img alt="" src="<?php bloginfo('stylesheet_directory'); ?>/img/line.png" border="0"/></div>
    <?php if ($comment->comment_approved == '0') : ?>
    <small><?php _e('<p> نظر شما منتظر تایید مدیریت سایت است.</p>'); ?></small>

    <?php endif; ?>

    <!--post -->

    <?php /* Changes every other comment to a different class */
    if ('alt' == $oddcomment) $oddcomment = '';
    else $oddcomment = 'alt';
    ?>

    <?php endforeach; /* end for each comment */ ?>

    <?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. -->
    <?php else : // comments are closed ?>

    <!-- If comments are closed. -->
    <p class="nocomments">امکان ارسال نظر وجود ندارد</p>

    <?php endif; ?>
    <?php endif; ?>

    <?php if ('open' == $post->comment_status) : ?>
    <!--post -->

    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p>برای ارسال نظر لطفا ابتدا /wp-login.php?redirect_to=<?php the_permalink(); ?>">وارد شوید .</p>

    <?php else : ?>

    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    <?php if ( $user_ID ) : ?>

    <p>
    شما با نام کاربری /wp-admin/profile.php"><?php echo $user_identity; ?> وارد شده اید. /wp-login.php?action=logout" title="خارج شدن">خارج می شوید ؟ »</p>

    <?php else : ?>

    <p>

    <label for="author"><small>نام <?php if ($req) echo "(لازم)"; ?></small></label>
    <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="40" tabindex="1" />
    </p>

    <p>
    <label for="email"><small>پست الکترونیک (نمایش داده نمی شود) <?php if ($req) echo "(لازم)"; ?></small></label>
    <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="40" tabindex="2" />
    </p>

    <p>
    <label for="url"><small>وب سایت</small></label>
    <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="40" tabindex="3" />
    </p>

    <?php endif; ?>

    <!--<p><small>XHTML: <?php _e('You can use these tags:'); ?> <?php echo allowed_tags(); ?></small></p>-->

    <p>
    <textarea name="comment" id="comment" cols="60" rows="10" tabindex="4" style="direction:rtl;font-family:tahoma;font-size:12px;"></textarea></p>

    <p>
    <input name="submit" type="submit" id="submit" tabindex="5" value="ارسال نظر" />
    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    </p>

    <!--post -->
    <?php do_action('comment_form', $post->ID); ?>

    </form>

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

    <?php endif; // if you delete this the sky will fall on your head ?>

درباره‌ی این موضوع



برچسب‌ها

هیچ برچسبی نیست.