Previous Thread
Next Thread
Print Thread
Rate Thread
#55541 02/25/2003 12:32 AM
Joined: May 2001
Posts: 794
Content Queen
Content Queen
Offline
Joined: May 2001
Posts: 794
My community is one of readers, and most readers hate to have anything spoiled for them. Thus, I went in search of a "spoiler hack" here.

A long, long time ago, someone posted a very basic SPOILER hack that involved adding one line of code to the ubb_lib.cgi file and one line of code to the vars_wordlets_mods.cgi file.

I have that. I am able to use that on my 6.5.0 board (you type [spoiler] and spoiler code fills the area so that if you click on active topics, you don't see the spoiler info).


Because my community is also mostly women--with most of them non-computer types--I need to use the KISS method with a lot of things.

Yes, even typing in [spoiler] is hard for some of them. laugh

So I was hoping that I could convince someone here to modify the simple spoiler hack that I have--into something a little more user friendly.

Here's my vision:

An Instant UBB Code button would be created. You click on it, and a pop-up window--much like the one for BOLD--opens up. Inside this dialogue window, you type the reason for the spoiler. You click OK ... and what you've type is automatically inserted into the message field--and the code for the spoiler is inserted.

It might look something like this:

SPOILER ALERT
The reason for this alert is because a discussion of PORTRAIT IN DEATH follows.
[spoiler]

This would then generate in front of the spoiler message enough of a warning to keep a story from being spoiled.

How hard would this be? Would anyone be willing to take a shot at it?

Thanks. smile


Sue
adwoff.com
Sponsored Links
#55542 02/26/2003 3:09 PM
Joined: May 2001
Posts: 50
Member
Member
Offline
Joined: May 2001
Posts: 50
The javascript popup is easily possible. Just copy the code for one of the exisitng ubb-code pop-ups in public_common.pl, and tweak it for the spoiler code.

#55543 02/26/2003 10:57 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
If you want something real simple, make a post icon that says 'spoiler'. Those that post spoiler messages could use it for the post icon and those that hate the spoiler messages could skip those threads smile


- Allen wavey
- What Drives You?
#55544 02/27/2003 12:42 AM
Joined: May 2001
Posts: 794
Content Queen
Content Queen
Offline
Joined: May 2001
Posts: 794
Allen, if only it could be that easy. laugh Half the time I couldn't get people to change the message icon from the smile so I finally put a blank one in its place. (Imagine, posting a condolence post with a smile tipsy )

With active topics, I need something to keep the potential spoiler info hidden away.

I tried playing with this a little earlier & came up with a whole bunch of syntax errors ... I'll give it another shot. Cuz I'm stubborn. tipsy


Sue
adwoff.com
#55545 02/27/2003 2:21 AM
Joined: May 2001
Posts: 794
Content Queen
Content Queen
Offline
Joined: May 2001
Posts: 794
Okay ... I've tried to play around with stuff, but since I'm clueless as to the programming language, just plugging in certain pieces of info just isn't working. laugh

My goal is this: create an Instant UBB Code Button for spoilers ... click on it, and a dialogue window appears--asking what the spoiler is for; click okay, and that information AND spoiler code fills the message window.

From a very basic spoiler hack that was created by someone a long time ago (I apologize for not knowing the name of the creator), you find this piece of code in the ubb_lib.cgi file:

Code
[/code]and add after it this piece of code:

[code]
Then, you set up what the [SPOILER] would mean in the vars_wordlets_mods.cgi file

-------

Can anyone out there talk me through how to make it so that the SPOILER code can be accessed by clicking an Instant UBB Code button?

Thanks!


Sue
adwoff.com
Sponsored Links
#55546 02/27/2003 3:24 AM
Joined: May 2001
Posts: 50
Member
Member
Offline
Joined: May 2001
Posts: 50
Ok completely without wordlets (because I'm being lazy tipsy ).

In public_common.pl. Find:
Code
[/code].
Add below:
Code
</pre></div></div>.<br>Find:<br><div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre>
.
Add below:
[code]
.

Change the text to what-ever you wish, and insert a gif file for ubb-spoiler.gif in your non-cgi directory (for the button). You might need to move that last line up or down a few lines depending on where you want the code button to appear.

#55547 02/27/2003 1:02 PM
Joined: May 2001
Posts: 794
Content Queen
Content Queen
Offline
Joined: May 2001
Posts: 794
Thank YOU, thank YOU, thank YOU! laugh thumbsup

With one tweak, I was able to get it to work perfectly!

Thank YOU, thank YOU, thank YOU! laugh thumbsup


Sue
adwoff.com

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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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
WebGuy 2
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)