WordPress Türkiye Forumları

WordPress Türkiye Forumları » Eklentiler

cmdavatar hakkında kod yardımı

(7 mesaj(lar))
  • 2 ay önce maviimge tarafından başlatıldı
  • h-yaman tarafından son cevap
  • Bu konu Çözülmemiş

Etiketler:

  1. maviimge
    Üye

    Merhaba;

    bu eklentiyi yükledim ve style.css'e eklenmesi söylenen şu kodları ekledim

    {
    clear: none;
    border-right: #687F92 1px solid;
    border-top: #687F92 1px solid;
    display: inline;
    float: right;
    margin: 5px;
    border-left: #687F92 1px solid;
    border-bottom: #687F92 1px solid;
    }

    daha sonra comment.php dosyasına şu kodu eklemem gerekiyormuş

    < ?php if(function_exists('cmd_show_avatar')){ cmd_show_avatar(); } ?>

    işte burda şöyle bir sorunum var ben avatarı her yorumun yanında göstermek isterken resimdeki gibi yorumların ya altında yada üstünde görünüyor.

    cmdavatar sorunu

    Mandigo adlı temayı kullanıyorum commed.php kodları şu şekilde ;


    <?php
    global $mandigo_options, $dirs;

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

    // if there's a password
    if (!empty($post->post_password)) {
    // and it doesn't match the cookie
    if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {
    ?>
    <p class="nocomments">This post is password protected. Enter the password to view comments.
    <?php
    return;
    }
    }

    /*
    if you really feel like it,
    you can start editing here
    */

    // the post/page author
    $the_author = get_the_author();
    $the_author_email = get_the_author_email();

    // if there's at least one comment
    if ($comments) {
    ?>
    <?php
    comments_number(
    __('No Responses to ', 'mandigo'),
    __('One Response to ', 'mandigo'),
    __('% Responses to ', 'mandigo')
    );
    ?>
    “<?php the_title();?>”

    <?php
    // loop through comments
    // what we do here is process each comment, build

  2. items, and separate real comments from trackbacks
    // we will display them later according to the chosen options
    foreach ($comments as $comment) {
    // the comment id
    $id = get_comment_ID();

    // a BIG sprintf, not for the faint of heart
    $comment_list_item = sprintf('
    <li class="clear%s" id="comment-%s">


    %s
    <cite>%s</cite>
    %s
    <small class="commentmetadata">%s %s</small>


    %s
  3. ',

    ( // first %s, highlight author comment class
    (
    $mandigo_options['comments_highlight_author']
    && get_comment_author() == $the_author
    && get_comment_author_email() == $the_author_email
    )
    ? ' authorcomment'
    : ''
    ),

    $id, // second %s, the comment id

    ( // 3rd %s, gravatar class
    (
    !$mandigo_options['comments_no_gravatars']
    && function_exists('get_avatar')
    && function_exists('get_comment_author_email')
    )
    ? ' avatar'
    : ''
    ),

    ( // 4th %s, gravatar
    !$mandigo_options['comments_no_gravatars']
    ? (
    function_exists('get_avatar') && function_exists('get_comment_author_email')
    ? sprintf(
    ' style="background: url(%s) no-repeat top left;"',
    preg_replace(
    '/.+src=[\'"]([^\'"]+)[\'"].+/',
    '\1',
    get_avatar(get_comment_author_email(), '36')
    )
    )
    : ''
    )
    : ''
    ),

    ( // 5th %s, animation link
    !$mandigo_options['disable_animations'] // if animations are not disabled
    ? sprintf(
    '<span class="switch-post"></span>',
    $id,
    $id
    )
    : ''
    ),

    sprintf( // 6th %s, the user name
    __('%s says:', 'mandigo'),
    get_comment_author_link()
    ),

    ( // 7th %s, whether the comment is pending moderation or not
    $comment->comment_approved == '0'
    ? ''. __('Your comment is awaiting moderation.', 'mandigo') .''
    : ''
    ),

    $id, // 8th %s, the comment id again

    sprintf( // 9th %s, "which date at what time"
    __('%s at %s', 'mandigo'),
    get_comment_date(__('F jS, Y', 'mandigo')),
    get_comment_time()
    ),

    ( // 10th %s, the edit comment link, if appropriate
    function_exists('get_edit_comment_link') && current_user_can('edit_post', $post->ID)
    ? ' - '. apply_filters(
    'edit_comment_link',
    ''. __('Edit', 'mandigo') .'',
    $comment->comment_ID
    )
    : ''
    ),

    // 11th %s, the comment itself
    apply_filters('comment_text', get_comment_text())

    ); // end of big sprintf, phew!

    // if this is a trackback
    if ($comment->comment_type == 'trackback') {

    // and we chose to display them either above or below regular comments
    if ($mandigo_options['trackbacks_position'] == 'above' || $mandigo_options['trackbacks_position'] == 'below') {
    // put them in a separate list
    $trackback_list[] = $comment_list_item;
    }

    // if we chose to display them along other comments
    elseif ($mandigo_options['trackbacks_position'] == 'along') {
    $comment_list[] = $comment_list_item;
    }
    }

    else {
    $comment_list[] = $comment_list_item;
    }

    } // end of foreach loop

    // if we have trackbacks and we chose to display them ABOVE comments
    if ($mandigo_options['trackbacks_position'] == 'above' && $trackback_list) {
    ?>

    <?php _e('Trackbacks', 'mandigo'); ?>

    <ol class="commentlist">
    <?php
    echo implode("\n", $trackback_list);
    ?>

    <?php _e('Comments', 'mandigo'); ?>

    <?php
    }

    // the comments
    ?>

    <ol class="commentlist">
    <?php
    echo implode("\n", $comment_list);
    ?>

    <?php

    // if we have trackbacks and we chose to display them BELOW comments
    if ($mandigo_options['trackbacks_position'] == 'below' && $trackback_list) {
    ?>

    <?php _e('Trackbacks', 'mandigo'); ?>

    <ol class="commentlist">
    <?php
    echo implode("\n", $trackback_list);
    ?>

    <?php
    }

    }

    // this is displayed when there are no comments
    else {

    // if comments are open (but there are no comments)
    if ($post->comment_status == 'open') {
    }

    // if comments are closed
    else {
    ?>
    <p class="nocomments"><?php _e('Comments are closed.', 'mandigo'); ?>

    <?php
    }
    } // end of 'whether there are comments or not' condition

    // if comments are open
    if ($post->comment_status == 'open') {
    ?>

    <?php _e('Leave a Reply', 'mandigo'); ?>

    <?php
    // if only registered users can comment, and the current user is not logged in
    if (get_option('comment_registration') && !$user_ID) {
    ?>
    <?php _e('| Yorum yapabilmek i&#231in giri&#351 yapmal&#305s&#305n&#305z | ', 'mandigo'); ?> /wp-login.php?redirect_to=<?php the_permalink(); ?>"><?php _e('Giri&#351 yap', 'mandigo'); ?> �

    <?php
    }

    // if user can leave a comment
    else {
    ?>

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

    <?php
    // if the user is logged in
    if ($user_ID) {
    ?>

    <?php printf(__('%s olarak g&#238r&#238&#351 yapt&#305n&#305z', 'mandigo'),''. $user_identity .''); ?>. /wp-login.php?action=logout" title="<?php _e('Bu hesaptan &#231&#305k&#305&#351 yap', 'mandigo'); ?>"><?php _e('&#199&#305k&#305&#351', 'mandigo'); ?> �

    <?php
    }

    // if the user is not logged in
    else {
    ?>

    <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
    <label for="author"><small><?php _e('Name', 'mandigo'); ?> <?php if ($req) echo "(". __('required', 'mandigo') .")"; ?></small></label>

    <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email"><small><?php _e('E-mail', 'mandigo'); ?> (<?php _e('will not be published', 'mandigo'); ?>) <?php if ($req) echo "(". __('required', 'mandigo') .")"; ?></small></label>

    <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small><?php _e('Website', 'mandigo'); ?></small></label>

    <?php
    }

    // if HTML tags are allowed in comments
    if ($mandigo_options['comments_allow_markup']) {
    ?>
    <small>XHTML: <?php _e('You can use these tags:', 'mandigo'); ?> <?php echo allowed_tags(); ?></small>

    <?php
    }
    ?>

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

    <input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'mandigo'); ?>" />
    <input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?>" />

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

    <?php
    } // end of 'whether the user is logged in or not' condition
    } // end of 'if comments are open' condition
    ?>

    Kısacası avatarı yorum alanı içerisinde gösteremiyorum Php bilgim yok kodu nereye eklemem gerektiğini söylerseniz sevinirim.

2 ay önce #
  • maviimge
    Üye

    Epey uğraştım ama yinede başaramadım :(

    Gravatar hariç wp 2.6 ile uyumlu önerebileceğiniz başka avatar eklentileri varsa yardımlarınızı beklerim tabi onlarıda yorumlara entegre etme konusunda şüphelerim var gibi :)

    2 ay önce #
  • BBuRaKK
    Üye

    Evet Avramtar eklentisi var,

    Avramtar v0.1.5
    Wordpress v2.5 ve 2.6 ile sorunsuz çalışıor.

    http://wordpress.org/extend/plugins/avramtar/

    Sadece yukarıdaki adresten download et ve ftp'ye yolalyıp etkinleştir.Yorumlarda kullanıcının www.avramtar.com dan eklediği avatarlar hemen gözükecektir.

    ------------------------

    Avatar yorumlarda otomatik olarak gözükmesse temanın comments.php (yorumlar) kısmına aşağıdaki siteye girerek 6. maddedeki kodu ekle:

    http://wordpress.org/extend/plugins/avramtar/faq/

    2 ay önce #
  • maviimge
    Üye

    Hocam teşekkürler yalnız ben avatarları kendi sunucumda barındırmak istiyorum başka bir sitenin aracılık yapmasını istemiyorum.

    2 ay önce #
  • BBuRaKK
    Üye

    Bir De Bunu Dene. Tıklayın

    hani diyorum ki cmd avatar kodunu da yukarıdaki konuda denilen yere yapıştırırsan belki düzgün görünebilir.

    2 ay önce #
  • invisibleseven
    Üye

    cmd avatar pluginin ben gayet rahat kullanıyorum. yorum kısmında yorumların yanında resmi göstermek istiyorsan iki tane div kullan float:left özelliği verirsen yanyana görünecektir. birinci div in içerisine cmdavatarın fonksiyonunu yazarsın ikincisine de yorum metninin kodunu.

    2 ay önce #
  • h-yaman
    Üye


    {
    clear: both;
    border-right: #687F92 1px solid;
    border-top: #687F92 1px solid;
    display: inline;
    float: left;
    margin: 5px;
    border-left: #687F92 1px solid;
    border-bottom: #687F92 1px solid;
    }

    Yaparak dener misiniz bir de?

    2 ay önce #

  • Bu konu için RSS beslemesi

    Cevapla

    Mesaj göndermek için giriş yapmalısınız.