• When posting, please be aware that artistic nudity is still nudity and not allowed under RpNation rules. Please edit your pictures accordingly!

    Remember to credit artists when using work not your own.

Tutorial How to Prettify A Code

Amerikia1126

Occasionally Active
So you want to make pretty code?

You came to the right place.​

I'd like help with something else.
I want to request a bbcode!*
*Filter by prefix, choose "Accepting Requests"

I want help with bbcode!

I want to learn how to use a bbcode!

I want to make aesthetically pleasing bbcode!

I don't understand bbcode at all!


This is an bbcode guide in aesthetics meant to make codes look just a little bit nicer. This guide will not be covering how to code from scratch but rather more along the lines of quick fixes able to be applied to current codes.

  • Before you begin...
    Go here to disable disable the rich text editor.
    You will have to untick the box next to "Use the rich text editor to create and edit messages".

    Why? Well, the rich text editor loves to muck with your pretty code. It adds unnecessary code and makes things really messy under the hood, so please disable it if you intend to heavily use bbcode in your posts.

    THIS DOES NOT FULLY DISABLE THE RICH TEXT EDITOR. You know when you make a post and click edit, how a box pops up? Yeah, that's the rich text editor in disguise. Click "more options" to take you to the bbcode editor. This is where you'll be spending most of your time coding.

    Note, the preview will be slightly off, so I suggest you make a thread in your private workshop so you can test out your code's true appearance in private.

    Help! The top bar is gone! Yes, that's supposed to happen. This isn't like IPS where there was one text editor, the bbcode editor is different. You can still do everything you can do with the top bar. What the top bar does is automatically insert the code for it when you click that button, making things more user friendly. Generally, this is a good thing, but since we want to do these things ourselves, having the rich text editor on is not a good idea. The top bar bbcodes are located here, so if you're looking for those, they're here.


Have a question not answered or a correction to make? Reply below and I'll add it to the guide.

Note that this guide is incomplete, it's up to you guys to ask what you want to know.

*edited imagefloat code
*added "recreating top bar effects" tab
 
Last edited:
Great guide! Just a suggestion for the hidden text thing -

You can use [COLOR=transparent]text[/COLOR] to make the text colorless, so you won't need to have a specific background for it.
 
Frequently asked questions.

The following are some bbcode questions I've seen asked a few times. These questions range from bbcode wonky bits to asking if something is possible.​

  • The editor keeps adding a bunch of junk code?
    There are three scenarios here.

    1. Your rich text editor is still on. To fix this go to your preferences and disable it. I cannot stress this enough.

    2.Your tags aren't closed. If you're testing out a code, and the editor adds a bunch of junk, it's very likely that your tags are still open. What do I mean by this? Well if you have an accordion slide containing a [font] code, but you never put a [/font] code in there, the editor will freak out and spam font codes everywhere.

    3. Your tags are in the wrong order. Stacking codes is entirely possible and is usually required of codes, but you have to close them in the right order. Compare them to russian dolls, they go inside each other. So if you start a code with [font][color][size], you have to close with [/size][/color][/font]. You would end up with this: [font][color][size][/size][/color][/font].

could've been added to the main post, but this thread needs a bump
 
A couple div tricks.

Have you seen what divs can do? Wondering how to do some of the things they can? This is a pretty good start.​

  • Centering a Post
    Sure you can use centerblock to center a code, but it's really finicky and doesn't center it everywhere. Instead, what you could do is center a post by wrapping the whole thing up in a big div and centering that.

    [div=margin: auto;]insert your beautiful code here[/div]

    What this does is tell the.. great magical being that controls what things look like on a website to automagically center your post on any screen. Well, center it within the post box.

    Hidden Scrolls
    While not the most mobile-friendly or user-friendly thing to do, this is a rather popular element in many aesthetics that aren't greyscale. You can find out how to make these here.

    Curved Borders (and circles!)
    Depending on the amount of curve you give your divs, this can look very elegant. It's pretty simple to do, just make sure you give the div, or those inside of it, a background or border in order
    (heh, that rhymed)
    for the effects to be visible.

    For normal curves:
    [div=border-radius: XX;]your beautiful code here[/div]

    For circles:
    [div=border-radius: 50%;]your beautiful code here[/div]

been a while since i updated this. figured i should add some more fancy stuffs. kept it basic tho, google's learning's a great teacher for complex stuff. can show how to do something more complex, but i think there's places for that already.
(totally knows all the new hacks and how they work.)
 

Users who are viewing this thread

Back
Top