comment.php
<?php // 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 (!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;
}
}
/* This variable is for alternating comment background */
$oddcomment = 'class="alt" ';
?>
<!-- You can start editing here. -->
<?php if ($comments) : ?>
<h3 id="comments"><?php comments_number('0 دیدگاه', 'یک دیدگاه', '% دیدگاه' );?> برای پست : <?php the_title(); ?></h3>
<ul class="cmt-info">
<?php if ('open' == $post-> comment_status){ ?><li class="comment_edit"><a href="#respond">ارسال دیدگاه</a></li><?php } ?>
<li class="comment_feed"><?php comments_rss_link('آر اس اس برای این مطلب'); ?></li>
<?php if ('open' == $post->ping_status){ ?><li class="comment_trackback"><a href="<?php trackback_url(); ?> " rel="trackback">بازتاب</a></li><?php } ?>
</ul>
<ol class="commentlist">
<?php foreach ($comments as $comment) :?>
<?php if (get_comment_type() == "comment") : //if is ordianry comment ?>
<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
<cite><span class="comment-name"><?php comment_author_link() ?></span></cite> می گوید :
<?php if ($comment->comment_approved == '0') : ?>
<em>دیدگاه شما با موفقیت شبت شد و بعد از تایید نمایش داده می شود.</em>
<?php endif; ?>
<br />
<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('edit',' ',''); ?></small>
<div class="entry">
<?php comment_text() ?>
</div>
</li>
<?php
/* Changes every other comment to a different class */
$oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
?>
<?php endif; ?>
<?php endforeach; /* end for each comment */ ?>
</ol>
<?php if (function_exists('trackpings') && $trackbacks = trackpings()) : ?>
<h3 id="trackpings"><?php echo trackpings('count'); ?> Trackbacks/<span>Pingbacks</span></h3>
<ul class="trackpings"><?php listtrackpings('trackback', '<li id="trackback-%id"><span><a href="%url" rel="nofollow" title="%origin">%origin</a> (Trackback, %date)</span><br />%content</li>'); ?><?php listtrackpings('pingback', '<li id="trackback-%id"><span><a href="%url" rel="nofollow" title="%origin">%origin</a> (Pingback, %date)</span><br />%content</li>'); ?></ul>
<?php endif; ?>
<?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) : ?>
<h3 id="respond">ارسال دیدگاه</h3>
<?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 get_option('siteurl'); ?>/wp-login.php?action=logout" 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" />
<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" />
<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="ارسال دیدگاه" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
<?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 ?>
style.css
/*
Theme Name: Obox
Author: Utom
Author URI: http://utombox.com
Translated By : <a href="http://www.7thline.ir/">Masoud Golchin</a>
*/
body {
background: #eeeeee;
font-family: tahoma, arial, sans-serif;
font-size: 8pt;
margin:0px;
}
a img {
border-width:0;
}
a:link, a:visited {
color: #000;
text-decoration: none;
}
a:hover {
color: #ff66cc;
text-decoration: none;
}
h2 {
font-size: 22px;
}
h3 {
font-size: 16px;
}
h4 {
font-size: 14px;
}
blockquote {
margin: 5px 5px 5px 25px;
padding: 0px 0px 0px 5px;
border-left: 2px solid #705a3d;
color: #705a3d;
}
/* container */
#container {
width: 760px;
margin: 0 auto;
padding:0;
background:#fff;
color:#333;
overflow: hidden;
border:1px solid #A5ABAB;
}
#wrapper{
background: #FEE4AB url(images/body_bg.png) repeat-y center top;
}
.wrapper{
width: 800px;
margin: 0 auto;
overflow: hidden;
}
#header{
background: #FF9900 url(images/top_bg.png) repeat-x 0 0;
height: 50px;
}
#header h1{
float: left;
margin: 19px 60px 0 0;
padding: 0 0 0 20px;
}
#header h1 a{
width: 86px;
height: 12px;
background: transparent url(images/logo.gif) no-repeat 0 0;
display: block;
text-indent: -300px;
overflow: hidden;
}
ul.menu{
float: left;
list-style: none;
margin: 15px 0 0 0;
}
ul.menu li{
float: left;
margin: 0 10px 0 0;
line-height: 20px;
font-size: 11px;
}
ul.menu li a, ul.menu li.current_page_item a:hover{
display: block;
padding: 0 0 0 8px;
color: #fff;
background: #c60 url(images/menu_bg.png) no-repeat left bottom;
}
ul.menu li a span, ul.menu li.current_page_item a:hover span{
display: block;
padding: 0 8px 0 0;
background: #c60 url(images/menu_bg.png) no-repeat right bottom;
}
ul.menu li.current_page_item a, ul.menu li a:hover{
color: #c60;
background: #fff url(images/menu_bg.png) no-repeat left top;
}
ul.menu li.current_page_item a span, ul.menu li a:hover span{
background: #fff url(images/menu_bg.png) no-repeat right top;
}
#searchform{
float:right;
margin:13px 0 0;
padding:0 20px 0 0;
}
#searchform input{
width: 154px;
height: 18px;
line-height: 18px;
padding: 3px;
border: none;
background: transparent url(images/input_search.png) no-repeat;
}
#searchform .s{ background-position: left top; }
#searchform .s_over{ background-position: left bottom; }
#searchsubmit{ display: none; }
/* content */
#content {
float:left;
width:520px;
overflow: hidden;
margin:20px;
}
#content a:hover{color: #666f00; text-decoration: rtl;}
.post {
margin:0;
padding:0;
line-height: 14pt;
}
.post img {
border: 1px solid #ccc;
padding: 4px;
max-width: 600px;
-moz-border-radius: 5px;
-khtml-border-radius: 5px;
-webkit-border-radius: 5px;
}
.post a:hover img, .post img:hover {
background-color: #ccc;
}
.post img.no-border, .post img.no-border:hover, .post a:hover img.no-border {
border: 1px solid #fff;
background-color: #fff;
}
.post h2{
text-transform: uppercase;
border-bottom: 3px solid #b25c00;
padding: 3px 6px;
margin: 10px 0px 5px 0px;
color:#7e8901;
font-size: 11px;font-weight:normal
}
.post h2 a{
color: #000;
text-decoration: none;
}
.post h2 a:hover{
color: #777;
text-decoration: none;
}
.post ul {}
.post li {}
.entry p{margin:12px 0;}
.postmetadata{
clear: both;
background:#F7F7F7;
padding:6px;
margin: 20px 0;
}
.post-a {
background: url(images/author.png) no-repeat; margin: 0px 3px 0px 15px;
}
.post-t {
background: url(images/tag.gif) no-repeat; margin: 0px 3px 0px 15px;
}
.post-d {
background: url(images/date.png) no-repeat; margin: 0px 3px 3px 12px;
}
.post-f {
background: url(images/cat.png) no-repeat;
margin: 0px 3px 0px 15px;
}
.commentslink {
background: url(images/com.png) no-repeat;
margin: 0px 3px 0px 15px;
}
.navigation {
font-size:8pt;
width:100%;
float:left;
margin:0;
padding:0;
overflow:hidden;
}
.alignleft a{float:left; margin:25px 0;}
.alignright a{float:right; margin:25px 0;}
#comments{
font-size: 14px;
margin: 0 0 15px;
}
.cmt-info{
list-style: none;
height: 20px;
margin: 0 0 20px;
}
.cmt-info li{
float: left;
margin: 0 20px 0 0;
padding: 0 0 0 20px;
}
.comment_edit{
background: transparent url(images/writedocument_icon.gif) no-repeat left center;
}
.comment_feed{
background: transparent url(images/feed_icon.gif) no-repeat left center;
}
.comment_trackback{
background: transparent url(images/trackback_icon.gif) no-repeat left center;
}
.commentlist{
list-style: none;
color: #000;
margin: 0 0 20px;
}
.commentlist li{
padding: 20px;
border-bottom: 1px solid #EBE6C9;
}
.commentlist cite{
font-style: normal;
color: #000;
}
.commentlist .avatar{
margin: 0 10px 10px 0;
border: 1px solid #c60;
float: left;
}
.commentlist .entry{
padding: 0 20px;
width: 470px;
font: 12px
}
#trackpings{
font-size: 14px;
margin: 0 0 20px;
}
.trackpings{
list-style: none;
color: #999;
margin: 0 0 20px;
}
.trackpings li{
padding: 20px;
border-bottom: 1px solid #eee;
}
.trackpings span{
background: transparent url(images/document2_icon.gif) no-repeat left center;
padding: 0 0 0 20px;
color: #333;
}
#respond{
font-size: 14px;
margin: 0 0 20px;
}
#commentform p{
margin: 0 0 10px;
color: #000;
}
#commentform input{
background: transparent url(images/input_text.png) repeat-x 0 0;
padding: 3px;
border:1px solid #ddd;
width: 200px;
}
#commentform textarea{
padding: 3px;
border:1px solid #ddd;
width: 500px;
}
#sidebar {
width: 180px;
margin-top: 10px;
padding: 0px;
float: right;
color:#ff6600;
font-size: 11px;
}
#sidebar img {
margin: 0px;
padding: 0px;
}
#sidebar #box {
width: 180px;
margin: 0px auto;
padding: 0px;
clear: both;
}
#sidebar h2 {
text-transform: uppercase;
border-bottom: 1px solid #b25c00;
padding: 3px 6px;
margin: 10px 0px 5px 0px;
color:#7e8901;
font-size: 11px;font-weight:normal
}
#sidebar h3 {
text-transform: uppercase;
border-bottom: 1px solid #b25c00;
padding: 3px 6px;
margin: 10px 0px 5px 0px;
color:#7e8901;
font-size: 11px;font-weight:normal
}
#sidebar a:link, #sidebar a:visited {
color: #555;
}
#sidebar a:hover {
color: #ff6600;
text-decoration: none;
}
#sidebar ul {
list-style-type: none;
margin: 0px 0px 3px 0px;;
padding: 0px 8px 10px 8px;
border-bottom:1px dashed #999;
}
#sidebar ul li {
margin: 0px;
padding: 3px 10px;
background: url(images/arrow.gif) no-repeat center right;
}
#sidebar li.widget li, .related_post li{
margin: 0px;
padding: 3px 10px;
background: url(images/arrow.gif) no-repeat center right;
}
#sidebar li.widget_flickrRSS ul{
width: 200px;
padding: 5px 0 0;
overflow: hidden;
}
#sidebar li.widget_flickrRSS li{
float: left;
margin: 0 10px 10px 0;
padding: 0;
background: none;
width: 79px;
height: 79px;
}
#sidebar li.widget_flickrRSS a img{
border: 2px solid #c60;
}
#sidebar li.widget_flickrRSS a:hover img{
border-color: #fff;
}
#sidebar li.widget_avatarComments ul{
width: 200px;
padding: 5px 0 0;
overflow: hidden;
}
#sidebar li.widget_avatarComments li{
float: left;
margin: 0 10px 10px 0;
padding: 0;
background: none;
width: 34px;
height: 34px;
}
#sidebar li.widget_avatarComments a img{
border: 1px solid #c60;
}
#sidebar li.widget_avatarComments a:hover img{
border-color: #fff;
}
#sidebar li.widget_feed{
width: 150px;
overflow: hidden;
}
#sidebar li.widget_feed a{
display: block;
float: left;
width: 100px;
height: 24px;
background: #FF8C33 url(images/feede_icon.png) no-repeat left top;
text-indent: -300px;
overflow: hidden;
}
#sidebar li.widget_feed a:hover{
background-position: left bottom;
}
#page404{
background: #FF8C33 url(images/404_bg.png) no-repeat left top;
width: 500px;
height: 300px;
padding: 6px;
position: absolute;
top: 100px;
left: 50%;
margin: 0 0 0 -256px;
}
#page404 h2{
line-height: 60px;
padding: 0 0 0 20px;
font-size: 20px;
color: #c60;
}
#page404 #searchform{
margin: 18px 0 0;
}
#page404 p{
padding: 60px 0 0 60px;
line-height: 170%;
}
#page404 a{
color: blue;
}
#page404 a:hover{
text-decoration: underline;
}
#wp-calendar{ width: 100%; }
#footer{
background: #FF8C33 url(images/bottom_bg.png) repeat-y center top;
}
#footer a{ color:#ff9; }
#footer a:hover{color:#ffc;}
#footer p{
padding: 10px 3px;
line-height: 20px;
color:#fff;
}
#content .wp-pagenavi{
height: 20px;
padding: 2px;
}
#content .wp-pagenavi a, .wp-pagenavi a:link {
padding: 2px 5px;
margin: 0 3px 3px 0;
text-decoration: none;
border: 1px solid #EBE6C9;
background-color: #F9FFE8;
color: #c60;
}
#content .wp-pagenavi a:visited {
padding: 2px 5px;
margin: 0 3px 3px 0;
text-decoration: none;
border: 1px solid #EBE6C9;
background-color: #F9FFE8;
}
#content .wp-pagenavi a:hover {
border: 1px solid #EBE6C9;
background-color: #F9FFE8;
color:#f60;
}
#content .wp-pagenavi a:active {
padding: 2px 5px;
margin: 0 3px 3px 0;
text-decoration: none;
border: 1px solid #EBE6C9;
background-color: #F9FFE8;
}
#content .wp-pagenavi span.pages {
padding: 2px 5px;
margin: 0 3px 3px 0;
border: 1px solid #EBE6C9;
background-color: #F9FFE8;
color: #c60;
}
#content .wp-pagenavi span.current {
padding: 2px 5px;
margin: 0 3px 3px 0;
font-weight: bold;
border: 1px solid #EBE6C9;
background-color: #FEE4AB;
color: #c30;
}
#content .wp-pagenavi span.extend {
padding: 2px 5px;
margin: 0 3px 3px 0;
border: 1px solid #EBE6C9;
background-color: #F9FFE8;
}
.comment-name{
font-size: 12px
}
بله حق با mummified هست, اینم آموزش ساخت گراواتار !