php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#155406 - 12/08/02 07:53 AM [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Dave2 Offline
Member

Registered: 12/16/01
Posts: 672
Loc: Bath || Reading, England

   [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version to Del.icio.us Add to del.icio.us
  Digg [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version Digg it
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 <dave@allaboutgames.co.uk>                *
*           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


Edited by Dave2 (03/08/07 04:57 PM)
Edit Reason: Lessee if anyone notices this edit, 4 and a quarter years later...
_________________________
The allaboutgames.co.uk UBB.classic -- Reborn and XHTML'd, 19th May 2002

Top
#155407 - 12/08/02 01:39 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
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?
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#155408 - 12/08/02 02:01 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Dave2 Offline
Member

Registered: 12/16/01
Posts: 672
Loc: Bath || Reading, England
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?
_________________________
The allaboutgames.co.uk UBB.classic -- Reborn and XHTML'd, 19th May 2002

Top
#155409 - 12/08/02 02:38 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
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
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#155410 - 12/08/02 02:54 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Dave2 Offline
Member

Registered: 12/16/01
Posts: 672
Loc: Bath || Reading, England
That code...still makes it use the FYI page for me wink .
_________________________
The allaboutgames.co.uk UBB.classic -- Reborn and XHTML'd, 19th May 2002

Top
#155411 - 12/08/02 03:37 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Oops, replace "$in{refer}" everywhere with "$ENV{HTTP_REFERER}"
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#155412 - 12/08/02 03:51 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Dave2 Offline
Member

Registered: 12/16/01
Posts: 672
Loc: Bath || Reading, England
That works, thanks smile

Text file updated smile
_________________________
The allaboutgames.co.uk UBB.classic -- Reborn and XHTML'd, 19th May 2002

Top
#155413 - 12/11/02 02:22 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Dave2 Offline
Member

Registered: 12/16/01
Posts: 672
Loc: Bath || Reading, England
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 )
_________________________
The allaboutgames.co.uk UBB.classic -- Reborn and XHTML'd, 19th May 2002

Top
#155414 - 12/11/02 04:40 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
1QuickSI Offline
Coder

Registered: 06/10/01
Posts: 705
Loc: CT
I like it. I will just have to adapt it to my 6.1.x system.
_________________________
...Steven
Hostboard.com
Running UBB v6.1.0.4
Doing what NO other UBB in the world is doing.
The first & only production UBB powered by MySQL.

Top
#155415 - 12/24/02 12:45 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Oblivion Knight Offline
Spotlight Runner-Up

Registered: 03/27/02
Posts: 422
Loc: England, UK
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.
_________________________
- OBK
- Gaming Update
- <img src="http://www.ubbdev.com/ud/?s=2&u=Oblivion Knight" alt=" - " /> Results Returned, <img src="http://www.ubbdev.com/ud/?u=Oblivion Knight&s=1" alt=" - " /> Points Collected & Counting!

Top
#155416 - 12/24/02 01:18 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Dave2 Offline
Member

Registered: 12/16/01
Posts: 672
Loc: Bath || Reading, England
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
_________________________
The allaboutgames.co.uk UBB.classic -- Reborn and XHTML'd, 19th May 2002

Top
#155417 - 12/24/02 02:44 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Oblivion Knight Offline
Spotlight Runner-Up

Registered: 03/27/02
Posts: 422
Loc: England, UK
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
_________________________
- OBK
- Gaming Update
- <img src="http://www.ubbdev.com/ud/?s=2&u=Oblivion Knight" alt=" - " /> Results Returned, <img src="http://www.ubbdev.com/ud/?u=Oblivion Knight&s=1" alt=" - " /> Points Collected & Counting!

Top
#155418 - 12/24/02 02:50 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Dave2 Offline
Member

Registered: 12/16/01
Posts: 672
Loc: Bath || Reading, England
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
_________________________
The allaboutgames.co.uk UBB.classic -- Reborn and XHTML'd, 19th May 2002

Top
#155419 - 12/24/02 04:29 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Poopy Pants Offline
Member

Registered: 08/22/01
Posts: 100
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 wear on the back of their Hondas. tipsy

Top
#155420 - 12/24/02 04:53 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Dave2 Offline
Member

Registered: 12/16/01
Posts: 672
Loc: Bath || Reading, England
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.
_________________________
The allaboutgames.co.uk UBB.classic -- Reborn and XHTML'd, 19th May 2002

Top
#155421 - 12/25/02 05:45 AM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Oblivion Knight Offline
Spotlight Runner-Up

Registered: 03/27/02
Posts: 422
Loc: England, UK
Quote:
quote:</font><hr />Originally posted by Dave2:
<blockquote><font class="small">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 <hr /></blockquote>I must be going daft in my old age..

Thanks Dave.
_________________________
- OBK
- Gaming Update
- <img src="http://www.ubbdev.com/ud/?s=2&u=Oblivion Knight" alt=" - " /> Results Returned, <img src="http://www.ubbdev.com/ud/?u=Oblivion Knight&s=1" alt=" - " /> Points Collected & Counting!

Top
#155422 - 12/27/02 12:23 AM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Joe Siegler Offline
Member

Registered: 03/20/01
Posts: 132
Loc: Garland, TX USA
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?
_________________________
Joe Siegler
Webmaster - 3D Realms
Moderator - Infopop UBB Support Forums

Join the TiVolution !

Top
#155423 - 12/27/02 12:58 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Dave2 Offline
Member

Registered: 12/16/01
Posts: 672
Loc: Bath || Reading, England
According to LK, ubb_lib.cgi section needs some modification, tho I have absolutely no idea what's different in 6.4 tipsy .
_________________________
The allaboutgames.co.uk UBB.classic -- Reborn and XHTML'd, 19th May 2002

Top
#155424 - 07/17/05 06:15 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25419
Loc: Texas
Has this been updated in the last 3 years? tipsy
_________________________
- Allen wavey
- What Drives You?

Top
#155425 - 07/17/05 09:08 PM Re: [6.3.x] [beta] Spoiler hack -=- CSS/Toggle Version
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5119
Loc: Portland, OR, USA
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 - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
Page 1 of 2 1 2 >


Top Posters Last 30 Days
AllenAyres 20
Gizmo 10
blaaskaak 2
S7ARBVCK 2
Iann128 1
Claus1 1
M4D 1
Who's Online
0 Registered (), 33 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Security Patch released for all 7.x versions
by AllenAyres
Yesterday at 08:00 PM
What do you use to edit the files
by AllenAyres
Yesterday at 07:54 PM
Team UBBDev Rides Again!
by AllenAyres
Yesterday at 07:32 PM
Here I am! Rock me like a Hurricane!
by AllenAyres
Yesterday at 07:20 PM
BeyondCompare v3.00
by AllenAyres
Yesterday at 07:16 PM
[7.3.1] add search to showmembers page
by AllenAyres
Yesterday at 07:13 PM
Noob - need help, or a reality check!
by Gizmo
09/04/08 03:21 AM
New Mods
[7.3.1] add search to showmembers page
by blaaskaak
Yesterday at 04:50 AM
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users

 

 

 
fusionbb message board php hacks