Includes

Started by Doug, January 07, 2005, 09:41:59 AM

Previous topic - Next topic

Doug

I am trying to include a left.php page in a left column on the index.template.php.  I have tried doing this and it is not working.

<td width="20%">include('left.php');</td>

The page Im trying to include has all the content for my left column.

Thanks,

Tee
YAP Portal

Tony Reid

<td width="20%"><?include('left.php');?></td>

Might work better :)
Tony Reid

Doug

Didn't work, still errors.

Tee
YAP Portal

Peter Duggan

Is left.php in your SMF base directory?

[Unknown]

<td width="20%"><?php include('left.php'); ?></td>

Or, in index.template.php:
<td width="20%">', include('left.php'), '</td>

-[Unknown]

Peter Duggan

Quote from: [Unknown] on January 07, 2005, 08:27:00 PM
<td width="20%"><?php include('left.php'); ?></td>

Meaning that Tony missed the spaces or that the full opening tag is necessary (which I thought was a server thing)?

[Unknown]

Spaces, but it's always better to use the full open tag because it always works.

-[Unknown]

Peter Duggan

Quote from: [Unknown] on January 07, 2005, 08:44:48 PM
Spaces

I'm ashamed to say I'd spotted that before I posted but neglected to mention it in my reply. :-[

Quote
but it's always better to use the full open tag because it always works.

And I always do. :)

Doug

Thanks, the only problem now is I get the #1 at the bottom of the column and can't find where its coming from




1


http://customplaygolf.com


Tee
YAP Portal

Peter Duggan

Quote from: Tee on January 07, 2005, 10:03:11 PM
Thanks, the only problem now is I get the #1 at the bottom of the column and can't find where its coming from

Can't see either a 1 or a left column (so is it in a different theme?), but can tell you that you've got old Help files up there and your Website link is broken.

Doug

Try it now, I put it on the main theme I'm using
YAP Portal

[Unknown]

Sorry, use:
<td width="20%">'; include('left.php'); echo '</td>

-[Unknown]

Doug

thanks, that works perfect.


Tee 8)
YAP Portal

raedzaro

I have an arabic Forum

jordanforum.com/forum

how could I add show.php which located in
jordanforum.com/news

[Unknown]

'; include('../news/show.php'); echo '

-[Unknown]

raedzaro

thanks but I wana add it below the menu, could please advise where to add it in template.index.php

A.M.A

in index.template.php look for:
// Show the menu here, according to the menu sub template.
template_menu();

add after it:
include('../news/show.php');
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

raedzaro

I add it as you  told me but didn't work?

raedzaro

#18
sorry it works ok with firefox but any idea about IE as I have to delete cookies each time to display show.php result

Oldiesmann

Try hitting CTRL+F5 in IE... That forces it to re-load the site without using a cached version.
Michael Eshom
Christian Metal Fans

Advertisement: