Pages: [1]   Go Down
Send this topic | Print
Author Topic: ADDED: SSI Support (.shtml pages)  (Read 4820 times)
andre
Administrator
Loyal 110MB Member
*****
Offline Offline

Posts: 3118


« on: October 28, 2007, 09:01:56 PM »

SSI is very useful if you're building a big site where you want the header & footer for each page to be the same.

So if you were to change something in header or footer, you only change it in one page and effects take instant effect on all pages.

SSI commands will only work if your page has a .shtml extension.

Code:
Eg if you were to create a page index.shtml and include this line inside it:

<!--#include virtual="/header.htm" -->

Then index.shtml will show the contents of header.htm.

So SSI is indeed very powerful, useful and time-saving for you.
« Last Edit: October 28, 2007, 09:19:05 PM by andre » Logged

NOTE: ALL PM'S WILL BE IGNORED. UNLESS I ASKED YOU TO PRIVATE MESSAGE ME.

-- Use the "Search" on top-right before posting.
-- If your topic is resolved, put [Resolved] at end of subject.
soren121
I eat lots of those
Advanced Authority Member
*****
Offline Offline

Posts: 1476


I shall stare you down with mah kitteh powahs!


WWW
« Reply #1 on: October 28, 2007, 09:35:31 PM »

Actually, you could use the PHP include() or require() functions to do the same thing.  wink
Logged

LightBlog Developer -- Fueled by Linkin Park, Sprite, and LOLCats
inp o҉rtb
The Gangsta
Global Moderator
Official 110mb Guru
*****
Offline Offline

Posts: 15634


experimental theologian


WWW
« Reply #2 on: October 29, 2007, 02:24:23 AM »

ohhhhhhhh SNAP! It's been done grin
Logged

Hi! I’m a signature virus! Add me to your signature to help me spread.
spam me: ispamspot@gmail.com

blog | my work @ deviantART | Imagine-ng image editor
meep-online
Authority Member
****
Offline Offline

Posts: 983


WWW
« Reply #3 on: April 24, 2008, 11:11:33 PM »

Yeah, why not just use php include and require?

Just put:

Code:
<?php include('header.php'); ?>

<!--WEBSITE-->

<?php include('footer.php'); ?>

Alternativly, if you want to include html pages, you can go:

Code:
<?php echo file_get_contents('header.html'); ?>

<?php echo file_get_contents('footer.html'); ?>
Logged

aldo
Official 110mb Guru
********
Offline Offline

Posts: 8004


SMF is ftw :D


WWW
« Reply #4 on: April 24, 2008, 11:37:35 PM »

Maybe for those who like .shtml I suppose, plus it is one more feature Wink
Logged


meep-online
Authority Member
****
Offline Offline

Posts: 983


WWW
« Reply #5 on: April 25, 2008, 02:30:25 AM »

Yeah, and I suppose it might be a little bit less resource intense than php.
Logged

TDSii
Best warez site!!
Loyal 110MB Member
*******
Offline Offline

Posts: 2056


..:: skdown.net ::..


WWW
« Reply #6 on: April 26, 2008, 11:36:18 AM »

i don think soo, but ohh well it is another feature added, maybe someone requested that Smiley
Logged


meep-online
Authority Member
****
Offline Offline

Posts: 983


WWW
« Reply #7 on: April 29, 2008, 06:52:27 AM »

probs Duh
Logged

freelancejobs
Software Engineer
Member
*
Offline Offline

Posts: 25


WWW
« Reply #8 on: August 20, 2008, 04:40:12 PM »

well,
I am already using php include.

somehow thanks for the feature..

Logged

thefluffball
Knock. Knock.
Loyal 110MB Member
*******
Offline Offline

Posts: 2314


I came, I saw, I strutted.


WWW
« Reply #9 on: August 27, 2008, 11:19:11 PM »

You can only use the PHP method in one directory, as absolute links are blocked here. So, I found myself using shtml with relative links.
Logged

meep-online
Authority Member
****
Offline Offline

Posts: 983


WWW
« Reply #10 on: August 30, 2008, 09:58:16 AM »

You can only use the PHP method in one directory, as absolute links are blocked here. So, I found myself using shtml with relative links.

with php include you can do full relative links such as ../index.php, /index.php, index.php, ./index.php, ../../index.php
etc Smiley
Logged

thefluffball
Knock. Knock.
Loyal 110MB Member
*******
Offline Offline

Posts: 2314


I came, I saw, I strutted.


WWW
« Reply #11 on: August 30, 2008, 08:25:59 PM »

True, although absolute links are easier. So, now I have found myself using absolute server paths.
Logged

Pages: [1]   Go Up
Send this topic | Print
Jump to: