The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Making a Custom Template (vba/vb)
So I've been learning how the template engine works and the more I mess with it the more I love it (1000000x more than phpBB). I've been messing around with vba's custom modules but I've having some problems.
The module I'm making basically queries my mysql database and retrieves a listing of items (for a MMORPG), and then displays it. Here is the weapon.php file: PHP Code:
HTML Code:
<tr> <td>$weapon[weapon_name]</td> <td>$weapon[patk]</td> <td>$weapon[matk]</td> <td>$weapon[item_grade]</td> <td>$weapon[attack_speed]</td> <td>$weapon[crystal_value]</td> </tr> I'm not quite sure what to put in the while() loop in the php file to make this work. Any help is appreciated, thanks! ^^ |
#2
|
|||
|
|||
I don't know, but maybe something like:
PHP Code:
|
#3
|
|||
|
|||
well that "semi" works. When I try that, it only grabs the very last weapon that was pulled.
I think I'm missing something with arrays in templates. *edit* grrr didn't notice the concat, yes that works, thanks ^^ |
#4
|
|||
|
|||
Ever single dot is needed.
|
#5
|
|||
|
|||
Thanks for posting this !
Very useful and great time-saver to see how someone goes from [total newbie] to the first example of something working. I'm completely in awe of how elegantly and cleanly vBulletin developers separated out logic from presentation using PHP vs templates. Stachel |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|