Si Posted October 8, 2018 Share Posted October 8, 2018 (edited) My MacBook recently had to be sent off for repair and I’ve been forced to use my iPad to answer support etc. However, every time I view a client page in the admin area, the client drop down search bar that appears at the top of each client page, forces me to sign in (using the fingerprint touch) on the iPad. It’s really annoying and laborious. however, I’ve been using WHMCS for about 12-13 years, and somewhere in the back of my mind, I remember there used to be an option to turn off the client drop down/search appearing (for performance sake). But for the life of me, I cannot now find that option. am I missing something? Help appreciated. Thanks. Edited October 8, 2018 by Si 1 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 8, 2018 Share Posted October 8, 2018 Hi Si, 1 hour ago, Si said: however, I’ve been using WHMCS for about 12-13 years, and somewhere in the back of my mind, I remember there used to be an option to turn off the client drop down/search appearing (for performance sake). But for the life of me, I cannot now find that option. it got removed three years ago with v6.2... https://docs.whmcs.com/Other_Tab#Disable_Full_Client_Dropdown Quote Disable Full Client Dropdown Check this option to remove the aforementioned client dropdown. This is used on large databases where the number of clients slows down the loading of pages. Deprecated: This option has been removed in WHMCS 6.2 and later. Improvements to the client menu rendering mean this is no longer required for larger installs. if we're talking about the client dropdown shown on the profile summary pages.. as a temporary fix, you could hide the dropdown with an Admin CSS Hook (tested with Blend - but should work with others)... <?php /** * Admin Client Search Hide Hook * @author brian! */ function clients_view_search_hook($vars) { return "<style>.client-dropdown-container { display:none; }</style>"; }; add_hook("AdminAreaFooterOutput",1,"clients_view_search_hook"); ... and then when you get your Macbook returned, just disable the hook and the dropdown should reappear again. 0 Quote Link to comment Share on other sites More sharing options...
Si Posted October 8, 2018 Author Share Posted October 8, 2018 (edited) Hi Brian! thanks for this. Forgive me, but exactly where do i put this code please? Edited October 8, 2018 by Si 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 8, 2018 Share Posted October 8, 2018 2 minutes ago, Si said: Forgive me, but exactly where do i put this code please? create a .php file in includes/hooks, give it a memorable filename (e.g adminclientdropdown.php), paste the above code into it and save - refresh the page, and the dropdown should be gone. 0 Quote Link to comment Share on other sites More sharing options...
Si Posted October 8, 2018 Author Share Posted October 8, 2018 Hmmm, I did that, but it didnt work. For me. I have it in the header.php file of the /admin area. It has removed the drop down box (so in that respect it’s working), but the code appears on the client summary page. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 8, 2018 Share Posted October 8, 2018 2 minutes ago, Si said: I have it in the header.php file of the /admin area. It has removed the drop down box (so in that respect it’s working), but the code appears on the client summary page. when you say the code appears on the client summary page, what do you mean ? the hook isn't removing any functionality, e.g WHMCS is still creating the dropdown - but the css is now hiding it. 0 Quote Link to comment Share on other sites More sharing options...
Si Posted October 8, 2018 Author Share Posted October 8, 2018 3 minutes ago, brian! said: when you say the code appears on the client summary page, what do you mean ? the hook isn't removing any functionality, e.g WHMCS is still creating the dropdown - but the css is now hiding it. The php code appears on the client summary page when viewed (in the place of the drop down). 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 8, 2018 Share Posted October 8, 2018 6 minutes ago, Si said: The php code appears on the client summary page when viewed (in the place of the drop down). how kinky - don't see why it's doing that if you're using the hook - it should work as a header or footer hook. second option would be to delete the hook and just edit the template - header.tpl - and paste the css code below into the <head> section anywhere by {$headoutput} <style>.client-dropdown-container { display:none; }</style> 0 Quote Link to comment Share on other sites More sharing options...
bear Posted October 8, 2018 Share Posted October 8, 2018 44 minutes ago, Si said: I have it in the header.php file of the /admin area. That might explain why it's showing on the page, since it's PHP code and meant to be in a hook (as written). 0 Quote Link to comment Share on other sites More sharing options...
Si Posted October 8, 2018 Author Share Posted October 8, 2018 5 minutes ago, bear said: That might explain why it's showing on the page, since it's PHP code and meant to be in a hook (as written). HI Brian, yes I understand that. I only put it in that file as a last resort as the includes/hook/adminareaclientdropdown.php file didn’t work. It’s ok. It’s doing the job I needed in the header.php file in the short term. Thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 8, 2018 Share Posted October 8, 2018 Just now, Si said: I only put it in that file as a last resort as the includes/hook/adminareaclientdropdown.php I hope you mean /includes/hooks 🙂 btw - which WHMCS version are you using and which admin template ? 0 Quote Link to comment Share on other sites More sharing options...
Si Posted October 8, 2018 Author Share Posted October 8, 2018 3 minutes ago, brian! said: I hope you mean /includes/hooks 🙂 btw - which WHMCS version are you using and which admin template ? 🙄 I do indeed. I’m working on my phone. version 7.2 and Blend. have to remove the file from header as its now stopping logins with Face ID on my phone. 😧 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 8, 2018 Share Posted October 8, 2018 when you say you had to remove the file from header, you weren't adding the hook code to the template - it was just in the hook right?? I can't see how the css would do that - it's literally just hiding one element. 0 Quote Link to comment Share on other sites More sharing options...
Si Posted October 8, 2018 Author Share Posted October 8, 2018 (edited) BIt was some glitch on my phone. i just can’t get this to work and can’t believe I’m the only person facing this using an iPad or iPhone. I refuse to use the limited app for I devices (which hasn’t been updated for more than 2 years). Yes, I’m now back on my iPad and can reply to you to confirm i created a file called adminclientareadropdown.php, inserted your code and uploaded it to the includes/hooks folder. Nothing happened on the client summary page. The drop down still appears and so every time I view that page safari prompts me to validate my login again. On the iPhone X it requires Face ID and in my iPad Touch ID. I would view this as a bug. The only way I can get your code to work Brian, (and the only reason I did it was because the hook didn’t work), was to insert the code into the header.tpl file. That has solved the problem (while its an ugly solution....in that the php code appears on the client summary page where the drop down box was), but at least that means I’m not being prompted to validate login constantly. hope that makes sense and clears up any confusion. Edited October 8, 2018 by Si 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 8, 2018 Share Posted October 8, 2018 6 minutes ago, Si said: i created a file called adminclientareadropdown.php, inserted your code and uploaded it to the includes/hooks folder. Nothing happened on the client summary page. The drop down still appears and so every time I view that page safari prompts me to validate my login again. did you try clearing the (browser or WHMCS template) cache ? 7 minutes ago, Si said: The only way I can get your code to work Brian, (and the only reason I did it was because the hook didn’t work), was to insert the code into the header.php file. you mean header.tpl ? if editing header.tpl, you just need the css code. 10 minutes ago, Si said: That has solved the problem (while its an ugly solution....in that the pho code appears on the client summary page where the drop down box was), but at least that means I’m not being prompted to validate login constantly. it doesn't do that on the desktop, but don't have an iPad nearby that I can test this with... but i'm (very) surprised that it's showing code. 0 Quote Link to comment Share on other sites More sharing options...
Si Posted October 8, 2018 Author Share Posted October 8, 2018 (edited) Yes cleared the templates_c folder completely and the browser cache. Still no success. Yes, I meant header.tpl and edited it immediately, but not quick enough for you 🧐 im not happy inserting the php code in the tpl file, so I’ve removed it and I’m now sitting with just the includes/hook/drop down.php file - but it’s not working. 😞 Edited October 8, 2018 by Si 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 9, 2018 Share Posted October 9, 2018 quick update to this - I tweaked the css to use @media and it now does what it's supposed to on the iPad. 🙂 <style> @media only screen and (device-width: 768px) { .client-dropdown-container { display:none; } } </style> 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.