vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Is there a hook for accepted friends? (https://vborg.vbsupport.ru/showthread.php?t=265238)

mihai11 06-15-2011 09:00 AM

Is there a hook for accepted friends?
 
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

Quote:

Originally Posted by cellarius (Post 2208429)
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

Quote:

Originally Posted by cellarius (Post 2208464)
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

Quote:

Originally Posted by mihai11 (Post 2208527)
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.


All times are GMT. The time now is 01:01 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01189 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete