Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 04 Jul 2012, 12:55
Altari Altari is offline
 
Join Date: Sep 2011
How to make the CKeditor return BBCODE and count caracters

Edit because i said some wrong things :

So here is how to get a message from the ckeditor, convert it from html to bbcode, and count caracters in the message without bbcode :


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


Last edited by Altari; 04 Jul 2012 at 16:20. Reason: Update
Reply With Quote
  #2  
Old 04 Jul 2012, 13:22
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
That's what I would have suggested - can you give us a sample of bbcde that results in html?
Reply With Quote
  #3  
Old 04 Jul 2012, 14:20
Altari Altari is offline
 
Join Date: Sep 2011
Hmm i should be a little bit stupid, i wanted to answer "Yes" to you but during test to be sure i can see my editor return directly html, no bbcode, that's why the PlainText parser does nothing.
I don't understand, my editor returned BBcode yesterday

So that's not really the thread, but maybe you could tell me how to construct an edit which return bbcode and not HTML ?
I actually do this :

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


Last edited by Altari; 04 Jul 2012 at 14:58.
Reply With Quote
  #4  
Old 04 Jul 2012, 15:17
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Well, the editor has a button in the upper left corner that sort of looks like "A/A", that toggles wysiwyg mode, and I think you get either html or bbcode depending on how that is set. I don't know a lot about the editor so I don't know how to tell you to force a certain mode, but looking at newreply.php, it does this (after "cleaning" the wysiwyg parameter):


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

Reply With Quote
  #5  
Old 04 Jul 2012, 15:48
Altari Altari is offline
 
Join Date: Sep 2011
Thank you for help,

About the "A/a" button : in every case it's bbcode which is shown, but $vbulletin->GPC['message'] returns html.

Thank you for the parse_wysiwyg_html_to_bbcode, it works as expected (and the PlainText parser too)

But there should be an other way to make the ckeditor return bbcode and not HTML : i did it yesterday but i don't know how

Thank you !
Reply With Quote
  #6  
Old 04 Jul 2012, 19:23
Badshah93's Avatar
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Real name: Aayush Agrawal
Create New Plugin

Hook: newpost_process
Code:


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

Reply With Quote
  #7  
Old 17 Aug 2012, 01:58
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
I am looking for a plugin to convert HTML posts to BBCode posts and came across this thread but I'm not sure I understand what you guys here are trying to do.

In particular, is the first post supposed to be a plugin or a separate PHP file? And what is the plugin in post #6 doing?
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:57.

Layout Options | Width: Wide Color: