The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I was just wondering I have all of these arrays such as $user[name]; Now what my problem is I have a repeating loop that gets a few templates that I store in the database. Don't ask why I just want them their for what I'm trying to learn. My problem is whenever I loop and echo, some of those templates will call upon stuff like $user[name] and it should output a text of like Joe for example... instead it only ouputs the actual text of $user[name].
Hopefully I'm not confusing anyone, but is there a way that if you define something in a file and then run a query if the query has any information on the echo statement of whats stored inside such as an array or variable that on the output it would display what it has been defined too? |
#2
|
||||
|
||||
![]()
You muste evaluate templates to get the variables in:
PHP Code:
|
#3
|
|||
|
|||
![]()
Look at the code at the top of every vB file, see a pattern? Especially this...
PHP Code:
yeah, and what he said too. |
#4
|
||||
|
||||
![]()
So lets say I had something like this...
PHP Code:
|
#5
|
||||
|
||||
![]() PHP Code:
|
#6
|
||||
|
||||
![]()
There's a few problems that arise when I do that... It now retrieves the data but at the same time when it does, it now won't let me do like set widths for tables or to be able to call upon any CSS such as the class = to whatever and so forth... Any ways around that one?
|
#7
|
||||
|
||||
![]()
Hmm ...
PHP Code:
HTML Code:
<table width="100%" class="mytable"><tr><td>Foo Bar</td></tr></table> |
#8
|
||||
|
||||
![]()
I've triple checked this and something is definately wrong with this... This is my entire php code for anything retaining towards the templates.
PHP Code:
|
#9
|
||||
|
||||
![]()
The code seems to be OK.
Can you post a template that does not work? |
#10
|
||||
|
||||
![]() PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|