Roger
01-20-2003, 11:17 AM
Anyone who knows where I can find a script that let me autoupdate the copyright on my webpages? I have about 50 pages on my website, and it is a lot of work to update the copyright with a new year on every page.
|
Click to See Complete Forum and Search --> : auto update COPYRIGHT Roger 01-20-2003, 11:17 AM Anyone who knows where I can find a script that let me autoupdate the copyright on my webpages? I have about 50 pages on my website, and it is a lot of work to update the copyright with a new year on every page. mawood 01-20-2003, 11:24 AM ©1996-<script language="JavaScript" type="text/javascript"> var time=new Date(); var year=time.getFullYear(); document.write(year);</script>, BooYaa, Inc. pyro 01-20-2003, 11:34 AM Or, JavaScript free option if you have PHP or SSI is this. PHP<? include("copyrightfooter.htm"); ?>SSI<!--#include file="copyrightfooter.htm"--> And in copyrightfooter.htm, add your copyright info. All pages will then read from this file and display the copyright date. IF you use PHP, you must rename to .php. If you use SSI, you must rename to .shtml or .shtm. Charles 01-20-2003, 01:07 PM Originally posted by mawood ©1996-<script language="JavaScript" type="text/javascript"> var time=new Date(); var year=time.getFullYear(); document.write(year);</script>, BooYaa, Inc. 1 - Keep in mind that JavaScript will fail one in ten times. Pyro's suggestion of using something server side is a muchbetter idea. However, for the SSI version I would use: <!--#config timefmt="&copy; 1996 - %Y."--><!--#echo var="DATE_LOCAL"--> 2 - If you must use JavaScript, you can clean that up a bit: <script type="text/javasript"> <!-- document.write('<h6>Copyright 1996 - ', new Date().getFullYear(), ', BooYaa, Inc.</h6>') // --> </script> webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |