How do I format my forum post? [HowTo]

The TTN forum is using Discourse, which supports several ways to format your post:

  • Markdown
  • BBCode
  • HTML
  • Any combination of the above

Quite often you’ll need an empty line above specific formatting to make it work. You’ll also have to type blank lines to create proper paragraphs; just pressing Return once and then typing a new block of text right below a previous block only creates a so-called line break, which might be harder to read.

Leaving one blank line between two blocks of texts nicely creates a new paragraph with some whitespace, which looks great on both mobile and in a regular desktop browser.

Toolbar

The toolbar above the editor’s input helps create mostly Markdown posts:

  • To apply formatting to parts of your post, first select the text you want to format and then click one of the toolbar buttons.

  • See the button’s tooltip for some hints. From left to right: quote post you’re replying to, bold, emphasis (italic), hyperlink, blockquote, preformatted text, upload an image or file, bulleted list, numbered list, heading, horizontal rule, emoij, other options (such as hidden details).

Code and logs

There are many options to format your code or logs:

  • “Fenced code blocks”: type 3 backticks above and below your text, optionally followed by a specification of the language for syntax highlighting, like ```cpp for C++, and likewise javascript, json and sql:

    Here is my code:
    
    ```cpp
    #define LMIC_DEBUG_LEVEL 0
    #include <avr/sleep.h>
    #ifdef PROGMEM
    // On AVR, these values are stored in flash and only copied to RAM
    int a = 0;
    ```
    

    …yielding highlighted C++ code:

    Here is my code:

    #define LMIC_DEBUG_LEVEL 0
    #include <avr/sleep.h>
    #ifdef PROGMEM
    // On AVR, these values are stored in flash and only copied to RAM
    int a = 0;
    
  • …or, as highlighting might be wrong, use ```text to suppress any highlighting:

    ```text
    ## some log output
    ## here
    ```
    
  • Or, also without any highlighting: indent the code with 4 spaces (or select your code and use the toolbar </> button to make the editor indent the selected code for you):

    Here is my code:
    
        #define LMIC_DEBUG_LEVEL 0
        #include <avr/sleep.h>
        #ifdef PROGMEM
        // On AVR, these values are stored in flash and only copied to RAM
        int a = 0;
    
  • Or: use BBCode [code] above your code or logs, and [/code] below it.

  • If you have many details, you can collapse them to avoid a very long post:

    [details=Click to see the full logs]
    ```text
    This text will be hidden,
    until clicked
    ```
    [/details]
    

    …which will get you:

    Click to see the full logs
    This text will be hidden,
    until clicked
    

Markdown

See Markdown Reference for a nice overview. It’s really easy; just a few of its options:

Just type, **use plenty of whitespace** and [link your sources](https:/thethingsnetwork.org)!

- An unordered list.
- Item B.    

Or:

1. An ordered list
    1. Nested item
    2. Nested item

2. Item 2.
    - Nested unordered list

3. Item 3.

    Nested paragraph.

    > Nested quote.

        Nested code

> A quote
>
>     with nested code

Images have a Discourse-specific option to scale down the preview size: add a percentage such as ,10% after the image size that is already added when uploading an image:

![TTN logo|649x500,10%](upload://svFg8QtnafrQD36BNhWCepOMnzG.png)

…to get a small image that is still clickable for the full version (which should be clickable for the full version, but that is broken in TTN’s installation :frowning: ):

HTML

Only some limited tags are supported; other HTML will be invisible, so use code to see that. Like type `<include ...>` to see <include ...>.

BBCode

[b]strong[/b]
[i]emphasis[/i]
[u]underlined[/u]
[s]strikethrough[/s]
[ul][li]option one[/li][/ul]
[quote="eviltrout"]They said...[/quote]
[quote="eviltrout, post:1, topic:2"]They said...[/quote]
[img]http://eviltrout.com/eviltrout.png[/img]
[url]http://bettercallsaul.com[/url]
[email]eviltrout@mailinator.com[/email]
[code]\nx++\n[/code]
11 Likes

How do I create my own post where I can ask my own question?

1 Like

first spend some time on this forum, and use search ! , big chance you’ll find a topic were you question fits in perfectly.

1 Like

This is a very useful page, where I landed while reading another topic. Markdown is familiar from the early days of Wiki. Unfortunately

HTML

Only some limited tags are supported …

Would it be good to start a sandbox topic where newcomers could train their skills without receiving remarks from veterans? The contents could then be emptied every now and then by somebody with moderator rights.

There is already online training available, it is offered to all users when they join, however most will choose to ignore it.

If you head over to this unlisted topic you can find the instructions to (re)start training.

Another option is to send yourself a private message.
In that you can experiment with formatting of messages/posts.

(Note that private messages to yourself are not visible in the ‘Inbox’ but under ‘Sent’).

More sources:

1 Like

A post was split to a new topic: Forum rules

Sorry to ask here. does any one know how to post. i can reply the in the forum to any topic,but i can not creat a new topic.

Initially you can only reply, once you read some posts (search will find ones that you may find useful), you may find a recent topic that you can add to to seek help, rather than starting a new duplicated topic. Once you’ve read enough (time & number) and it’s not that many, you can start a new topic.

The forum is entirely volunteer run, so the policies are set to limit people diving in to ask questions that may well already be answered. And spam, the endless spam.

Ironically, if you scroll up, you’d find this was answered and there are further resources …