İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

Wordpress Üye Resim IDsi

serhat_331

0
Yasakli Uye
Katılım
13 Ağustos 2012
Mesajlar
86
Reaction score
0
Arkadaşlar wordpress bir site kurdum siteye üye olanlar kendi profil resmini ekleyebiliyor gravatar kullanılmıyor.

sorum yorum bölümünde yorum bırakan üyenin resmi yerine benim önceden tanımladıgım resim çıkıyor.

Comment.php ye nasıl bir kod eklersem yorum bırakan üyenin kendi resmi gözükür?

Comment php şu şekilde

<?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>Yorumları görebilmek için giriş yapmalısınız.</p>

<?php
return;
}
}

/* This variable is for alternating comment background */
$oddcomment = ' alt';
?>
<!-- You can start editing here. -->

<div id="comments" class="yorumlar">
<?php if ($comments) : ?>
<br /><br />


<?php foreach ($comments as $comment) : ?>
<p class="avt">
<?php
$link_avatar = get_user_meta($post->post_author, 'avatar',true); if(empty($link_avatar)){
$link_avatar = get_bloginfo('template_directory')."/images/question-img.jpg";}
else{
$link_avatar = TEMPLATE_URL.'/images/avatar/'.$link_avatar;}
?>
<img alt="<?php _e(' No avatar','qa'); ?>" src="<?php echo $link_avatar;?>" height="74" width="74"/>





</p>










<p class="usercom"><a href="#comment-<?php comment_ID() ?>"> <font face="verdana" color="#460000"><b><?php comment_author_link(); ?></b></font><br><br>

<a href="#comment-<?php comment_ID() ?>"> Tarih: <?php comment_date('F jS, Y') ?> | Saat: <?php comment_time() ?></a> </p>
<div class="entry <?php echo $oddcomment; ?>" id="comment-<?php comment_ID(); ?>">
<?php if ($comment->comment_approved == '0') : ?>
<p><em style=" font-style: normal; color:#FF0000;">Yorumunuz onaylandıktan hemen sonra yayınlanacaktır.</em></p>
<?php endif; ?>
<div class="con"><?php comment_text() ?></div>
<?php comment_reply_link( $args, $comment, $post ) ?>
</div>

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

<?php elseif ('open' != $post->comment_status) : ?>
<?php endif; ?>
</div>


<?php if ('open' == $post->comment_status) : ?>
<div class="yorum-formu">
<h3 id="respond">YORUMLA:</h3>
<form id="comment-form" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post">
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>Yorum Ekleyebilmek İçin Giriş Yapmalısınız.</p>
<?php else : ?>


<?php if ( $user_ID ) : ?>
<p class="userformbg"><?php echo $user_identity; ?></p><br />

<?php else : ?>
<p class="formbg"><input id="comment-name" value="<?php echo $comment_author; ?>" name="author" type="text" class="formid" /> <label for="comment-name">İsim</label></p>
<p class="formbg"><input id="comment-email" name="email" value="<?php echo $comment_author_email; ?>" type="text" class="formemail" /> <label for="comment-name">E-Mail</label></p>
<p class="formbg"><input id="comment-url" name="url" value="<?php echo $comment_author_url; ?>" type="text" class="formuri"/> <label for="comment-name">Website</label></p>
<?php endif; ?>
<p class="formtxt"><textarea id="comment" name="comment" cols="55" rows="4" style="width: 566px; height: 81px;"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" class="button" value="yollaaaa!" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<?php endif; ?>
</form>
</div>
<?php endif; ?>
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

Üst