Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Joined: Apr 2001
Posts: 96
Power User
Power User
Joined: Apr 2001
Posts: 96
Originally Posted by Gizmo
Could you paste me exactly what you put in the ubbcode block for the spoiler tag? What it looks like is that you're missing the ),

All I did was type
test
smirk

The error came up in Post Preview - I never actually posted it. Not sure if that makes a difference...



GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0
Sponsored Links
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
well, the error is with the ubbcode insert in the lib file; i need to know exactly what you inserted to troubleshoot it lol


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: Apr 2001
Posts: 96
Power User
Power User
Joined: Apr 2001
Posts: 96

Sorry, I misunderstood what you were asking blush

I put this in libs/ubbthreads.inc.php, the same code you provided, after the email line as directed:
Code

array( "#\[spoiler\](.+?)\[/spoiler\]#i", "<div class=\"ubbcode-block\"><div class=\"ubbcode-header\">Warning, Spoiler: <input type=\"button\" class="form-button" value=\"Show\" onclick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }\" /></div><div class=\"ubbcode-body\"><div style=\"display: none;\">\\1</div></div></div>" ),

And not only do I get the following error, but it prevents the entire forum from loading up. I get a white screen with:
Quote

Parse error: syntax error, unexpected T_STRING, expecting ')' in /home2/gbb/public_html/threads/libs/ubbthreads.inc.php on line 1011

confused


GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0
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
I'm certainly hoping you're posting the content of your file vs the first post in this thread lol...

I don't honestly see why you'd be getting this issue; could you email me your libs/ubbthreads.inc.php so I can take a look? james[at]virtualnightclub[dot]net.


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: Apr 2001
Posts: 96
Power User
Power User
Joined: Apr 2001
Posts: 96

Of course I copied/pasted it from my file - lol - but I'll email it to you anyway... laugh


GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0
Sponsored Links
Joined: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Gizmo,

This looked like a cool addon so I tried it as well, I got the same error. I simply copied/pasted the one line in your first post and saved the file. I got the same error and removed it.

Fred

Joined: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Found the error. You were missing the escape characters for the added "class" part.

Should be:
Code
array( "#\[spoiler\](.+?)\[/spoiler\]#i", "<div class=\"ubbcode-block\"><div class=\"ubbcode-header\">Warning, Spoiler: <input type=\"button\" class=\"form-button\" value=\"Show\" onclick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }\" /></div><div class=\"ubbcode-body\"><div style=\"display: none;\">\\1</div></div></div>" ),

Fred

Joined: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Hmmm, I added everything like in the instructions, but I can't get the window to "popup."

I did change void(x) to void (0) to match the others as in:
Code
<a href="javascript: void(0)" onclick="DoPrompt('spoiler');" title="Spoiler" alt="Spoiler"><img id="spoiler" onmouseover="raiseButton(this.id);" onmouseout="normalButton(this.id);" onmousedown="lowerButton(this.id);" class="markup_panel_normal_button" src="{$config.BASE_URL}/images/{$style_array.markup_panel}/spoiler.gif" /></a> 


Still no dice.

Joined: Apr 2001
Posts: 96
Power User
Power User
Joined: Apr 2001
Posts: 96

Good eye, Fred! Mine's working properly now... cool
It was the class="form-button" missing the slashes...



GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0
Joined: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Are you using the markup panel? I have gotten the spoiler part to work, but not the markup panel. It shows the button, will highlight it and when you mouse over it, it says "spoiler" and at the bottom (status bar) you can see where it will call javascript like the others, but when you click the button nothing happens.

Sponsored Links
Joined: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Weird, I had to exit out of IE all together and come back and now the spoiler button is working...

FYI


Joined: Apr 2001
Posts: 96
Power User
Power User
Joined: Apr 2001
Posts: 96

No, I didn't include it in the markup panel, but glad yours is working now... cool




GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0
Joined: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Oh, one more FYI, the gif file is about 1 or 2 pixels too big (tall-height).

Edit: I removed a pixel from the top and it matches up now.
Attachments
2375-Spoiler.gif (467 Bytes, 3 downloads)

Last edited by Fred Johnson; 03/19/2007 4:19 PM.
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
The markup panel addon should work, i tested it like once then removed it from my board.

As for the class, blaime it on me... I added that like a week or so ago and just updated it here vs taking from my live board lol... I'll update first post now...


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: 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
Ok, first post updated.

As for the markup panel working after you closed your browser; your browser was caching the lib file.

AS for the gif being "too big", I'll get it updated to freds; the one I supplied was the ! which should be the proper size.


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: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Gizmo,

Well, I thought it was all working, but I have found out that now if someone uses a spoiler tag in a post no one can edit either their post or any post in the topic (even if posted after the spoiler tag post).

Any ideas?

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
I don't see how it'd happen actually, could you link me to an example of this?


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: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Sent you a PM.

Test

Can someone else with this mod installed post a spoiler in a topic and then try to edit their post?

Does it let you?

Fred

Last edited by Fred Johnson; 03/19/2007 6:03 PM.
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
Allows me just fine on 3 installs, hence why i dont see why this would error...


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: Apr 2001
Posts: 96
Power User
Power User
Joined: Apr 2001
Posts: 96

No problems here. It's a tag like any other, so doesn't make sense to me, either... confused


GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0
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
I can't see how it COULD mess with the edit post timer (the erorr is generated from that), all this mod does is insert html/ubbcode into the database which any post-based mod would do... The worse that could occour would be that the connection to the server died mid-packet and not all html was inserted; which would be near impossible and woudln't be related lol...


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: 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
After digging further we discovered that Fred's issues derived from a separate issue which was in no part related to this modification.


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: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Yep,

Gizmo sure is a trooper! He logged into my site and saw I wasn't nuts, well at least that something was wrong. whistle

I backed out all of the mods and I was still having the problem so I then went a little deeper and remembered that earlier today I had made a code change listed on the main UBB site for a v7.1.1 fix. I usually read the fixes, try them out and update my code as Rick lists them, but this one is what broke the page. I'll have to tell him about it (tomorrow, it's late now).

Anyway, this mod works great, you should try it, it is a neat feature (not sure why it isn't here yet?).

Fred

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
Oh, it will be here wink... just you wait hehe...

And yeh, if you applied a fix schedualed for 7.1.1 then you definitely should report it; odd that it b0ged things this badly though lol...


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: Apr 2001
Posts: 96
Power User
Power User
Joined: Apr 2001
Posts: 96

Fine, don't tell the rest of us what conflicted with it... tipsy wink



GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0
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
According to Fred, it was one of the proposed 7.1.1 fixes at UBBCentral; he'll be making a post about it there later on today.


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: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
To be specific it was the modify.inc.php one where on line 94 you change the T2 to a T1. Don't do it...

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
Originally Posted by Fred Johnson
Don't do it...
But, that makes me want to do it...


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: Jul 2006
Posts: 21
Junior Member
Junior Member
Offline
Joined: Jul 2006
Posts: 21
Then do it, but don't.

How's that?

I guess you could call it a "feature." Only the topic generator can edit a post in the topic for x amount of minutes... tipsy

Joined: Nov 2001
Posts: 29
User
User
Offline
Joined: Nov 2001
Posts: 29
Originally Posted by Gizmo
Originally Posted by Fred Johnson
Don't do it...
But, that makes me want to do it...

/agree Now I HAVE to try it! lol


-Cuervo
zOMG and oNOES
Joined: Nov 2001
Posts: 29
User
User
Offline
Joined: Nov 2001
Posts: 29
What about spoilers based on User Group? j/k


-Cuervo
zOMG and oNOES
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
Lol that could be interesting; not sure how it'd work lol, but interesting none the less...


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: Apr 2001
Posts: 96
Power User
Power User
Joined: Apr 2001
Posts: 96

Just to boost your ego a bit... laugh

Quote

Those spoiler tags are the coolest things ever.
Quote

This is an AWESOME feature Geoff, thanks!
Quote

I like it Geoff!! smile Great idea!!

Thanks for making me look good! laugh wink



GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0
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
haha, makes me feel much better today! (sick as a dog)


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: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
i must echo the sentiments.. spoiler mod is sooooo much of a great idea!!

thanks

ps: should put this mod in the core :2c:

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
Originally Posted by sirdude
ps: should put this mod in the core :2c:
wink


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: 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
I added code which would allow users to specify a warning; it can come quite helpful if they wanted something other than the generic "Warning, Spoiler", they could have "Chapter 6, Title" and have it run into the spoiler.

Originally Posted by Gizmo
To allow users to specify their own warning:
In libs/ubbthreads.inc.php, add after the [spoiler] tag set:
Code
			array( "#\
((.+?)\)
(.+?)\[/spoiler\]#i", "<div class=\"ubbcode-block\"><div class=\"ubbcode-header\">\\1 <input type=\"button\" class=\"form-button\" value=\"{$ubbt_lang['SPOILER_SHOW']}\" onclick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = '{$ubbt_lang['SPOILER_HIDE']}'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '{$ubbt_lang['SPOILER_SHOW']}'; }\" /></div><div class=\"ubbcode-body\"><div style=\"display: none;\">\\2</div></div></div>" ),

Usage Instructions:
Code
[spoiler=This will be the warning]This text will be hidden


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: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
hrm, i wonder where that idea came from.. whistle

glad you added it wink

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
Well, it's been in for quite a while (in my bbcode that I transfer everywhere), I just adapted it for UBB7.2 and mailed it to Rick for 7.2 but it didn't get in :tear:


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: 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 UBB Spoiler Tags. You can get entire information which you want. Thank you

Page 2 of 2 1 2

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
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
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)