![]() |
|
|||||||
| phpBB3 Manuals and Guides You will find out how to admin a forum, change forum style and many other guides. Other online helps: http://www.phpbb.com/support/documentation/3.0/, http://www.phpbb.com/support/tutorials/3.0/, http://www.phpbb.com/kb/3.0/. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
A password in your spoilers... to restrict access to unwanted people
BBcode Code:
[pswdspoil={TEXT1}]{TEXT2}[/pswdspoil]
Code:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">
<b>Spoiler</b>: <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onClick="password=prompt('Please enter password to view this message...',' ');
if (password=='{TEXT1}')
{
alert('Password Accepted!');
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 = 'Show';
}
}
">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
{TEXT2}
</div>
</div>
</div>
Password Spoiler : Code:
[pswdspoil=the password here]your menssage[/pswdspoil] Hope youŽll enjoy it!! Last edited by MaT : 03-11-2011 at 01:23 PM. |