Quote:
Originally Posted by webjocky
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
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
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
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
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
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.