View Single Post
  #4  
Old 08-01-2014, 03:24 AM
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
Location: at Home...
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by webjocky View Post
If vB5 had adequate documentation for using the API instead of having to dig through the code, I (along with many many others) could probably accomplish anything I needed without having to post here.
Not sure what this has to do with me. I have access to EXACTLY the same information you do, and less motivation (I don't have a vb5 public forum running).

Quote:
Originally Posted by webjocky View Post
As I stated above, the data required for this is not in the database to begin with. There's a field (groupid) for it in the proper table (node), but the field is full of NULL values by default. If you're talking about something else, please elaborate.
It is in the database, just not the table you're looking for it in. It's in the user table.

Quote:
Originally Posted by webjocky View Post
I am making zero additional database calls per post. The hacks above works just fine for my purpose without such.
You asked for a different way, without manual file edits.

Quote:
Originally Posted by webjocky View Post
Your point here is not clear. How will additional database calls save manual file edits?
Build an API that looks up the user group based on the user id. Call it within the template. As far as I can see, those are your two options for using the user group ID within the template. (alternatively, you could assign the avatar to the user when they join the usergroup...)

But, this seems to be the way the new system was designed. Build an API to pull the data, grab the data for the template via an API call, and display.

The tags within the template for calling the API are the <vb:data> tags, if you want to look at them.

Quote:
Originally Posted by webjocky View Post
Obviously somebody at vBulletin Solutions thought this was a good idea at one point, otherwise why would the database field exist in the node table?
There are vestiges of 3 & 4 within 5. Likely, at one point, someone needed to denormalize whatever table that was in order to access the usergroup without needing to join the user table. That need probably doesn't exist within 5, but nobody removed the column.

Quote:
Originally Posted by webjocky View Post
I hope that clarifies what i'm trying to do, why I need to do it, and how I'm attempting to accomplish it. If there's a better way to accomplish what I'm trying to do, I'm all ears!
Like I said, I'm not sure it's better, just different. But, no manual file edits.
Reply With Quote
Благодарность от:
tbworld
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01179 seconds
  • Memory Usage 1,782KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_box_bit
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete