|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
******************************************************************************** * 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 Uhh... helps if I post a link Text file Oh yeah, it'll need some modification for 6.3.1
Last edited by Dave2; 03/08/2007 5:57 PM. Reason: Lessee if anyone notices this edit, 4 and a quarter years later...
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
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?
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
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  . 2) How would I do that? Call &transition; or something?
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
2) try something like: 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 
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
That code...still makes it use the FYI page for me  .
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Oops, replace "$in{refer}" everywhere with "$ENV{HTTP_REFERER}"
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
That works, thanks Text file updated 
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
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  )
|
|
|
|
Joined: Jun 2001
Posts: 729
Coder
|
Coder
Joined: Jun 2001
Posts: 729 |
I like it. I will just have to adapt it to my 6.1.x system.
|
|
|
|
Joined: Mar 2002
Posts: 451
Spotlight Runner-Up
|
Spotlight Runner-Up
Joined: Mar 2002
Posts: 451 |
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.
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
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 ? 
|
|
|
|
Joined: Mar 2002
Posts: 451
Spotlight Runner-Up
|
Spotlight Runner-Up
Joined: Mar 2002
Posts: 451 |
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.. 
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
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. 
|
|
|
|
Joined: Aug 2001
Posts: 103
Member
|
Member
Joined: Aug 2001
Posts: 103 |
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]](http://ColoradoF-Body.com/ubb/graemlins/Type-R.gif) wear on the back of their Hondas. 
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
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.
|
|
|
|
Joined: Mar 2002
Posts: 451
Spotlight Runner-Up
|
Spotlight Runner-Up
Joined: Mar 2002
Posts: 451 |
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]
I must be going daft in my old age.. Thanks Dave.
|
|
|
|
Joined: Mar 2001
Posts: 145
Member
|
Member
Joined: Mar 2001
Posts: 145 |
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?
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
According to LK, ubb_lib.cgi section needs some modification, tho I have absolutely no idea what's different in 6.4  .
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Has this been updated in the last 3 years? 
|
|
|
|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 Likes: 20 |
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...
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
Member
Joined: Dec 2001
Posts: 699 |
Originally posted by AllenAyres: Has this been updated in the last 3 years? No  . 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.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
hehe, thanks for the reply  I may update it once I get some more time in a couple weeks 
|
|
|
|
Joined: Jan 2011
Posts: 3
Lurker
|
Lurker
Joined: Jan 2011
Posts: 3 |
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
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|