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 08:27] – [Prevent parsing of posting parts] Tobias | docs:bbcode [2022-06-09 08:51] (current) – [Blocks] Tobias | ||
---|---|---|---|
Line 43: | Line 43: | ||
==== Links ==== | ==== Links ==== | ||
- | <table class=" | + | ^ Purpose |
- | < | + | | Set a link to a page on the internet | '' |
- | < | + | | Use some text as label for the link | '' |
- | < | + | | Add a relative |
- | </ | + | | Set a hashtag((which is a shortcut to the local search for the given term)) | '' |
- | < | + | | Mention one of your contacts or a participant in the current discussion | @Mention |
- | < | + | | Explicitely mention |
- | < | + | | Set an email link | '' |
- | </ | + | | Use some text as label for the email link | '' |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | #^[url]http:// | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | #^[url=http:// | + | |
- | # | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | <td>[url=/ | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | <td>#Friendica</td> | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | <td>@Mention</td> | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | <td>acct: | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | <td>[mail]user@mail.example.com[/ | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | <td>[mail=user@mail.example.com]Send an email to User[/mail]</ | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
==== Blocks ==== | ==== Blocks ==== | ||
- | <table class=" | + | === Paragraphs === |
- | <tr> | + | |
- | < | + | Usually, when you hit the '' |
- | < | + | |
- | </ | + | === Centered Text === |
- | < | + | |
- | <td>[p]A paragraph of text[/p]</ | + | In Friendica you can center a text using the '' |
- | < | + | |
- | </tr> | + | === Code Blocks === |
- | <tr> | + | |
- | < | + | You can either use inline |
- | < | + | |
- | </tr> | + | However if you put more then one line of code in the '' |
- | <tr> | + | |
- | < | + | For example |
- | < | + | |
- | line | + | <code> |
- | code</code></ | + | Can somebody help me with the [code]hello_world()[/code] function in the [code]indroduction[/code] module? |
- | </tr> | + | </code> |
- | < | + | |
- | <td>[code=php]function text_highlight($s,$lang)[/code]< | + | will produce a posting like |
- | < | + | |
- | </tr> | + | > Can somebody help me with the '' |
- | <tr> | + | |
- | <td>[quote]quote[/quote]</ | + | while something like |
- | < | + | |
- | </ | + | <code> |
- | < | + | Can somebody help me understand the following function from the [code]introduction[/code] module? |
- | <td>[quote=Author]Author? Me? No, no, no...[/quote]</td> | + | |
- | < | + | [code=python] |
- | </tr> | + | def hello_world(): |
- | <tr> | + | "" |
- | < | + | A function to print "Hello World!" |
- | < | + | """ |
- | </ | + | print('Hello World!') |
- | < | + | [/code] |
- | < | + | </code> |
- | | + | |
- | <div class="wall-item-container"> | + | will produce something like |
- | You should not read any further if you want to be surprised.<br> | + | |
- | < | + | > Can somebody help me understand the following function from the '' |
- | < | + | > |
- | < | + | > <code=python> |
- | </ | + | def hello_world(): |
- | </ | + | "" |
- | </tr> | + | A function to print "Hello World!" |
- | <tr> | + | """ |
- | | + | print('Hello World!') |
- | | + | </code> |
- | <div class="wall-item-container"> | + | |
- | < | + | === Quotes === |
- | < | + | |
- | < | + | To quote a text, you can use the '' |
- | <div class=" | + | |
- | </ | + | <code> |
- | </ | + | Hey I found this wonderful quote from Albert Einstein |
- | </tr> | + | [quote=Albert Einstein] |
- | <tr> | + | 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! |
- | </tr> | + | </code> |
- | </table> | + | |
- | <a name=" | + | the posting will look something like this |
- | - abap | + | |
- | - avrc | + | {{ : |
- | - cpp | + | |
- | - css | + | If you don't provide the '' |
- | - diff | + | |
- | - dtd | + | === Spoilers === |
- | - html | + | |
- | - java | + | Sometimes you may want to warn your readers, that they should avoid reading any further if they wont get spoiled. In Friendica you can use the '' |
- | - javascript | + | |
- | - js | + | <code> |
- | - mysql | + | So the other day we were at the cinema watching this awesome movie ... it don't want to spoil too much you should go see it for yourself. For those not caring about spoilers, you can find my review below. |
- | - perl | + | |
- | - php | + | [spoiler=Don' |
- | - python | + | |
- | - ruby | + | So the most awesome... |
- | - sh | + | [/spoiler] |
- | - sql | + | |
- | - vbscript | + | After the movie we had lunch at the Funny Milkbar which... |
- | - xml | + | </ |
+ | |||
+ | The result can be seen in the following screenshots. On the first the text inside the spoiler tag is hidden. I | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | In the second it is shown after the reader had clicked on the spoiler text. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | === Horizontal Lines === | ||
+ | |||
+ | If you want to use a horizontal line as visual divider between two paragraphs, you can use the '' | ||
==== 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 337: | 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 364: | 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 376: | 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. |