Online-Roleplaying.community

Go Back   Online-Roleplaying.community > Public Commonness > Proclamations

Reply
Thread Tools
  #1  
Unread 2nd of May, 2012, 06:02
Gralhruk's Avatar
Gralhruk
Ghost of ORP Past [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #13
Location: The Netherworld
Posts: 10,847 (1.87 per day)
You've never been so spoiled!

The administration team is proud to bring you yet another thing you might have asked for a long time ago and may even still want. To wit: the spoiler tag.

[spoiler]Text you want to hide[/spoiler]:


Alternatively, you can specify the button text as an option.

[spoiler=Hidden Text]Text you want to hide[/spoiler]:


And if you hate the "show/hide" text, you can bypass it with a double equal sign:

[spoiler==Hidden Text]Text you want to hide[/spoiler]:


Try not to keel over in excitement.
__________________
How many deaths shall serve to break at last
This heritage which wraps me in the grey
Apparel of ghosts?
Reply With Quote
  #2  
Unread 2nd of May, 2012, 06:11
Mercutio's Avatar
Mercutio
Grave Digger [Epic GM]

User is offline
 
Join Date: Oct 2005
Member: #1485
Location: Ocean City, NJ
Posts: 8,215 (1.85 per day)
WOOHOOO! SPOILERS



It's seriously awesome.

Last edited by Mercutio; 2nd of May, 2012 at 06:17.
Reply With Quote
  #3  
Unread 2nd of May, 2012, 06:23
Linklegacy77's Avatar
Linklegacy77
Spectral Savant of the Aether. [Epic GM]

User is offline
 
Join Date: Mar 2006
Member: #1662
Location: United States
Posts: 5,944 (1.38 per day)
That's awesome.
Reply With Quote
  #4  
Unread 2nd of May, 2012, 07:32
itches's Avatar
itches
Vampire Lord [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #10
Location: Castle Greyskull
Posts: 13,740 (2.37 per day)
Wait I didn't authorise this.

Oh god, I'm losing control!
__________________
@}-`-- Coffee + Hate = itches
Reply With Quote
  #5  
Unread 2nd of May, 2012, 07:34
LeadPal's Avatar
LeadPal
One Huecuva Guy [Epic GM]

User is offline
 
Join Date: Oct 2005
Member: #1488
Location: Canada, eh?
Posts: 3,254 (0.73 per day)


Excellent, this should make my posts much more tolerable.

Playing around with it a bit:



Originally Posted by Gral
Hooray, no glaringly obvious bugs! Except me I guess.
Reply With Quote
  #6  
Unread 2nd of May, 2012, 08:59
Mercutio's Avatar
Mercutio
Grave Digger [Epic GM]

User is offline
 
Join Date: Oct 2005
Member: #1485
Location: Ocean City, NJ
Posts: 8,215 (1.85 per day)
I found at least one bug. The spoiler tags don't work if the text has a question mark in it.



Removed a few spoiler tags that contained other special characters because they broke the post and showed a blank post.

Gral edit: These?



Last edited by Mercutio; 2nd of May, 2012 at 09:02.
Reply With Quote
  #7  
Unread 2nd of May, 2012, 09:01
Mercutio's Avatar
Mercutio
Grave Digger [Epic GM]

User is offline
 
Join Date: Oct 2005
Member: #1485
Location: Ocean City, NJ
Posts: 8,215 (1.85 per day)
And apparently too many spoilers breaks the board.



Edit: It appears the @ sign breaks it hard.




Gral edit:

Last edited by Mercutio; 2nd of May, 2012 at 09:03.
Reply With Quote
  #8  
Unread 2nd of May, 2012, 09:19
itches's Avatar
itches
Vampire Lord [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #10
Location: Castle Greyskull
Posts: 13,740 (2.37 per day)
And apparently too many spoilers breaks the board.
How many is 'too many' ?
__________________
@}-`-- Coffee + Hate = itches
Reply With Quote
  #9  
Unread 2nd of May, 2012, 10:47
Mercutio's Avatar
Mercutio
Grave Digger [Epic GM]

User is offline
 
Join Date: Oct 2005
Member: #1485
Location: Ocean City, NJ
Posts: 8,215 (1.85 per day)
I think it wasn't the number so much as it was the @ sign. Not that I foresee a need to use that particular sign, but I do think I'd have question marks.
Reply With Quote
  #10  
Unread 2nd of May, 2012, 10:50
Mercutio's Avatar
Mercutio
Grave Digger [Epic GM]

User is offline
 
Join Date: Oct 2005
Member: #1485
Location: Ocean City, NJ
Posts: 8,215 (1.85 per day)
Edit - it appears it is not the number of spoilers, but you can see for yourself that some of the special characters (including parentheses) throw off the spoiler tags. Also - \ kills it.


-This one is weird.













































Gral edit:


Last edited by Mercutio; 2nd of May, 2012 at 11:04.
Reply With Quote
  #11  
Unread 2nd of May, 2012, 10:56
Mercutio's Avatar
Mercutio
Grave Digger [Epic GM]

User is offline
 
Join Date: Oct 2005
Member: #1485
Location: Ocean City, NJ
Posts: 8,215 (1.85 per day)
Using an \ inside spoiler returns the following error:


Warning: preg_replace() [function.preg-replace]: Unknown modifier '\' in [path]/includes/class_postbit.php(294) : eval()'d code on line 87

Warning: preg_replace() [function.preg-replace]: Compilation failed: missing terminating ] for character class at offset 24 in [path]/includes/class_postbit.php(294) : eval()'d code on line 87

And putting an @ in spoilers gives no error, but the post is invisible.

Last edited by Mercutio; 2nd of May, 2012 at 10:59.
Reply With Quote
  #12  
Unread 2nd of May, 2012, 11:16
itches's Avatar
itches
Vampire Lord [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #10
Location: Castle Greyskull
Posts: 13,740 (2.37 per day)
It's not a bug, it's a feature. You've found the secret easter egg, now decode it to claim your prize!
__________________
@}-`-- Coffee + Hate = itches
Reply With Quote
  #13  
Unread 2nd of May, 2012, 11:35
Gralhruk's Avatar
Gralhruk
Ghost of ORP Past [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #13
Location: The Netherworld
Posts: 10,847 (1.87 per day)
Yeah, the @, \ and $ are all special characters in PHP so it's hosing up the parsing. I'm sure there is a way to escape them somehow. I'll look into it on the 'morrow.
Reply With Quote
  #14  
Unread 2nd of May, 2012, 11:38
zachol's Avatar
zachol
Flesh Colossus [Epic GM]

User is offline
 
Join Date: Jan 2005
Member: #1103
Location: Glorious Nippon
Posts: 8,153 (1.73 per day)
Yay, thanks Gral. You're awesome.
__________________
Sleepy cat is sleepy.
Reply With Quote
  #15  
Unread 2nd of May, 2012, 11:59
Mercutio's Avatar
Mercutio
Grave Digger [Epic GM]

User is offline
 
Join Date: Oct 2005
Member: #1485
Location: Ocean City, NJ
Posts: 8,215 (1.85 per day)
No worries. Any idea why ? and () don't work either? I don't really anticipate parentheses being necessary, but OOC comments frequently have questions in them, and that's what I was thinking I'd be using spoiler tags for most often (well, that and images, and that works extremely well).
Reply With Quote
  #16  
Unread 2nd of May, 2012, 22:22
Gralhruk's Avatar
Gralhruk
Ghost of ORP Past [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #13
Location: The Netherworld
Posts: 10,847 (1.87 per day)
Originally Posted by Mercutio # No worries. Any idea why ? and () don't work either? I don't really anticipate parentheses being necessary, but OOC comments frequently have questions in them, and that's what I was thinking I'd be using spoiler tags for most often (well, that and images, and that works extremely well).
Technically, the issue is that all the characters you are having problems with are special characters in PHP regular expressions. Well, with the exception of @, which I'm using as a delimiter for the regex pattern. But anyway, thanks to the handy preg_quote function (which escapes all of those) it should be fixed shortly.

Also, I'm adding in some error handling so that if you do manage to break it you should get a nice message in your post instead of a broken board.
__________________
How many deaths shall serve to break at last
This heritage which wraps me in the grey
Apparel of ghosts?
Reply With Quote
  #17  
Unread 2nd of May, 2012, 23:33
Gralhruk's Avatar
Gralhruk
Ghost of ORP Past [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #13
Location: The Netherworld
Posts: 10,847 (1.87 per day)
Reply With Quote
  #18  
Unread 2nd of May, 2012, 23:39
zachol's Avatar
zachol
Flesh Colossus [Epic GM]

User is offline
 
Join Date: Jan 2005
Member: #1103
Location: Glorious Nippon
Posts: 8,153 (1.73 per day)
Gral is the best. Yay.
__________________
Sleepy cat is sleepy.
Reply With Quote
  #19  
Unread 3rd of May, 2012, 00:59
Gralhruk's Avatar
Gralhruk
Ghost of ORP Past [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #13
Location: The Netherworld
Posts: 10,847 (1.87 per day)
Also, if you don't want the "Show / Hide" text appended, you can use (note the double = sign):
[spoiler==Your button text]Hidden text[/spoiler]



rather than:
[spoiler=Your button text]Hidden text[/spoiler]:

Reply With Quote
  #20  
Unread 3rd of May, 2012, 03:03
Tashalar's Avatar
Tashalar
Ghastly Thread Necromancer [Epic GM]

User is offline
 
Join Date: Jul 2006
Member: #1799
Location: Castle Korvosa
Posts: 5,971 (1.43 per day)
__________________
Reply With Quote
  #21  
Unread 3rd of May, 2012, 07:18
Mercutio's Avatar
Mercutio
Grave Digger [Epic GM]

User is offline
 
Join Date: Oct 2005
Member: #1485
Location: Ocean City, NJ
Posts: 8,215 (1.85 per day)
Thanks Gral! Seriously. I'm a big fan of this.
Reply With Quote
  #22  
Unread 8th of May, 2012, 04:54
Black Plauge's Avatar
Black Plauge
PhD in Physics [Epic GM]

User is offline
 
Join Date: Sep 2002
Member: #192
Location: Old Town, ME
Posts: 6,801 (1.22 per day)
__________________
Physics is like sex. Sometimes it yields practical results, but that's not why we do it.
-Richard Feynman
Reply With Quote
  #23  
Unread 8th of May, 2012, 05:24
Gralhruk's Avatar
Gralhruk
Ghost of ORP Past [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #13
Location: The Netherworld
Posts: 10,847 (1.87 per day)
My education in regular expression syntax continues.
Reply With Quote
  #24  
Unread 21st of May, 2012, 14:42
itches's Avatar
itches
Vampire Lord [Epic Admin]

User is offline
 
Join Date: Jan 2002
Member: #10
Location: Castle Greyskull
Posts: 13,740 (2.37 per day)
Finally updated the FAQ about this if anyone is interested.
__________________
@}-`-- Coffee + Hate = itches
Reply With Quote
  #25  
Unread 21st of May, 2012, 15:15
Tashalar's Avatar
Tashalar
Ghastly Thread Necromancer [Epic GM]

User is offline
 
Join Date: Jul 2006
Member: #1799
Location: Castle Korvosa
Posts: 5,971 (1.43 per day)
Wait... there's a FAQ?
__________________
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 05:32.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Graphics by Koert van Kleef (T0N!C) and Lyle Warren