|Summary||Hides the lock badge icon for selected secure categories and chat channels|
|Install Guide||How to install a theme or theme component|
|New to Discourse Themes?||Beginner’s guide to using Discourse Themes|
Install this theme component
This simple theme component allows for hiding the lock badge icons for selected secure categories in the drop-down category selectors, header breadcrumbs, navigation sidebar menu and corresponding category chat channels.
In the theme’s categories and channels field, which is the only setting, use the category slug and category ID of each secure category (and chat channel) you want to hide the lock icon for, where the URL of the category is
your-forum-address/c/category-slug/ID (you can look in your browser’s address bar from the secured category). Separate the category slug and ID with a semicolon.
https://exampleforum.org/c/vip/6 would have category slug “vip” and category ID = 6 and in the setting category field you would input “vip;6” as one of the list items. Chat channel must be linked to the category and channel slug must be the same as it’s corresponding category. (See screenshots below)
For sub-categories, the sub-category will inherit the parent category if the latter is hidden. However, you can a hide lock icon in secure sub-categories themselves by separating the parent category and sub-category slugs with a forward slash like
boats/motorboats/8 ) and use the sub-category ID in the settings field, separated by a semicolon, like
To-do: Use category list_type setting. Add setting for hiding lock icon for all secured categories, and setting to hide lock icon of search results from secured categories.
Thanks to @Arkshine and @Don for some of the code snippets.