<?php // Sidebar echo '<div id="my-sidebar">'; echo '<div id="my-profile-box">'; // Show avatar echo $wps_user->get_avatar(204); if ($wps_user->get_id() != $current_user->ID) { // Friends? if ($wps_user->is_friend()) { echo 'You are friends.<br />'; } else { // Pending friend? if ($wps_user->is_pending_friend()) { echo 'Friendship requested.'; echo $wps_ui->friendship_cancel($wps_user->get_id(), 'Cancel', 'Cancelled!', 'my-submit-button'); } else { // Not a friend echo 'Make friends with '.$wps_user->get_display_name().'...'; echo $wps_ui->friendship_add($wps_user->get_id(), "Type a message, hit return!", "Request sent.", "my-input-box"); } } // Poke(tm) button echo '<div style="margin-top:10px; margin-bottom:10px">'.$wps_ui->poke_button(get_option(WPS_OPTIONS_PREFIX.'_poke_label'), "my-submit-button").'</div>'; } // Show profile information if permitted to do so