Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 14 Aug 2008, 21:56
sockwater's Avatar
sockwater sockwater is offline
 
Join Date: Apr 2008
[SQL] BBcode breaks

This [SQL] bbcode breaks when previewing or quick editing in full WYSIWYG mode.

To fix this, you can add an HTML comment to the beginning and end of the [sql] bbcode replacement text (to identify where it begins and ends), and then in a plugin on wysiwyg_parse_start (or wysiwyg_parse_complete (either one should work)), add something similar to this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 15 Aug 2008, 16:05
Jase2 Jase2 is offline
 
Join Date: Dec 2007
This was reported before, although the staff didn't know how to fix it. I'm sure they will appreciate this.
Reply With Quote
  #3  
Old 15 Aug 2008, 18:24
sockwater's Avatar
sockwater sockwater is offline
 
Join Date: Apr 2008
Actually my code is a little bit off, since I just wrote it from memory. I've looked back at my code, and I've found an even easier way to do this. Here is a full working example.

1. Create a custom SQL bbcode, fill in any dummy text in the replacement HTML box (it won't be used). This will cause the bbcode to show up on misc,php?do=bbcode

2. Create a plugin on bbcode_create: The trick is adding 'sql' to the list of unparsed tags (the last line).

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #4  
Old 16 Aug 2008, 10:40
Jase2 Jase2 is offline
 
Join Date: Dec 2007
Any comment from staff?
Reply With Quote
  #5  
Old 16 Aug 2008, 10:44
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Staff will respond once we have information to share.
__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #6  
Old 16 Aug 2008, 22:16
Jase2 Jase2 is offline
 
Join Date: Dec 2007
Ok.
Reply With Quote
  #7  
Old 05 Sep 2008, 22:52
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Originally Posted by sockwater View Post
This [SQL] bbcode breaks when previewing or quick editing in full WYSIWYG mode.

To fix this, you can add an HTML comment to the beginning and end of the [sql] bbcode replacement text (to identify where it begins and ends), and then in a plugin on wysiwyg_parse_start (or wysiwyg_parse_complete (either one should work)), add something similar to this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Here's the original thread:
http://www.vbulletin.org/forum/showthread.php?t=168734
__________________
Sr Software Developer / Tech Lead
Reply With Quote
  #8  
Old 06 Sep 2008, 03:48
sockwater's Avatar
sockwater sockwater is offline
 
Join Date: Apr 2008
Originally Posted by SirAdrian View Post
Thanks for the link. The instructions in post #3 will fix this bug.
Reply With Quote
  #9  
Old 06 Sep 2008, 12:42
Jase2 Jase2 is offline
 
Join Date: Dec 2007
Originally Posted by Marco van Herwaarden View Post
Staff will respond once we have information to share.
So have you decided on this or not?
Reply With Quote
  #10  
Old 06 Sep 2008, 12:57
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Originally Posted by Jase2 View Post
So have you decided on this or not?
Nope, so far no one has had time to look - its been this way for a number of years so there is no hurry.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #11  
Old 12 Jun 2009, 16:13
sockwater's Avatar
sockwater sockwater is offline
 
Join Date: Apr 2008
Originally Posted by Paul M View Post
Nope, so far no one has had time to look - its been this way for a number of years so there is no hurry.
May I reiterate that the only change you need to make is add the following code to any plugin on bbcode_create:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This tells vBulletin that the [SQL] bbcode should be displayed in the WYSIWYG editor as [SQL]Raw SQL text[/SQL] instead of sending the actual formatted display text to the WYSIWYG editor.

For example, the [B] bbcode is parsed; it displays as bold instead of [B]bold[/B] in the WYSIWYG editor. On the other hand, the [QUOTE] bbcode is unparsed; it displays as [QUOTE]some quote[/QUOTE] in the WYSIWYG editor, and not as the formatted display HTML for the quote.
Reply With Quote
  #12  
Old 12 Jun 2009, 18:41
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Added.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:19.

Layout Options | Width: Wide Color: