ManagedCloud-Hosting Posted August 18, 2020 Share Posted August 18, 2020 Is there any way to provide Knowledgebase access to only one specific user account as (primary.clientemail@client.com) If yes then how to do this ? Thanks 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 19, 2020 Share Posted August 19, 2020 13 hours ago, VirtualWorldGlobal said: Is there any way to provide Knowledgebase access to only one specific user account as (primary.clientemail@client.com) If yes then how to do this ? Thanks Not by default. This could be done with hooks and some customization but out of the box there is no option. You can either make them public or private, and private is global for all users. This also makes sense. Why would you create a completely new KB article just for 1 single person? It would make more sense if this were per group, example, this KB only applies to people with XX product, but that is also not possible out of the box. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 19, 2020 Share Posted August 19, 2020 16 hours ago, VirtualWorldGlobal said: Is there any way to provide Knowledgebase access to only one specific user account as (primary.clientemail@client.com) as yggdrasil says, you would have to hook or edit the templates.... once a user is logged in, then you start to limit who sees what. 3 hours ago, yggdrasil said: Why would you create a completely new KB article just for 1 single person? he's not wanting to create a kb article for just one user - I can imagine what he has in mind with this. 1 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted August 19, 2020 Author Share Posted August 19, 2020 @yggdrasil Kind of Admin KB (where all KB articles will be accessed by one client only). I have started using WordPress KB plugin for clients which is more convenient for me to manage... 1 hour ago, brian! said: as yggdrasil says, you would have to hook or edit the templates.... once a user is logged in, then you start to limit who sees what. Okay 1 hour ago, brian! said: he's not wanting to create a kb article for just one user - I can imagine what he has in mind with this. Yes you know better 😃 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 19, 2020 Share Posted August 19, 2020 13 minutes ago, VirtualWorldGlobal said: I have started using WordPress KB plugin for clients which is more convenient for me to manage... so is the KB in WordPress or WHMCS ? 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted August 19, 2020 Author Share Posted August 19, 2020 (edited) 10 minutes ago, brian! said: so is the KB in WordPress or WHMCS ? Wordpress for client KB - For client KB I have migrated all articles to my website using - Knowledgebase Helpdesk lite plugin (It's Free) But for the WHMCS KB for just one user access would help me to create Admin KB for ourselves.... Edited August 19, 2020 by VirtualWorldGlobal 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted August 19, 2020 Author Share Posted August 19, 2020 (edited) Hi @brian! please help me to add submenu in the primary navbar So that when user clicks on 'Order' Button there is a drop down where I can add to website URL's and they open in a new window. You provide me a hook to add custom text to the navbar and it has been excellent - many thanks, now I want remove the URL from the Order button and add the websites below... Edited August 19, 2020 by VirtualWorldGlobal 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 19, 2020 Share Posted August 19, 2020 38 minutes ago, VirtualWorldGlobal said: Wordpress for client KB - For client KB I have migrated all articles to my website using - Knowledgebase Helpdesk lite plugin (It's Free) it might be useful to post a link in case others want to use it. 39 minutes ago, VirtualWorldGlobal said: But for the WHMCS KB for just one user access would help me to create Admin KB for ourselves.... the quick way would be to detect who the user is, and redirect them away from kb pages if they're not who you want to access kb... <?php # Allow Access To Knowledgebase Pages Hook # Written by brian! function allow_access_to_kb_pages_hook($vars) { $client = Menu::context('client'); $kbusers = array(5); if (!in_array($client->id,$kbusers)) { header("Location: index.php"); die; } } add_hook("ClientAreaPageKnowledgebase", 1, "allow_access_to_kb_pages_hook"); if we were having to give access to different articles to different users, then that gets more involved - but the above is more of a simple, are you user X? if so, you can view the kb; if not, you're getting redirected away from there to another specified page. so $kbusers is an array of client IDs that you want to grant access to the kb to... i'd prefer to use ids rather than email addresses, but you could switch the array to contain a list of email addresses, and then use $client->email in the code instead. 9 minutes ago, VirtualWorldGlobal said: So that when user clicks on 'Order' Button there is a drop down where I can add to website URL's and they open in a new window. what's the menuitemname of that Order navbar child ? 1 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted August 19, 2020 Author Share Posted August 19, 2020 The below hook you gave me...to add custom Menu Item Quote <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $client = Menu::context('client'); $primaryNavbar->addChild('A- Order',array('label' => Lang::trans('Order'),'uri' => 'https://www.mydomain.com/sales','order' => 1,'icon' => 'fa fa-shopping-cart',))->setAttribute('target','_blank'); if (!$client && !is_null($primaryNavbar->getChild('Home'))) { $primaryNavbar->getChild('Home')->setUri('clientarea.php')->setAttribute('target','_blank'); } }); 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted August 19, 2020 Author Share Posted August 19, 2020 Knowledgebase Helpdesk lite plugin (It's Free) URL: https://wordpress.org/plugins/knowledgebase-helpdesk/ 36 minutes ago, brian! said: 1 hour ago, VirtualWorldGlobal said: Wordpress for client KB - For client KB I have migrated all articles to my website using - Knowledgebase Helpdesk lite plugin (It's Free) it might be useful to post a link in case others want to use it. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 19, 2020 Share Posted August 19, 2020 11 minutes ago, VirtualWorldGlobal said: The below hook you gave me...to add custom Menu Item <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $client = Menu::context('client'); $primaryNavbar->addChild('A- Order',array('label' => Lang::trans('Order'),'uri' => 'https://www.mydomain.com/sales','order' => 1,'icon' => 'fa fa-shopping-cart',))->setAttribute('target','_blank'); $primaryNavbar->getChild('A- Order')->addChild('website1',array('uri' => 'https://www.mydomain.com/website1','order' => 1,'icon' => 'fa fa-shopping-cart',))->setAttribute('target','_blank'); $primaryNavbar->getChild('A- Order')->addChild('website2',array('uri' => 'https://www.mydomain.com/website2','order' => 2,'icon' => 'fa fa-shopping-cart',))->setAttribute('target','_blank'); if (!$client && !is_null($primaryNavbar->getChild('Home'))) { $primaryNavbar->getChild('Home')->setUri('clientarea.php')->setAttribute('target','_blank'); } }); I didn't know if you wanted to use icons on the child menu items, or if there should be language overrides used for the labels... 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted August 19, 2020 Author Share Posted August 19, 2020 (edited) Thank you @brian! It's Perfect !! Exactly what I wanted 😃 35 minutes ago, brian! said: I didn't know if you wanted to use icons on the child menu items, or if there should be language overrides used for the labels... Edited August 19, 2020 by VirtualWorldGlobal 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.