MyBB Community Forums

Full Version: Suggestion of a new and better code bbcode layout
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

MyBB's code bbcode layout is bad because of 3 reasons:

1) If you copy and paste code from the layout into the template manager in the ACP, all spaces are converted into annoying  's

Example:

<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tbody>
		<tr>
			<td class="tcat tcat_right tcat_left tcat_top">
				<div class="float_left smalltext">
					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
				</div>
				{$post['posturl']}
			</td>
		</tr>

		<tr>
			<td class="trow1 {$unapproved_shade}">
				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
					<tr>
						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
							{$post['useravatar']}
						</td>
						<td class="post_author">
							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
							<span class="smalltext">
								{$post['usertitle']}<br />
								{$post['userstars']}
								{$post['groupimage']}
							</span>
						</td>
						<td class="smalltext post_author_info" width="165">

This is how it will look like:
[Image: x8m2cgie.png]

2) If lines in the code are longer than the width of the code box then they will seperated by a linebreak, making it difficult to read the code.

3) A codeline numbers bar is missing. You have one in the ACP, why not in posts?


I took a look at Woltlab's Community Framework and I'm very impressed by their work. I am actually tempted to switch to WBB3 if I cannot accomplish what I want with MyBB. Their code bbcode box is by far the best of all free and commercial forum software. This is how it looks like:
[Image: 6jl3kmrq.png]

It has a codeline number bar, it doesn't produce any &nbsp; junk, there are no forced linebreaks and it looks overall amazing.

So why not adapt Woltlab's code box layout to MyBB? Oh and please don't say that I should use WBB if I want the new code layout. Woltlab's Community Framework is LGPL, it's meant to provide others with free code Smile

CodePress is outdated and we're discussing internally about a change. CodePress will be replaced at some point, but it's up to Tomm to decide which release to implement a new one in.