Spoiler Tags Addition?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Seidaki
Registered User
Posts: 37
Joined: Fri Sep 24, 2010 11:06 am

Spoiler Tags Addition?

Post by Seidaki » Mon Sep 27, 2010 11:21 am

Just wondering if this code would work to add a spoiler tag to my forum. I'm using a Hermes downloaded skin.

I'd just like to get some insight before I try out this mod, because I don't want my board collapsing or anything.

It says for put for BBCode Usage..

Code: Select all

[spoiler="{TEXT1}"]{TEXT2}[/spoiler]
And for the HTML Replacement..

Code: Select all

<blockquote>
   <div style="margin-left: 20px; border-bottom: 1px solid #DBDBDB;">Spoiler for {TEXT1}: [ <a href="javascript:void(0)" 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 = 'Hide'; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = 'Show'; this.value = 'Show'; }">Show</a> ]</div>

   <div style="margin-left: 20px; padding: 6px 0;">
      <div style="display: none;">{TEXT2}</div>
   </div>
</blockquote>
So if I do this, all should go well right? I just want a way to show and hide text and images with a click of the button. Anything that is wrapped in spoiler tags would be hidden unless the word "Show" is clicked.

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Spoiler Tags Addition?

Post by ric323 » Mon Sep 27, 2010 11:26 am

-- moved from "Discussion" to "Support".
That is not a "MOD", it's just a "Custom BBcode". Just try it and see, you can always delete it if it doesn't work how you want.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

Locked

Return to “[3.0.x] Support Forum”