Still stuck on this, wondering if I could get another assist. Here's the code I tried (and in this case, I've just entered one User Agent String to look for, that of the Sidekick/Hiptop mobile device from Danger.)
PHP Code:
<?php if (strpos($_SERVER[‘HTTP_USER_AGENT’],’hiptop’) === false) { ?>
<div style="margin:5px 20px 20px 20px">
<div class="smallfont" style="margin-bottom:2px">
<input type="button" value="Show" style="width:50px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.value=='Show') {this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.value='Hide';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display='none'; this.value='Show';}">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">{param}</div>
</div>
</div> <?php
}else{?>
<div style="margin:20px; margin-top:5px">
<div class="smallfont">Spoiler: (<i>Highlight this box to reveal the text.</i>)</i></div></font>
<pre class="alt2" style="margin:0px; padding:$stylevar[cellpadding]px; border:1px inset; width:$stylevar[codeblockwidth]; height:{$blockheight}px; overflow:auto"><div dir="ltr" style="text-align:left;"><table bgcolor=#E1E4F2><tr><td><font color=#E1E4F2>{param}</font></td></tr></table></div></pre>
<?php}?>
When I test this though it ends up showing both styles of spoiler code.