<?php
global $user;
$uid = $user->uid;
$app = 0;
$friend_req = db_result(db_query("SELECT COUNT(*) AS counts FROM {user_relationships} ur WHERE ur.requestee_id = %d AND ur.approved = %d", $uid, $app));
$message = privatemsg_unread_count();
$links = array();
if($friend_req >= 1){
$links[] = array(
'title' => format_plural($friend_req, t('1 Friendship request'), t('@count Friendship requests')),
'href' => 'relationships/requests',
'attributes' => array('class' => 'friend-requests'),
);
}
if($message >= 1){
$message_count = format_plural($message, t('1 New message'), t('@count New messages'));
$links[] = array(
'title' => format_plural($message, t('1 New message'), t('@count New messages')),
'href' => 'messages',
'attributes' => array('class' => 'messages'),
);
}
if($links){
print theme('links', $links);
}
?>
Thursday, August 19, 2010
Example of theme links option #2
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment