View Full Version : Is there a hook for accepted friends?
mihai11
06-15-2011, 09:00 AM
Hello,
If a user accepts a friendship request is there a hook for this action?
Thank you!
al3bed
06-15-2011, 09:41 AM
I guess this goes through Ajax. the nearest hook is profile_contactlist_listtype but it's not what you want... what are you trying to do anyway?
mihai11
06-15-2011, 09:44 AM
When a friendship relation is created between 2 users (they must both accept) then I will award them some points.
This is why I need to know when they have both accepted.
cellarius
06-16-2011, 10:49 AM
Wouldn't you have to do that via database records anyways, including keeping some kind of track, since it would be a great way to gain points by just befriending/unfriending all day long?
mihai11
06-16-2011, 11:48 AM
Wouldn't you have to do that via database records anyways, including keeping some kind of track, since it would be a great way to gain points by just befriending/unfriending all day long?
Thank you for taking a look at this, but your point doesn't help me. I already took care of that issue: a friend relation is retained for 3 months => if you make the same friend again in these 3 months you will not win any credits.
Now I need to know when 2 people become friends - that's it, nothing more, nothing less. I will take care of ALL other details whatever they may be.
cellarius
06-16-2011, 12:12 PM
Well, if there's no hook, there's no hook. You always can just go through the database once a day/once per hour/whatever and check who's friend with whom. I know, that does not answer your question yet again. Or you can go through the code and find a suitable spot and request a hook.
mihai11
06-16-2011, 02:22 PM
Well, if there's no hook, there's no hook. You always can just go through the database once a day/once per hour/whatever and check who's friend with whom. I know, that does not answer your question yet again. Or you can go through the code and find a suitable spot and request a hook.
I agree with you: I am scanning the table userlist once per minute.
About requesting a hook - I already requested a hook (for some other issue) 2 months ago. Since then 2 minor VB versions were out without the new hook.
Looks like asking for something is just lost time.
Paul M
06-16-2011, 03:51 PM
About requesting a hook - I already requested a hook (for some other issue) 2 months ago. Since then 2 minor VB versions were out without the new hook.
Asking for something doesnt mean it will appear in the next release. Different releases focus on different things. Im only just adding one or two hooks in to 4.1.5 that were requested last year. If the request is in Jira, it will get looked at at some point. However, thats not a promise it will be added.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.