UBB.Dev
Code
********************************************************************************
* HACK NAME: Spoiler Hack *
********************************************************************************
* DESCRIPTION: Allow people to post spoilers and only people who want to *
* see them do *
* CREATED BY: Dave2/Dave Wickham <[email protected]> *
* DATE: 2002-12-07 *
* VERSION: Version 1.0beta1 *
* DEMO: http://www.allaboutgames.co.uk/cgi-bin/ultimatebb.cgi *
********************************************************************************
This is different from the one that CTM said he is writing, in that his requires you to select the text, so you can control how many spoilers you see. This uses CSS and JavaScript to hide the text.

/me waits to see how many security holes it has wink

Uhh... helps if I post a link wink
Text file

Oh yeah, it'll need some modification for 6.3.1
Suggestion: maybe make it in Edit Profile and Register Page thus encourage unregistered users to register and registered users don't have to re-enable it every time they clear cookies. Also maybe use Transition to HTTP_REFERER instead of StandardHTML?
1) Enabling spoilers is only likely to be done for a short amount of time, which is why I did it like this. Also it's much easier wink .

2) How would I do that? Call &transition; or something?
2) try something like:
Code
	my $clean_cgi = quotemeta("$vars_config{CGIURL}/ultimatebb.cgi");
my $clean_non = quotemeta($ULTIMATEBB); # Accelerator
if (($in{refer} ne '') && ($in{refer} !~ m/register|age|coppa/i) && ($in{refer} !~ /(logoff|cookies|find_lost|password)$/)
# Comment out the following line to allow redirects back to anywhere
&& ($in{refer} =~ /^($clean_cgi|$clean_non)/)
) {

# take viewer back to topic
&set_page_elements;
&Transition("$ENV{HTTP_REFERER}", "Thanks for enabling/disabling spoiler...", "$ENV{HTTP_REFERER}");
} else { &StandardHTML("Thanks for enabling/disabling spoiler..."); }
It's untested, but should work shocked
That code...still makes it use the FYI page for me wink .
Oops, replace "$in{refer}" everywhere with "$ENV{HTTP_REFERER}"
That works, thanks smile

Text file updated smile
Since none have been mentioned, I guess that either:
A) There are no obvious security holes for this hack or
B) Nobody actually USES the hack (much more likely wink )
I like it. I will just have to adapt it to my 6.1.x system.
I'd much rather have a haver spoiler hack that uses UBB Code spoiler tags. Also, if you look at Gaming Update, I have a PM inbox link where you have placed the spoiler cookie button thing, and haven't offered any alternatives.
Uhh... to post a spoiler you put it in [spoiler][/spoiler] tags... What exactly do you mean by using spoiler tags? o_O
Also - for that position - another
? wink
Oh my bad, I didn't look at the code..
I just saw the screenshot and thought you'd done something else weird..

In that case, would it be possible to remove the whole cookie part of the hack and just make the spoiler tags add something like this ? I know this would pretty much be a totally different version of the hack, but it would be much more user friendly in my opinion.. smile
Quote
quote:
Originally posted by Dave2:
This is different from the one that CTM said he is writing, in that his requires you to select the text, so you can control how many spoilers you see.
wink
I don't want to sound ignorant but what does this hack do? The only 'spoilers' I know of are the big huge ones that the [Linked Image] wear on the back of their Hondas. tipsy
Mostly for use by game forums, it hides a piece of text unless spoilers are enabled; so people can post things about - for example - the ending of a game without spoiling it for other people.
Quote
quote:
Originally posted by Dave2:
quote:
[qb]Originally posted by Dave2:
This is different from the one that CTM said he is writing, in that his requires you to select the text, so you can control how many spoilers you see.[/qb]
wink
I must be going daft in my old age..

Thanks Dave.
Has anyone tested this with 6.4 release yet?

I tried it this morning, and got "compliation errors" on ultimatebb.cgi when I tried using it with the 6.4 codebase. Was it me fux0ring up the code, or does it need updating for 6.4?
According to LK, ubb_lib.cgi section needs some modification, tho I have absolutely no idea what's different in 6.4 tipsy .
Has this been updated in the last 3 years? tipsy
Ya know, I wondered about this myself... We where planning on allowing spoilers on our reviews but decided against it due to the lack of the spolier hack...

I believe Ian had something like this on his 6.5 board...
Quote
Originally posted by AllenAyres:

Has this been updated in the last 3 years? tipsy
No tipsy .

We're still running a hacked 6.3.0 (and currently attempting to switch it to a CSS-based layout...fun). Probably hacked in more ways than one, too... I wouldn't imagine it's too hard to update, but then again I've not seen the recent UBB code.
hehe, thanks for the reply smile I may update it once I get some more time in a couple weeks smile
It is too good for those users who are not well knowledge about Spoiler hack -=- CSS/Toggle Version. You can get entire information which you want. Thank you
© UBB.Developers