Jump to content

techwthquestion

Members
  • Content count

    16
  • Joined

  • Last visited

Community Reputation

10 Good

1 Follower

About techwthquestion

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. techwthquestion

    Support pin for clients

    Yes. Everything is in one file exception 'Whoops\Exception\ErrorException' with message 'Call to undefined function generatePinCode()' in /home/xxxxxx/public_html/includes/hooks/pin.php:26Stack trace:#0 /home/xxxxx/public_html/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(1, 'Call to undefin...', '/home/xxxxxx/p...', 26)#1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown()#2 {main} And this is the file <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { function generatePinCode($clientid = 0, $length = 6){ preg_match_all('!\d+!', md5(date("y" . $clientid)), $matches); $numbers = join("", $matches[0]); return substr($numbers, 0, $length); } $clientID = intval($_SESSION['uid']); $SupportPIN = generatePinCode($clientID, 8); $primarySidebar->addChild('Support-Pin', array( 'label' => "Support Pin", 'uri' => '#', 'order' => '1', 'icon' => 'fa-ticket' )); $primarySidebar->getChild('Support-Pin')->setBodyHtml($SupportPIN); }); add_hook('AdminAreaClientSummaryPage', 1, function($vars) { return 'Support Pin: ' . generatePinCode($vars['userid'], 8); });
  2. techwthquestion

    Support pin for clients

    Thanks, but Getting error exception 'Whoops\Exception\ErrorException' with message 'Call to undefined function generatePinCode()' in
  3. techwthquestion

    Support pin for clients

    Perfect !! And what kind of changes needed to get same code in admin side ? add_hook('AdminAreaClientSummaryPage', 1, function($vars) { return 'Support Pin: ' . date("dm" . $vars['userid'] . "y"); }); This code gives me different value
  4. techwthquestion

    Support pin for clients

    Thank you so much ! Its worked perfectly. How can I get random 8 digits code which will change every month ? $SupportPIN = date("dm".$clientID."y"); This generate code which looks very simple.
  5. techwthquestion

    Support pin for clients

    Thank you. When I use $firstSidebar = $primarySidebar->getFirstChild(); This remove client information from page . How can I add new box in primary sidebar and named it support pin ?
  6. techwthquestion

    Support pin for clients

    Hello I am using below code to display support pin in client area <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { // The Support PIN will be generated automatically and will change daily. // The Support PIN will have the format of: Day (1st and 2nd numbers), Month (3rd and 4th numbers), Client ID (5th, 6 or 7th number) and then the last 2 digits is the current year. $clientID = intval($_SESSION['uid']); $SupportPIN = date("dm".$clientID."y"); $firstSidebar = $primarySidebar->getFirstChild(); if ($firstSidebar) { $firstSidebar->setBodyHtml($SupportPIN); } }); How can I get support pin in admin side ?
  7. techwthquestion

    One page order form

    Hello I would like to use one page order form for my website please pm me quotation for the same. also i would like some one familiar with ccavenue payment gateway to make some changes in checkout process. waiting for your pm.
  8. techwthquestion

    New tab on services page

    Hello On services pages, I would like to add new option under login to cpanel button can someone please guide me how to do that ?
  9. techwthquestion

    New tab on services page

    Hello On services pages, I would like to add new option logni to cpanel button can someone please guide me how to do that ?
  10. techwthquestion

    Force email verification

    How can I get this kind of box ? https://snag.gy/vCRS8J.jpg
  11. techwthquestion

    Force email verification

    Will this work for existing client ?
  12. techwthquestion

    Force email verification

    Hello How can I disable client area page for client if email id is not verified ? I am using latest whmcs version Thanks
  13. Hello How to get Customer IP and maxmind result using API ? Using Get Clients Details API , I am not able to get this information..
  14. techwthquestion

    Change account password using API

    Hello I would like to change cpanel account password using whmcs API. Can you please let me know how can I do it ?
  15. techwthquestion

    Auto cPanel / whm login

    Hello, For our internal staff we are building portal and in that we want to add functions as below 1.Auto cpanel login to client account 2.create / suspend / terminate account for client 3.change server for client domain and setup cpanel on that server 4.change cpanel password 5.Upgrade plan Can you please let us know how can we do this ? For server side functions we are not able to find any API which we can use.
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines