Jump to content

to hide some knowledgebase answer for clients only.


Anders

Recommended Posts

  • 4 weeks later...

[2¢]

This sounds like the feature I just realised I would need for our knowledgebase. Unless implemented correctly I see a problem with the smarty option though, as visitors might still be able to see articles or categories that are hidden by changing the category or article IDs in the URL manually.

 

I guess a smarty based option would best be a "deny all, allow some" type solution to protect against people finding things that they should not by modifying the URL manually, or by me forgetting to update the template when adding a new article. The smarty checks should take into account both category and article IDs.

 

AVeal - you might want to update your smarty template if you're really keen on keeping guests from viewing articles they shouldn't have access to. ;)

 

An ideal solution however would be for an additional feature in WHMCS to enable us to set an article or whole category of articles as viewable by logged in users only. This permission bit would need to be respected by the search function as well in the case where searching is offered to the general public.

[/2¢]

Link to comment
Share on other sites

  • 3 weeks later...

Yes jarett, more or less.

 

the ID in the main page is $kbcat.id and on the kb article $catid, so it would be something like:

 

{if $loggedin && $kbcat.id==XX}show the category {else} dont show {/if}

 

and in the articles themselves:

 

{if $loggedin && $catid==XX}show the category {else} dont show {/if}

 

When hidding more than a few categories, you would probably just want to assign all categories to an array. You can do that with either testing in php and assigning a smarty variable, or using a smarty plugin called smarty_function_assign, or write your own matching plugin.

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