Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #16  
Old 18 Nov 2009, 04:22
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Lynne, so how would we call multiple templates for the same custom page and it actually work?
Reply With Quote
  #17  
Old 18 Nov 2009, 04:33
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You would do it as before, only use the new syntax. So, something like this:

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

You would use {vb:var foo} and {vb:var bar} in your first_template to insert the variables $foo and $bar and then you would use {vb:var my_variable} in the TEST template to insert the output from $my_variable.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #18  
Old 18 Nov 2009, 04:37
Mythotical Mythotical is offline
 
Join Date: Jun 2004
EDIT: I'm a fruitcake, damn pain pill is kicking my butt right now.


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

Missing that from my print_output area.

Thanks tho, at least I understand now.

--------------- Added 18 Nov 2009 at 04:52 ---------------

Ok next question, I am reusing the same variable for different pages so I am not having a cluster of different variables within conditional statements. Right now it seems that is confusing me or its the meds, either way is it safe to say I can keep doing that or should I change it?


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

That var is what I am reusing for each page load of do=cat or do=file, etc. Do I need to change it to print_output or what?

Last edited by Mythotical; 18 Nov 2009 at 04:52. Reason: Auto-Merged DoublePost
Reply With Quote
  #19  
Old 18 Nov 2009, 16:51
LoveStream LoveStream is offline
 
Join Date: Jan 2009
Thank your tutor.
I had met following error, when I using this template page, there is a cookie sent already.

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

I create scripts as phoenixjournals.php, but it occur if I logout.

How could I solve it? or what deos it mean in this case?

I hope your teaching. Thanks.
Reply With Quote
  #20  
Old 18 Nov 2009, 17:16
ragtek's Avatar
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Be sure that there's nothing before <?php
__________________
my addons: http://ragtek.github.com
Reply With Quote
  #21  
Old 18 Nov 2009, 18:58
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Steve M View Post
Ok next question, I am reusing the same variable for different pages so I am not having a cluster of different variables within conditional statements. Right now it seems that is confusing me or its the meds, either way is it safe to say I can keep doing that or should I change it?


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

That var is what I am reusing for each page load of do=cat or do=file, etc. Do I need to change it to print_output or what?
You should be able to use the same variable name on different pages - vb does that alot.

If you are wanting to register that variable on each page for use in the template, you need to put that line inbetween the $templater = vB_Template::create('whatever_template') and the $templater->render() lines.

edit: Or actually, you may be able to just preregister it at the top of you page for the template. See the article I link to in my first post to find out about preregistering variables.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #22  
Old 18 Nov 2009, 19:06
cory_booth cory_booth is offline
 
Join Date: Jul 2006
Smile

Replace the line:
require_one ./gobal

With:

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

Will allow you to put the php files anywhere on the site (i.e. mydomain.com/pages/)
Reply With Quote
  #23  
Old 19 Nov 2009, 02:02
LoveStream LoveStream is offline
 
Join Date: Jan 2009
Originally Posted by ragtek View Post
Be sure that there's nothing before <?php
Yes, I double checked it but it still remains. I suspect that affected by server programs. When I logged there is no problem. It is only just for guest than member logged.

I create new my.php file. and do define this scripts refer to template files.

Regards.

--------------- Added 19 Nov 2009 at 02:04 ---------------

Originally Posted by cory_booth View Post
Replace the line:
require_one ./gobal

With:

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

Will allow you to put the php files anywhere on the site (i.e. mydomain.com/pages/)
Thanks. I do put it the same path with vB. When I trial as logged it's run very well.

Last edited by LoveStream; 19 Nov 2009 at 02:04. Reason: Auto-Merged DoublePost
Reply With Quote
  #24  
Old 19 Nov 2009, 02:10
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by cory_booth View Post
Replace the line:
require_one ./gobal

With:

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

Will allow you to put the php files anywhere on the site (i.e. mydomain.com/pages/)
Actually, if you chdir, you don't want to then put the whole path to the global.php file. You would just go:

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

__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #25  
Old 19 Nov 2009, 03:52
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Originally Posted by Lynne View Post
You should be able to use the same variable name on different pages - vb does that alot.

If you are wanting to register that variable on each page for use in the template, you need to put that line inbetween the $templater = vB_Template::create('whatever_template') and the $templater->render() lines.

edit: Or actually, you may be able to just preregister it at the top of you page for the template. See the article I link to in my first post to find out about preregistering variables.
Good point, I will look into doing that tomorrow. Need sleep first.
Reply With Quote
  #26  
Old 19 Nov 2009, 10:14
ragtek's Avatar
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
What's with
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Do we need it?
Some files in vB4 have it^^
__________________
my addons: http://ragtek.github.com
Reply With Quote
  #27  
Old 19 Nov 2009, 14:41
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You may need to add those lines depending on what you do in your code. But, every page doesn't need those lines. I *think*, but I'm not positive, that if you have hooks in your page, you will want to include those lines. But, since usually there aren't any hooks added into a custom page, then those lines aren't needed.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #28  
Old 21 Nov 2009, 13:14
EidolonAH EidolonAH is offline
 
Join Date: May 2009
Real name: Eidolon
Brilliant, thank you Lynne.
Reply With Quote
  #29  
Old 21 Nov 2009, 17:05
Anseur's Avatar
Anseur Anseur is offline
 
Join Date: Jun 2004
I've set this up on my test site, and it works OK while i'm logged in, but when I'm not logged in, and I visit this custom page, I just get a plain white screen.

looking at a source of this plain white pages shows me:

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

Here is the code currently used in the template for this custom .php page:


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

Reply With Quote
  #30  
Old 21 Nov 2009, 17:34
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Anseur View Post
I've set this up on my test site, and it works OK while i'm logged in, but when I'm not logged in, and I visit this custom page, I just get a plain white screen.

looking at a source of this plain white pages shows me:
[code]
<!-- BEGIN TEMPLATE: dkp_template -->

<!-- END TEMPLATE: dkp_template -->
What is in your error_logs? (If you don't know where they are, ask your host.) What is in your php page that you created?
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
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
Forum Jump


New To Site? Need Help?

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

Layout Options | Width: Wide Color: