DIR Return Create A Forum - Home
---------------------------------------------------------
Create A Forum - Support Forums
HTML https://support.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Create a Forum Codes and Support
*****************************************************
#Post#: 18954--------------------------------------------------
BBCode spoiler
By: geckogirl Date: September 19, 2017, 8:52 am
---------------------------------------------------------
I apologize if this has been asked and answered. I did do a
search and was unable to find the answer I needed.
Is there a way to change the bbcode for spoiler?? the hover is a
pain in the butt for larger areas of text, every time you try to
scroll down you lose the box.
I would like to have a click to show / click to hide spoiler
that stays open when you click on it.
Thank You
#Post#: 18962--------------------------------------------------
Re: BBCode spoiler
By: CreateAForum Date: September 19, 2017, 12:57 pm
---------------------------------------------------------
At the moment we can't change it. Will look into in the future
for improvements.
#Post#: 19969--------------------------------------------------
Re: BBCode spoiler
By: Agent Moose Date: April 19, 2018, 8:31 pm
---------------------------------------------------------
EDIT: Nevermind, I didn't read the whole post. Whoops. I
thought you wanted a spoiler code for the forum. But there
already is one. Again, woops.
This code should theoretically work for you. (It's an old code
from SMF for Free.
[code]<script type="text/javascript
src="/jquery.js></script><script>
b = document.getElementsByTagName("div");
for(x=0;x<b.length;x++){
if(b[x].className=="post" &&
b[x].innerHTML.match(/\[spoiler\](.*)\[\/spoiler\]/i)){
b[x].innerHTML =
b[x].innerHTML.replace("[spoiler]"+RegExp.$1+"[/spoiler]","<div>
<div><a
href='javascript:void(0)'
onclick='$(this).parent().next().toggle()'>(Click to Show/Hide
Spoiler)</a></div><div style='display:none'
id='spoiler'>"+RegExp.$1+"</div></div>");
};};
</script>[/code]
#Post#: 19970--------------------------------------------------
Re: BBCode spoiler
By: thekreater Date: April 20, 2018, 1:34 am
---------------------------------------------------------
so, a lot of code from SMF is compatible?
#Post#: 20147--------------------------------------------------
Re: BBCode spoiler
By: Agent Moose Date: May 30, 2018, 10:57 pm
---------------------------------------------------------
Not a ton, but few are, yes. It's more likely it will not work
than will work.
*****************************************************