Lane Miles wrote:
Hi All,

Hi Lane,

On the support.openoffice.org page, below the content header, the date is messed up. It is shown as, $Date: 2007/12/07 03:58:36 $. I don't know if the date is even supposed to be there. If it is, I quote the HTML from the page.

<span class="modified">$Date: 2007/12/07 03:58:36 $</span>


the $Date: .... $ thing is pure CVS magic.

If you have a $Date:$ String somewhere in your document this will automatically be replaced by $Date: 2007/12/07 03:58:36 $ when the page is first checked into the CVS source code control repository and automatically replaced by a newer date everytime a new version is checked into the source code control repository.
However, it should read:

<span class="modified">Date: 2007/12/07 03:58:36</span>


If we now just change that to <span class="modified">Date: 2007/12/07 03:58:36</span> this would mean that now every user changing the page would have to manually(!!!!) change that date value also which might often be forgotten instead of this happening automatically.

I do also think that this doesn´t look good on that HTML page tough. Such $Date:$ might be acceptable in a comment in source code but is not so good for an HTML page displayed to end users. Thus i would like to propose a third variant which keeps the CVS magical handling intact but beautifies the page at least for those users which do have javascript enabled.

<span id="modified" class="modified">$Date: 2007/12/07 03:58:36 $</span>
<script type="text/javascript">
     if( document.getElementById )
        elem = document.getElementById("modified");
     else if( document.all )
        elem = document.all["modified"];
     else if( document.layers )
        elem = document.layers["modified"];
     if ( elem ) {
        lastmod=elem.firstChild.data;
        elem.firstChild.data=lastmod.substring(1,lastmod.length-2);
     }
</script>


Sincerely,
Lane

Kind regards
Bernd Eilers

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to