vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   I want VB to run a query when I delete a User (https://vborg.vbsupport.ru/showthread.php?t=143107)

upirate 03-25-2007 01:28 PM

I want VB to run a query when I delete a User
 
where can I put such a query ?

thankyou

calorie 03-25-2007 01:58 PM

Try hooks...
Code:

useradmin_prune
userdata_delete


upirate 03-25-2007 02:09 PM

calorie,
thanks soooooo much for replying.

Im new to VB. How do I get about playing with hooks ?

thanks again

calorie 03-25-2007 02:32 PM

Take a read through the following to get a sense of how it works, and then find the hooks in the vB code to see what is available to you for use in your plugins:That is, if you want to run a query in a plugin located at hook X, you need to know what is available, what to use, and what to avoid:
Code:

// Example...

$db
$vbulletin->db
$this->dbobject
$this->registry->db


upirate 03-25-2007 03:00 PM

thanks calaorie. youre awesome!

so

useradmin_prune
userdata_delete

are hooks thata re already in VB ?

I understand userdata_delete. what is useradmin_prune ?

calorie 03-25-2007 03:15 PM

The useradmin_prune hook is in the /admincp/user.php file.

upirate 03-25-2007 03:30 PM

I see!

Is there a place with a list of hooks and their location documented somewhere ? I tried a search on forums but no luck.

calorie 03-25-2007 03:34 PM

The /includes/xml/hooks_vbulletin.xml file contains a hook list with location hint.

upirate 03-25-2007 09:52 PM

cool thanks a lot.

I think it makes most sense to use the useradmin_prune hook


All times are GMT. The time now is 09:25 PM.

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.01149 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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