The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom PHP Page Dynamic Data to template?
Ok so a small issue, I've read up all about creating custom pages within vbulletin 4, however a small issue remains.
What I want to do: Read from a database a bunch of values and generate a table from it. The issue: I know how to pass static data in $vars over to the template to display but, there has to be a better way right to display my generated table. I'm doing a mysql_fetch and adding the whole <tr> string to another string for each value. so I then add <table> the actual content of my table and then the </table> string together, register it, pass it to the template and try to display it. As you can imagine it seems to be causing quite a few issues, where the table gets skewed e.t.c Is there a better way to be doing this? If so how? Best Regards |
#2
|
|||
|
|||
I think what you want to do is to build an array from your query results, register the array to your main template, then use {vb:each} in the template to format it. Here's the manual page for vb:each (at the bottom of the page): https://www.vbulletin.com/docs/html/...mplates_syntax
|
Благодарность от: | ||
blackracoon |
#3
|
|||
|
|||
Godlike help! Thank you!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|