Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #436  
Old 18 Dec 2010, 11:21
stevectaylor stevectaylor is offline
 
Join Date: Aug 2007
would this still work in a sub-folder?

--------------- Added 18 Dec 2010 at 12:34 ---------------

I'm struggling here on a test page; Why wont it allow the 'php include' function to show.

<div class="blockbody">
<div class="blockrow">
Testing this page for php input. <?php include("offers/choice_ad1.php"); ?>
</div>
</div>

Last edited by stevectaylor; 18 Dec 2010 at 12:34. Reason: Auto-Merged DoublePost
Reply With Quote
  #437  
Old 18 Dec 2010, 18:20
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by stevectaylor View Post
would this still work in a sub-folder?

--------------- Added 18 Dec 2010 at 04:34 ---------------

I'm struggling here on a test page; Why wont it allow the 'php include' function to show.

<div class="blockbody">
<div class="blockrow">
Testing this page for php input. <?php include("offers/choice_ad1.php"); ?>
</div>
</div>
You cannot put php in the template. PHP goes into the php file, and html goes into the template.
__________________
Former vBulletin.org Staff Member

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
  #438  
Old 18 Dec 2010, 23:09
CroNiX CroNiX is offline
 
Join Date: Dec 2010
First, thank you for this. I learned a lot and have a few things planned!

When following the example, I noticed that if you went to the url:
http://www.yoursite.com/test (with no .php) the page still comes up fine, but the online locations page would break. I fixed this easily by adding an extra statement to the switch in the plugin using the online_location_process hook:


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

I'm not sure if this has anything to do with the fact I'm using the mod rewrite url rules.
Reply With Quote
  #439  
Old 19 Dec 2010, 00:30
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Thanks for posting that. I'm guessing you are correct in that it has something to do with the mod rewrite rules because I can't go to just mysite.com/test and get the same page.
__________________
Former vBulletin.org Staff Member

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
  #440  
Old 19 Dec 2010, 09:54
stevectaylor stevectaylor is offline
 
Join Date: Aug 2007
Originally Posted by Lynne View Post
You cannot put php in the template. PHP goes into the php file, and html goes into the template.
Thanks lynne, I did guess that, but when inserted to the php it appears at the very top. How do you position a php include statement.
Reply With Quote
  #441  
Old 19 Dec 2010, 13:24
Shamil. Shamil. is offline
 
Join Date: Sep 2008
Originally Posted by stevectaylor View Post
Thanks lynne, I did guess that, but when inserted to the php it appears at the very top. How do you position a php include statement.
This is what I did


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

It went in after: Start Main Script.
__________________
Shamil Nunhuck, - Radon Systems Ltd.
VPS + Dedicated Server Hosting and Management
vBulletin Solutions
Server / Website Consultation
Reply With Quote
  #442  
Old 19 Dec 2010, 18:39
stevectaylor stevectaylor is offline
 
Join Date: Aug 2007
Originally Posted by ct2k7 View Post
This is what I did


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

It went in after: Start Main Script.
Thanks but can't really see how it changed.
Reply With Quote
  #443  
Old 19 Dec 2010, 18:45
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by stevectaylor View Post
Thanks lynne, I did guess that, but when inserted to the php it appears at the very top. How do you position a php include statement.
In the php page, test.php, after you include global.php, just include your script also - something like:

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

It should not have any output. If it does, then you need to assign it to a variable and then output that variable in your template where you want it.
__________________
Former vBulletin.org Staff Member

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
  #444  
Old 19 Dec 2010, 18:56
stevectaylor stevectaylor is offline
 
Join Date: Aug 2007
Originally Posted by Lynne View Post
In the php page, test.php, after you include global.php, just include your script also - something like:

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

It should not have any output. If it does, then you need to assign it to a variable and then output that variable in your template where you want it.
I had done this and seperately set a variable but both print the output before that header of the page.
Reply With Quote
  #445  
Old 19 Dec 2010, 19:28
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by stevectaylor View Post
Thanks lynne, I did guess that, but when inserted to the php it appears at the very top. How do you position a php include statement.
Originally Posted by stevectaylor View Post
I had done this and seperately set a variable but both print the output before that header of the page.
You need to look at the contents of that file. If it has any echo statements, then that is going to cause what you are seeing. You cannot use echo if you want to put the ads where you want them.
__________________
Former vBulletin.org Staff Member

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
  #446  
Old 19 Dec 2010, 20:20
stevectaylor stevectaylor is offline
 
Join Date: Aug 2007
I think I might have suused the issue. When I put in custom variables it doesn't like them e.g

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle = 'My Page Title';
$pagead = 'trial';

Then in template add

{vb:raw pagead}

Nothing shows, but alter the standards and the standards work fine.

Last edited by stevectaylor; 19 Dec 2010 at 20:20. Reason: removed the $
Reply With Quote
  #447  
Old 19 Dec 2010, 20:38
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by stevectaylor View Post
I think I might have suused the issue. When I put in custom variables it doesn't like them e.g

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle = 'My Page Title';
$pagead = 'trial';

Then in template add

{vb:raw pagead}

Nothing shows, but alter the standards and the standards work fine.
You need to register any variable for use in a template.
__________________
Former vBulletin.org Staff Member

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
  #448  
Old 20 Dec 2010, 10:57
stevectaylor stevectaylor is offline
 
Join Date: Aug 2007
Originally Posted by Lynne View Post
You need to look at the contents of that file. If it has any echo statements, then that is going to cause what you are seeing. You cannot use echo if you want to put the ads where you want them.
Registered the variable. What are the acceptable alternatives to echo as the print function also returns the same result?

Last edited by stevectaylor; 20 Dec 2010 at 12:16.
Reply With Quote
  #449  
Old 20 Dec 2010, 17:14
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by stevectaylor View Post
Registered the variable. What are the acceptable alternatives to echo as the print function also returns the same result?
instead of:

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

use

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

__________________
Former vBulletin.org Staff Member

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
  #450  
Old 20 Dec 2010, 17:28
stevectaylor stevectaylor is offline
 
Join Date: Aug 2007
Originally Posted by Lynne View Post
instead of:

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

use

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

I found the answer in another thread of yours on vbulletin.com and used the following which works a dream.


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:24.

Layout Options | Width: Wide Color: