Jump to content

Duvida sobre o Hook de Suporte de Pin


DarkRenato

Recommended Posts

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 comment
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 comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Do you agree with our terms?