MyBB Community Forums

Full Version: Code tabs problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A user in my forum asks:

Quote:Is there an option that we can get non-breaking spaces in code tabs? The formatting always gets lost, which makes it hard to read.

Does that ring a bell with anyone?

How to do this?

Thanks

Carlos
I should maybe mention my forum is here:

http://www.idevgames.com/dim3/
I don't believe it's possible with the way the tags are currently formatted, but I think you can solve it by doing this:
Open functions_post.php and find:
PHP Code:
$replace = array("<div class=\"code_header\">$lang->code</div><div class=\"code_body\">",
                     
"</div>\n"); 
Replace it with:
PHP Code:
$replace = array("<div class=\"code_header\">$lang->code</div><div class=\"code_body\"><pre>",
                     
"</pre></div>\n"); 

Note: this may mess up your layout if there are long pieces of text, just like [php]-code does.
Reference URL's