MyBB Community Forums

Full Version: Truncating double-spaces
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Truncating spaces, that's what I would like to see in the 'Gold' release.

At the moment if one adds a few smilies to the text it looks like this.

SmileTest textSad where it looks better like this Smile Test text Sad

And addingRolleyes smilies within the Smiletext is even worse...

Suggestion:

Modify this Line in /inc/functions_post to include the extra spaces:

$message = str_replace($smilie['find'], [color=red]" <img [/color]src=\"".$smilie['image']."\" align=\"middle\" border=\"0\" alt=\"$smilie[find]\" [color=red]/> ", [/color]$message);

And modify the db_inserts.php file (Smilie Section Click-Code) to this..

$inserts[] = "INSERT INTO `mybb_smilies` (`sid`, `name`, `find`, `image`, `disporder`, `showclickable`) VALUES (1, 'Smile', [color=red]' :) '[/color], 'images/smilies/smile.gif', 1, 'yes');";

In other words "add" a space either side of the 'clickable code'... as that makes it look "uncluttered" when including the smilies within the text..

And of course the Script that 'calls' the additional (more) smilies, would have to have the spaces added also. Wink

But......... Truncating the double spaces would be the key to NOT making it worse than what it is.. ??

Only a suggestion.. Toungue
Ozidave Wrote:Truncating spaces, that's what I would like to see in the 'Gold' release.

Multiple spaces should appear as 1 in MyBB Gold as multiple spaces are no longer &nbsp;'ed.
Thanks for the info............. Wink

But what I suggested below / earlier is NOT a good idea, as it would mean that ALL smilie code would have to start and end with a space when manually adding the code to the text.. else it wouldn't work. Sad which would be more of a pain than adding the space at the moment.. Sad

Oh Well!! Back to the 'drawing board' ... Toungue

Ozidave Wrote:And modify the db_inserts.php file (Smilie Section Click-Code) to this..

$inserts[] = "INSERT INTO `mybb_smilies` (`sid`, `name`, `find`, `image`, `disporder`, `showclickable`) VALUES (1, 'Smile', [color=red]' :) '[/color], 'images/smilies/smile.gif', 1, 'yes');";

In other words "add" a space either side of the 'clickable code'... as that makes it look "uncluttered" when including the smilies within the text..

I wasn't planning on changing that anyway Toungue In my opinion, I think the user should get the choice where to put their smiliesBig Grin
Ozidave Wrote:The Script that 'calls' the additional (more) smilies, would have to have the spaces added also]

Ok Dennis, with what I've got in mind... (which is not much) and wanted to add a space either side of the 'more' smilies... How and where would I find the code to modify ??

I know I can add it to the 24 modified "smilie" entries in the Db prior to installation, but "Where Oh Where" is the line that would add it to the others.. Toungue