Custom BBCodes on the forum

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
User avatar
xenopeek
Level 24
Level 24
Posts: 22760
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Custom BBCodes on the forum

Post by xenopeek » Sat Apr 07, 2018 3:29 pm

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 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 too much in the way of the topic. They can be clicked to see the linked images 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 created 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]
Last edited by xenopeek on Sun Apr 15, 2018 3:07 pm, edited 2 times in total.
Reason: added center
Image

User avatar
phd21
Level 16
Level 16
Posts: 6752
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Custom BBCodes on the forum

Post by phd21 » Sat Apr 07, 2018 4:26 pm

Hi xenopeek,

Thank you for posting this. :)
Phd21: Mint KDE 17.3 & 18.3, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

User avatar
trytip
Level 8
Level 8
Posts: 2051
Joined: Tue Jul 05, 2016 1:20 pm

Re: Custom BBCodes on the forum

Post by trytip » Sat Apr 07, 2018 7:31 pm

Image
Image

User avatar
Schultz
Level 6
Level 6
Posts: 1279
Joined: Thu Feb 25, 2016 8:57 pm

Re: Custom BBCodes on the forum

Post by Schultz » Sat Apr 07, 2018 9:37 pm

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

Untitled.jpg

User avatar
xenopeek
Level 24
Level 24
Posts: 22760
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Custom BBCodes on the forum

Post by xenopeek » Sun Apr 08, 2018 1:51 am

Yes, like I said some are displayed (c and rimg) but most are hidden.
Image

User avatar
smurphos
Level 6
Level 6
Posts: 1401
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Custom BBCodes on the forum

Post by smurphos » Sun Apr 08, 2018 2:02 am

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)?

User avatar
xenopeek
Level 24
Level 24
Posts: 22760
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Custom BBCodes on the forum

Post by xenopeek » Sun Apr 08, 2018 4:53 am

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 6
Level 6
Posts: 1401
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Custom BBCodes on the forum

Post by smurphos » Sun Apr 08, 2018 5:18 am

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.

Post Reply

Return to “Tutorials”