23:18 ST
Reply
Some (very minor) BBCode formatting updates

Hello!

We’ve just pushed a few changes to our BBCode renderer which will hopefully save those of you with complex profiles / posts a lot of headaches. The changes are pretty minor things, and are all with regards to spacing. The most noticeable differences are:

Corrected spacing around nested list elements
  • Nested list elements no longer have that awkward gap between nesting levels
    • See? No awkward gap above this line
  • Much better :)

 

Corrected spacing within [code] blocks

It used to be that if you put a [code] block on its own line, the resulting block would begin with a blank line. This is no longer the case, so you can place your opening code tags on their own line :)

This used to look like now looks like
[code]
stuff
[/code)

stuff
stuff

 

Corrected spacing within table [tr] blocks

It used to be if you had blank lines between [tr] blocks (or anywhere else that newlines “can’t” go), these would be incorrectly displayed before the table. Now, they are removed from the output.

This used to look like now looks like
something
[table]
[tr][td]stuff[/td][/tr]


[tr][td]other stuff[/td][/tr]
[/table]

something

 

 

stuff
other stuff

something

stuff
other stuff
Various other minor fixes

Previously some combinations of BBCode could result in invalid HTML which could get rendered inconsistently depending on your browser. These issues have been fixed!

It’s also about 30% faster in generating the HTML from your BBCode, so pageloads involving forum threads or large pet/player profiles will be slightly snappier in terms of response time :)


If you rely on vertical spacing for your profiles, please give them a check to make sure they’re still OK — in some cases, if you’re using a bunch of blank lines for vertical spacing, you may find you need to add a few to reach the same height. As always, please let me know if this change causes any issues for you. There are some very creative profile constructions in use, and I want to make sure we aren’t breaking any of them :)

Posted 03/28/17, edited 03/28/17

It seems like any new lines I put between a table and a centered image don’t display (unless I put them inside the center tags along with the image). Is that supposed to happen? o:

stuff
other stuff

 

 

 

[table]
[tr][td]stuff[/td][/tr]


[tr][td]other stuff[/td][/tr]
[/table]




[center][img]https://www.mycenacave.com/images/games/mushroom_meals/Mushroom_01.png[/img][/center]

I also noticed that if I put any less lines between the image and the start of the code tag, the space between them isn’t visible either! (I think it’s 3 or 4 lines?)

Posted 03/28/17
this is off topic almost completely, but is there any chance that profiles could be custom coded in the future using html / css? or that html / css would be a factor worked into some aspect of the site ever? similarly, it makes sense if it never is, ability to edit the site css and all, and i’m not sure there’s a demand for it, but i thought it’d be nice.
Posted 03/28/17
glitch Much happy cheer for these formatting updates!
Posted 03/28/17

Thanks Rhyme! I’ll check into what’s going on there — as a temporary fix you could probably throw in more newlines, but I’ll see if there’s a better solution to that.

Essi This is unlikely in the near future. HTML sanitization is a horrendously complex problem (interestingly enough, one in which I have personally contributed significant work to the state-of-the-art ^^), and not one which Mycena Cave is likely to be able to do safely across the various browsers that visit us. If we could give everyone’s pet / player profiles their own subdomain to operate within that’d be one thing, but this isn’t feasible for us at this time.

If you want to define your own CSS rules for Mycena Cave, you can absolutely do that! Most browsers allow you to define custom local stylesheets for websites, and there are extension to help you do this too. They’re limited to just your computer of course, but you can restyle Mycena Cave for yourself however you see fit :)

Posted 03/28/17, edited 03/28/17

Hi glitch!

It’s super minor but I used to have my side bars and upper gif be basically flush with each other (so I had two side images and one top image and it made a rectangle in the center). With the update it pushes them all the way to the top if I don’t have a space between the two floated images on the left and right.

It’s not a huge thing since I can just put a space and it drops it down but I figured I should mention it anyway :D!

Posted 03/28/17

Hi priz!

You have some code that looks kind of like this:

[img]topthing[/img]
[float=left][img]leftthing[/img][/float]
[float=right][img]rightthing[/img][/float]

Previously, this ended up displaying sort of like this:

  XXXXXXX
  XXXXXXX
YY       ZZ
YY       ZZ
YY       ZZ

But now it looks like this:

YYXXXXXXZZ
YYXXXXXXZZ
YY      ZZ

And to get the the previous look, you find that you need to insert a blank line in the code like this:

[img]something[/img]

[float=left][img]leftthing[/img][/float]
[float=right][img]right[/img][/float]

Is that correct?

If so, this is actually a fix and is now working as intended: all three floats (default, left, right) fit on the same line, so they’re displayed next to each other. Inserting a blank line pushes the sidebars down because you’re putting the top image into its own paragraph block, which spans the width of the page (and so the left and right floats can no longer fit on the same line).

Note though that if you do this, you won’t be able to get the corners to line up quite right because you’ll get the vertical gap that exists between paragraphs. If you want the corners to be flush with each other, you’ll want to use [clearfloat] to push the sidebar contents down:

[img]topthing[/img]
[clearfloat]
[float=left][img]leftthing[/img][/float]
[float=right][img]rightthing[/img][/float]

You can also use [clearfloat] again right before the bottom image to push it below the sidebar ones, so that you don’t need use a bunch of blank lines to pad out the center rectangle.

Posted 03/28/17, edited 03/28/17
i do have local customization extensions / software, it was definitely more just out of curiosity! i don’t really mind enough to bother with that, however. i know cross browser messiness can be an issue, as well as maliciousness that comes with allowing for embedded scripting. thanks for getting back so quickly, though!
Posted 03/28/17
Thanks glitch! 8D That was exactly what I meant!
Posted 03/28/17

Rhyme Thanks again for pointing out that mistake! It should now be fixed.

If anyone else spots things that are unintuitive / broken regarding vertical spacing in bbcode, please let me know :)

Posted 04/01/17, edited 04/01/17
Awesome, thanks for getting it fixed so quickly! :D
Posted 04/01/17
Reply