Anders Posted April 10, 2007 Share Posted April 10, 2007 Hi guys, is possible to hide some of the knowledgebase answers to customers only? when they login they will see these categories and answers. Regards Anders 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted April 10, 2007 Share Posted April 10, 2007 setup a category that is for clients only, then use smarty to to hide from everyone else except for logged in users 0 Quote Link to comment Share on other sites More sharing options...
Anders Posted April 11, 2007 Author Share Posted April 11, 2007 Yes, That is exactly what i want to do, but i am super rookie with smarty i just know html. could give me hint how i should do it, i will appreciate that alot. Warm regards anders 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted April 11, 2007 Share Posted April 11, 2007 if you create the category, give me the category number, i will create the code for you and implement it for $30 (basically my 30 minute rate). 0 Quote Link to comment Share on other sites More sharing options...
AVeal Posted April 12, 2007 Share Posted April 12, 2007 cj-hosting.co.uk/customer/knowledgebase.php Is this what your trying to complete? 0 Quote Link to comment Share on other sites More sharing options...
nitro Posted May 6, 2007 Share Posted May 6, 2007 [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¢] 0 Quote Link to comment Share on other sites More sharing options...
jerett Posted May 24, 2007 Share Posted May 24, 2007 its very simple to just do a {if $loggedin & kbcategory == "client"} show the category {else} dont show. now i know the variables aren't right but wouldn't this work and save people $30? 0 Quote Link to comment Share on other sites More sharing options...
trine Posted May 24, 2007 Share Posted May 24, 2007 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.