Jump to content

JesusSuarz

Senior Member
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

2 Neutral

About JesusSuarz

  • Rank
    Newbie

Recent Profile Visitors

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

  1. also in the comments of the module you say that the problem is solved, but I still don't see any update on your part. I see that the last update was in 2018. I speak with evidence, I don't have to tell lies. (I don't care if you get mad for comments).
  2. seeing that you lie to look good. Then I will leave you a screenshot of the ticket that was sent on August 1st. therefore do not attempt to explain this.
  3. Hello After exhausting all my options I started looking at all my installed modules. the following module presented the problem: https://marketplace.whmcs.com/product/2966-services-fee I had to remove it.
  4. Hello After exhausting all my options I started looking at all my installed modules. the following module presented the problem: https://marketplace.whmcs.com/product/2966-services-fee I had to remove it.
  5. thanks for answering. I have updated to the latest version 7.10.2 and change the template to six (default) however the problem persists. the buttons are not yet displayed. any new thoughts?
  6. hi, the reseller button is only available if the cpanel account is a reseller account. in other words, if the cpanel account is not a reseller account then the WHM button for port 2086 or 2087 will then not be available. that's the advantage. In addition, the official whmcs plugin accesses the cpanel login through the server host link, not through the domain. in other words, the official plugin allows users to access using (example): cpanel.yourhost.com while this hook allows users to directly access the domain that has the hosting account. example: yourhost.com/cpanel
  7. Hello I have improved your code to make it work for resellers and users. basically if the customer's account is a reseller then the cpanel and whm buttons appear but if a cpanel account, then cpanel only appears. I have also added a condition to verify if the domain uses cloudflare, since if the domain uses cloudflare then it cannot be accessed through: https://domain.com:2083 or 2086,2087. also for some reason the btn-block class does not work for me. therefore I made a new class to make it look like the original. <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $service = Menu::context('service'); $servertype = $service->product->servertype; if ($servertype!="cpanel"){ return; } $domain = $service->domain; $username = $service->username; $cloudflare = 'http://'.$domain.''; $get_cf = get_headers($cloudflare, 1)[Server]; if ($get_cf != 'cloudflare'){ $cpanelhref = 'https://'.$domain.':2083/login/'; $webmailhref = 'https://'.$domain.':2096/login/'; $webwhmhref = 'https://'.$domain.':2087/login/'; $command = 'DecryptPassword'; $postData = array('password2' => $service->password); $results = localAPI($command, $postData); $password = $results['password']; if ($service->product->type=="reselleraccount"){ $whmcpanel = '<input class="btn btn-primary btn-sm block-btn mb-1" type="submit" formaction="'.$webwhmhref.'" value="'.Lang::trans('cpanelwhmlogin').'"/>'; } $bodyhtml = '<form method="post" action="'.$cpanelhref.'" target="_blank"> <input type="hidden" name="user" value ="'.$username.'"/> <input type="hidden" name="pass" value ="'.$password.'"/> <input class="btn btn-success btn-sm block-btn mb-1" type="submit" value="'.Lang::trans('cpanellogin').'"/> <input class="btn btn-danger btn-sm block-btn mb-1" type="submit" formaction="'.$webmailhref.'" value="'.Lang::trans('cpanelwebmaillogin').'"/>'.$whmcpanel.''.' </form> <a href="/contact.php" class="btn btn-info btn-sm block-btn mb-1" data-toggle="tooltip" data-placement="bottom" title="Si tiene problemas para ingresar a su panel, puede deberse a que usa una CDN o proxy como CloudFlare en su dominio, en este caso, contacte con soporte.">Ayuda <i class="fas fa-question-circle"></i></a> <style>.block-btn {width: 100%;}</style>'; if (!is_null($primarySidebar->getChild('Service Details Actions'))) { $primarySidebar->getChild('Service Details Actions') ->removeChild('Login to cPanel') ->removeChild('Login to Webmail') ->removeChild('Login to WHM'); } $primarySidebar->addChild('cPanel Login', array( 'label' => 'Ingresar a cPanel/WHM', 'icon' => 'fa-server', 'order' => 20, 'footerHtml' => $bodyhtml, )); } }); Sorry for the texts in Spanish. you can edit if you want. for resellers it looks like this: and for customers it looks like this: and if the site has cloudflare then leave the default panel of whmcs.
  8. Hello thanks for answering. in this way I have managed to get the notifications / alerts outside of whmcs. Here is the way to achieve it. <?php if (!defined("WHMCS")) die("No se puede acceder a este archivo directamente"); // definiciones a usar para obtener vars de WHMCS use WHMCS\ClientArea; use WHMCS\Database\Capsule; require_once 'URLWHMCS/init.php'; /* Defining object to get elements*/ $ca = new ClientArea(); /* initPage() let get all data */ $ca->initPage(); $uid_client = $_SESSION["uid"]; $adminid_admin = $_SESSION["adminid"]; /* Hack to get all var definedes*/ //print_r (get_defined_vars()); $vars = get_defined_vars(); if ($uid_client == 1) { /* Hack 2 , Get property of a object protected */ function get_property(object $object, string $property) { $array = (array) $object; $propertyLength = strlen($property); foreach ($array as $key => $value) { if (substr($key, -$propertyLength) === $property) { return $value; } } } /*Accessing for each level of a var. $level_1 > $level_2 > $level_3 Basically, we use get_property to access to each level and get exact property we want.*/ /* Level of access*/ $level_1 = get_property($vars["ca"], 'templateVariables'); $level_2 = $level_1["clientAlerts"]; $level_3 = get_property($level_2, 'items'); /* Response final defined empty for init*/ $response = array(); /* Creating a counter for final interaction and intercept final items / data */ $level_3_counter = 0; foreach ($level_3 as $key => $value) { /* Interact == just to get what $var[$key] are exploring */ $iteract = $level_3[$key]; /* $message intercepting message $link intercepting link $linkText result : "Pagar Ahora" */ $message = get_property($iteract, 'message'); $link = get_property($iteract, 'link'); $linkText = get_property($iteract, 'linkText'); # array_push($response[$level_3_counter], $intercept); $response[$level_3_counter] = array(); $response[$level_3_counter]["message"] = array(); $response[$level_3_counter]["message"] = $message; $response[$level_3_counter]["link"] = array(); $response[$level_3_counter]["link"] = $link; $response[$level_3_counter]["linkText"] = array(); $response[$level_3_counter]["linkText"] = $linkText; $level_3_counter++; } } /* Generating response ... for View*/ /* foreach ($response as $key1 => $value1) { echo ' <span>'.$response[$key1]['message'].'</span> <a href="'. $response[$key1]['link'] .'"> '. $response[$key1]['linkText'] .'</a> <br> '; } */ ?>
  9. Hello I want to know if someone knows how I can get customer notifications and alerts? I leave you a photo. to explain a little. I am creating my own website in php. i am using whmcs api to connect. my own website is domain.com and the whmcs is another folder, domain.com/dashboard but in the whmcs api there is no function to get customer notifications and alerts. I will be grateful for your help.
  10. I understand, However, this problem has been unresolved for many years, even you answered several posts explaining some ways to solve it and nobody could solve it. None of the answers you gave before worked for anyone on the community. suddenly everything works fine? However. the idea is always to contribute to the community 🙂
  11. Hi. Sorry but it is in the right way to work with this specific server. The way you say it doesn't work. everyone tried that way and it never works that way. is the correct way to work with this server. 🙂
  12. please go to my answer, I have solved it: https://whmcs.community/topic/294616-whois-for-venezuelan-domains-not-working/?do=findComment&comment=1334976
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated