The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do I display vb Database information in a template?
I installed this side column mod onto my forum:'
https://vborg.vbsupport.ru/showthread.php?t=229496 Now I have a template called 'ss_rightcolumn_contents" where I can add content that I want to display in that column. I have been trying to display information from the "forum" table of the database but so far have been unsuccessful. Here is some of the code I tried putting in the template: PHP Code:
I'm looking for someone to help tell me what I need to do to be able to display forum information in the side column. Please let me know if you know the solution. I can also pay a small donation for helping me out with this! Thanks |
#2
|
||||
|
||||
Questions regarding modifications need to be asked in the modification thread.
One thing to help.... look at the other templates used on that page and see what variables are used there. Or, look at the php page being called and see what variables are being used there. |
#3
|
|||
|
|||
Thanks Lynne :-)
Generally speaking though, regardless of this particular mod, how can I extract information from vb tables to display in any template? |
#4
|
||||
|
||||
First you would need to query the database to get the information, then assign the results to a variable and then use the variable in the template, usually like {vb:raw array.name}
|
#5
|
|||
|
|||
Quote:
So I'd need to create a plugin with the php query and variable declaration? |
#6
|
||||
|
||||
Yes, if the query has not already been made. There are also hooks you can use to 'plugin' to existing queries if you just need to add a couple of fields to a query.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|