SA-MP Forums Archive
bbcodes - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: bbcodes (/showthread.php?tid=620761)



bbcodes - Tasous - 02.11.2016

Hello there; first I'd like to apologize if this is not the right forum to been asking this but I'm quite sure one of you will have the answer to my question.

I am been trying to add the correct bbcode for [spoiler] to my forums but I've failed.
All I can find is the below thing which is not what I want - I simply want to "hide" a text inside the spoiler.




Re: bbcodes - SickAttack - 02.11.2016

Either look for a package/ad-on for the forum software you use, or if you want to do it on your own (if you know how), use the CSS display property.

inline, block, initial, etc. = Show
none = Hide


Re: bbcodes - Tasous - 02.11.2016

I found a code which basically does what I'm looking for but it's not as satisfied as I need.
I would be really grateful if one of you could hit me up with a decent bbcode for spoiler.


Re: bbcodes - Vince - 02.11.2016

If you want the one that opens with a button click then you will need Javascript. Should be relatively simple with jQuery. Wrote this in 5 min: https://jsfiddle.net/c1u6ccx1/


Re: bbcodes - Tasous - 02.11.2016

Sorry to ask but I'm not familiar with that kind of stuff, I just copy any useful bbcode from ****** and add it and I'm not the owner of the forum, just adminstrator.

Where do I use that code which you wrote/


Re: bbcodes - Vince - 03.11.2016

It depends on the forum software, honestly. I know in IPB you can edit pretty much everything directly from the admin CP but with less sophisticated platforms you'll likely have to edit a few files manually. The JS (between <script> tags) should be placed in the file that handles the topic template, so that it gets loaded when a topic is viewed.