1
rcjohnson
Using an Include( ) and its not working...
  • 2004/9/16 21:08

  • rcjohnson

  • Not too shy to talk

  • Posts: 187

  • Since: 2004/7/23


Im not sure Im doing this right, but Im tryign to use an "include()" statement in my theme.html page to insert a navigatin bar.

Here is an example of what I have written:
<td background="<{$xoops_imageurl}>images/back_line.jpg"" class="line">
<?
include("navbar.htm");
?>
</td>
The navbar.htm is in the same folder as the theme.html....

Im just learning all this stuff and don't understand what Im doing wrong...when I view the site, absolutly nothing appears in that row of the table.

Thanks for the help!


2
pdaddict
Re: Using an Include( ) and its not working...
  • 2004/9/16 21:25

  • pdaddict

  • Friend of XOOPS

  • Posts: 106

  • Since: 2003/4/6 1


try <{php}>include("navbar.htm");<{/php}>

3
DonXoop
Re: Using an Include( ) and its not working...

Maybe cleaner:

<{include file="$xoops_rootpath/my_custom_files/navbar.inc"}>

<{include file="navbar.inc"}>


4
rcjohnson
Re: Using an Include( ) and its not working...
  • 2004/9/16 22:10

  • rcjohnson

  • Not too shy to talk

  • Posts: 187

  • Since: 2004/7/23


Quote:

by pdaddict on 2004/9/16 10:25:00

try <{php}>include("navbar.htm");<{/php}>

by DonXoop on 2004/9/16 10:45:17

Maybe cleaner:

<{include file="$xoops_rootpath/my_custom_files/navbar.inc"}>

<{include file="navbar.inc"}>


when I entered the above lines, they just show up like normal text...

I don't think im "getting" the idea of how to do this.


5
rcjohnson
Re: Using an Include( ) and its not working...
  • 2004/9/16 22:17

  • rcjohnson

  • Not too shy to talk

  • Posts: 187

  • Since: 2004/7/23


When I look at my source code after the html has been loaded, the php tags are right out in the open, like its not even being processed...

6
DonXoop
Re: Using an Include( ) and its not working...

With XOOPS tags like <{include file="links.inc"}> you don't use <?php ?> delimiters. Use it just like I wrote it.



7
rcjohnson
Re: Using an Include( ) and its not working...
  • 2004/9/16 22:46

  • rcjohnson

  • Not too shy to talk

  • Posts: 187

  • Since: 2004/7/23


I don't understand the .inc extension. I did some searches, but can't find info anywhere. What are the .inc files suppose to have in them?

8
DonXoop
Re: Using an Include( ) and its not working...

oi.

Replace the quoted filename with your own. Can be anything that once included is correct. File extention doesn't matter.

I use .inc since it suggests Include and make sense to me but it doesn't matter. Also, I tell Apache to not serve .inc files so they can't be viewed, stolen, or abused by any crackheads. But that is another story.


<{include file="your_file_name.html"}>

<{include file="whatever"}>

Login

Who's Online

202 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 202


more...

Donat-O-Meter

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

Latest GitHub Commits