vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Running additional scripts during registration (https://vborg.vbsupport.ru/showthread.php?t=263113)

ferdia 05-04-2011 02:50 PM

Running additional scripts during registration
 
Hello all. I'm currently building a site for a client and we have decided to use vBulletins user manager for the site at large. I have figured out how to do that, but I need to populate some other tables that the site at large will use during the registration (basically to allow users to access other features as soon as they register).

Where would be the best place to place a set of mysql INSERT commands in the registration script, baring in mind I will need vBul's username variable to associate the tables properly.

Thanks in advance,
Ferdia

Disasterpiece 05-06-2011 11:18 PM

you can check the registration php script and watch out for fetch_hook calls, because these are the hook locations you can add a plugin to.

First you follow the script code to the point where you have all the vars/information you need, then you look for the next available hook name.
Then navigate to the "add plugin" link in your admincp, enter the hook location and you can add your code using the local vars from the code where the hook gets called.

You can use the vbulletin database interface from $vbulletin->db. For information about the API, check the vbulletin api documentation or look for the classes_core.php file in includes dir.


All times are GMT. The time now is 06:00 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.02190 seconds
  • Memory Usage 1,703KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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