Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-17-2012, 06:08 PM
pjclas pjclas is offline
 
Join Date: Aug 2012
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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...
Reply With Quote
  #2  
Old 11-17-2012, 06:26 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pjclas View Post
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.
Reply With Quote
  #3  
Old 11-17-2012, 06:33 PM
pjclas pjclas is offline
 
Join Date: Aug 2012
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03692 seconds
  • Memory Usage 2,175KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete