Hi Rob,

On 20 Oct 2009, at 13:52, RobS wrote:
> I maintain a web site which is constantly being added to and edited.
> Trying to indicate to site visitors what is new and then removing that
> indicator after a reasonable interval is becoming onerous, and is
> fraught with problems when done manually.
>
> I wonder if there is anything -- a script I suppose -- that could be
> invoked on my pages locally to tell me that some of my NEW indicators
> have timed out and should be removed?

I don't know if this would suit you but, you could do this on the  
server with a little PHP at the top of your page...

<?php
// e.g. New pages are less than a week old

// set a class on body tag for new pages
$bodyClass = 'new';

// check if page is new
if ( (filemtime(__FILE__) + 7 * 24 * 60 * 60) < time() ) {
        // file was modified more than one week ago, so...

        // do something, e.g. remove class attribute from body tag
        $bodyClass = '';

        //or log an error so we know the file needs updating
        trigger_error(__FILE__ .' is stale and needs updating');
}

?>
<html>
<head>
...
</head>
<body class="<?php echo $bodyClass; ?>">
...
</body>

Obviously there are a million variations on a theme here...

HTH.

Regards,
Carlton
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to