convert html to bbcode

Started by alimrb, April 15, 2011, 04:19:22 AM

Previous topic - Next topic

alimrb

is there any complete sql syntax for converting html tags to smf bbcode?

Arantor

No, especially since not all HTML can be represented in bbcode anyway.

What are you trying to convert?

alimrb

i use Re: RSS Feed Poster 3.0 Released!

and it cannot convert external html tag to bbcode , and i want to convert it's posts with html tags to bbcode for simple editing with sql query.

if there is not any complete html to bbcode converter sql, what is the function and php file name that do this for WYSIWYG editor?

alimrb

the post code of the mod is:

$msg_body =  $func['htmlspecialchars']($context['feeditems'][$i]['description'], ENT_QUOTES);
$msg_body = $func['htmltrim']($msg_body);
$msg_body = '[html]' . $msg_body . '[/html]';


how can i use the html to bbcode converter function of the WYSIWYG Editor in  the code?

Arantor

The one in the WYSIWYG editor is extremely (and I do mean EXTREMELY) limited. You do know that it doesn't even handle complex bbcodes that are built into SMF, right?

The odds are that even if you did wire up html_to_bbc() and legalise_bbc() in Subs-Editor.php that it'd give you a variety of bbcode and a lot more HTML it could not convert.

alimrb

#5
but i used the html_bbcode in the mod's code and it done.

thanks.

Arantor

Yes... it doesn't convert anything. It just allows using the raw HTML.

Advertisement: