FREEPAGES-ADVANCED-L Archives

Archiver > FREEPAGES-ADVANCED > 2003-10 > 1065215845


From: <>
Subject: Re: [FP-ADVAN] SSI Help Requested - Update a Hyperlink Containing Current Year and Month
Date: Fri, 3 Oct 2003 14:17:27 -0700 (PDT)


Hi Elsi -

I was testing an idea when your reply popped up in response to my test.
Your INCLUDE "fp-first.txt" file matches my INCLUDE "pre-adv-fp.shtml"
file, but I had simplified the example I'd provided the forum (by
removing archiver sort order information and font specs), so I took
care of all of that with an additional INCLUDE "post-adv-fp.shtml"
file. That eliminates any worry about quotes and angle brackets.

For the benefit of readers who are new to SSI and might not quite
follow the above: I wanted to get out of manually changing the
hyperlink pointer to the FreePages-Advanced monthly message archives on
one of my web pages whenever a new month started. The code I was hand
modifying was (and I've changed angle brackets to square brackets here
so that people wouldn't assume the "." inhibitor I'd previously used
with the left angle bracket was part of this code):

[a href="http://archiver.rootsweb.com/th/index/FREEPAGES-ADVANCED/
2003-10?mode=chronological&amp;with=names&amp;with=dates&amp;.submit=Redisplay&amp;.cgifields=with"
target="_blank"][font size="2" face="Courier New"][i]Adv[/i][/font][/a]

Elsi and I agree that the first part of the solution was to create a
file in the same directory, containing: [a
href="http://archiver.rootsweb.com/th/index/FREEPAGES-ADVANCED/

... which I named pre-adv-fp.shtml (but I could have also named it with
a .txt file extension as long as I used the same filename in my code)

I then created a file in the same directory, containing:
?mode=chronological&amp;with=names&amp;with=dates&amp;.submit=Redisplay&amp;.cgifields=with"
target="_blank"][font size="2" face="Courier New"][i]Adv[/i][/font][/a]

... which I named post-adv-fp.shtml (but I could have also named it
with a .txt file extension as long as I used the same filename in my
code)

I next changed the code on my webpage to:

[!--#include file="pre-adv-fp.shtml" --][!--#config
timefmt="%Y-%m"--][!--#echo
var="DATE_LOCAL" --][!--#include file="post-adv-fp.shtml" --]

When the FreePages server renders that code, a "View Source" of the
displayed webpage will look like (at least for the month of October
2003):

[a href="http://archiver.rootsweb.com/th/index/FREEPAGES-ADVANCED/
2003-10?mode=chronological&amp;with=names&amp;with=dates&amp;.submit=Redisplay&amp;.cgifields=with"
target="_blank"][font size="2" face="Courier New"][i]Adv[/i][/font][/a]

... just like my previous hand modified code. But when the FreePages
server's time clock rolls over to November 1st, the yyyy-mm part of
that rendered code will automatically display as "2003-11" rather than
"2003-10".

It's SO NICE to get out of hand maintenance of my code! (P.S.--Most of
what I know about SSI, I've learned from Elsi's webpage and her emails
to the Help forum)

Robin Moore


This thread: