]> git.mxchange.org Git - friendica.git/blobdiff - doc/BBCode.md
spelling: exception
[friendica.git] / doc / BBCode.md
index 50fb406b0539cd2f78030f8269283378bede0b32..ea6fa8e2b72356795469174b42b6cbe7d79b4689 100644 (file)
@@ -61,17 +61,21 @@ table.bbcodes > * > tr > th {
   <td><span style="color:  red;">red</span></td>
 </tr>
 <tr>
-  <td>[url=http://www.friendica.com]Friendica[/url]</td>
-  <td><a href="http://www.friendica.com" target="external-link">Friendica</a></td>
+  <td>[url=http://friendi.ca]Friendica[/url]</td>
+  <td><a href="http://friendi.ca" target="external-link">Friendica</a></td>
 </tr>
 <tr>
-  <td>[img]http://friendica.com/sites/default/files/friendika-32.png[/img]</td>
-  <td><img src="http://friendica.com/sites/default/files/friendika-32.png" alt="Immagine/foto"></td>
+  <td>[img]https://raw.githubusercontent.com/friendica/friendica/stable/images/friendica-32.png[/img]</td>
+  <td><img src="https://raw.githubusercontent.com/friendica/friendica/stable/images/friendica-32.png"></td>
 </tr>
 <tr>
-  <td>[img=64x32]http://friendica.com/sites/default/files/friendika-32.png[/img]<br>
+  <td>[img=https://raw.githubusercontent.com/friendica/friendica/stable/images/friendica-32.png]The Friendica Logo[/img]</td>
+  <td><img src="https://raw.githubusercontent.com/friendica/friendica/stable/images/friendica-32.png" alt="The Friendica Logo"></td>
+</tr>
+<tr>
+  <td>[img=64x32]https://raw.githubusercontent.com/friendica/friendica/stable/images/friendica.svg[/img]<br>
 <br>Note: provided height is simply discarded.</td>
-  <td><img src="http://friendica.com/sites/default/files/friendika-32.png" style="width: 64px;"></td>
+  <td><img src="https://raw.githubusercontent.com/friendica/friendica/stable/images/friendica.svg" style="width: 64px;"></td>
 </tr>
 <tr>
   <td>[size=xx-small]small text[/size]</td>
@@ -82,7 +86,7 @@ table.bbcodes > * > tr > th {
   <td><span style="font-size: xx-large;">big text</span></td>
 </tr>
 <tr>
-  <td>[size=20]exact size[/size] (size can be any number, in pixel)</td>
+  <td>[size=20]exact size[/size] (size can be any number, in pixels)</td>
   <td><span style="font-size: 20px;">exact size</span></td>
 </tr>
 <tr>
@@ -99,27 +103,27 @@ table.bbcodes > * > tr > th {
   <th>Result</th>
 </tr>
 <tr>
-  <td>[url]http://friendica.com[/url]</td>
-  <td><a href="http://friendica.com">http://friendica.com</a></td>
+  <td>[url]http://friendi.ca[/url]</td>
+  <td><a href="http://friendi.ca">http://friendi.ca</a></td>
 </tr>
 <tr>
-  <td>[url=http://friendica.com]Friendica[/url]</td>
-  <td><a href="http://friendica.com">Friendica</a></td>
+  <td>[url=http://friendi.ca]Friendica[/url]</td>
+  <td><a href="http://friendi.ca">Friendica</a></td>
 </tr>
 <tr>
-  <td>[bookmark]http://friendica.com[/bookmark]<br><br>
-#^[url]http://friendica.com[/url]</td>
-  <td><span class="oembed link"><h4>Friendica: <a href="http://friendica.com" rel="oembed"></a><a href="http://friendica.com" target="_blank">http://friendica.com</a></h4></span></td>
+  <td>[bookmark]http://friendi.ca[/bookmark]<br><br>
+#^[url]http://friendi.ca[/url]</td>
+  <td><span class="oembed link"><h4>Friendica: <a href="http://friendi.ca" rel="oembed"></a><a href="http://friendi.ca" target="_blank" rel="noopener noreferrer">http://friendi.ca</a></h4></span></td>
 </tr>
 <tr>
-  <td>[bookmark=http://friendica.com]Bookmark[/bookmark]<br><br>
-#^[url=http://friendica.com]Bookmark[/url]<br><br>
-#[url=http://friendica.com]^[/url][url=http://friendica.com]Bookmark[/url]</td>
-  <td><span class="oembed link"><h4>Friendica: <a href="http://friendica.com" rel="oembed"></a><a href="http://friendica.com" target="_blank">Bookmark</a></h4></span></td>
+  <td>[bookmark=http://friendi.ca]Bookmark[/bookmark]<br><br>
+#^[url=http://friendi.ca]Bookmark[/url]<br><br>
+#[url=http://friendi.ca]^[/url][url=http://friendi.ca]Bookmark[/url]</td>
+  <td><span class="oembed link"><h4>Friendica: <a href="http://friendi.ca" rel="oembed"></a><a href="http://friendi.ca" target="_blank" rel="noopener noreferrer">Bookmark</a></h4></span></td>
 </tr>
 <tr>
   <td>[url=/posts/f16d77b0630f0134740c0cc47a0ea02a]Diaspora post with GUID[/url]</td>
-  <td><a href="/display/f16d77b0630f0134740c0cc47a0ea02a" target="_blank">Diaspora post with GUID</a></td>
+  <td><a href="/display/f16d77b0630f0134740c0cc47a0ea02a" target="_blank" rel="noopener noreferrer">Diaspora post with GUID</a></td>
 </tr>
 <tr>
   <td>#Friendica</td>
@@ -165,7 +169,7 @@ line
 code</code></td>
 </tr>
 <tr>
-  <td>[code=php]function text_highlight($s,$lang)[/code]</td>
+  <td>[code=php]function text_highlight($s,$lang)[/code]<sup><a href="#supported-code">1</a></sup></td>
   <td><code><div class="hl-main"><ol class="hl-main"><li><span class="hl-code">&nbsp;</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">text_highlight</span><span class="hl-brackets">(</span><span class="hl-var">$s</span><span class="hl-code">,</span><span class="hl-var">$lang</span><span class="hl-brackets">)</span></li></ol></div></code></td>
 </tr>
 <tr>
@@ -187,7 +191,7 @@ code</code></td>
       You should not read any further if you want to be surprised.<br>
       <span id="spoiler-wrap-0716e642" class="spoiler-wrap fakelink" onclick="openClose('spoiler-0716e642');">Click to open/close</span>
       <blockquote class="spoiler" id="spoiler-0716e642" style="display: none;">There is a happy end.</blockquote>
-      <div class="body-attach"><div class="clear"></div></div>
+      <div class="body-attach"></div>
     </div>
   </td>
 </tr>
@@ -198,7 +202,7 @@ code</code></td>
       <strong class="spoiler">Author wrote:</strong><br>
       <span id="spoiler-wrap-a893765a" class="spoiler-wrap fakelink" onclick="openClose('spoiler-a893765a');">Click to open/close</span>
       <blockquote class="spoiler" id="spoiler-a893765a" style="display: none;">Spoiler quote</blockquote>
-      <div class="body-attach"><div class="clear"></div></div>
+      <div class="body-attach"></div>
     </div>
   </td>
 </tr>
@@ -208,6 +212,27 @@ code</code></td>
 </tr>
 </table>
 
+<a name="supported-code">1</a>: Supported language parameter values for code highlighting:
+- abap
+- avrc
+- cpp
+- css
+- diff
+- dtd
+- html
+- java
+- javascript
+- js
+- mysql
+- perl
+- php
+- python
+- ruby
+- sh
+- sql
+- vbscript
+- xml
+
 ### Titles
 
 <table class="bbcodes">
@@ -477,10 +502,6 @@ You can embed video, audio and more in a message.
   <td>[embed]URL[/embed]</td>
   <td>Embed OEmbed rich content.</td>
 </tr>
-<tr>
-  <td>[iframe]URL[/iframe]</td>
-  <td>General embed, iframe size is limited by the theme size for video players.</td>
-</tr>
 <tr>
   <td>[url]*url*[/url]</td>
   <td>If *url* supports oembed or opengraph specifications the embedded object will be shown (eg, documents from scribd).
@@ -490,7 +511,7 @@ Page title with a link to *url* will be shown.</td>
 
 ## Map
 
-This require "openstreetmap" or "Google Maps" addon version 1.3 or newer.
+This requires "openstreetmap" or "Google Maps" addon version 1.3 or newer.
 If the addon isn't activated, the raw coordinates are shown instead.
 
 <table class="bbcodes">
@@ -514,10 +535,10 @@ If the addon isn't activated, the raw coordinates are shown instead.
 
 ## Abstract for longer posts
 
-If you want to spread your post to several third party networks you can have the problem that these networks have a length limitation like on Twitter.
+If you want to spread your post to several third party networks you may have the problem that these networks have a length limitation like on Twitter.
 
-Friendica is using a semi intelligent mechanism to generate a fitting abstract.
-But it can be interesting to define a custom abstract that will only be displayed on the external network.
+Friendica uses a semi-intelligent mechanism to generate a fitting abstract.
+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.
 <table class="bbcodes">
 <tr>
@@ -566,7 +587,7 @@ Instead you have to name the explicit network:
 <tr>
   <td>
 [abstract]These days I had a strange encounter...[/abstract]<br>
-[abstract=goog]Helly my dear Google+ followers. You have to read my newest blog post![/abstract]<br>
+[abstract=goog]Hello my dear Google+ followers. You have to read my newest blog post![/abstract]<br>
 [abstract=face]Hello my Facebook friends. These days happened something really cool.[/abstract]<br>
 While taking pictures in the woods I had a really strange encounter...</td>
   <td>Google and Facebook will show the respective abstracts while the other networks will show the default one.<br>
@@ -574,9 +595,12 @@ While taking pictures in the woods I had a really strange encounter...</td>
 </tr>
 </table>
 
-The [abstract] element isn't working with connectors where we post the HTML 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.
 For the native connections--that is to e.g. Friendica, Hubzilla, Diaspora or GNU Social--the full posting is used and the contacts instance will display the posting as desired.
 
+For postings that are delivered via ActivityPub, the text from the abstract is placed in the summary field.
+On Mastodon this field is used for the content warning.
+
 ## Special
 
 <table class="bbcodes">
@@ -585,15 +609,34 @@ For the native connections--that is to e.g. Friendica, Hubzilla, Diaspora or GNU
   <th>Result</th>
 </tr>
 <tr>
-  <td>If you need to put literal bbcode in a message, [noparse], [nobb] or [pre] are used to escape bbcode:
+  <td>If you need to put literal BBCode in a message, [noparse], [nobb] or [pre] blocks prevent BBCode conversion:
     <ul>
       <li>[noparse][b]bold[/b][/noparse]</li>
       <li>[nobb][b]bold[/b][/nobb]</li>
       <li>[pre][b]bold[/b][/pre]</li>
     </ul>
+    Note: [code] has priority over [noparse], [nobb] and [pre] which makes them display as BBCode tags in code blocks instead of being removed.
+    [code] blocks inside [noparse] will still be converted to a code block.
   </td>
   <td>[b]bold[/b]</td>
 </tr>
+<tr>
+  <td>Additionally, [noparse] and [pre] blocks prevent mention and hashtag conversion to links:
+    <ul>
+      <li>[noparse]@user@domain.tld #hashtag[/noparse]</li>
+      <li>[pre]@user@domain.tld #hashtag[/pre]</li>
+    </ul>
+  </td>
+  <td>@user@domain.tld #hashtag</td>
+</tr>
+<tr>
+  <td>Additionally, [pre] blocks preserve spaces:
+    <ul>
+      <li>[pre]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Spaces[/pre]</li>
+    </ul>
+  </td>
+  <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Spaces</td>
+</tr>
 <tr>
   <td>[nosmile] is used to disable smilies on a post by post basis<br>
     <br>
@@ -602,15 +645,15 @@ For the native connections--that is to e.g. Friendica, Hubzilla, Diaspora or GNU
   <td>;-) :-O</td>
 </tr>
 <tr>
-  <td>Custom inline styles<br>
+  <td>Custom block styles<br>
 <br>
 [style=text-shadow: 0 0 4px #CC0000;]You can change all the CSS properties of this block.[/style]</td>
-  <td><span style="text-shadow: 0 0 4px #cc0000;;">You can change all the CSS properties of this block.</span></td>
+  <td><div style="text-shadow: 0 0 4px #cc0000;;">You can change all the CSS properties of this block.</div></td>
 </tr>
 <tr>
-  <td>Custom class block<br>
+  <td>Custom inline styles<br>
 <br>
-[class=custom]If the class exists, this block will have the custom class style applied.[/class]</td>
-  <td><pre>&lt;span class="custom"&gt;If the class exists,<br> this block will have the custom class<br> style applied.&lt;/span&gt;</pre></td>
+You can change all the [style=text-shadow: 0 0 4px #CC0000;]CSS properties[/style] of this inline text.</td>
+  <td>You can change all the <span style="text-shadow: 0 0 4px #cc0000;;">CSS properties</span> of this inline text.</td>
 </tr>
 </table>