Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/16/2008 07:15:32 AM (17 years ago)
Author:
apeatling
Message:

Added information messages to profile widges when user has no friend connections or groups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-templatetags.php

    r343 r349  
    346346    <div class="info-group">
    347347        <h4><?php bp_my_or_name() ?> <?php _e('Friends') ?> (<?php echo BP_Friends_Friendship::total_friend_count() ?>)  <a href="<?php echo $bp['current_domain'] . $bp['friends']['slug'] ?>"><?php _e('See All') ?> &raquo;</a></h4>
    348         <ul class="horiz-gallery">
    349         <?php for ( $i = 0; $i < count( $friend_ids ); $i++ ) { ?>
    350             <li>
    351                 <a href="<?php echo bp_core_get_userurl( $friend_ids[$i] ) ?>"><?php echo bp_core_get_avatar( $friend_ids[$i], 1 ) ?></a>
    352                 <h5><?php echo bp_core_get_userlink($friend_ids[$i]) ?></h5>
    353             </li>
     348       
     349        <?php if ( $friend_ids ) { ?>
     350            <ul class="horiz-gallery">
     351            <?php for ( $i = 0; $i < count( $friend_ids ); $i++ ) { ?>
     352                <li>
     353                    <a href="<?php echo bp_core_get_userurl( $friend_ids[$i] ) ?>"><?php echo bp_core_get_avatar( $friend_ids[$i], 1 ) ?></a>
     354                    <h5><?php echo bp_core_get_userlink($friend_ids[$i]) ?></h5>
     355                </li>
     356            <?php } ?>
     357            </ul>
     358        <?php } else { ?>
     359            <div id="message" class="info">
     360                <p><?php bp_you_or_name() ?> <?php _e('added any friend connections yet.') ?></p>
     361            </div>
    354362        <?php } ?>
    355         </ul>
    356363        <div class="clear"></div>
    357364    </div>
Note: See TracChangeset for help on using the changeset viewer.