Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 2001
Posts: 699
Member
Member
Offline
Joined: Dec 2001
Posts: 699
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

Last edited by Dave2; 03/08/2007 5:57 PM. Reason: Lessee if anyone notices this edit, 4 and a quarter years later...
Sponsored Links
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
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
Offline
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 wink .

2) How would I do that? Call &transition; or something?

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
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

Joined: Dec 2001
Posts: 699
Member
Member
Offline
Joined: Dec 2001
Posts: 699
That code...still makes it use the FYI page for me wink .

Sponsored Links
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Oops, replace "$in{refer}" everywhere with "$ENV{HTTP_REFERER}"

Joined: Dec 2001
Posts: 699
Member
Member
Offline
Joined: Dec 2001
Posts: 699
That works, thanks smile

Text file updated smile

Joined: Dec 2001
Posts: 699
Member
Member
Offline
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 wink )

Joined: Jun 2001
Posts: 729
Coder
Coder
Offline
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
Offline
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.

Sponsored Links
Joined: Dec 2001
Posts: 699
Member
Member
Offline
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
? wink

Joined: Mar 2002
Posts: 451
Spotlight Runner-Up
Spotlight Runner-Up
Offline
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.. smile

Joined: Dec 2001
Posts: 699
Member
Member
Offline
Joined: Dec 2001
Posts: 699
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

Joined: Aug 2001
Posts: 103
Member
Member
Offline
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] wear on the back of their Hondas. tipsy

Joined: Dec 2001
Posts: 699
Member
Member
Offline
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
Offline
Joined: Mar 2002
Posts: 451
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.

Joined: Mar 2001
Posts: 145
Member
Member
Offline
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
Offline
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 tipsy .

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? tipsy


- Allen wavey
- What Drives You?
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
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...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Dec 2001
Posts: 699
Member
Member
Offline
Joined: Dec 2001
Posts: 699
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.

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 smile I may update it once I get some more time in a couple weeks smile


- Allen wavey
- What Drives You?
Joined: Jan 2011
Posts: 3
Lurker
Lurker
Offline
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


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)