Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
5 - 2 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: random img => random audio
by Peekay on 2007/8/22 17:59:59

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):

le="color: #000000"><?php <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 "<object type="application/x-shockwave-flash" width="1" height="1" data="http://www.example.com/xspf/xspf_player_slim.swf?playlist_url=http://www.example.com/xspf/playlist.xspf&autoplay=true"> <param name="movie" value="http://www.example.com/xspf/xspf_player_slim.swf?playlist_url=http://www.example.com/xspf/playlist.xspf&autoplay=true" /></object>" ; } <{/php}> </td></tr>


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?...
Re: random img => random audio
by mjz55 on 2007/8/21 17:55:03

How about adding a cookie or something that lets it play only once period? Is that possible?
Re: random img => random audio
by Peekay on 2007/8/11 10:20:27

It *should* auto-load the player when you open the site, then if you go to another page the player will stop. On return to the homepage, it should say 'still here then' instead of loading the player a second time.

Does the message appear at all?

My server has PHP register_globals 'Off', so the first line of code is needed to avoid creating an undefined attribute. You could try removing the first line:

le="color: #000000"><?php $_SERVER["HTTP_REFERER"] = !isset($_SERVER["HTTP_REFERER"])? NULL : $_SERVER["HTTP_REFERER"];


Other than that, I'm running out of ideas on this one!
Re: random img => random audio
by mjz55 on 2007/8/8 16:12:20

It didn't work for me. I changed the block to php. It won't play.
Re: random img => random audio
by Peekay on 2007/8/7 21:21:49

No such thing as a problem. Just interesting challenges!

Who's Online

148 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 148


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits