Read before updating: How to Update Kunena Templates - More detail

How to turn on and add more topic label?

Huyen Nguyen's Avatar Topic Author
Moderator Moderator
  • Posts: 558
  • Thanks: 140

How to turn on and add more topic label?

7 years 11 months ago - 7 years 11 months ago
#11388
Hi all,
In this topic we will guide you how to enable and assign a label for the topic. If you want to add more custom label you, let scroll down to the second part.

I. Enable the topic label.
  • Log-in to back-end of your site and click to the "Components -> Kunena Forums -> Templates" menu.
  • Choose the current template and click to the "Features" tab. Scroll down and you will see the "Show Labels" option.
  • Choose the "Topic id" field and save your configure.
  • Back to your forum and edit a topic, assign a topic icon for that topic.
  • Click to the "Submit" button to finish edit topic.

II. Add more custom labels.
- Step 1: Open the "labels.xml" file in the "[root]media\kunena\labels\" path and add a custom label line (middle line).
Code:
... <label id="5" name="COM_KUNENA_LABELS_BUG" b2="bug" b3="bug" fa="bug" labeltype="danger" /> ...

- Step 2: Open the "topicicons.xml" file in the "[root]\media\kunena\topic_icons\default" path. Add more icon to the "Topic icon" line (this icon you will see when create new or edit a topic). Let see middle line.
Code:
... <icon id="4" name="love" published="1" b2="heart" b3="heart" fa="heart" title="COM_KUNENA_ICON_LOVE" src="user/love.png" /> <icon id="5" name="bug" published="1" b2="bug" b3="bug" fa="bug" title="COM_KUNENA_ICON_BUG" src="user/bug.png" /> <icon id="9" name="merged" published="1" b2="contract" b3="resize-small" fa="compress" title="COM_KUNENA_ICON_MERGED" src="user/merged.png" /> ...

- Step 3: Add language string to the language file. Open the "en-GB.com_kunena.templates.ini" file in the "[root]\components\com_kunena\language\en-GB\" path and add language string of label.
Code:
... COM_KUNENA_LABELS_SOLVED="Solved" COM_KUNENA_LABELS_BUG="Bug" COM_KUNENA_LABELS_MERGED="Merged" ...

- Step 4: Try to edit a topic and assign new icon for that topic.
- Step 5: Save and view all change.

**Some note:
- b2: icon in bootstrap 2 (FontAwesome 3).
- b3: icon in bootstrap 3 (FontAwesome 4).
- fa: FontAwesome icon.
- name: Name of label.
- labeltype: background color of label (default, primary, info, success, danger, warning)
Huyen Nguyen
Nice Theme Store's Support Department.
Support email: 9themestore[at]gmail.com
** Please post your site url here if it has been lived **
Last edit: 7 years 11 months ago by ntstore.

Please Log in or Create an account to join the conversation.

Time to create page: 0.361 seconds