PDA

View Full Version : Putting vB code blocks in spoilers



El_Pablo
2011-05-07, 06:06 AM
So, I wanted to share a block of vB code on the forum which included spoilers. It was a formatted block for rolling granted maneuvers. In fact it was this,
1st round: 1d5 first maneuver granted, 1d4second maneuver granted.
2nd round: 1d3 third maneuver granted, 1d2 fourth maneuver granted.

The original block was a little more messy, and I didn't like it so I tried to find a a way to post that code so it could be easily copy and pasted, but still hide it under spoiler tags. I failed. The best I could do was:

1st round: 1d5 first maneuver granted, 1d4second maneuver granted.
2nd round: 1d3 third maneuver granted, 1d2 fourth maneuver granted.

So, my question is: Can I post code that will not be parsed under spoiler tags without breaking the spoiler tags?
I have already determined I cannot nest html or code in spoilers. If it is not possible, then a simple no is also fine.

Kuma Kode
2011-05-07, 06:21 AM
1st round: 1d5 first maneuver granted, 1d4second maneuver granted.

Like that? Just make sure the noparse tags are inside the spoiler, like this:

1st round: 1d5 first maneuver granted, 1d4second maneuver granted.

El_Pablo
2011-05-07, 06:48 AM
1st round: 1d5 first maneuver granted, 1d4second maneuver granted.

Like that? Just make sure the noparse tags are inside the spoiler, like this:

1st round: 1d5 first maneuver granted, 1d4second maneuver granted.

Close try actually spoilering the code I posted and you can see the result. Well, why don't I just do that:
1st round: 1d5 first maneuver granted, 1d4second maneuver granted.
2nd round: 1d3 third maneuver granted, 1d2 fourth maneuver granted.

Below is the code block in the only way I can actually post it so it is read:

1st round: 1d5 first maneuver granted, 1d4second maneuver granted.
2nd round: 1d3 third maneuver granted, 1d2 fourth maneuver granted.

Elder Tsofu
2011-05-07, 07:06 AM
Like this?
1st round: 1d5 first maneuver granted, 1d4second maneuver granted.
2nd round: 1d3 third maneuver granted, 1d2 fourth maneuver granted.

1st round: 1d5 first maneuver granted, 1d4second maneuver granted.
2nd round: 1d3 third maneuver granted, 1d2 fourth maneuver granted.

Rawhide
2011-05-07, 07:34 AM
You can't {noparse} the following tags:
{hr}
{roll}
{rollv}
{hr}
{table}

El_Pablo
2011-05-07, 08:06 PM
Like this?
{Scrubbed}

Edit: I probably came across as an idiot for the above. I never meant to be insulting. I was always speaking about myself, and I apologize for making it appear that I was attributing my self-deprication to someone else in an insulting form.

Maybe I'm not being clear. What I want is to make a spoiler, in that spoiler I want vB code that someone else can copy and paste into their own posts directly without additional formatting. I want what they paste to output like this -
1st round: 1d5 first maneuver granted, 1d4second maneuver granted.
2nd round: 1d3 third maneuver granted, 1d2 fourth maneuver granted.

Edit: Yeah, forgot the dice roller doesn't work in this forum. :smallsigh:

So, I know how to give them the code so they can post it, I just want to hide that code under spoilers. Not each roll, but including the spoilers which hides the rolls! It seems that when you noparse code which contains spoiler tags you can't hide it under spoiler tags.


You can't {noparse} the following tags:
{hr}
{roll}
{rollv}
{hr}
{table}

That makes sense, but the tag I'm having trouble with is {spoiler}, which you haven't listed. Or is part of that the reason I can't spoiler the code?

Rawhide
2011-05-07, 08:24 PM
Well, that's a new one.

You can't noparse a spoiler inside a spoiler. If you do, the regular spoiler won't work. I suggest you use another formatting trick, such as: [spoiler]

Mando Knight
2011-05-07, 10:30 PM
You can't {noparse} the following tags:
{hr}
{roll}
{rollv}
{hr}
{table}

Sure about that? I thought I've noparsed a couple tables before...
{table]Let's|See...[/table]
Shows up as not parsed for me...

El_Pablo
2011-05-07, 11:06 PM
Well, that's a new one.

You can't noparse a spoiler inside a spoiler. If you do, the regular spoiler won't work. I suggest you use another formatting trick, such as: [spoiler]

1. Glad I could find you a new one. Sorry, my obscure coding methods find new and exciting ways for php to cry.
2. GENIUS! Why didn't I think of that?! Then, I can just noparse the rolls, and the code will still be usable. I bow your mastery of code acrobatics.