Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs:bbcode [2022-06-07 11:45] – [Links] Tobias | docs:bbcode [2022-06-09 08:51] (current) – [Blocks] Tobias | ||
---|---|---|---|
Line 55: | Line 55: | ||
==== Blocks ==== | ==== Blocks ==== | ||
- | <table class=" | + | === Paragraphs === |
- | <tr> | + | |
- | < | + | Usually, when you hit the '' |
- | < | + | |
- | </tr> | + | === Centered Text === |
- | <tr> | + | |
- | < | + | In Friendica you can center a text using the '' |
- | < | + | |
- | </tr> | + | === Code Blocks === |
- | <tr> | + | |
- | < | + | You can either use inline code or create a multi-line code block, both by using the BBCode '' |
- | < | + | |
- | </tr> | + | However if you put more then one line of code in the '' |
- | <tr> | + | |
- | <td>[code]Multi< | + | For example |
- | < | + | |
- | line | + | <code> |
- | code</code></ | + | Can somebody help me with the [code]hello_world()[/ |
- | </tr> | + | </code> |
- | < | + | |
- | <td>[code=php]function text_highlight($s,$lang)[/ | + | will produce a posting like |
- | | + | |
- | </tr> | + | > Can somebody help me with the '' |
- | <tr> | + | |
- | < | + | while something like |
- | < | + | |
- | </tr> | + | < |
- | <tr> | + | Can somebody help me understand the following function from the [code]introduction[/code] module? |
- | < | + | |
- | < | + | [code=python] |
- | </tr> | + | def hello_world(): |
- | < | + | """ |
- | <td>[center]Centered text[/center]</td> | + | |
- | < | + | |
- | </tr> | + | print(' |
- | <tr> | + | [/code] |
- | < | + | </code> |
- | < | + | |
- | <div class=" | + | will produce something like |
- | | + | |
- | <span id=" | + | > Can somebody help me understand the following |
- | < | + | > |
- | < | + | > <code=python> |
- | </ | + | def hello_world(): |
- | </ | + | |
- | </tr> | + | A function to print "Hello World!" |
- | <tr> | + | |
- | < | + | print(' |
- | | + | </ |
- | < | + | |
- | < | + | === Quotes === |
- | <span id="spoiler-wrap-a893765a" | + | |
- | < | + | To quote a text, you can use the '' |
- | <div class=" | + | |
- | </ | + | <code> |
- | </ | + | Hey I found this wonderful quote from Albert Einstein |
- | </ | + | [quote=Albert Einstein] |
- | < | + | Everybody is a genius, but if you judge a fish by its ability to climb a tree, it will live its hole life believing it is stupid. |
- | < | + | [/quote] |
- | < | + | I can fully agree with it! |
- | </ | + | </code> |
- | </ | + | |
+ | the posting will look something like this | ||
+ | |||
+ | {{ :docs: | ||
+ | |||
+ | If you don't provide the '' | ||
+ | |||
+ | === Spoilers === | ||
+ | |||
+ | Sometimes you may want to warn your readers, that they should | ||
+ | |||
+ | <code> | ||
+ | So the other day we were at the cinema watching this awesome movie ... it don't want to spoil too much you should | ||
+ | |||
+ | [spoiler=Don' | ||
+ | |||
+ | So the most awesome... | ||
+ | [/spoiler] | ||
+ | |||
+ | After the movie we had lunch at the Funny Milkbar which... | ||
+ | </code> | ||
+ | |||
+ | The result can be seen in the following screenshots. On the first the text inside the spoiler | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | In the second it is shown after the reader had clicked on the spoiler | ||
+ | |||
+ | {{ | ||
+ | |||
+ | === Horizontal Lines === | ||
- | <a name=" | + | If you want to use a horizontal line as visual divider between two paragraphs, you can use the '' |
- | - abap | + | |
- | - avrc | + | |
- | - cpp | + | |
- | - css | + | |
- | - diff | + | |
- | - dtd | + | |
- | - html | + | |
- | - java | + | |
- | - javascript | + | |
- | - js | + | |
- | - mysql | + | |
- | - perl | + | |
- | - php | + | |
- | - python | + | |
- | - ruby | + | |
- | - sh | + | |
- | - sql | + | |
- | - vbscript | + | |
- | - xml | + | |
==== Titles ==== | ==== Titles ==== | ||
You can set heading with descending order by using '' | You can set heading with descending order by using '' | ||
+ | |||
+ | If you set a title for the posting you are composing, it is displayed as level 2 header. To keep the hierarchical order of section titles, you should stick to the '' | ||
+ | |||
+ | |||
==== Tables ==== | ==== Tables ==== | ||
Line 297: | Line 312: | ||
But it can be useful to define a custom abstract that will only be displayed on the external network. | But it can be useful to define a custom abstract that will only be displayed on the external network. | ||
This is done with the [abstract]-element. | This is done with the [abstract]-element. | ||
- | <table class=" | + | |
- | <tr> | + | <code> |
- | < | + | [abstract]Totally interesting! A must-see! Please click the link![/ |
- | < | + | I want to tell you a really boring story that you really never wanted to hear. |
- | </ | + | </code> |
- | < | + | |
- | <td>[abstract]Totally interesting! A must-see! Please click the link![/ | + | Twitter would display the text |
- | I want to tell you a really boring story that you really never wanted to hear.</td> | + | |
- | < | + | > Totally interesting! A must-see! Please click the link! |
- | On Friendica you would only see the text after < | + | |
- | </ | + | On Friendica you would only see the text after |
- | </ | + | |
+ | > I want to tell you a really ... | ||
It is even possible to define abstracts for separate networks: | It is even possible to define abstracts for separate networks: | ||
- | <table class=" | + | <code> |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | <td> | + | |
[abstract]Hi friends Here are my newest pictures![/ | [abstract]Hi friends Here are my newest pictures![/ | ||
[abstract=twit]Hi my dear Twitter followers. Do you want to see my new | [abstract=twit]Hi my dear Twitter followers. Do you want to see my new | ||
Line 324: | Line 334: | ||
[abstract=apdn]Helly my dear followers on ADN. I made sone new pictures | [abstract=apdn]Helly my dear followers on ADN. I made sone new pictures | ||
that I wanted to share with you.[/ | that I wanted to share with you.[/ | ||
- | Today I was in the woods and took some real cool pictures ...</td> | + | Today I was in the woods and took some real cool pictures ... |
- | < | + | </code> |
- | For other networks (e.g. when you are using the " | + | |
- | </ | + | For Twitter and App.net the system will use the defined abstracts. |
- | </ | + | |
+ | For other networks (e.g. when you are using the " | ||
If you use (for example) the " | If you use (for example) the " | ||
Line 336: | Line 347: | ||
Instead you have to name the explicit network: | Instead you have to name the explicit network: | ||
- | <table class=" | + | <code> |
- | < | + | [abstract]These days I had a strange encounter...[/ |
- | < | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | <td> | + | |
- | [abstract]These days I had a strange encounter...[/ | + | |
[abstract=goog]Hello my dear Google+ followers. You have to read my newest blog post![/ | [abstract=goog]Hello my dear Google+ followers. You have to read my newest blog post![/ | ||
[abstract=face]Hello my Facebook friends. These days happened something really cool.[/ | [abstract=face]Hello my Facebook friends. These days happened something really cool.[/ | ||
- | While taking pictures in the woods I had a really strange encounter...</ | + | While taking pictures in the woods I had a really strange encounter... |
- | < | + | </code> |
- | <br>Meanwhile, Friendica | + | |
- | </ | + | Google and Facebook will show the respective abstracts while the other networks will show the default one. Meanwhile, Friendica |
- | </ | + | |
The [abstract] element is not working with connectors where we post HTML directly, like Tumblr, Wordpress or Pump.io. | The [abstract] element is not working with connectors where we post HTML directly, like Tumblr, Wordpress or Pump.io. |