The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Source of vb:raw
Under which files are the raw scripts being called from?
For example {vb:raw post.username} <- because I would like to see it's query for pulling the username. I am attempting to add a custom vb query and I do not want to put it directly on the template page. Thank you in advance. |
#2
|
|||
|
|||
post.username basically means $post['username'];
If you're looking to modify the post array, you have to look into showthread.php line 1484 to 1651. showthread_postbit_create is the hook in the loop which iterates through the posts. |
Благодарность от: | ||
tbworld |
#3
|
||||
|
||||
That would likely be populated in global.php You'd have to be a lot more specific about what you want to change or how you want to change it, or even where it comes from, if you need help.
If you told us what you were trying to do, we might be able to help more. |
Благодарность от: | ||
tbworld |
#4
|
|||
|
|||
I'm trying to query a table in the same DB and post the info in the thread's postbit legacy
|
#5
|
|||
|
|||
Do you need to query the DB in the loop which iterates through the posts or do you need to query the DB before the loop? Else just use the hook like I said in my previous post.
|
#6
|
|||
|
|||
In file showthread.php, search for 'showthread_query' (it's there twice but you can look at either one). That hook location is called right before the query, and you can set variables $hook_query_fields and $hook_query_joins to add fields (and join tables if necessary) to the post query.
For example, if there was an added table called more_userinfo in the database and I wanted to use all fields from it in postbit, I might use this plugin code: Code:
$hook_query_fields .= ', more_userinfo.* '; $hook_query_joins .= ' LEFT JOIN more_userinfo ON (more_userinfo.userid = user.userid) '; |
#7
|
|||
|
|||
Quote:
That's exactly what I was looking for, thank you --------------- Added [DATE]1404923672[/DATE] at [TIME]1404923672[/TIME] --------------- @kh99, I did exactly what you suggested and it worked like a charm. Thank you again for your reply, I can now continue my projects |
Благодарность от: | ||
kh99 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|