SSI's

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
andy764383
Registered User
Posts: 12
Joined: Tue Apr 01, 2008 5:59 pm

SSI's

Post by andy764383 » Mon May 05, 2008 2:11 am

Can someone tell me why

<!--#include file="filename.html" -->

doesn't work for SSI's in phpbb3 but

<!-- INCLUDE filename.html -->

does?

I got the includes I wanted working but it would be nice to know why too.

Thanks
Last edited by stevemaury on Sun Aug 31, 2008 4:27 pm, edited 2 times in total.
Reason: Topic icon changed

SneakySimian
Registered User
Posts: 31
Joined: Fri Apr 11, 2008 12:31 am

Re: SSI's

Post by SneakySimian » Mon May 05, 2008 2:24 am

phpBB3 template files get passed to PHP, not the SSI parser. INCLUDE is a phpBB tag that has nothing to do with PHP.

User avatar
Eelke
QA Team
Posts: 2903
Joined: Thu Dec 20, 2001 8:00 am
Location: NL, Bussum
Name: Eelke Blok
Contact:

Re: SSI's

Post by Eelke » Mon May 05, 2008 7:55 am

To be more precise, phpBB template files are interpreted by phpBB itself, which turns them into PHP files (which reside in the cache directory).

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 2523
Joined: Mon Jul 10, 2006 9:58 pm
Name: Andreas Fischer

Re: SSI's

Post by bantu » Mon May 05, 2008 8:31 am

The later one is valid phpBB template syntax. The first one is not.

More information can be found here: http://olympuswiki.naderman.de/Template_Syntax

Regards
Powered by Coffee

andy764383
Registered User
Posts: 12
Joined: Tue Apr 01, 2008 5:59 pm

Re: SSI's

Post by andy764383 » Mon May 05, 2008 4:50 pm

That makes sense. Thanks.

Bob_La_Londe
Registered User
Posts: 94
Joined: Sun Aug 17, 2008 5:08 pm

Re: SSI's

Post by Bob_La_Londe » Sun Aug 17, 2008 8:21 pm

<!-- INCLUDE filename.html -->
Where are you putting that include? In the header file?

User avatar
Eelke
QA Team
Posts: 2903
Joined: Thu Dec 20, 2001 8:00 am
Location: NL, Bussum
Name: Eelke Blok
Contact:

Re: SSI's

Post by Eelke » Sun Aug 31, 2008 4:21 pm

You can put it anywhere in a template file, wherever you happen to require the contents of another template file.

Bob_La_Londe
Registered User
Posts: 94
Joined: Sun Aug 17, 2008 5:08 pm

Re: SSI's

Post by Bob_La_Londe » Sun Aug 31, 2008 4:25 pm

Actually I was asking where in which file. And I have noticed that PHP style includes don't seem to work everywhere in the header file. I recently added Announcement Center for example. The inlcude worked just fine right below the body tage with my other includes, but in the lower location as indicated in the documentaion it dod not seem to work. Weird.

User avatar
Phil
Former Team Member
Posts: 10403
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm
Contact:

Re: SSI's

Post by Phil » Sun Aug 31, 2008 4:27 pm

For PHP includes in template files, you first need to enable the setting under Security Settings, then use the following syntax:

Code: Select all

<!-- PHPINCLUDE myfile.php -->
Moving on, with the wind. | My Corner of the Web

Bob_La_Londe
Registered User
Posts: 94
Joined: Sun Aug 17, 2008 5:08 pm

Re: SSI's

Post by Bob_La_Londe » Sun Aug 31, 2008 4:33 pm

iWisdom wrote:For PHP includes in template files, you first need to enable the setting under Security Settings, then use the following syntax:

Code: Select all

<!-- PHPINCLUDE myfile.php -->
That may be a key ingredient to solving another problem I have been struggling with. Thank you.
Last edited by Bob_La_Londe on Sun Aug 31, 2008 5:28 pm, edited 1 time in total.

User avatar
Eelke
QA Team
Posts: 2903
Joined: Thu Dec 20, 2001 8:00 am
Location: NL, Bussum
Name: Eelke Blok
Contact:

Re: SSI's

Post by Eelke » Sun Aug 31, 2008 5:21 pm

Bob_La_Londe wrote:Actually I was asking where in which file.
Yes. And I answered you can put it anywhere you like, basically. As long as you're doing it in a template file and the file you are including also is a file according to the phpBB template syntax.

Locked

Return to “[3.0.x] Support Forum”