Page 1 of 1

Custom BBCodes on the forum

Posted: Sat Apr 07, 2018 3:29 pm
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 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]

Re: Custom BBCodes on the forum

Posted: Sat Apr 07, 2018 4:26 pm
by phd21
Hi xenopeek,

Thank you for posting this. :)

Re: Custom BBCodes on the forum

Posted: Sat Apr 07, 2018 7:31 pm
by trytip
Image

Re: Custom BBCodes on the forum

Posted: Sat Apr 07, 2018 9:37 pm
by Schultz
Isn't the inline code tag already in the edit box (the "c")?

Untitled.jpg

Re: Custom BBCodes on the forum

Posted: Sun Apr 08, 2018 1:51 am
by xenopeek
Yes, like I said some are displayed (c and rimg) but most are hidden.

Re: Custom BBCodes on the forum

Posted: Sun Apr 08, 2018 2:02 am
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)?

Re: Custom BBCodes on the forum

Posted: Sun Apr 08, 2018 4:53 am
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 :)

Re: Custom BBCodes on the forum

Posted: Sun Apr 08, 2018 5:18 am
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.