I have a music player I'm trying to work in to bbpress, I will have a music file relative to a Topic. I want the php code to check t see if an dmp3 file with the same name as the Topic '<?php topic_title(); ?>.mp3' exists and if it does to show the Flash player (code below) if doesn't exist to show an image or even nothing would be fine.
I've had a go at this but I seem to come across one problem after another.
If I put this code in on it's own it works exactly as it's pasted here, when I put in inside php as an IF result it seems to loose the < and > symbols which are replaced with %3B and %3C which in turn causes the result to fail.
<script language="JavaScript" src="<?php bb_uri(); ?>bb-audio/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="<?php bb_uri(); ?>bb-audio/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="<?php bb_uri(); ?>bb-audio/player.swf">
<param name="FlashVars" value="playerID=audioplayer1&soundFile=<?php bb_uri(); ?>bb-audio/<?php topic_title(); ?>.mp3">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
</object>
If somebody could point me in the right direction I don't mind figuring it out myself, I just seem to be going round in circles at the moment.