MyBB Community Forums

Full Version: Change Code BB Tag
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

Remove code and php tag.

Add code=lang tag and any code colorant. (Prism or highlight.js)


For HTML (xxx = code):

[xxx=html]your code here[/xxx]

Output (Source Code)

<pre><code>your code here</code></pre>

I believe this is necessary.

I don't really think that this is necessary or something important but ok...
I think details are important Sad
I want to say that this is not necessary for most of forums and it would be real pain to make that different for each language or so and even than not all languages will be implemented as there are too much of them so...

Maybe it's not something necessary right now.
Considering that MyBB already has support for PHP syntax highlighting, it probably won't hurt adding that for every other language. If I recall, the 2.0 parser had support for Markdown, which in Discord would be:

...PHP code here...

Edit: I got tripped up by the names Discourse and Discord being similar again x.x
(2017-12-09, 03:18 AM)Azah Wrote: [ -> ]Considering that MyBB already has support for PHP syntax highlighting, it probably won't hurt adding that for every other language.
Actually the reason it's there is likely because PHP syntax highlighting is included in PHP itself.
Other languages would require someone to actually write a parser, which may introduce speed issues and the like.
Yeah, we could do the syntax highlighting with JS, but then when users have JS disabled obviously that won't work. Whether that's an acceptable trade-off, I'm not sure.
There is another thread about highlighting code syntax. Code is complex enough it would require a full-blown plugin / parser instead of a simple REGEX / replace custom MyCode. I don't know if enough forums post code to make code block a standard MyCode. Also, as I mentioned in that other thread, use GeSHi to highlight the syntax on the server side instead of relying on complex JavaScript.
I thought this was a way to edit the 'CODe' text above the source code box, i've been looking for a way to do this for some time... I want to change the 'Quote' and 'Code' text to-:

Quote = 'Highlighted Text'
Code = 'Links'

Can someone tell me which file these parts of the code are in please?
(FYI : I can see when i look at the 'inspect' part of Firefox it is a label called 'codeblock' so i guess this is just the html/css for the 'code' and 'quote' boxes)


'Quote' and CHANGE to (=) 'Highlighted Text' (Above the Box)


'Code' to (=) 'Links' (Above the Box that contains the "CODE") as alot of us have no NEED for the actual Wording = CODE, PHP, QUOTE etc, BUT other wording, and BOLD or ITALIC in these words.... a TUTORIAL on HOW TO CHANGE in CODE WOULD BE GREAT & I THINK MUCH NEEDED. I've needed this on a number of different Forum Types over the years, and had thos done in phpBB, but I'm now using myBB on ALL my Forums, I'm hoping somebody can help Me/US Pls.... :-)

A STEP-by-STEP TUTORIAL with IMAGES would be IDEAL, Anyone else require this "HOW-TO"?

There is no Need for 'CODE' or 'PHP' on Non-Coding Forums, but alot of Forums use CODE & PHP for 'LINKS' & Adding Font Boldening/Italic/Change Colour of these words ABOVE the 'Box' is another great EDIT most of us would use IMHO given what Forums I use on a daily basis....
Pages: 1 2