vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Adding information to the display of user names (pulling from DB) (https://vborg.vbsupport.ru/showthread.php?t=249545)

sapphiremagus 08-29-2010 03:51 PM

Adding information to the display of user names (pulling from DB)
 
I'm trying to avoid using the custom fields provided by VB because ultimately this will be used in a custom plugin for my site.

Basically, I'd like to know the best way to pull data from a table (say, vb_user) and add it to the display of the user name in places like postbit and postbit_legacy.

Ostensibly I could just use PHP to pull it brute force, but I figure there's a nicer way to do it in VB.


Thanks in advance :)

Lynne 08-29-2010 05:39 PM

You'll need to use the query_hooks like fetch_postinfo_query and showthread_query. Just look in the php page your are wanting to show info in and find the query and the query_hook should be right above it. Add your query fields and any tables to join to that plugin.

sapphiremagus 08-31-2010 07:40 PM

I don't suppose the API is documented anywhere? It'd be a lot easier to start learning to develop for vB if you didn't have to dig for information on what functions and objects do what and where, heh.

Lynne 09-01-2010 12:06 AM

API is listed right under Quick Links - vBulletin API

sapphiremagus 09-01-2010 02:15 AM

Quote:

Originally Posted by Lynne (Post 2092225)
API is listed right under Quick Links - vBulletin API

*SMACK SELF* Wow, very sorry for that. I actually did a whole bunch of searching here and on Google ... but never looked at the quick links. Thanks Lynne, again :)


All times are GMT. The time now is 08:23 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.01095 seconds
  • Memory Usage 1,713KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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