now with added Masterweb and IB Geek Girl

spider web Ecanus•net :: Tutorials

Tutorials

These aren't really full blown tutorials – more quick 'n' dirty guides to doing stuff that might save you some time. Click the links below to see them.

Update your copyright notice date

Okay, so if you've got a 'last updated' line after your copyright notice, or you put '2005– ', which is effectively '2005 to date' you don't actually need to include another year. You only need to claim copyright from when the page was first built (or when the content was first published elsewhere if it is earlier), but many people like to put a second year, if only to show that the do look at their own pages occasionally...but after reading this page, you can create the impression you do, without going anywhere near them!

Here we're going to look at four methods for adding a the current year to your pages, using:

FrontPage

Unfortunately FrontPage doesn't have a built in 'display the current year' function, but you can get round that and display the year your content was last updated by tweaking its 'date and time' function.

Step 1: From the Insert menu, select Date and Time...and the Date and Time dialog box appears.

The FrontPage date and time dialogue box

Step 2: Select Date this page was last edited.

The FrontPage date and time dialogue box showing format pull-down list

Step 3: From the Date format pull–down list select a date format – any one will do.

Step 4: Click OK.

Step 5: If you're not there already, go into either Split or Code view and find the 'webbot' code that FrontPage has inserted. It'll look something like: <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" --> (depending on which date format you picked)

Step 6: Edit the webbot code so it looks like the code below:

<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" -->

JavaScript

Two simple steps – that's all there is to it!

Step 1: Copy the following code:

<script type="text/JavaScript">
<!--
var currentTime = new Date()
var year = currentTime.getFullYear()
document.write(year)
//-->
</script>

Step 2: Paste it into your copyright notice – see the result below:

© Copyright

Step 2 ½: Don't forget some suitable <noscript> text ;–)

PHP

This is the one we use on MasterWeb. The squirrels aren't too happy about it and are considering industrial action tho...<grin>. Less than five seconds and a cut 'n' paste is all it takes...

Step 1: Copy the code below...

<?php echo date('Y'); ?>

Step 2: Paste the code where you want the year, as demonstrated below...

2017

(Step 2 ½: Remember, if it isn't already, you'll need to give your file a '.php' rather than '.html' extension.)

ASP

And finally...ASP – another "two-stepper"...

Step 1: Copy the following code:

<% Response.Write DatePart("ww", Date()) %>

Step 2: Paste it where you want your date.