Password Spoiler BBCode

Ordinary BBCode Database
BBCodes that need nothing else than installation through ACP
There is no support here! Only Read Access!
User avatar
BBCode Bot
BBCoder IV
BBCoder IV
Posts: 239
Joined: 04 Mar 2010, 15:04
Location: bbcode table

Password Spoiler BBCode

Post by BBCode Bot »

Password Spoiler BBCode

Author: JACP
Description: With the Password Spoiler BBCode you can post a spoiler where a password is needed to see the content.
Note that users always can see the password if the have edit rights or can quote the post.
The password can also be fetched it they view source.
So this is more for fun :)

BBCode:

Code: Select all

[pswdspoil={SIMPLETEXT}]{TEXT}[/pswdspoil]
HTML:

Code: Select all

<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=='{SIMPLETEXT}')
{
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;">
{TEXT}
</div>
</div>
</div>
Helpline:

Code: Select all

Password Spoiler:  [pswdspoil=password]Message[/pswdspoil]
Example:

Code: Select all

[pswdspoil=Test]Tested with phpBB3. When a person clicks the "Show" button, a prompt for a password pops up. If an incorrect password is entered, the popup goes away, and things stay just as they were. If a correct password is entered, the popup goes away and the spoiler opens up. If a person wants to re-hide the spoiler, they must enter the password again. Of course, the spoiler is reset when the person navigates away from that page.

Please note: Anyone that has editing rights to the message will be able to see the password and the message. So, while this is good for general public viewing, I wouldn't suggest hiding your deep, dark secrets with it.[/pswdspoil]
Demo: (password is test)
[pswdspoil=test]Tested with phpBB3. When a person clicks the "Show" button, a prompt for a password pops up. If an incorrect password is entered, the popup goes away, and things stay just as they were. If a correct password is entered, the popup goes away and the spoiler opens up. If a person wants to re-hide the spoiler, they must enter the password again. Of course, the spoiler is reset when the person navigates away from that page.

Please note: Anyone that has editing rights to the message will be able to see the password and the message. So, while this is good for general public viewing, I wouldn't suggest hiding your deep, dark secrets with it.[/pswdspoil]
User avatar
kevinviet
BBCoder III
BBCoder III
Posts: 123
Joined: 06 Mar 2010, 04:52

Re: Password Spoiler BBCode

Post by kevinviet »

Hi Stoker
Some how this BBcode doesn't working on my board and here too, I use Firefox browser 3.6. When i input the password not thing happen?. Can you check ? thanks
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: Password Spoiler BBCode

Post by cisco007 »

i am using FF 3.7a3 and it works fine for me!
User avatar
kevinviet
BBCoder III
BBCoder III
Posts: 123
Joined: 06 Mar 2010, 04:52

Re: Password Spoiler BBCode

Post by kevinviet »

cisco007 » 20 Mar 2010, 03:55 wrote:i am using FF 3.7a3 and it works fine for me!
where you get FF 3.7a3 ? I go for update my FF browser but the latest is only 3.6
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: Password Spoiler BBCode

Post by Stoker »

Works fine for me with Firefox and Internet Explorer, but Internet Explorer is blocking the popup so you have to allow that.
Board rules! No PM support
User avatar
Anthies
BBCoder II
BBCoder II
Posts: 10
Joined: 20 Mar 2010, 12:41
Location: Finland
Contact:

Re: Password Spoiler BBCode

Post by Anthies »

Great BBCode, just what I wanted.
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: Password Spoiler BBCode

Post by cisco007 »

kevinviet » 20 Mar 2010, 04:04 wrote:
cisco007 » 20 Mar 2010, 03:55 wrote:i am using FF 3.7a3 and it works fine for me!
where you get FF 3.7a3 ? I go for update my FF browser but the latest is only 3.6

it's an experimental version, so don't worry about getting it now! :tup:
User avatar
Sir Xiradorn
BBCoder II
BBCoder II
Posts: 10
Joined: 08 Mar 2010, 11:36
Location: MMM....i don't know.....
Contact:

Re: Password Spoiler BBCode

Post by Sir Xiradorn »

I ask to me if there is a method to hide the pass in source code?
EN language torturer :twisted:
Admin Leader & Founder of: Xiradorn Lab - www.xiradorn.it
User avatar
Inner Circle
BBCoder III
BBCoder III
Posts: 107
Joined: 20 Mar 2010, 20:25
Location: Germany
Contact:

Re: Password Spoiler BBCode

Post by Inner Circle »

when i quote the message where someone posted this bbcode, you could see the password he used, or am i missing something?
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: Password Spoiler BBCode

Post by cisco007 »

it says so in the first post!

Code: Select all

Author: JACP
Description: With the Password Spoiler BBCode you can post a spoiler where a password is needed to see the content.
Note that users always can see the password if the have edit rights or can quote the post.
The password can also be fetched it they view source.
Locked