25
The referrer trick works for me on a static site, so I tried putting the conditional player script in the template. This seems to work and stops the player runing when users log in or out.
In your theme.html (I put it under the footer):
<tr><td>
<{php}>
$_SERVER["HTTP_REFERER"] = !isset($_SERVER["HTTP_REFERER"])? NULL : $_SERVER["HTTP_REFERER"];
$origin = $_SERVER["HTTP_REFERER"];
if ( strstr( $origin, "example.com" ) ) {
echo "Still here then" ;
}
else {
echo "
However...
if a user leaves the site (to visit a web link for example) the player will play when they return, 'cos it thinks they are a new site visitor. A cookie or perhaps a session thingy may indeed be the answer to that, but I wouldn't know where to start.
Anyone out there bake a good cookie?...
A thread is for life. Not just for Christmas.