Custom BBCodes on the forum

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
xenopeek
Level 25
Level 25
Posts: 29460
Joined: Wed Jul 06, 2011 3:58 am

Custom BBCodes on the forum

Post by xenopeek »

Besides the regular buttons on the edit box, to add BBCodes to your post:
Normal c rimg
There are several custom BBCodes you can use on this forum that are not otherwise discoverable. This posts details all currently available custom BBCodes we've added to the forum. The regular BBCodes are explained here: app.php/help/bbcode

The last two buttons on above bar are also custom BBCodes. [c] is used to show commands or code in-line. [rimg] is used to show larger images as previews, so the images don't get in the way of the topic too much. Such images can be clicked to see them at full size.

Link within a post
Say you write a longer tutorial post and want to provide a table of contents where readers can click on items in the table to jump to them directly, you can use the anchor and goto tags for this. The anchor tag is used to create a named destination in your post. The goto tag creates a clickable link to such a named destination in your post. Syntax of the tags (replace identifier with name of your link using only a-z letters, 0-9 digits, hyphen or underscore; replace text with the text to display as link):

Code: Select all

[goto=identifier]text[/goto]
[anchor=identifier]text[/anchor]
Note that you can also just use the anchor tag on its own. It will create a link you can share elsewhere with people (like in another topic here on the forum). After submitting your post you can right-click the anchor and select to copy the link location to get the URL that will take people directly to that place in your post.

FontAwesome glyphs
The forum uses FontAwesome glyphs for icons. You can also use FontAwesome glyphs in your own posts. Cheatsheet of available icons here: https://fontawesome.com/v4.7.0/cheatsheet/. Just copy the fa-something code and put it between the tags. Like [fa]fa-linux[/fa] for .

Code: Select all

[fa]identifier[/fa]
Horizontal rule
A horizontal line in your post.

Code: Select all

[hr][/hr]
Strikethrough text
What more to say :)

Code: Select all

[s]text[/s]
Indent a block of text
Indent block of text. You used to be able to do this with an empty list but since an earlier upgrade of phpBB the empty list now always adds a bullet for the first item. Use the tab tag as an alternative.

Code: Select all

[tab]text[/tab]
Center align text

Code: Select all

[center]text[/center]
Spoiler
Hide a block of text, with a clickable spoiler line to show it.

Code: Select all

[spoiler=spoiler line]hidden text[/spoiler]
Click here to try it
Hello world!
Last edited by xenopeek on Wed Nov 08, 2023 5:21 pm, edited 5 times in total.
Image
phd21
Level 20
Level 20
Posts: 10103
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Custom BBCodes on the forum

Post by phd21 »

Hi xenopeek,

Thank you for posting this. :)
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
User avatar
trytip
Level 14
Level 14
Posts: 5371
Joined: Tue Jul 05, 2016 1:20 pm

Re: Custom BBCodes on the forum

Post by trytip »

Image
Image
User avatar
Schultz
Level 9
Level 9
Posts: 2920
Joined: Thu Feb 25, 2016 8:57 pm

Re: Custom BBCodes on the forum

Post by Schultz »

Isn't the inline code tag already in the edit box (the "c")?

Untitled.jpg
User avatar
xenopeek
Level 25
Level 25
Posts: 29460
Joined: Wed Jul 06, 2011 3:58 am

Re: Custom BBCodes on the forum

Post by xenopeek »

Yes, like I said some are displayed (c and rimg) but most are hidden.
Image
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Custom BBCodes on the forum

Post by smurphos »

Is there BB for embedded video that could be enabled?

Also is there any specialised code BB which scans for common language types and applies colour formatting (e.g to distinguish comments from code)?
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
xenopeek
Level 25
Level 25
Posts: 29460
Joined: Wed Jul 06, 2011 3:58 am

Re: Custom BBCodes on the forum

Post by xenopeek »

I don't think embedding videos adds much for a technical support forum? There is an official extension to enable automatic video embedding but there's several drawbacks to it (like it likely increases server load for all pages and it for sure slows down page load speed on pages that have videos).

There are several 3rd party (unofficial, with questionable support) extensions that add syntax highlighting. It looks like they do that client side with JavaScript. It could be nice to have for posts in Scripts & Bash forum but isn't very useful outside of that. And we rarely if ever see code in programming languages other than bash. For very long scripts, where syntax highlighting is useful, I'd hope people post them on their GitHub account or similar code sharing website instead. Thanks for the suggestions though, at least sent me on a hunt so see what is available :)
Image
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Custom BBCodes on the forum

Post by smurphos »

No worries. After posting I went on a quick hunt for an easy way to convert webm (from Cinnamon's screen recorder) to animated gif and found a few options. That was my main use case - being able to post short animated screenshots as demonstrators.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
Portreve
Level 13
Level 13
Posts: 4882
Joined: Mon Apr 18, 2011 12:03 am
Location: Within 20,004 km of YOU!
Contact:

Re: Custom BBCodes on the forum

Post by Portreve »

Why in the world have I not seen this before?!?

Thank you, xenopeek!!!
Flying this flag in support of freedom 🇺🇦

Recommended keyboard layout: English (intl., with AltGR dead keys)

Podcasts: Linux Unplugged, Destination Linux

Also check out Thor Hartmannsson's Linux Tips YouTube Channel
gm10

Re: Custom BBCodes on the forum

Post by gm10 »

Portreve wrote: Tue Jul 16, 2019 2:24 pm Why in the world have I not seen this before?!?
Thanks for bumping, because ditto. I knew about [fa] because Moem had posted about it afterwards and some of those are pretty standard on phpBB boards, but I didn't realize we had anchors. Time to update some guides I guess. ;)
User avatar
Moem
Level 22
Level 22
Posts: 16193
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Custom BBCodes on the forum

Post by Moem »

gm10 wrote: Tue Jul 16, 2019 3:10 pm I knew about [fa] because Moem had posted about it afterwards and some of those are pretty standard on phpBB boards
Yeah, it's not a new concept... :wink:
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Spiderspoon
Level 4
Level 4
Posts: 275
Joined: Tue May 14, 2013 6:03 am
Location: Dapto NSW

Re: Custom BBCodes on the forum

Post by Spiderspoon »

Is this the BBCode reference, or is there more elsewhere on this forum? Thanks.
Linux Mint 21.1 Cinnamon, MATE & Xfce. Desktop computer 16 GB RAM. Windows 11. 22" & 24" monitors.
Linux Mint 21.1 Cinnamon on 256 GB USB flash drive. Dell Inspiron 13-7378 laptop. 16 GB RAM. Windows 10.
User avatar
xenopeek
Level 25
Level 25
Posts: 29460
Joined: Wed Jul 06, 2011 3:58 am

Re: Custom BBCodes on the forum

Post by xenopeek »

The other supported BBCodes are standard phpBB BBCodes, which you can also insert with the buttons on top of the edit box when typing a post. There's some help for those here: https://www.phpbb.com/community/help/bbcode
Image
User avatar
Termy
Level 12
Level 12
Posts: 4254
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Custom BBCodes on the forum

Post by Termy »

Awesome. Strikethrough is obligatory on a message board, IMO. :P
I'm also Terminalforlife on GitHub.
Post Reply

Return to “Tutorials”