The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I know I can extend the user table with more fields and then access them via $userinfo[fieldname] in templates/plugins without having to perform additional queries - can I do the same with the thread table? If so would this be available in all plugins and do I access the data via $thread[fieldname]?
Many thanks! |
#2
|
|||
|
|||
![]()
You go to:
User Profile Fields > Add New Profile Field to add another, it can be called by $post variable. It is also stored in the $userinfo variable but is not parsed inside templates, although it can be accessed inside plugins by using the vbulletin class $vbulletin->userinfo['tablename']. The $thread array isn't stored globally, so adding fields to it won't include their contents globally. |
#3
|
||||
|
||||
![]()
Yes, you can do the same with the thread table. It will be available if the select query calls it explicitly or via thread.* . If only a select few of the thread fields are called in the query, it won't be available unless you add it to the query. If you are wanting the field to be saved via the datamanager, you also need to add it to the array in the thread datamanager (and, of course, add the field to the info to be saved when the datamanager is called).
|
#4
|
|||
|
|||
![]()
Found it - to access the data in this field in forumdisplay and show in threadbit, I needed to add a plugin on 'forumdisplay_query'
Code:
$hook_query_fields .= ',thread.fieldname AS fieldname'; |
#5
|
||||
|
||||
![]()
"Sounds about right"
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|