@Faranth:
Additionally, you say that $globaltemplates = array('main'); is for caching templates? How does this work? To me it appears as if you just declare a local array? The fetch_template function in functions.php does not reference any var named $globaltemplates. Could you possibly explain why you init this array in the page? And I'm still not getting the template :-( THANKS FOR BEING PATIENT WITH ME! :-) |
Some more troubleshooting steps it now appears as if the fetch_template does not return any content. It's empty... hmm... HELP!
|
Quote:
yes $globaltemplates cach's the template do you HAVE a template called main in the database? |
Faranth, my capitalized "help" was in no way ment to offend you in any way. It's just I was in such a despair...
Do I have a template called "main"... honestly, I don't know. Maybe. Is there any standard template, comming with the clean default vB3 RC2 install I could test instead? And: I understood that you were saying that the $globaltemplates array is done to cache templates but I don't know how it does so. Is there a GLOBAL variable named $globaltemplates in the vB system? I mean, if I put this statement at the top of my script, all it does is create an array with a single string value but how does this "instruct" vb to cache a template? |
lol thats most lily your problem you dont have another tempalte atm lol ^^
make a new template called main and add anything you like to it :) |
And one more question, Faranth (sorry, knowing that you're online is just too attractive.. :-) ):
Why do I have to use eval(...). Couldn't I just do a $output = fetch_template(...); echo $output; ? |
why two lines?
eval('print_output("' . fetch_template('main') . '");'); one simple line, plus this is how its done for all files in vb |
Hmm. I see. I might not have asked my question the right way. (I'm not a native English speaker. Sorry again.)
I was wondering why to use the eval() at all? Why not: echo fetch_template("FORUMHOME"); but instead: eval('echo "'.fetch_template(...).'");'); So my main question was: Why do we use eval here? Is it, because templates might contain php code, too? or vars? (Btw.: You were right with the "main" template. If I replace it with e.g. FORUMHOME, it works great.) I still do not understand how the declaration of the local variable $globaltemplates helps caching... |
ah yes, actually , if conditions are inlaid php :) all of the tempaltes are stored in php format to boot
|
If I slap your (longer) example into a blank .php page and use the shell_blank as my template (unchanged); I get an "object expected" error when the page tries to run this script:
Code:
<script type="text/javascript"> PHP Code:
|
All times are GMT. The time now is 11:24 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|