Jump to content

Admin-only knowledge base articles


rodolphe

Recommended Posts

you can create hidden categories within the knowledgebase that are only visible when viewing the kb in the admin area.

 

http://docs.whmcs.com/Support_Center#Knowledgebase

 

Enter a name and description to be displayed to clients. Tick the Hide checkbox to make this category invisible, it will only be visible in the admin area. Click Add Category.

any articles you add to the hidden category/categories will also be hidden and not accessible directly from the client area kb.

Link to comment
Share on other sites

OK, how does one search articles created in a hidden category? The admin area doesn't appear to allow searching.

 

Or do I need to specifically index those articles so they appear as search results from the top-right-hand search box (what's that for anyway?)

Link to comment
Share on other sites

OK, how does one search articles created in a hidden category? The admin area doesn't appear to allow searching.

I don't think you can.

 

Or do I need to specifically index those articles so they appear as search results from the top-right-hand search box (what's that for anyway?)

it's a quick search for finding existing clients, domains, products etc

Link to comment
Share on other sites

  • 2 weeks later...
I would love to know how to create a knowledgebase category that is hidden from public view, but available if you know the link.

you could modify knowledgebase.tpl to not display certain categories by using {if} statements...

 

foreach name=kbasecats from=$kbcats item=kbcat}
{if $kbcat.id neq 4}
   <div class="col4">
       <div class="internalpadding">
           <img src="images/folder.gif" /> <a href="{if $seofriendlyurls}knowledgebase/{$kbcat.id}/{$kbcat.urlfriendlyname}{else}knowledgebase.php?action=displaycat&catid={$kbcat.id}{/if}" class="fontsize2"><strong>{$kbcat.name}</strong></a> ({$kbcat.numarticles})<br />
           {$kbcat.description}
       </div>
   </div>
   {if ($smarty.foreach.kbasecats.index+1) is div by 4}<div class="clear"></div>
   {/if}
{/if}
{/foreach}

in this case, it will prevent category id #4 from being displayed in the list of categories - but you can still you use its direct link - knowledgebase.php?action=displaycat&catid=4 - and it will be displayed.

 

depending on its content, it might then also be useful to make any articles inside that category private - so only logged in clients can view it.

 

one further thing you might need to do is to hide any articles within your "hidden" category from being shown in the "Most Popular Articles" section...

 

{foreach from=$kbmostviews item=kbarticle}
{if $kbarticle.id neq 24 and $kbarticle.id neq 26}
<div class="row">
   <img src="images/article.gif"> <a href="{if $seofriendlyurls}knowledgebase/{$kbarticle.id}/{$kbarticle.urlfriendlytitle}.html{else}knowledgebase.php?action=displayarticle&id={$kbarticle.id}{/if}" class="fontsize2"><strong>{$kbarticle.title}</strong></a><br />
   {$kbarticle.article|truncate:100:"..."}
</div>
{/if}
{/foreach}

the category value isn't stored in the $kbarticle array, so you will need to add the article IDs that you want to hide to the {if} statement.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated