BARBELITH underground
 

Subcultural engagement for the 21st Century...
Barbelith is a new kind of community (find out more)...
You can login or register.


Spoilers!!!

 
  

Page: 1234(5)6

 
 
Olulabelle
21:16 / 10.05.07
Well cool. Let's just start using it then. If we can do it already without having to get Tom to do anything, then great.
 
 
Hallo, Paper Spaceboy
21:55 / 10.05.07
Someone want to post the code for it, please?
 
 
Shrug
22:30 / 10.05.07
And then add it to the FAQ, mebbe?
 
 
---
03:33 / 11.05.07
That + - thing looks awesome, agreed.
 
 
Sibelian 2.0
09:59 / 11.05.07
[+] [-]

8thed.
 
 
Spatula Clarke
15:54 / 11.05.07
Gah, why isn't it easier to post code to show people without it actually doing the code thing? Bloody internets. Let's see if this works.

[<strong onclick="document.getElementById('spoiler2').style.display = 'block'" style="cursor: pointer;">+</strong>] [<strong onclick="document.getElementById('spoiler2').style.display = 'none'" style="cursor: pointer;">-</strong>] <strong>Spoiler</strong> <em id="spoiler2" style="display: none; margin: 0.5em 1em 0 1em; border: 1px solid #666; background: #eee; color: #000; padding: 0.5em;">YOUR SPOILER TEXT IN HERE</em>
 
 
Spatula Clarke
15:54 / 11.05.07
[+] [-] Spoiler

Yos. Him am work.
 
 
Spaniel
17:11 / 11.05.07
This page he now bookmarked
 
 
grant
17:40 / 11.05.07
Is in a special place, too.

[+] [-] What special place?
 
 
grant
17:41 / 11.05.07
Ha! I think I broke the code.

(Clicking mine makes Randy's appear.)
 
 
Spatula Clarke
17:44 / 11.05.07
[+] [-] Spoiler

[+] [-] Spoiler
 
 
grant
17:47 / 11.05.07
Hmm. Your second one does the same thing mine did (opens first spoiler on page), but the third shows Spoiler 3.
 
 
grant
17:49 / 11.05.07
It's the element ID, isn't it.
 
 
Spatula Clarke
17:53 / 11.05.07
Oh, fucknuts.

Right, I think I know what the problem is. Unfortunately, it makes matters a little more complicated and means that you've got to do a bit more than simply copy and paste the code.

You see where it says 'spoiler 2' in the code? That appears to be some kind of unique identifier. I *think* the code creates and names the spoiler box, then points to it, so what's happening is every time you use the name 'spoiler 2' within a single page, the plus and minus signs will open up the first instance of its use.

Does that make sense? Sorry, I can see what it's doing, but explaining it is a bit difficult. Basically, what it eans is this will only work if people make sure that each time a spoiler is used within a single page of a Barbelith thread, they use a different name within those bits of code that are named 'spoiler 2' in the above example. The best way of going about it would be for the first spoiler on any page to be named either 'spoiler' or 'spoiler 1', then for anybody who wishes to post another one later on within the sme page to call theirs 'spoiler x', where x is the number of spoilers currently on the page + 1.

So. My spoiler is called 'spoiler 2', and because grant's used the same code, his opens mine. The same applies to the first one in my last post. My last spoiler is called 'spoiler 3', so the mixup doesn't happen in that case.

Clearly, a button for this is pretty much essential if it's not going to lead to massive amounts of confusion and moderation.
 
 
Spatula Clarke
17:53 / 11.05.07
Or, in other words, what grant said.
 
 
grant
18:30 / 11.05.07
I'm going to have to edit the wiki now....

Hmm. I think there's a way. Experiment:
[+] [-] Spoiler
 
 
grant
18:39 / 11.05.07
OK, I edited the wiki to reflect the way I think it works.

This is the first time I've ever looked at anything with Java, so I may be making unsound assumptions.

[+] [-] Pray for strength
 
 
Olulabelle
18:52 / 11.05.07
I get the whole 1,2,3 thing but which bits of the spoiler code that I copy do I not need, in order to make it be an actual spoiler window and not just the code in the thread?
 
 
grant
18:58 / 11.05.07
None bits. The code is only showing up as code because Randy put "tt" brackets or something similar around it so it'd show as characters and not be read as code.

If you cut and paste what's there, it'll be read as code.
 
 
Spatula Clarke
21:58 / 11.05.07
Yeah, I used that whole &lt;, &gt; business, so you just cut and paste the entire thing.

g: the ID doesn't have to be a number

No, you're right. You could call it whatever you wanted, just so long as it hadn't already been used by another person on the same page of the thread - I just thought that the idea of numbering the spoilers would avoid any problems with two different people using the same name (which shouldn't be a problem, but when you're still living in a world where people use 'password' as their password on sites...)
 
 
Tsuga
23:13 / 11.05.07
Okay, I'm trying this now, I just renamed "spoiler2" with something else. I hope it's okay to experiment here, but this is too fascinating.
[+] [-] Spoiler
 
 
Proinsias
23:33 / 11.05.07
It would be very handy for me if it was included in the format text, post links and images link a bit above the post reply button. This may be a testament to my laziness but I imagine it would help myself and newer members from saying sorry and then editing posts.

Not that I've ever engaged with anything of that sort but you never know...
 
 
Olulabelle
07:27 / 12.05.07
[+] [-] Spoiler
 
 
Olulabelle
07:29 / 12.05.07
OK. I bollocksed mine up but I know why. It is because there is more than one 'spoiler2' to change.
 
 
Spatula Clarke
10:24 / 12.05.07
Yeah, you need to change every occurence of spoiler2 into whatever name you've chosen:

[<strong onclick="document.getElementById('YOUR SPOILER NAME').style.display = 'block'" style="cursor: pointer;">+</strong>] [<strong onclick="document.getElementById('YOUR SPOILER NAME').style.display = 'none'" style="cursor: pointer;">-</strong>] <strong>Spoiler</strong> <em id="YOUR SPOILER NAME" style="display: none; margin: 0.5em 1em 0 1em; border: 1px solid #666; background: #eee; color: #000; padding: 0.5em;">YOUR SPOILER TEXT IN HERE</em>
 
 
STOATIE LIEKS CHOCOLATE MILK
10:29 / 12.05.07
Oh my God this looks complicated.
 
 
Spatula Clarke
10:41 / 12.05.07
Nah, it's easy when you've done it a couple of times. Have a crack with

[<strong onclick="document.getElementById('stoatie1').style.display = 'block'" style="cursor: pointer;">+</strong>] [<strong onclick="document.getElementById('stoatie1').style.display = 'none'" style="cursor: pointer;">-</strong>] <strong>Spoiler</strong> <em id="stoatie1" style="display: none; margin: 0.5em 1em 0 1em; border: 1px solid #666; background: #eee; color: #000; padding: 0.5em;">YOUR SPOILER TEXT IN HERE</em>

and put your spoiler text where indicated. Then post a second one, only change the three bits that say stoatie1 so that they're stoatie2. You don't need to come up with a new name for spoilers in different threads, just if you're posting multiple spoilers in one page of a thread.
 
 
Spatula Clarke
10:44 / 12.05.07
Ah. hehe. That shows how easy it is, actually - far less easy to post the code as an example. Edit pending - it'll be code that you can copy and paste, stoats.
 
 
STOATIE LIEKS CHOCOLATE MILK
10:56 / 12.05.07
Cheers, dude. This looks like it could need some practise.
 
 
STOATIE LIEKS CHOCOLATE MILK
11:46 / 12.05.07
[+] [-] Spoiler
 
 
STOATIE LIEKS CHOCOLATE MILK
11:47 / 12.05.07
Neat!

Only problem I can see being that you aren't always aware whether your post's going on a new page or not, especially if it's quite a fast-moving thread and you're writing a long post.
 
 
Olulabelle
13:10 / 12.05.07
People could put their own names in the code which would make things much easier. So yours would be stoatie1 stoatie2 etc, in thread A and mine would be lula1 and lula2 in thread A That way everyone can just deal with their own spoiler numbering instead of having to check through the thread and count previous ones from other people.
 
 
Spatula Clarke
13:20 / 12.05.07
That'd be the best idea, really.

Lula, your edit isn't working because there are three occurrences of the spoiler ID in the code, not just two. I've put another edit in to fix it, but this highlights - again - the utter stupidity of there being no 'preview edit' button on the board.
 
 
Olulabelle
14:38 / 12.05.07
Yes yes I completely agree. It's one of the most important things we need.
 
 
Spaniel
16:45 / 12.05.07
Can I kick it?

[+] [-] Spoiler
 
  

Page: 1234(5)6

 
  
Add Your Reply