Freepages-Help-L Archives

Archiver > Freepages-Help > 2010-09 > 1284852990


From: "Barry Carlson" <>
Subject: Re: [FreeHelp] What's essential to a great genealogy website?
Date: Sun, 19 Sep 2010 11:36:30 +1200
References: <4955A3138CF54D40A714FA29CEC2C9FE@D9MXRS31><AANLkTiks3sRKedWC81O4H1dSZhZPF674Yy=cakRF=dvj@mail.gmail.com><AANLkTi=Aj_g7pjPv+pO8yLnhgD2iCgOkYa_jeZAw=phY@mail.gmail.com><AANLkTi=f-itxcYGC14dnQu3YL8uDjj+Ge_28yRi7BvCg@mail.gmail.com><647D0D01B41D41FAAF6628DAD09997EB@BERT>


On Saturday, September 18, 2010 11:42 PM (UTC+12)

I wrote:-

> It may be of interest to those inserting the standard meta copyright tag
> in the head of the page, that it is possible to format it so that the
> copyright date shown by the tag always shows the year in which the page is
> viewed.
>
> An example using Server Side Includes follows:-
>
> <meta name="copyright" content="<!--#config timefmt="%Y" --><!--#echo
> var="DATE_LOCAL" --> Barry Carlson" />
>
> The above is entered on the same line, but when the source code is viewed
> online, the result will be:-
>
> <meta name="copyright" content="2010 Barry Carlson" />
>
> Have a look at the source code in:-
>
> http://freepages.rootsweb.com/~bristowe/test/fixed-header.html
>
> Also note the use of SSI to display some similar "nonsense" at the bottom
> of the displayed page.
------------------------------------------

It is important to remember when inserting SSI data into a page,
particularly the way I have shown, that it will not directly validate.
However, the file that the server delivers will validate.

The safest way of achieving the same result and also to have the local file
validate is to do the following:-

1.. Create a text file with the following data -

<meta name="copyright" content="<!--#config timefmt="%Y" --><!--#echo
var="DATE_LOCAL" --> Your Name" />

2.. Save this file as, e.g. meta-copyright.shtml .... NOTE the shtml
extension!

3.. Where <meta name="copyright" content="2010 Your Name" /> would normally
be placed in the head section, place the following:-

<!--#include file="meta-copyright.shtml" -->

4.. Load your page to the server along with the meta-copyright.shtml file.

The trick involved is that the server will now read the content of the
..shtml file and act on the other SSI directives in it. The local page and
that delivered by the server will now both validate.

Barry



This thread: