Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Friend request plugin
- * Extend the Elgg topbar with link to Friends request, if any
- *
- * @package friend_request
- * @author ColdTrick IT Solutions
- * @copyright Coldtrick IT Solutions 2009
- * @link http://www.coldtrick.com/
- * @version 2.0
- */
- if(isloggedin()){
- $user = get_loggedin_user();
- $count = elgg_get_entities_from_relationship(array(
- 'relationship'=>'friendrequest',
- 'relationship_guid' =>$user->guid,
- 'inverse_relationship'=>true
- );
- if(!empty($count)){
- echo "<a href='" . $CONFIG->wwwroot . "pg/friend_request' class='new_friendrequests' title='" . elgg_echo('friend_request:new') . "'>[" . $count . "]</a>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement