พี่ๆใครช่วยดูโค้ดให้หน่อยครับงมมาทั้งวันแล้ว T0T

เริ่มโดย รอสซี่, 14 ธันวาคม 2011, 13:50:25

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

รอสซี่

<?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="nocomments">This post is password protected. Enter the password to view comments.</p>

<?php
return;
}
}

?>


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

<div id="left_left">
<div class="margin10">
<div id="comm1"></div>
<div id="comm2">
<div id="comments">

<ol><li class="nolist">

<div id="comments-list" class="comments">
<?php if ($comments) : ?>
<!-- <h3><?php comments_number('No Comment''One Comment''% Comments' );?> <a href="#respond" title="<?php _e("Leave a comment"); ?>">&raquo;</a></h3> -->
<div id="comm6"></div>
<div class="comments-list2">
<div class="red"><a href=""></a></div>
<?php foreach ($comments as $comment) : ?>

<?php
$isByAuthor false;
if($comment->comment_author_email == get_the_author_email()) {
$isByAuthor true;
}?>

<!-- <ol class="nolist2"><li id="comment-<?php comment_ID() ?>" <?php if($isByAuthor ) { echo 'class="comment c1 c-y2011 c-m12 c-d14 c-h05';} ?>"> -->
<div class="comment-author_vcard"><!-- <?php echo get_avatar$comment$size '55' ); ?> <span class="fn n"></span> --><span class="black">โดยคุณ:</span>&nbsp;<?php comment_author_link() ?> <?php if($isByAuthor ) { echo '(author)';} ?> </div>
<div class="comment-meta">Posted <?php comment_date('j F Y'?> at <?php comment_time() ?><span class="meta-sep">|</span> <!-- <a href="" title="Permalink to this comment">Permalink</a> --></div>
<?php if ($comment->comment_approved == '0') : ?>
<em>Your comment is awaiting moderation.</em>
<?php endif; ?>
<p><?php comment_text() ?></p>
<!-- </li></ol> -->
</div>
<div class="comm5"></div>

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

</div><!-- #comments-list .comments -->

</li></ol>
<?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">Comments are closed.</p>
<?php endif; ?>

<?php endif; ?>

<div id="comm4"></div>

<div id="comm3"></div>
<?php if ('open' == $post->comment_status) : ?>
<div id="respond">
<!-- <h3>แสดงความคิดเห็น </h3> -->
<div class="formcontainer">
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>

<p id="comment-notes">You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>

<?php else : ?>

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

<?php if ( $user_ID ) : ?>

<p id="comment-notes">Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>

<?php else : ?>

<!-- <p>Add your comment below, or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a> from your own site. You can also <?php comments_rss_link('subscribe to these comments'); ?> via RSS.</p> -->

<p id="comment-notes"><!-- Your email is <em>never</em> shared .--> กรุณากรอกชื่อและอีเมลล์ <span class="required">*</span></p>

<div class="form-label"><label for="author">Name</label> <?php if ($req) echo '<span class="required">*</span>'?></div>

<div class="form-input"><input id="author" name="author" class="text required" type="text" value="<?php echo $comment_author?>" size="30" maxlength="50" tabindex="3" /></div>

<div class="form-label"><label for="email">Email</label> <?php if ($req) echo '<span class="required">*</span>'?></div>
<div class="form-input"><input id="email" name="email" class="text required" type="text" value="<?php echo $comment_author_email?>" size="30" maxlength="50" tabindex="4" /></div>

<!-- <div class="form-label"><label for="url">Website</label> <?php if ($req) echo '<span class="required">*</span>'?></div>
<div class="form-input"><input id="url" name="url" class="text" type="text" value="<?php echo $comment_author_url?>" size="30" maxlength="50" tabindex="5" /></div> -->


<div class="form-label"><label for="comment">Comment</label></div>

<div class="form-textarea"><textarea id="comment" name="comment" class="text required" cols="45" rows="4" tabindex="6"></textarea></div>

<!-- <p>You can use these tags:<br/><code><?php echo allowed_tags(); ?></code></p>
<p>This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at <a href="http://www.gravatar.com">Gravatar</a>.</p> -->

<div class="form-submit"><input id="submit" name="submit" class="button" type="submit" value="Post Comment" tabindex="7" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id?>" /></div>

<div class="form-option"><p style="display: none;"><?php do_action('comment_form'$post->ID); ?></p></div>

</form><!-- #commentform -->

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

<?php endif; ?>

</div><!-- .formcontainer -->

</div><!-- #respond -->

</div>
<div id="comm10"></div>

</div><!-- #comments -->
</div><!-- comm2 -->
</div><!-- margin10 -->
</div><!-- left_left -->


Parse error: syntax error, unexpected $end in C:\AppServ\httpdocs\wp\wp-content\themes\default\comments.php on line 132

ขอบคุณมากครับ  :wanwan017:

เฮียเล้ง

if อันนี้ <?php if ('open' == $post->comment_status) : ?> ไม่มี endif; รึป่าวคับ
[direct=http://ประตูไม้สัก.net]ประตูไม้สัก[/direct] [direct=http://ประตูไม้สัก.net]เฟอร์นิเจอร์ไม้สัก[/direct]


LoadRang


KONINW

<?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="nocomments">This post is password protected. Enter the password to view comments.</p>

<?php
return;
}
}

?>


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

<div id="left_left">
<div class="margin10">
<div id="comm1"></div>
<div id="comm2">
<div id="comments">

<ol><li class="nolist">

<div id="comments-list" class="comments">
<?php if ($comments) : ?>
<!-- <h3><?php comments_number('No Comment''One Comment''% Comments' );?> <a href="#respond" title="<?php _e("Leave a comment"); ?>">&raquo;</a></h3> -->
<div id="comm6"></div>
<div class="comments-list2">
<div class="red"><a href=""></a></div>
<?php foreach ($comments as $comment) : ?>

<?php
$isByAuthor false;
if($comment->comment_author_email == get_the_author_email()) {
$isByAuthor true;
}?>

<!-- <ol class="nolist2"><li id="comment-<?php comment_ID() ?>" <?php if($isByAuthor ) { echo 'class="comment c1 c-y2011 c-m12 c-d14 c-h05';} ?>"> -->
<div class="comment-author_vcard"><!-- <?php echo get_avatar$comment$size '55' ); ?> <span class="fn n"></span> --><span class="black">โดยคุณ:</span>&nbsp;<?php comment_author_link() ?> <?php if($isByAuthor ) { echo '(author)';} ?> </div>
<div class="comment-meta">Posted <?php comment_date('j F Y'?> at <?php comment_time() ?><span class="meta-sep">|</span> <!-- <a href="" title="Permalink to this comment">Permalink</a> --></div>
<?php if ($comment->comment_approved == '0') : ?>
<em>Your comment is awaiting moderation.</em>
<?php endif; ?>
<p><?php comment_text() ?></p>
<!-- </li></ol> -->
</div>
<div class="comm5"></div>

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

</div><!-- #comments-list .comments -->

</li></ol>
<?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">Comments are closed.</p>
<?php endif; ?>

<?php endif; ?>

<div id="comm4"></div>

<div id="comm3"></div>
<?php if ('open' == $post->comment_status) : ?>
<div id="respond">
<!-- <h3>แสดงความคิดเห็น </h3> -->
<div class="formcontainer">
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>

<p id="comment-notes">You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>

<?php else : ?>

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

<?php if ( $user_ID ) : ?>

<p id="comment-notes">Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>

<?php else : ?>

<!-- <p>Add your comment below, or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a> from your own site. You can also <?php comments_rss_link('subscribe to these comments'); ?> via RSS.</p> -->

<p id="comment-notes"><!-- Your email is <em>never</em> shared .--> กรุณากรอกชื่อและอีเมลล์ <span class="required">*</span></p>

<div class="form-label"><label for="author">Name</label> <?php if ($req) echo '<span class="required">*</span>'?></div>

<div class="form-input"><input id="author" name="author" class="text required" type="text" value="<?php echo $comment_author?>" size="30" maxlength="50" tabindex="3" /></div>
<?php endif; ?>
<div class="form-label"><label for="email">Email</label> <?php if ($req) echo '<span class="required">*</span>'?></div>
<div class="form-input"><input id="email" name="email" class="text required" type="text" value="<?php echo $comment_author_email?>" size="30" maxlength="50" tabindex="4" /></div>

<!-- <div class="form-label"><label for="url">Website</label> <?php if ($req) echo '<span class="required">*</span>'?></div>
<div class="form-input"><input id="url" name="url" class="text" type="text" value="<?php echo $comment_author_url?>" size="30" maxlength="50" tabindex="5" /></div> -->


<div class="form-label"><label for="comment">Comment</label></div>

<div class="form-textarea"><textarea id="comment" name="comment" class="text required" cols="45" rows="4" tabindex="6"></textarea></div>

<!-- <p>You can use these tags:<br/><code><?php echo allowed_tags(); ?></code></p>
<p>This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at <a href="http://www.gravatar.com">Gravatar</a>.</p> -->

<div class="form-submit"><input id="submit" name="submit" class="button" type="submit" value="Post Comment" tabindex="7" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id?>" /></div>

<div class="form-option"><p style="display: none;"><?php do_action('comment_form'$post->ID); ?></p></div>

</form><!-- #commentform -->

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

<?php endif; ?>

</div><!-- .formcontainer -->

</div><!-- #respond -->

</div>
<div id="comm10"></div>

</div><!-- #comments -->
</div><!-- comm2 -->
</div><!-- margin10 -->
</div><!-- left_left -->


:P
ไม่มีอะไรที่ไม่สำเร็จหากเราไม่ลงมือทำมัน [direct=http://mobileplayerx.com/xxx.html].[/direct]