Jump to content

Duvida sobre o Hook de Suporte de Pin


Recommended Posts


  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Adicione ao final do arquivo pin.php o seguinte:

use WHMCS\View\Menu\Item as MenuItem;
use Illuminate\Database\Capsule\Manager as Capsule;

# Add Sidebar PIN Atendimento
add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $primarySidebar){
	

    $primarySidebar->addChild('Client-PINATD', array(
        'label' => "PIN Atendimento",
        'uri' => '#',
        'order' => '1',
        'icon' => 'fa-key'
    ));
    
    # Retrieve the panel we just created.
    $PinATDPanel = $primarySidebar->getChild('Client-PINATD');
    
    // Move the panel to the end of the sorting order so it's always displayed
    // as the last panel in the sidebar.
    $PinATDPanel->moveToBack();
    $PinATDPanel->setOrder(0);
    
    # Exibi o PIN.
    $balancePanel->addChild('pin-atd', array(
        'uri' => '#',
        'label' => '<h4 style="text-align:center;">'.montar_pin($_SESSION["uid"]).'</h4>',
        'order' => 1
    ));
    

});

Não cheguei a testar, mas pode ser que aconteça erros.

Fiz uma sugestão @LucianoZa grosso modo: https://github.com/whmcsred/pin/compare/master...msaulohenrique:patch-1

Edited by msaulohenrique
Link to post
Share on other sites
22 horas atrás, msaulohenrique disse:

Adicione ao final do arquivo pin.php o seguinte:


use WHMCS (link do PDH)\View\Menu\Item as MenuItem;
use Illuminate\Database\Capsule\Manager as Capsule;

# Add Sidebar PIN Atendimento
add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $primarySidebar){
	

    $primarySidebar->addChild('Client-PINATD', array(
        'label' => "PIN Atendimento",
        'uri' => '#',
        'order' => '1',
        'icon' => 'fa-key'
    ));
    
    # Retrieve the panel we just created.
    $PinATDPanel = $primarySidebar->getChild('Client-PINATD');
    
    // Move the panel to the end of the sorting order so it's always displayed
    // as the last panel in the sidebar.
    $PinATDPanel->moveToBack();
    $PinATDPanel->setOrder(0);
    
    # Exibi o PIN.
    $balancePanel->addChild('pin-atd', array(
        'uri' => '#',
        'label' => '<h4 style="text-align:center;">'.montar_pin($_SESSION["uid"]).'</h4>',
        'order' => 1
    ));
    

});

Não cheguei a testar, mas pode ser que aconteça erros.

Fiz uma sugestão @LucianoZa grosso modo: https://github.com/whmcsred/pin/compare/master...msaulohenrique:patch-1

Não deu certo, após adicionar ao final do código a área do cliente nem abre aparece a tela de "Opss...."

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.




Chat

Chat

    You don't have permission to chat.
    ×
    ×
    • Create New...