Posted by DarkLight on June 10, 2009 at 5:54pm
Hey guys.
The title pretty much says everything. I cannot find a way of writing a notification snippet which will display a message to users when they have pending friend requests to approve. I would like it to say "Friends: (2 new)" but nomatter what I write, it simply doesn't work. After just under a week of trying, I have come to these forums to request some guidance.
Thanks for any help you can give.
Comments
Hi! My solution looks
Hi!
My solution looks something like this:
$requests = db_result(db_query("SELECT COUNT(DISTINCT(users.uid)) AS c
FROM users users
INNER JOIN flag_content flag_content_users ON users.uid = flag_content_users.uid AND flag_content_users.fid = 2
WHERE flag_content_users.content_id = ".$user->uid
));
Ahh, thanks for your reply. I
Ahh, thanks for your reply. I shall try this out right now. Cheerz man I appreciate this.
SongZilla!
Just made a really cool little application here. Take a look. Feel free to punch me if you don't like it xD
Working with this code made
Working with this code made me re-focus on what I originally wanted it for, a Notification system. While I was tinkering about I found a much easier and much more efficient way of acheiving what I wanted. I used Views and used a few arguments and a relationship, now I have everything I need.
In a way you helped me acheive this by bringing me back onto the subject of Flag Friend, so I thank you very much. I'm sure this code would have worked by I found what I needed using Views (which I am in love with) so I'll use that instead.
Thanks again ;)
SongZilla!
Just made a really cool little application here. Take a look. Feel free to punch me if you don't like it xD
Dark-light could You tell me
Dark-light could You tell me how You did this?
Yeah how did you do that?
Yeah how did you do that?
www.fitnessprogress.net - Track your health and fitness for free.
www.advancedwebvision.com - Drupal Services
Hey. Sorry I cannot remember.
Hey. Sorry I cannot remember. I did this a year ago, and I now use the User Relationships module. Try playing around with Views :)
SongZilla!
Just made a really cool little application here. Take a look. Feel free to punch me if you don't like it xD