bbcode convert html to bbcode

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Ideas Centre
Locked
gennyna
Registered User
Posts: 72
Joined: Mon Apr 06, 2009 7:29 pm

bbcode convert html to bbcode

Post by gennyna »

I know it seems a matter of words, but now I'll explain better ..

I'd like to create a bbocode that transforms HTML into bbocode .. Type

[bbcode] html code here [/ bbcode]

and have the results as HTML BBCode turned into ..

example:

[bbcode] <p> <a href="www.esempio.it"> Click Me </ a> </ p> [/ bbcode]

Code: Select all

[url=http://www.esempio.it]Cliccami[/url]
Senky
Former Team Member
Posts: 2300
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: bbcode convert html to bbcode

Post by Senky »

So you want bb code, which will transform common html into bb codes? And than what to do with it? Remove it from the post? I would say, it will be better to make some external page where html will be converted into bb codes. And - what about custom bb codes? How to parse them?
Understand?
‎‏‏ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‏‎‏‏‎ ‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎🔔
Browser & Mobile Notifications Extension
Now with Safari (both macOS and iOS) support!
gennyna
Registered User
Posts: 72
Joined: Mon Apr 06, 2009 7:29 pm

Re: bbcode convert html to bbcode

Post by gennyna »

We therefore need to create this HTML page to create the parser to be used later in bbcode?
Senky
Former Team Member
Posts: 2300
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: bbcode convert html to bbcode

Post by Senky »

I would not do this in html (and js), it would be better to use php and submit text (with html) and after submit, the output (in bb code) will be shown...
‎‏‏ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‏‎‏‏‎ ‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎🔔
Browser & Mobile Notifications Extension
Now with Safari (both macOS and iOS) support!
gennyna
Registered User
Posts: 72
Joined: Mon Apr 06, 2009 7:29 pm

Re: bbcode convert html to bbcode

Post by gennyna »

is a good idea
gennyna
Registered User
Posts: 72
Joined: Mon Apr 06, 2009 7:29 pm

Re: bbcode convert html to bbcode

Post by gennyna »

up :P
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: bbcode convert html to bbcode

Post by Oyabun1 »

gennyna wrote:is a good idea
This sounds like a very bad idea.

If you automatically parse HTML and convert it into BBCode that would be the same as allowing HTML to be entered directly in a post and thus bypassing the phpBB security feature of not allowing HTML in posts.

There is a mod around that will allow posting HTML directly, but because it is a security risk it is not available from this site.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
Locked

Return to “[3.0.x] MOD Requests”