• 10-02-2015, 05:08:18
    #1
    Üyeliği durduruldu
    buddypresste mesaj sayısı gösterme kodu gerekiyor yardımcı olabilirmisiniz
  • 10-02-2015, 16:03:03
    #2
    <li><a href="<?php echo bp_loggedin_user_domain() ?><?php echo BP_MESSAGES_SLUG ?>">Inbox (<?php echo messages_get_unread_count(); ?>)</a></li>
  • 10-02-2015, 20:18:03
    #3
    Üyeliği durduruldu
    Ceu adlı üyeden alıntı: mesajı görüntüle
    <li><a href="<?php echo bp_loggedin_user_domain() ?><?php echo BP_MESSAGES_SLUG ?>">Inbox (<?php echo messages_get_unread_count(); ?>)</a></li>
    Ne kadar teşekkür etsem azdır messages kısmını değiştirerek aynısını bildirimler içinde yapabilirmiyim

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 20:18:03 -->-> Daha önceki mesaj 20:15:00 --

    Ceu adlı üyeden alıntı: mesajı görüntüle
    <li><a href="<?php echo bp_loggedin_user_domain() ?><?php echo BP_MESSAGES_SLUG ?>">Inbox (<?php echo messages_get_unread_count(); ?>)</a></li>
    hocam kod işe yaradı siz bir dahisiniz aynısını bildirimler içinde yapacağım ama bildirimlere link vermek yerine anasayfada açılır pencere içinde göstermek istiyorum kişinin bildirimlerini göstermek için açılır pencereye hangi kodu eklemeliyim hocam
  • 10-02-2015, 23:33:29
    #4
    function my_bp_adminbar_notifications_menu() {
    global $bp;

    if ( !is_user_logged_in() )
    return false;

    echo '<li id="top-notification">';
    _e( 'Alerts', 'buddypress' );

    if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
    <span><?php echo count( $notifications ) ?></span>
    <?php
    }

    echo '</a>';
    echo '<ul>';

    if ( $notifications ) {
    $counter = 0;
    for ( $i = 0; $i < count($notifications); $i++ ) {
    $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>

    <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>

    <?php $counter++;
    }
    } else { ?>

    <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'You have no new alerts.', 'buddypress' ); ?></a></li>

    <?php
    }

    echo '</ul>';
    echo '</li>';
    }

    Yukarıdaki fonksiyonu <?php my_bp_adminbar_notifications_menu()?> ile çağırıp dene bakalım.
  • 10-02-2015, 23:52:12
    #5
    Üyeliği durduruldu
    Ceu adlı üyeden alıntı: mesajı görüntüle
    function my_bp_adminbar_notifications_menu() {
    global $bp;

    if ( !is_user_logged_in() )
    return false;

    echo '<li id="top-notification">';
    _e( 'Alerts', 'buddypress' );

    if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
    <span><?php echo count( $notifications ) ?></span>
    <?php
    }

    echo '</a>';
    echo '<ul>';

    if ( $notifications ) {
    $counter = 0;
    for ( $i = 0; $i < count($notifications); $i++ ) {
    $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>

    <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>

    <?php $counter++;
    }
    } else { ?>

    <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'You have no new alerts.', 'buddypress' ); ?></a></li>

    <?php
    }

    echo '</ul>';
    echo '</li>';
    }

    Yukarıdaki fonksiyonu <?php my_bp_adminbar_notifications_menu()?> ile çağırıp dene bakalım.
    hata aldım hocam