Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

616 lines
17 KiB

  1. Friendica BBCode tags reference
  2. ========================
  3. * [Creating posts](help/Text_editor)
  4. ## Inline
  5. <style>
  6. table.bbcodes {
  7. margin: 1em 0;
  8. background-color: #f9f9f9;
  9. border: 1px solid #aaa;
  10. border-collapse: collapse;
  11. color: #000;
  12. width: 100%;
  13. }
  14. table.bbcodes > tr > th,
  15. table.bbcodes > tr > td,
  16. table.bbcodes > * > tr > th,
  17. table.bbcodes > * > tr > td {
  18. border: 1px solid #aaa;
  19. padding: 0.2em 0.4em
  20. }
  21. table.bbcodes > tr > th,
  22. table.bbcodes > * > tr > th {
  23. background-color: #f2f2f2;
  24. text-align: center;
  25. width: 50%
  26. }
  27. </style>
  28. <table class="bbcodes">
  29. <tr>
  30. <th>BBCode</th>
  31. <th>Result</th>
  32. </tr>
  33. <tr>
  34. <td>[b]bold[/b]</td>
  35. <td><strong>bold</strong></td>
  36. </tr>
  37. <tr>
  38. <td>[i]italic[/i]</td>
  39. <td><em>italic</em></td>
  40. </tr>
  41. <tr>
  42. <td>[u]underlined[/u]</td>
  43. <td><u>underlined</u></td>
  44. </tr>
  45. <tr>
  46. <td>[s]strike[/s]</td>
  47. <td><strike>strike</strike></td>
  48. </tr>
  49. <tr>
  50. <td>[o]overline[/o]</td>
  51. <td><span class="overline">overline</span></td>
  52. </tr>
  53. <tr>
  54. <td>[color=red]red[/color]</td>
  55. <td><span style="color: red;">red</span></td>
  56. </tr>
  57. <tr>
  58. <td>[url=http://www.friendica.com]Friendica[/url]</td>
  59. <td><a href="http://www.friendica.com" target="external-link">Friendica</a></td>
  60. </tr>
  61. <tr>
  62. <td>[img]http://friendica.com/sites/default/files/friendika-32.png[/img]</td>
  63. <td><img src="http://friendica.com/sites/default/files/friendika-32.png" alt="Immagine/foto"></td>
  64. </tr>
  65. <tr>
  66. <td>[img=64x32]http://friendica.com/sites/default/files/friendika-32.png[/img]<br>
  67. <br>Note: provided height is simply discarded.</td>
  68. <td><img src="http://friendica.com/sites/default/files/friendika-32.png" style="width: 64px;"></td>
  69. </tr>
  70. <tr>
  71. <td>[size=xx-small]small text[/size]</td>
  72. <td><span style="font-size: xx-small;">small text</span></td>
  73. </tr>
  74. <tr>
  75. <td>[size=xx-large]big text[/size]</td>
  76. <td><span style="font-size: xx-large;">big text</span></td>
  77. </tr>
  78. <tr>
  79. <td>[size=20]exact size[/size] (size can be any number, in pixel)</td>
  80. <td><span style="font-size: 20px;">exact size</span></td>
  81. </tr>
  82. <tr>
  83. <td>[font=serif]Serif font[/font]</td>
  84. <td><span style="font-family: serif;">Serif font</span></td>
  85. </tr>
  86. </table>
  87. ### Links
  88. <table class="bbcodes">
  89. <tr>
  90. <th>BBCode</th>
  91. <th>Result</th>
  92. </tr>
  93. <tr>
  94. <td>[url]http://friendica.com[/url]</td>
  95. <td><a href="http://friendica.com">http://friendica.com</a></td>
  96. </tr>
  97. <tr>
  98. <td>[url=http://friendica.com]Friendica[/url]</td>
  99. <td><a href="http://friendica.com">Friendica</a></td>
  100. </tr>
  101. <tr>
  102. <td>[bookmark]http://friendica.com[/bookmark]<br><br>
  103. #^[url]http://friendica.com[/url]</td>
  104. <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>
  105. </tr>
  106. <tr>
  107. <td>[bookmark=http://friendica.com]Bookmark[/bookmark]<br><br>
  108. #^[url=http://friendica.com]Bookmark[/url]<br><br>
  109. #[url=http://friendica.com]^[/url][url=http://friendica.com]Bookmark[/url]</td>
  110. <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>
  111. </tr>
  112. <tr>
  113. <td>[url=/posts/f16d77b0630f0134740c0cc47a0ea02a]Diaspora post with GUID[/url]</td>
  114. <td><a href="/display/f16d77b0630f0134740c0cc47a0ea02a" target="_blank">Diaspora post with GUID</a></td>
  115. </tr>
  116. <tr>
  117. <td>#Friendica</td>
  118. <td>#<a href="/search?tag=Friendica">Friendica</a></td>
  119. </tr>
  120. <tr>
  121. <td>@Mention</td>
  122. <td>@<a href="javascript:void(0)">Mention</a></td>
  123. </tr>
  124. <tr>
  125. <td>acct:account@friendica.host.com (WebFinger)</td>
  126. <td><a href="/acctlink?addr=account@friendica.host.com" target="extlink">acct:account@friendica.host.com</a></td>
  127. </tr>
  128. <tr>
  129. <td>[mail]user@mail.example.com[/mail]</td>
  130. <td><a href="mailto:user@mail.example.com">user@mail.example.com</a></td>
  131. </tr>
  132. <tr>
  133. <td>[mail=user@mail.example.com]Send an email to User[/mail]</td>
  134. <td><a href="mailto:user@mail.example.com">Send an email to User</a></td>
  135. </tr>
  136. </table>
  137. ## Blocks
  138. <table class="bbcodes">
  139. <tr>
  140. <th>BBCode</th>
  141. <th>Result</th>
  142. </tr>
  143. <tr>
  144. <td>[p]A paragraph of text[/p]</td>
  145. <td><p>A paragraph of text</p></td>
  146. </tr>
  147. <tr>
  148. <td>Inline [code]code[/code] in a paragraph</td>
  149. <td>Inline <key>code</key> in a paragraph</td>
  150. </tr>
  151. <tr>
  152. <td>[code]Multi<br>line<br>code[/code]</td>
  153. <td><code>Multi
  154. line
  155. code</code></td>
  156. </tr>
  157. <tr>
  158. <td>[code=php]function text_highlight($s,$lang)[/code]</td>
  159. <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>
  160. </tr>
  161. <tr>
  162. <td>[quote]quote[/quote]</td>
  163. <td><blockquote>quote</blockquote></td>
  164. </tr>
  165. <tr>
  166. <td>[quote=Author]Author? Me? No, no, no...[/quote]</td>
  167. <td><strong class="author">Author wrote:</strong><blockquote>Author? Me? No, no, no...</blockquote></td>
  168. </tr>
  169. <tr>
  170. <td>[center]Centered text[/center]</td>
  171. <td><div style="text-align:center;">Centered text</div></td>
  172. </tr>
  173. <tr>
  174. <td>You should not read any further if you want to be surprised.[spoiler]There is a happy end.[/spoiler]</td>
  175. <td>
  176. <div class="wall-item-container">
  177. You should not read any further if you want to be surprised.<br>
  178. <span id="spoiler-wrap-0716e642" class="spoiler-wrap fakelink" onclick="openClose('spoiler-0716e642');">Click to open/close</span>
  179. <blockquote class="spoiler" id="spoiler-0716e642" style="display: none;">There is a happy end.</blockquote>
  180. <div class="body-attach"><div class="clear"></div></div>
  181. </div>
  182. </td>
  183. </tr>
  184. <tr>
  185. <td>[spoiler=Author]Spoiler quote[/spoiler]</td>
  186. <td>
  187. <div class="wall-item-container">
  188. <strong class="spoiler">Author wrote:</strong><br>
  189. <span id="spoiler-wrap-a893765a" class="spoiler-wrap fakelink" onclick="openClose('spoiler-a893765a');">Click to open/close</span>
  190. <blockquote class="spoiler" id="spoiler-a893765a" style="display: none;">Spoiler quote</blockquote>
  191. <div class="body-attach"><div class="clear"></div></div>
  192. </div>
  193. </td>
  194. </tr>
  195. <tr>
  196. <td>[hr] (horizontal line)</td>
  197. <td><hr></td>
  198. </tr>
  199. </table>
  200. ### Titles
  201. <table class="bbcodes">
  202. <tr>
  203. <th>BBCode</th>
  204. <th>Result</th>
  205. </tr>
  206. <tr>
  207. <td>[h1]Title 1[/h1]</td>
  208. <td><h1>Title 1</h1></td>
  209. </tr>
  210. <tr>
  211. <td>[h2]Title 2[/h2]</td>
  212. <td><h2>Title 2</h2></td>
  213. </tr>
  214. <tr>
  215. <td>[h3]Title 3[/h3]</td>
  216. <td><h3>Title 3</h3></td>
  217. </tr>
  218. <tr>
  219. <td>[h4]Title 4[/h4]</td>
  220. <td><h4>Title 4</h4></td>
  221. </tr>
  222. <tr>
  223. <td>[h5]Title 5[/h5]</td>
  224. <td><h5>Title 5</h5></td>
  225. </tr>
  226. <tr>
  227. <td>[h6]Title 6[/h6]</td>
  228. <td><h6>Title 6</h6></td>
  229. </tr>
  230. </table>
  231. ### Tables
  232. <table class="bbcodes">
  233. <tr>
  234. <th>BBCode</th>
  235. <th>Result</th>
  236. </tr>
  237. <tr>
  238. <td>[table]<br>
  239. &nbsp;&nbsp;[tr]<br>
  240. &nbsp;&nbsp;&nbsp;&nbsp;[th]Header 1[/th]<br>
  241. &nbsp;&nbsp;&nbsp;&nbsp;[th]Header 2[/th]<br>
  242. &nbsp;&nbsp;&nbsp;&nbsp;[th]Header 2[/th]<br>
  243. &nbsp;&nbsp;[/tr]<br>
  244. &nbsp;&nbsp;[tr]<br>
  245. &nbsp;&nbsp;&nbsp;&nbsp;[td]Cell 1[/td]<br>
  246. &nbsp;&nbsp;&nbsp;&nbsp;[td]Cell 2[/td]<br>
  247. &nbsp;&nbsp;&nbsp;&nbsp;[td]Cell 3[/td]<br>
  248. &nbsp;&nbsp;[/tr]<br>
  249. &nbsp;&nbsp;[tr]<br>
  250. &nbsp;&nbsp;&nbsp;&nbsp;[td]Cell 4[/td]<br>
  251. &nbsp;&nbsp;&nbsp;&nbsp;[td]Cell 5[/td]<br>
  252. &nbsp;&nbsp;&nbsp;&nbsp;[td]Cell 6[/td]<br>
  253. &nbsp;&nbsp;[/tr]<br>
  254. [/table]</td>
  255. <td>
  256. <table>
  257. <tbody>
  258. <tr>
  259. <th>Header 1</th>
  260. <th>Header 2</th>
  261. <th>Header 3</th>
  262. </tr>
  263. <tr>
  264. <td>Cell 1</td>
  265. <td>Cell 2</td>
  266. <td>Cell 3</td>
  267. </tr>
  268. <tr>
  269. <td>Cell 4</td>
  270. <td>Cell 5</td>
  271. <td>Cell 6</td>
  272. </tr>
  273. </tbody>
  274. </table>
  275. </td>
  276. </tr>
  277. <tr>
  278. <td>[table border=0]</td>
  279. <td>
  280. <table border="0">
  281. <tbody>
  282. <tr>
  283. <th>Header 1</th>
  284. <th>Header 2</th>
  285. <th>Header 3</th>
  286. </tr>
  287. <tr>
  288. <td>Cell 1</td>
  289. <td>Cell 2</td>
  290. <td>Cell 3</td>
  291. </tr>
  292. <tr>
  293. <td>Cell 4</td>
  294. <td>Cell 5</td>
  295. <td>Cell 6</td>
  296. </tr>
  297. </tbody>
  298. </table>
  299. </td>
  300. </tr>
  301. <tr>
  302. <td>[table border=1]</td>
  303. <td>
  304. <table border="1">
  305. <tbody>
  306. <tr>
  307. <th>Header 1</th>
  308. <th>Header 2</th>
  309. <th>Header 3</th>
  310. </tr>
  311. <tr>
  312. <td>Cell 1</td>
  313. <td>Cell 2</td>
  314. <td>Cell 3</td>
  315. </tr>
  316. <tr>
  317. <td>Cell 4</td>
  318. <td>Cell 5</td>
  319. <td>Cell 6</td>
  320. </tr>
  321. </tbody>
  322. </table>
  323. </td>
  324. </tr>
  325. </table>
  326. ### Lists
  327. <table class="bbcodes">
  328. <tr>
  329. <th>BBCode</th>
  330. <th>Result</th>
  331. </tr>
  332. <tr>
  333. <td>[ul]<br>
  334. &nbsp;&nbsp;[li] First list element<br>
  335. &nbsp;&nbsp;[li] Second list element<br>
  336. [/ul]<br>
  337. [list]<br>
  338. &nbsp;&nbsp;[*] First list element<br>
  339. &nbsp;&nbsp;[*] Second list element<br>
  340. [/list]</td>
  341. <td>
  342. <ul class="listbullet" style="list-style-type: circle;">
  343. <li>First list element</li>
  344. <li>Second list element</li>
  345. </ul>
  346. </td>
  347. </tr>
  348. <tr>
  349. <td>[ol]<br>
  350. &nbsp;&nbsp;[*] First list element<br>
  351. &nbsp;&nbsp;[*] Second list element<br>
  352. [/ol]<br>
  353. [list=1]<br>
  354. &nbsp;&nbsp;[*] First list element<br>
  355. &nbsp;&nbsp;[*] Second list element<br>
  356. [/list]</td>
  357. <td>
  358. <ul class="listdecimal" style="list-style-type: decimal;">
  359. <li> First list element</li>
  360. <li> Second list element</li>
  361. </ul>
  362. </td>
  363. </tr>
  364. <tr>
  365. <td>[list=]<br>
  366. &nbsp;&nbsp;[*] First list element<br>
  367. &nbsp;&nbsp;[*] Second list element<br>
  368. [/list]</td>
  369. <td>
  370. <ul class="listnone" style="list-style-type: none;">
  371. <li> First list element</li>
  372. <li> Second list element</li>
  373. </ul>
  374. </td>
  375. </tr>
  376. <tr>
  377. <td>[list=i]<br>
  378. &nbsp;&nbsp;[*] First list element<br>
  379. &nbsp;&nbsp;[*] Second list element<br>
  380. [/list]</td>
  381. <td>
  382. <ul class="listlowerroman" style="list-style-type: lower-roman;">
  383. <li> First list element</li>
  384. <li> Second list element</li>
  385. </ul>
  386. </td>
  387. </tr>
  388. <tr>
  389. <td>[list=I]<br>
  390. &nbsp;&nbsp;[*] First list element<br>
  391. &nbsp;&nbsp;[*] Second list element<br>
  392. [/list]</td>
  393. <td>
  394. <ul class="listupperroman" style="list-style-type: upper-roman;">
  395. <li> First list element</li>
  396. <li> Second list element</li>
  397. </ul>
  398. </td>
  399. </tr>
  400. <tr>
  401. <td>[list=a]<br>
  402. &nbsp;&nbsp;[*] First list element<br>
  403. &nbsp;&nbsp;[*] Second list element<br>
  404. [/list]</td>
  405. <td>
  406. <ul class="listloweralpha" style="list-style-type: lower-alpha;">
  407. <li> First list element</li>
  408. <li> Second list element</li>
  409. </ul>
  410. </td>
  411. </tr>
  412. <tr>
  413. <td>[list=A]<br>
  414. &nbsp;&nbsp;[*] First list element<br>
  415. &nbsp;&nbsp;[*] Second list element<br>
  416. [/list]</td>
  417. <td>
  418. <ul class="listupperalpha" style="list-style-type: upper-alpha;">
  419. <li> First list element</li>
  420. <li> Second list element</li>
  421. </ul>
  422. </td>
  423. </tr>
  424. </table>
  425. ## Embed
  426. You can embed video, audio and more in a message.
  427. <table class="bbcodes">
  428. <tr>
  429. <th>BBCode</th>
  430. <th>Result</th>
  431. </tr>
  432. <tr>
  433. <td>[video]url[/video]</td>
  434. <td>Where *url* can be an url to youtube, vimeo, soundcloud, or other sites wich supports oembed or opengraph specifications.</td>
  435. </tr>
  436. <tr>
  437. <td>[video]Video file url[/video]
  438. [audio]Audio file url[/audio]</td>
  439. <td>Full URL to an ogg/ogv/oga/ogm/webm/mp4/mp3 file. An HTML5 player will be used to show it.</td>
  440. </tr>
  441. <tr>
  442. <td>[youtube]Youtube URL[/youtube]</td>
  443. <td>Youtube video OEmbed display. May not embed an actual player.</td>
  444. </tr>
  445. <tr>
  446. <td>[youtube]Youtube video ID[/youtube]</td>
  447. <td>Youtube player iframe embed.</td>
  448. </tr>
  449. <tr>
  450. <td>[vimeo]Vimeo URL[/vimeo]</td>
  451. <td>Vimeo video OEmbed display. May not embed an actual player.</td>
  452. </tr>
  453. <tr>
  454. <td>[vimeo]Vimeo video ID[/vimeo]</td>
  455. <td>Vimeo player iframe embed.</td>
  456. </tr>
  457. <tr>
  458. <td>[embed]URL[/embed]</td>
  459. <td>Embed OEmbed rich content.</td>
  460. </tr>
  461. <tr>
  462. <td>[iframe]URL[/iframe]</td>
  463. <td>General embed, iframe size is limited by the theme size for video players.</td>
  464. </tr>
  465. <tr>
  466. <td>[url]*url*[/url]</td>
  467. <td>If *url* supports oembed or opengraph specifications the embedded object will be shown (eg, documents from scribd).
  468. Page title with a link to *url* will be shown.</td>
  469. </tr>
  470. </table>
  471. ## Map
  472. This require "openstreetmap" or "Google Maps" addon version 1.3 or newer.
  473. If the addon isn't activated, the raw coordinates are shown instead.
  474. <table class="bbcodes">
  475. <tr>
  476. <th>BBCode</th>
  477. <th>Result</th>
  478. </tr>
  479. <tr>
  480. <td>[map]address[/map]</td>
  481. <td>Embeds a map centered on this address.</td>
  482. </tr>
  483. <tr>
  484. <td>[map=lat,long]</td>
  485. <td>Embeds a map centered on those coordinates.</td>
  486. </tr>
  487. <tr>
  488. <td>[map]</td>
  489. <td>Embeds a map centered on the post's location.</td>
  490. </tr>
  491. </table>
  492. ## Abstract for longer posts
  493. 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.
  494. Friendica is using a semi intelligent mechanism to generate a fitting abstract.
  495. But it can be interesting to define a custom abstract that will only be displayed on the external network.
  496. This is done with the [abstract]-element.
  497. <table class="bbcodes">
  498. <tr>
  499. <th>BBCode</th>
  500. <th>Result</th>
  501. </tr>
  502. <tr>
  503. <td>[abstract]Totally interesting! A must-see! Please click the link![/abstract]<br>
  504. I want to tell you a really boring story that you really never wanted to hear.</td>
  505. <td>Twitter would display the text <blockquote>Totally interesting! A must-see! Please click the link!</blockquote>
  506. On Friendica you would only see the text after <blockquote>I want to tell you a really ...</blockquote></td>
  507. </tr>
  508. </table>
  509. It is even possible to define abstracts for separate networks:
  510. <table class="bbcodes">
  511. <tr>
  512. <th>BBCode</th>
  513. <th>Result</th>
  514. </tr>
  515. <tr>
  516. <td>
  517. [abstract]Hi friends Here are my newest pictures![/abstract]<br>
  518. [abstract=twit]Hi my dear Twitter followers. Do you want to see my new
  519. pictures?[/abstract]<br>
  520. [abstract=apdn]Helly my dear followers on ADN. I made sone new pictures
  521. that I wanted to share with you.[/abstract]<br>
  522. Today I was in the woods and took some real cool pictures ...</td>
  523. <td>For Twitter and App.net the system will use the defined abstracts.<br>
  524. For other networks (e.g. when you are using the "statusnet" connector that is used to post to your GNU Social account) the general abstract element will be used.</td>
  525. </tr>
  526. </table>
  527. If you use (for example) the "buffer" connector to post to Facebook or Google+ you can use this element to define an abstract for a longer blogpost that you don't want to post completely to these networks.
  528. Networks like Facebook or Google+ aren't length limited.
  529. For this reason the [abstract] element isn't used.
  530. Instead you have to name the explicit network:
  531. <table class="bbcodes">
  532. <tr>
  533. <th>BBCode</th>
  534. <th>Result</th>
  535. </tr>
  536. <tr>
  537. <td>
  538. [abstract]These days I had a strange encounter...[/abstract]<br>
  539. [abstract=goog]Helly my dear Google+ followers. You have to read my newest blog post![/abstract]<br>
  540. [abstract=face]Hello my Facebook friends. These days happened something really cool.[/abstract]<br>
  541. While taking pictures in the woods I had a really strange encounter...</td>
  542. <td>Google and Facebook will show the respective abstracts while the other networks will show the default one.<br>
  543. <br>Meanwhile, Friendica won't show any of the abstracts.</td>
  544. </tr>
  545. </table>
  546. The [abstract] element isn't working with connectors where we post the HTML like Tumblr, Wordpress or Pump.io.
  547. 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.
  548. ## Special
  549. <table class="bbcodes">
  550. <tr>
  551. <th>BBCode</th>
  552. <th>Result</th>
  553. </tr>
  554. <tr>
  555. <td>If you need to put literal bbcode in a message, [noparse], [nobb] or [pre] are used to escape bbcode:
  556. <ul>
  557. <li>[noparse][b]bold[/b][/noparse]</li>
  558. <li>[nobb][b]bold[/b][/nobb]</li>
  559. <li>[pre][b]bold[/b][/pre]</li>
  560. </ul>
  561. </td>
  562. <td>[b]bold[/b]</td>
  563. </tr>
  564. <tr>
  565. <td>[nosmile] is used to disable smilies on a post by post basis<br>
  566. <br>
  567. [nosmile] ;-) :-O
  568. </td>
  569. <td>;-) :-O</td>
  570. </tr>
  571. <tr>
  572. <td>Custom inline styles<br>
  573. <br>
  574. [style=text-shadow: 0 0 4px #CC0000;]You can change all the CSS properties of this block.[/style]</td>
  575. <td><span style="text-shadow: 0 0 4px #cc0000;;">You can change all the CSS properties of this block.</span></td>
  576. </tr>
  577. <tr>
  578. <td>Custom class block<br>
  579. <br>
  580. [class=custom]If the class exists, this block will have the custom class style applied.[/class]</td>
  581. <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>
  582. </tr>
  583. </table>