The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom query in postbit
Hey guys in my vb database i have a custom table that contains information about our users. We run a couple game servers and in that table we have the stats of our members.
my question is how do i add some of this info into the postbit? The info can be linked through a custom profile field. so let say the custom table is called stats Select * from stats where playername='$post[fieldXX]'; where would i put the query? how do i display this only if the member has the custom profile field filled in? thanks in advance .. |
#2
|
||||
|
||||
|
#3
|
|||
|
|||
I know how to display a custom field, that one is easy.... showing info from a custom table i am not sure about.... thanx though
|
#4
|
||||
|
||||
I'm not sure I completely understand. Are you looking for the stats info for the user who's post you are seeing? If so, I'm not sure you mean playername='$post[fieldXX]', but instead playername='$post[username]', right? If so, then I think you can hook into the $posts query to grab that info. You'd have to ask for the columns you want (I wouldn't suggest doing stats.*, but instead exactly which fields you want) and also do a JOIN.
|
#5
|
|||
|
|||
i do mean playername='$post[fieldXX]' < that contains the name of the player in the game, but yes i do want to show the stats of the person that posted...
the custom table does not contain the users name on the forum, just his playername how do i hook into the post query? |
#6
|
||||
|
||||
If you want to hook into the $posts query, then I think you would use the hook location 'showthread_query'. I'm not great at joins (the different types still confuse me), so I can't help with that part.
|
#7
|
||||
|
||||
Most of the time, a left [outer] join will fit the bill.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|