Quote:
Originally Posted by Kyttias
Ah, what if I just wanted the number of pending friend requests, but not a list of names? Is that simpler? (Is exploding supposed to sound dangerous, because it does.) I'll take a closer look in a few minutes, but I really can't thank you enough for all this help. ovo~
I could probably make a tooltip with a fun combination of Smarty conditionals and Javascript, that if the 'pending requests' are 'greater than 0', hovering over the notification would pull down a notification with, if I knew how to get this information, the pending friend(s) names and links to confirm or deny them without the need to travel to a new page. But that sounds more ambitious than I want to trouble myself with for tonight.
On a similar vein, if the messages in the inbox were 'greater than zero', to hover over the number and show some basic information, like the message titles (wherein clicking a specific title would take you to that specific message as well) and the senders, of about the first three messages, sort of like you had originally given.
I'll probably accumulate the things I've learned here into a nice convenient post for others eventually. My intention is, of course, to give people a way to easily install something like this, to go under a header image of their choosing:
|
Number of pending friend requests should be similar to the PM number:
$req = $mysidia->db->select("friend_requests", array(), "touser='{$mysidia->user->username}' and status='pending'")->rowCount();
$this->assign("req",$req);
I think, untested though!
The rest I can help out with whatever you need later tomorrow. I managed to do the message one on my test site the way I showed you, but not javascript, ending up like this: