DarkRenato Posted September 26, 2019 Share Posted September 26, 2019 Bom galera estou usando o Hook de gerar um pin pra atendimento. (Hook do Whmcs.RED) Facilmente encontrado no Github Porém além de aparecer ali na Dashboard, gostaria dele aparecer na Sidebar também Alguém tem alguma adaptação ? Gostaria de aparecer somente o PIN mesmo... 0 Quote Link to comment Share on other sites More sharing options...
msaulohenrique Posted September 27, 2019 Share Posted September 27, 2019 Onde vc adquiriu? Já contratou o desenvolvedor? 0 Quote Link to comment Share on other sites More sharing options...
LucianoZ Posted September 27, 2019 Share Posted September 27, 2019 6 minutos atrás, msaulohenrique disse: Onde vc adquiriu? Já contratou o desenvolvedor? é hook grátis... veja a descrição do autor. 0 Quote Chamou? Estamos ai! Link to comment Share on other sites More sharing options...
msaulohenrique Posted September 28, 2019 Share Posted September 28, 2019 (edited) 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 September 28, 2019 by msaulohenrique 0 Quote Link to comment Share on other sites More sharing options...
DarkRenato Posted September 28, 2019 Author Share Posted September 28, 2019 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...." 0 Quote Link to comment Share on other sites More sharing options...
msaulohenrique Posted September 29, 2019 Share Posted September 29, 2019 36 minutos atrás, DarkRenato disse: Não deu certo, após adicionar ao final do código a área do cliente nem abre aparece a tela de "Opss...." Ative o modo debug do WHMCS e compartilhe a mensagem de erro. 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.
Note: Your post will require moderator approval before it will be visible.