1
khuhner
"include file" Syntax?
  • 2007/4/6 23:37

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


I'm adding Goolge's Ad Sense to my site in the CBB section. I'd like to compartmentalize the code so I created a file called adsense.html.

Now in various newbb templates, I want to include this file however I'm having problems getting it working (note inserting the ad sense code directly into the template files works). My Syntax is:

Quote:
<{include file='<{$xoops_url}>/modules/<{$xoops_dirname}>/adsense.html'}


When viewing the pages all I see is:

Quote:
/modules/newbb/adsense.html'}>


Any suggestions?

Kurt

2
attock
Re: "include file" Syntax?
  • 2007/4/6 23:56

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


for a php file you need to do sumthing like this:

<{include_php file="$xoops_rootpath/blahblah.php"}>


I am not sure if therez any syntax for html i.e <{include_html.....

And how insert your link inside " (double quotes), instead of '(single quotes)

3
khuhner
Re: "include file" Syntax?
  • 2007/4/7 0:53

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


Thanks.

I'm looking to include this file in "template" files which are html.

Kurt

4
skenow
Re: "include file" Syntax?
  • 2007/4/7 1:06

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


Here's how it looks in theme.html (default)
<{include file="default/theme_blockright.html"}>

5
khuhner
Re: "include file" Syntax?
  • 2007/4/7 2:47

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


Quote:

skenow wrote:
Here's how it looks in theme.html (default)
<{include file="default/theme_blockright.html"}>


Thanks skenow.

I've tried a similiar format with single and double quotes. No luck.

From my original post, a portion of my include string isnt resolved and simply rendered as text upon output.

Kurt

6
attock
Re: "include file" Syntax?
  • 2007/4/7 12:29

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


Try the actual path, instead of variables. i.e


<{include file="http://mywebsite.com/modules/myModule/adsense.html"}

Login

Who's Online

347 user(s) are online (266 user(s) are browsing Support Forums)


Members: 0


Guests: 347


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits