vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   vBulletin API question (https://vborg.vbsupport.ru/showthread.php?t=290914)

pjclas 11-17-2012 06:08 PM

vBulletin API question
 
So honestly, I have no idea if this has been asked... I've done a lot of searching and have not been able to find my answers so I apologize in advance if this has been answered before.

I've been trying to interact with vBulletin for my site and the only supported external API I've found is the DataManager. That works well for what it is, but it doesn't provide all the things I need.

For instance, I need a way to find out what child forums a category has. I realize I can do this using the $vbulletin->forumcache global, but for me that seems like bad programming. I would like to be able to call an API that will remain supported from version to version that returns children of some forum id. There are functions in the vBulletin API like fetch_child_forums, but this has major side effects. It adds each subsequent query to the forumcache variable and returns that. In other words, if you call this in a loop for multiple forums, you constantly get back the data from all the prior calls.

I thought vBulletin was designed with the potential to be highly integrated with an existing site, but it seems that it's very challenging to do this properly. I don't like having to know details about the format of the vb database and such... I recently converted from SMF, and they provided lots of APIs that made all this easy.

I have to assume I'm just missing something here, right? Any help would be appreciated. I'm making this all work with my site, but I'm not sure I'm doing it right...

kh99 11-17-2012 06:26 PM

Quote:

Originally Posted by pjclas (Post 2381987)
I thought vBulletin was designed with the potential to be highly integrated with an existing site, ...

Yeah, I'm not sure that's true, at least with vb3 or 4. I can't say that nothing like you want exists anywhere as a mod or external product, but the vbulletin code itself doesn't really have an api that was meant to do what you're talking about. There is documentation of an API here: https://members.vbulletin.com/api/, but as youve noticed it doesn't have an interface for everything. I think the data managers are (for some reason) meant only for writing, which is obviously nice since you don't have to understand everything that needs to be done, but when it comes to reading the information you want, it seems like you're on your own unless there happens to be an existing function.

pjclas 11-17-2012 06:33 PM

Thanks for the response. This was the same conclusion I came to, I just figured I'd ask around to see if I was missing something.


All times are GMT. The time now is 05:36 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.00936 seconds
  • Memory Usage 1,718KB
  • 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
  • (3)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