include HTML file in template file

Having trouble installing serendipity?
Post Reply
msp_erv
Regular
Posts: 67
Joined: Thu Feb 05, 2009 1:58 am

include HTML file in template file

Post by msp_erv »

i need to include an html file into bulletproof template

and am failing on all fronts

things that should work do not

Code: Select all

{php}
include ("/full/server/path/to/file/counter.html")
{/php}

{include file='/("/full/server/path/to/file/counter.html'}

{include file='/counter.html'}

{include file='counter.html'}

i have even tried to include the counter file directly....

[code]{include virtual='/full/server/path/to/file/_stats/counter.cgi?site=cptr'}

{include file='/full/server/path/to/file/_stats/counter.cgi?site=cptr'}
[/code]

i will be using a stats app locally that uses an SSI include that is parsed in an html file

we have been using this successfully in PHP sites for years with an addhandler in htaccess and this simple php tag

Code: Select all

<?php



  virtual ("/counter.html");

?>
so far i am unable to include this into the app...

i am working with inded.tpl from the bulletproof dir - and get errs...
Warning: Smarty error: unable to read resource: "html/counter.html" in ("/full/server/path/to/file/bundled-libs/Smarty/libs/Smarty.class.php on line 1092
how can i get this html file pulled into the app?

ultimately this is what will get parsed as html as thsi wi8ll be the contents of counter.html

Code: Select all

<!--#include virtual="/_webshop101Stats/counter.cgi?site=041"-->
thoughts?
msp_erv
Regular
Posts: 67
Joined: Thu Feb 05, 2009 1:58 am

Re: include HTML file in template file

Post by msp_erv »

my eyes hurt frm staring at this dam monitor an dproblem for way too long...

ok...

here is the poor boy solution if any one else ever needs to run cgi or server parsed html inside this blog...

i wound up usinng and iframe to call my html file that holds my SSI call

the heck with it....

here it is for anyone that can use this

Code: Select all

<!--[if IE]>
<iframe align="middle" scrolling="no" frameborder="0" height="3" width="20" src="http://www.yourniftywebsite.com/counter.html"></iframe>
<!--[if !IE]>
<iframe align="middle" scrolling="no" frameborder="0" height="3" width="20" src="http://www.yourniftywebsite.com.com/counter.html"></iframe>
<![endif]-->
  
msp_erv
Regular
Posts: 67
Joined: Thu Feb 05, 2009 1:58 am

Re: include HTML file in template file

Post by msp_erv »

this iframe is catching only local referrals...

i would be most greaeful if someone could please point to a way for me to do this without iframes

thank you very much
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: include HTML file in template file

Post by yellowled »

msp_erv wrote:i need to include an html file into bulletproof template
Do you actually need to include the file or would it suffice to include its content? BP offers a theme option for that.

YL
msp_erv
Regular
Posts: 67
Joined: Thu Feb 05, 2009 1:58 am

Re: include HTML file in template file

Post by msp_erv »

many thanks

...content....

this is what i need here... in one form or another -- the virtual call of the actual cgi counter script

Code: Select all

<!--#include virtual="/_webshop101Stats/counter.cgi?site=041"-->
failing miserably!
msp_erv
Regular
Posts: 67
Joined: Thu Feb 05, 2009 1:58 am

Re: include HTML file in template file

Post by msp_erv »

found this ---

looking to see if this will help any where...

http://board.s9y.org/viewtopic.php?f=1&t=3851&hilit=SSI
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: include HTML file in template file

Post by judebert »

I'd try {include file='that_script_url'}. I'm not sure it would work, but it's possible.

Does the script return a graphic? That would get it called. Or is it just a link that needs to be clicked to be activated?
Judebert
---
Website | Wishlist | PayPal
msp_erv
Regular
Posts: 67
Joined: Thu Feb 05, 2009 1:58 am

Re: include HTML file in template file

Post by msp_erv »

the script can be used 2 ways -- with 'image' thsi will not count outside referrs -- bad

and the virtual include that is the intended way-- later today i will try to tweeek the cfg file to allow the php include and report back

thanks
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: include HTML file in template file

Post by judebert »

Simply including the line as you originally typed it into the index.tpl should include the file -- IF your server is set up correctly.

Here is some documentation on Server Side Includes that might help you:
http://en.wikipedia.org/wiki/Server_Side_Includes
http://httpd.apache.org/docs/1.3/howto/ssi.html
Judebert
---
Website | Wishlist | PayPal
daniello
Regular
Posts: 84
Joined: Thu Apr 09, 2009 11:47 am

Re: include HTML file in template file

Post by daniello »

yellowled wrote:
msp_erv wrote:i need to include an html file into bulletproof template
Do you actually need to include the file or would it suffice to include its content? BP offers a theme option for that.

YL
Hi Yellowled .. could you clarify .. which option exactly you mean? I edited the template and put the content directly there .. maybe there is a better way.

br
Daniello
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: include HTML file in template file

Post by yellowled »

daniello wrote:could you clarify .. which option exactly you mean?
As a matter of fact, the theme option to include text in the footer can also be used to include HTML or JS in the footer. This is sometimes an easy way out to include counter scripts etc.

YL
Post Reply