akarweb Posted October 22, 2020 Share Posted October 22, 2020 in which file do we write these commands? Can you tell me exactly how to do the process, I guess we're doing it wrong. I could not see the subject exactly, but I read it completely. I edited homepage.tpl, admin page turns out blank. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 22, 2020 Author Share Posted October 22, 2020 4 minutes ago, akarweb said: in which file do we write these commands? Can you tell me exactly how to do the process, I guess we're doing it wrong. I could not see the subject exactly, but I read it completely. I edited homepage.tpl, admin page turns out blank. it's an action hook - therefore, you just need to create a .php file in /includes/hooks, paste the code from the latest version into it and save... there is no need to add any code to the homepage.tpl template - the hook does all the work. 🙂 0 Quote Link to comment Share on other sites More sharing options...
akarweb Posted October 22, 2020 Share Posted October 22, 2020 We will save the code you provided as a hook file php. So is the name of this file important? Do we need to do anything else after writing the code in php and saving it. How do we run the hook? 0 Quote Link to comment Share on other sites More sharing options...
akarweb Posted October 22, 2020 Share Posted October 22, 2020 Thanks i made it. It works 🙂 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 22, 2020 Author Share Posted October 22, 2020 2 minutes ago, akarweb said: So is the name of this file important? don't put any spaces in - just jeep it simple and memorable so you know what it does. 3 minutes ago, akarweb said: Do we need to do anything else after writing the code in php and saving it. no. 3 minutes ago, akarweb said: How do we run the hook? it runs automatically by itself. 1 minute ago, akarweb said: Thanks i made it. It works 🙂 that's good to hear! 🙂 0 Quote Link to comment Share on other sites More sharing options...
giora Posted October 27, 2020 Share Posted October 27, 2020 Hi Brian I know that you can not complain about a gift you get.... however the number of the ticket(s) Awaiting Reply is off. for example I have a number of 74 ticket while I see only 7. Have you seen that before? Best Regards, --Giora 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 27, 2020 Author Share Posted October 27, 2020 Hi Giora, 4 hours ago, giora said: I know that you can not complain about a gift you get.... however the number of the ticket(s) Awaiting Reply is off. for example I have a number of 74 ticket while I see only 7. Have you seen that before? there was an issue where deleted merged tickets were being included in the count - but that issue should have been fixed in the most recent version I posted... sadly, I can't edit the code in the first post (I wouldn't be able to even if I had chosen to keep the meaningless Gearhead rank), so at some point, i'll move the code to an external site like GitHub where it will be easier to manage and update. if using the above linked version doesn't solve the issue, please let me know. 🙂 0 Quote Link to comment Share on other sites More sharing options...
giora Posted October 27, 2020 Share Posted October 27, 2020 Works like a charm... Thank you so much!!😄 Best Regards, --Giora 0 Quote Link to comment Share on other sites More sharing options...
AzeDK Posted November 8, 2020 Share Posted November 8, 2020 Thank you Brian, this was much needed after the update 🙂 0 Quote Link to comment Share on other sites More sharing options...
m107 Posted November 16, 2020 Share Posted November 16, 2020 This ticket got a bit confusing, can someone please share the latest working hook for WHMCS 8.0.4? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 16, 2020 Author Share Posted November 16, 2020 2 minutes ago, m107 said: This ticket got a bit confusing, can someone please share the latest working hook for WHMCS 8.0.4? just use the last version that I posted in the thread... 0 Quote Link to comment Share on other sites More sharing options...
m107 Posted November 16, 2020 Share Posted November 16, 2020 @brian! thank you,, working 🙂 Anyway to fix this problem? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 16, 2020 Author Share Posted November 16, 2020 50 minutes ago, m107 said: Anyway to fix this problem? you mean the counts seeming to be wrong ? what's the awaiting reply count in the sidebar ? also, did you remove the date from the output of the info bar ?? 0 Quote Link to comment Share on other sites More sharing options...
m107 Posted November 16, 2020 Share Posted November 16, 2020 14 minutes ago, brian! said: you mean the counts seeming to be wrong ? what's the awaiting reply count in the sidebar ? Yes, showing correctly: 14 minutes ago, brian! said: Also, did you remove the date from the output of the info bar ?? No, I used the code you mentioned. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 17, 2020 Author Share Posted November 17, 2020 19 hours ago, m107 said: Yes, showing correctly: AFAIK, the hook is using the same count method as WHMCS, e.g for pending orders, it's checking the Order Statuses database table, finding the statuses that are defined to be included in the "Pending" counts and then running a count on those orders that match. modifying that column values will result in the counts being updated in the info bar - the values shown by WHMCS in the sidebar and the info bar should match, so there is something weird going on with your install. similarly for Ticket Statuses, it's finding the statuses that are included in the "Awaiting Reply" counts and then running a count on those tickets that match... there was an issue with deleted merged tickets being counted in the original post, but that should have been resolved in the version that you're using. 19 hours ago, m107 said: No, I used the code you mentioned. then the output should include the date... 😕 0 Quote Link to comment Share on other sites More sharing options...
m107 Posted November 23, 2020 Share Posted November 23, 2020 (edited) Now I used this post's version and date is displayed. Can you share the last version? It still showing wrong number. Current situation: https://puu.sh/GQyBG/98e22e8a8b.png Edited November 23, 2020 by m107 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 24, 2020 Author Share Posted November 24, 2020 20 hours ago, m107 said: Now I used this post's version and date is displayed. at least that's some progress. 20 hours ago, m107 said: Can you share the last version? It still showing wrong number. I think i've only posted one version that included the date - so that must be the one you're using. for those figures to be wrong, then there is either something very unusual with your install/configuration, or there is a fundamental error in the hook counts.... but i've not received any similar complaints from other users. we might need to discuss this via PM as i'm going to need more details about your configuration. 0 Quote Link to comment Share on other sites More sharing options...
scarrott Posted November 26, 2020 Share Posted November 26, 2020 This is amazing work. Thanks so much for posting it. It works perfectly. Still absolutely baffled what the devs were thinking by removing this. So obvious that people need that most important information in front of them when they log in. Another feature that didn't need fixing, broken! 0 Quote Link to comment Share on other sites More sharing options...
zalouma Posted November 30, 2020 Share Posted November 30, 2020 Hello Brian Thank you for this great hook, the pending order and overdue invoice count seems to be perfect only issue is the ticket count, for some reason it doesnt match the one in the side bar and also the date/time doesnt show anymore on the top header Would appreciate any tips on how to add/correct these please Thanks again 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 30, 2020 Author Share Posted November 30, 2020 2 minutes ago, zalouma said: Thank you for this great hook, the pending order and overdue invoice count seems to be perfect only issue is the ticket count, for some reason it doesnt match the one in the side bar and also the date/time doesnt show anymore on the top header are you using the most recent version of the hook I posted, and not the one from the initial post ? the first version didn't account for merged tickets and didn't include any date output - the second version should have fixed both issues. 0 Quote Link to comment Share on other sites More sharing options...
zalouma Posted November 30, 2020 Share Posted November 30, 2020 4 minutes ago, brian! said: are you using the most recent version of the hook I posted, and not the one from the initial post ? the first version didn't account for merged tickets and didn't include any date output - the second version should have fixed both issues. Wow Brian that was super fast reply, really appreciate it I used the one on page 1, where is the second post please? i went through the 2 pages not sure if i am missed it 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 30, 2020 Author Share Posted November 30, 2020 2 minutes ago, zalouma said: I used the one on page 1, where is the second post please? i went through the 2 pages not sure if i am missed it 17th post on page 1 - it has 3 votes. 2 Quote Link to comment Share on other sites More sharing options...
zalouma Posted November 30, 2020 Share Posted November 30, 2020 4 minutes ago, brian! said: 17th post on page 1 - it has 3 votes. Thank you Brian and my apology for missing this post, i just updated it with this one and works perfectly 1 Quote Link to comment Share on other sites More sharing options...
m107 Posted December 1, 2020 Share Posted December 1, 2020 15 hours ago, brian! said: 17th post on page 1 - it has 3 votes. @brian! I used this version. now number of tickets is correct, only the pending order is wrong 😂 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 1, 2020 Author Share Posted December 1, 2020 7 hours ago, m107 said: I used this version. now number of tickets is correct, only the pending order is wrong 😂 some progress! 🙂 the pending orders value discrepancy is a weird one because it should be using the same counting method used by WHMCS - e.g order statuses defined to be included as "Pending". 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.