MyBB Community Forums

Full Version: Space after {thread['threadprefix']}
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay, so, in the postbit, I want my thread prefix to be surrounded by square brackets in the showthread bit. In order to achieve that, I edited the showthread template thusly:

	<div>
		<strong>[{$thread['threadprefix']}] {$thread['subject']}</strong>
	</div>

I expected this to give me:

[prefix] title

Instead, it gave me:

[prefix ] title

How do I get rid of that redundant space?
Is this the "poll" prefix or the custom ones? (Cba to check sorry)

If it's the custom ones then you'll need to remove a space from your thread prefixes.

If it's the default ones you may need to remove a space from the language.
(2011-05-13, 06:29 PM)Clarkie Wrote: [ -> ]If it's the custom ones then you'll need to remove a space from your thread prefixes.

MyBB adds an extra space in the code.

You either have to edit core, or you could add the [ ] brackets to your prefix itself. So instead of using "TAG", use "[TAG]".

If you want to edit the core: in forumdisplay.php search for:
$thread['threadprefix'] .= '&nbsp;';
and comment it out:
//$thread['threadprefix'] .= '&nbsp;';
The latter solution is exactly what I needed, thanks. The reason I dont put the brackets in right with the prefix is

a) aesthetics
b) I already included them in all the display styles now, and editing them back out would be tedious

Thanks again! Smile