cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Hidden Gems of Web Help Desk - Text Formatting with BBCode

Level 15

Web Help Desk (WHD) is an easy to use, but also flexible tool for your IT team and even-though we are working on many great new features or improving existing like recently added Orion Integration, there are still less-known areas, which I call the hidden gems.


As a technician you want to use formatted text in your tickets, asset notes or emails. Sometimes you might want to highlight certain information in an email, send a clickable link, format a FAQ that it's easy to follow, or maybe highlight crucial information in an asset note, thus your fellow colleague won't forget to notify you when updating your machine. Some forms like ticket notes offer formatting options in a little menu on the top, but these may not be available everywhere or you might want to do more than standard options.

whd_editor.png

Being a web-based tool, HTML could be sometimes tricky to use, so that's why we have simple formatting which resembles HTML, but uses different syntax. Meet BBCode.

BBCode

BBCode (Bulletin Board Code) is a lightweight markup for text formatting. It was introduced in message-boards, but widely used in many other types of software nowadays. Tags are usually indicated by square brackets [ and ], enclosing a keyword. There is no formal standard and you can find different implementations and variations in supported tags. WHD also has its own implementation and there is a good reason for it - you can customize it.

Here is a simple example of BBCode, which you can use in WHD.

[size=20]Title[/size]

[img]http://www.solarwinds.com/favicon.ico[/img]

<p>

Lorem ipsum [b]dolor sit[/b] amet, [url=http://www.webhelpdesk.com]consectetuer adipiscing[/url] elit. Cum sociis natoque [i]penatibus et magnis[/i] dis parturient montes, nascetur ridiculus mus.

</p>

And now some list:

[list]

[*]Fusce tellus. Proin in tellus sit amet nibh dignissim sagittis.

[*]Sed convallis magna eu sem. Maecenas sollicitudin.

[/list]

[list=A]

[*][color=blue]FAQ link:[/color] [faq id=1]

[*][u]FAQ link:[/u] <faq id=2>

[/list]

This text renders to following.

whd_faq_render.png

Note that markup is actually mix of BBCode and HTML.

Formatting

Basic markup follows pretty simple structure:

  • Simple tags: [tab]something[/tag]
  • Simple parameterized tags: [tag=value]something[/tag]
  • Complex parameterized tags: [tag value1="xxx" value2="yyy"]something[/tag]

WHD supports wide range of tags:

  • [code]your code here[/code]
  • [quote]Text[/quote]
  • [quote=Author]Text[/quote]
  • [b]bold[/b]
  • [i]italics[/i]
  • [u]underscored[/u]
  • [list] [*]First item [*] Second Item
  • [img]URL[/img]
  • [email]address[/email]
  • [email=address]Text[/email]
  • [url]address[/url]
  • [url=address]Text[/url]
  • [color=name]Text[/color] (supports HTML color names)
  • [size=number of pixels]Text[/size]
  • [google]key words[/google]
  • [google=key words]Text[/google]
  • [faq id=number]

Additionally you can also use selected supported HTML tags, which you can mix with BBCode tags:

b, i, u, a, img, li, ul, ol, font, br, p, pre, center, faq, code, hr, strong.

You can use the BBCode in many places in WHD like ticket subject, request details, notes, email templates, FAQ, Messages, Login message, custom field description and so on. However not all fields do support BBCode, so if it's something like secondary email field in your account details, you better check in advance.

Special Behavior

Apart from tags, BBCode mechanism also detects bare URLs like http or ftp links, emails or UNC paths and make them clickable. If you put link to Youtube or Vimeo video, WHD will actually embed that video and display it instead of the link. (If you want you can disable this behavior, see below.)

whd_embeded_video.png

(Btw. if you have not seen the video you definitely should ).

There is also a special tag faq. This tag will provide a link to existing FAQ and has the form of [faq id=NUMBER] or <faq id=NUMBER>.

Customization

WHD stores transformation rules for all tags in WebHelpDesk/bin/webapps/helpdesk/WEB-INF/Helpdesk.woa/Contents/Resources/bb_config.xml.

EDIT:  Location of bb_config.xml has changed at some point. Since versions 12.x it is located at whd-web.jar\Resources\bb_config.xml.

If you want to modify it, you should do the following:

  1. Stop WHD
  2. Back up whd-web.jar
  3. Edit bb_config.xml within the whd-web.jar, (e.g. Total Commander allows user to modify files packed in a jar)
  4. Start WHD

Great thing about having own implementation is that you can easily create your own tags. Let say you want to use strikethrough text. Simply add this custom tag definition to bb_config.xml and restart WHD.

     <!-- S -->

     <match name="s">

          <regex>(?s)(?i)\[s\](.*?)\[/s\]</regex>

          <replace>

          <![CDATA[

          <strike>$1</strike>

          ]] >

          </replace>

     </match>


Now you can use [s] and [/s] tags.

In bb_config.xml you can also disable embedding video instead of displaying a link. Find all rules with name starting with auto-youtube (or auto-vimeo) and comment them out with <!-- and -->. Don't forget to restart WHD and you will see the link instead of the video. (Which means url BBCode rule was applied.)

whd_video_not_embedded.png

How about trying something more fancy? Sometimes when working on an incident or writing a FAQ, you refer to other tickets by saying "ticket 544" or maybe you use terms like request, case or problem. Wouldn't it be nice if this could be a link, so you colleague could click on it and open that ticket right away? Let's write a simple rule to do it. (Don't forget to replace the URL with the link to your system.)

     <match name="TicketLink" alwaysProcess="true">

          <regex>(?s)(?i)((?:ticket|incident|case|problem|request)\s*)([0-9]+)</regex>

          <replace>

          <![CDATA[

          <a href="http://webhelpdesk.com:8081/helpdesk/WebObjects/Helpdesk.woa/wa/TicketActions/view?ticket=$2">$1$2</a>

          ]]>

          </replace>

     </match>

Now you can just type "case 22" and voilà - there is link!

whd_bbcode_new_rule.png

As you could see WHD is tremendously flexible, you can use BBCode in various places and also add your new tags. I'm sure there are more areas you would like to learn more about, so please let me know in comments!

References:

14 Comments
Level 7

When I first saw the title, I said how can bbcode provide anything meaningful to add to html. But, I am impressed by the ability to create your own codes and the idea of embedding youtubes. This offers some interesting ideas for FAQs. Nice job.

Level 9

This is a really great article and I am  glad you shared this.  In testing, I found that not all BBCODE features are supported here, such as strike text and others.  It would be really cool if it supported tables and other customization to make the FAQs more visually appealing and organized.  I read that there is posting in Feature Requests for HTML support in notes and FAQs, so maybe we can be lucky!

This is a great first start though...

Level 15

I would say that most of the thing can you probably do with BBCode. We do not support tables at the moment, but I would be interested to hear more ideas, what can't be covered by existing BBCode support, so we know where to go.

Level 8

What's the best way to go about this if you are running the Virtual Appliance?

Level 11

Please note that although Solarwinds added an Export option for FAQ's, if you use coding that the tags show up in the output which is not ideal.

Level 10

In Web Help Desk version 12.2 I can't locate the bb_config.xml referenced in the Customization Section above to make the changes that allows you to type in ticket #### and have a link automatically get created to it or do FAQ #### and have a link created.  Does anyone know where this is done in the new version.  I have always had this functionality for the techs before and they are now clamoring because it's gone.

Level 15

Location of bb_config.xml has changed at some point.

Currently it is located at whd-web.jar\Resources\bb_config.xml.

If you want to modify it, you should do the following:

-       Stop WHD

-       Back up whd-web.jar

-       Edit bb_config.xml within the whd-web.jar, (e.g. Total Commander allows user to modify files packed in a jar)

-       Start WHD

Hope that helps

Level 15

Should be very same, do you have some specific issues with this in VA?

Level 9

Is there a way to use BBCode to link to a file location on our corporate network?

In Outlook, I can link to a file as follows: file:///\\COMPANYNAME.com\public\Policies\IT\

In WHD, this doesn't work. I have tried various methods and formats. I have also tried using [url][/url] wrapper.

Thanks

Level 10

What would be the regex to indent text (not just the first line)?

Level 12

Running 12.5.2 Where is <match name="TicketLink" alwaysProcess="true"> located, can't find it inside whd-web.jar

Level 8

I am also running 12.5.2. Where would I use BBcode to set a larger font for all ticket notes?

Level 12

Great info. Thanks for posting!

Cheers for this, OP. It's great to highlight the customisation available in SWI products, and WHD is no exception