Log in

View Full Version : Output of variables from inside templates .. how? (not vBulletin related)


Davey
11-30-2004, 07:20 PM
I devised a script to use custom templates for a project I am working on (file driven, not database driven) without using vBulletin. (as vBulletin's user system is a bit too complex for me to do what I had in mind)
I stumbled across a problem for which I cannot seem to find a solution.

When I grab the template from the file, it works fine. It stores the template and everything, brilliant. However, when I try to print the index template (with the variables in the HTML) it only prints $varname, not the actual data stored inside.

Does anyone have a solution as to get around this problem?

Code attached.

(please bear in mind the script is in a very early code stage, its not meant for use yet)

--I had to rename page.css to page.css.txt to upload it. Disregard the <link> being to the wrong file.

Davey
11-30-2004, 07:23 PM
And the result...

rake
11-30-2004, 07:52 PM
i haven't looked through your code, but, have you used eval? Or, ever wonder why the vbulletin developers are evaluating the templates?

Davey
11-30-2004, 09:12 PM
Then you should look at the code in index.php and the functions in functions.php

edit- Yes I have used eval() but I'm not sure if I should have used it another way. I think this may be a problem with the do_output() function.