You guys probably know the Spoiler BB-Code which expands and then shows some hidden text. I want to do the same but want to hide the contents for guests.
My idea is the following:
Code:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b> </b></font></right>
<input type="button" value="Spoiler about {option}" style="font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '{option}'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<if condition="$show['member']">
{param}
</if>
<else />
Sorry, you need to register in order to view the contents.
</if>
</div>
</div>
</div>
This however does not work as vBulletin does not allow template conditionals in BB-Codes. How would I do something similar?
Thanks for your help

.