I have hidden all widgets to all users that are not logged in. The only thing that remains is the login box AND the search box. Since the KB and Troubleshooter are hidden until you login I would like to hide this search box as well. Is it possible for me to do this?
Hi there, If you goto Admin CP, Templates, Groups, Click on your default template. then when the new window opens up, click on templates. Then go into general, and then click on header. Search the code and find this bit Code: <form method="post" id="searchform" action="<{$_baseName}><{$_templateGroupPrefix}>/Base/Search/Index" name="SearchForm"> <div class="searchboxcontainer"> <div class="searchbox"> <span class="searchbuttoncontainer"> <a class="searchbutton" href="javascript: void(0);" onclick="$('#searchform').submit();"><span></span><{$_language[searchbutton]}></a> </span> <span class="searchinputcontainer"><input type="text" name="searchquery" class="searchquery" onclick="javascript: if ($(this).val() == '<{$_language[pleasetypeyourquestion]}>' || $(this).val() == '<{$_language[pleasetypeyourquery]}>') { $(this).val('').addClass('searchqueryactive'); }" value="<{if $_baseIndex == true}><{$_language[pleasetypeyourquestion]}><{else}><{$_language[pleasetypeyourquery]}><{/if}>" /></span> </div> </div> </form> and change it to this: Code: <{if $_filterKnowledgebase == true}> <form method="post" id="searchform" action="<{$_baseName}><{$_templateGroupPrefix}>/Base/Search/Index" name="SearchForm"> <div class="searchboxcontainer"> <div class="searchbox"> <span class="searchbuttoncontainer"> <a class="searchbutton" href="javascript: void(0);" onclick="$('#searchform').submit();"><span></span><{$_language[searchbutton]}></a> </span> <span class="searchinputcontainer"><input type="text" name="searchquery" class="searchquery" onclick="javascript: if ($(this).val() == '<{$_language[pleasetypeyourquestion]}>' || $(this).val() == '<{$_language[pleasetypeyourquery]}>') { $(this).val('').addClass('searchqueryactive'); }" value="<{if $_baseIndex == true}><{$_language[pleasetypeyourquestion]}><{else}><{$_language[pleasetypeyourquery]}><{/if}>" /></span> </div> </div> </form> <{/if}>
Damn Gary I hope you are getting some kick backs from Kayako for all the help you provide on here. ;-)
Hey Gary, you did a right thing by helping him!! I tot the person like you is not existing in this world now a day ! I hope many person like you now a day!! Yeastrol
Can you do a step by step guide how to do it? Or if you just post some hints here I will create such guide. Will help all of us a lot. Cheers, Igor
Hi Igor, In the admin CP, widgets, when you go into a widget, there are a couple of tabs, on the options tab, you can select visability for "logged in users" or "guests". Then there is a permissions tab, where you can remove access to that widget for guests or registered users. Registered users effectively means "logged in users" Gary
Thank you Gary. I have different situation on one portal I want guests to see News, Knowledgebase and New Ticket on another portal - nothing should be available until user logs in. As I understand I have to use <{if $_userIsLoggedIn == true}> inside templates as otherwise restricted portal shows widgets available for Guest on another portal. So strange that concept of Guest does not linked to portal and is global. When I will finish I will post Part II of 'How do we use Kayako' with all the steps I did to configure Kayako. However the reason I posted this question here is - looks like links in navbar are added via loop: <ul id="toptoolbarlinklist"><{foreach key=key item=_item from=$_widgetContainer}><{if $_item[displayinnavbar] == '1'}><li<{if $_item[isactive] == true}> class="current"<{/if}>><a class="toptoolbarlink" style="<{if $_item[defaultsmallicon] != ''}>background-image: url(<{$_item[defaultsmallicon]}>);<{/if}>" href="<{$_item[widgetlink]}>"><{$_item[defaulttitle]}></a></li><{/if}><{/foreach}></ul> It was interesting to see how they can be analysed individually based on <{if $_userIsLoggedIn == true}> or other condition. Boxes in a main area are displayed individually. So there is no problem to switch them off but prepending each block starting with smth. like <{if $_filterNews == true}> (for News) with the same <{if $_userIsLoggedIn == true}> condition. Hopefully, for me I just wrap this loop and I am done but it could be nice to now how (just in case and to please own curiosity) After I wrote above I realised that one can use a combination of ($_item[defaulttitle] ='News' && $_userIsLoggedIn == true) Also wondering if Kayako upgrades affect these template files I value so much after all the work was done. Can they be overwritten? BTW Strange that neither Kayako nor one of their partners saw an opportunity to create Kayako configurator - wizard like UI which can have as many as 100 steps or more but once done you have all SQL code and all files to replace and have your system just 'what you need'. Tool should allow to stop and save progress at any step and redo some steps if necessary and understand dependencies (if we answered question 10 differently - questions 20-40 are irrelevant and hidden now). May be nobody is interested because of a worry that Kayako will see it and copycat? I already spent a week building tunnels via Putty from my PC to my server to avoid proxies and figuring out template's layouts and opening multiple parts of UI many many times.
Hi Igor, Before you upgrade your helpdesk next time around, goto the admin CP, templates, Import/Export and export all your templates. Then after you upgrade kayako, you can simply import them again Gary
Thanks, GaryGBM. This was a very nice solution to our quandary. Thanks for the help and keep up the good work.
Try: <{if $_userIsLoggedIn == true}> Instead of: <{if $_filterKnowledgebase == true}> A person was asking how to show search only to those who can see Knowledgebase.
Thanks. I will take a look shortly. Incidentally, I could see the knowledge base once logged in but not the search box whether logged in or not...
Gary, I have removed the search box, widgets, and practically everything except for the login box from my helpdesk page. This is a good thing as I only want logged in users creating tickets or seeing any content for now. I'd like to resize the login widget so that it looks more presentable (since nothing else is on the page) and put up a message telling users that they need to login to create a ticket. Have any recommendations on how to accomplish these goals? Great information by the way! I wish more elements of kayako were visually configurable to make it easier to edit for non-coders.
Hi James, The login screen is actually drawn using HTML in the header template in the admin CP, you can alter the HTML in there and move it around, restyle it etc.. Gary
New to Kayako. I was able to hide both search and knowledgebase from non logged in users , but articles on the left panel is still showing. How can i hide the left panel (KB) from non logged in users? Thanks, joti