Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #16  
Old 10 Jan 2004, 07:22
Brad Brad is offline
 
Join Date: Nov 2001
Hi, I notcied one error with the action templates call. It should be:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #17  
Old 10 Jan 2004, 07:23
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
whatchu talkin about foo :P
__________________
Looking for ImpEx?
Reply With Quote
  #18  
Old 10 Jan 2004, 08:32
Mr. HillBilly Mr. HillBilly is offline
 
Join Date: Oct 2003
Thanks much for the guide!

I made a page, first time I've ever done it.

http://ph33rnet.com/uc.php
Reply With Quote
  #19  
Old 11 Jan 2004, 21:49
rrottman rrottman is offline
 
Join Date: Jun 2002
Faranth, any hint:
I copied the first code block (the very easy one :-) ) and tried it: Nothing gets displayed. Any hint?
Reply With Quote
  #20  
Old 11 Jan 2004, 21:52
rrottman rrottman is offline
 
Join Date: Jun 2002
I created a new, empty file. This is all and exactly what's in there:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It's saved as index.php in the website root, while vB sits in /forum.
If I open http://www.mydomain.com in a browser, this is what I receive:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Any idea?
For troubleshooting I replaced the print_output with:

echo fetch_template('main');

and received an empty string, too.

Please help.
Reply With Quote
  #21  
Old 11 Jan 2004, 22:00
rrottman rrottman is offline
 
Join Date: Jun 2002
@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! :-)
Reply With Quote
  #22  
Old 11 Jan 2004, 22:03
rrottman rrottman is offline
 
Join Date: Jun 2002
Some more troubleshooting steps it now appears as if the fetch_template does not return any content. It's empty... hmm... HELP!
Reply With Quote
  #23  
Old 11 Jan 2004, 22:14
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
Originally Posted by rrottman
Some more troubleshooting steps it now appears as if the fetch_template does not return any content. It's empty... hmm... HELP!
sorry ive been working on stuff, you can wait more than 3 min for a nother post too ;D

yes $globaltemplates cach's the template

do you HAVE a template called main in the database?
__________________
Looking for ImpEx?
Reply With Quote
  #24  
Old 11 Jan 2004, 22:22
rrottman rrottman is offline
 
Join Date: Jun 2002
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?
Reply With Quote
  #25  
Old 11 Jan 2004, 22:25
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
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
__________________
Looking for ImpEx?
Reply With Quote
  #26  
Old 11 Jan 2004, 22:29
rrottman rrottman is offline
 
Join Date: Jun 2002
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;

?
Reply With Quote
  #27  
Old 11 Jan 2004, 22:31
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
why two lines?

eval('print_output("' . fetch_template('main') . '");');

one simple line, plus this is how its done for all files in vb
__________________
Looking for ImpEx?
Reply With Quote
  #28  
Old 11 Jan 2004, 22:34
rrottman rrottman is offline
 
Join Date: Jun 2002
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...
Reply With Quote
  #29  
Old 11 Jan 2004, 22:35
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
ah yes, actually , if conditions are inlaid php all of the tempaltes are stored in php format to boot
__________________
Looking for ImpEx?
Reply With Quote
  #30  
Old 12 Jan 2004, 22:35
VodkaFish VodkaFish is offline
 
Join Date: Oct 2003
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:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

* The page I wrote was in a different directory, so I used this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 08:14.

Layout Options | Width: Wide Color: