Boas-vindas ao Power Pixel

Junte-se a comunidade! Crie o seu próprio conteúdo, e faça amizades.EntrarCriar uma conta

Staff Online

2 participantes

Zeek Zeek  • Qui 16 Jun 2016 - 21:26

Staff Online Empty Staff Online Qui 16 Jun 2016 - 21:26


  • Descrição:

Bom quero saber como crio um widget Staff Online em meu fórum? já vi diversos tutoriais porem nenhum deles resultou em meu fórum, poderiam me ajudar? Eu agradeço.


Como eu quero: https://i.imgur.com/bJBbMw7.jpg

  • Informações:



Fórum:[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]Versão:PUNBB

Zeek Zeek  • Seg 20 Jun 2016 - 19:41

Staff Online Empty Re: Staff Online Seg 20 Jun 2016 - 19:41

#up

while1 while1  • Qua 22 Jun 2016 - 17:57

Staff Online Empty Re: Staff Online Qua 22 Jun 2016 - 17:57

Reputação da mensagem: 100% (1 votos)
Olá, confira : http://ajuda.forumeiros.com/t102613-tutorial-gerir-widget-staff-online
Até mais.

Zeek Zeek  • Qui 23 Jun 2016 - 11:59

Staff Online Empty Re: Staff Online Qui 23 Jun 2016 - 11:59

Opá while fiz tudo certo e não resultou as configurações dos widgets está tudo certa porem ele fico em branco.
Segui os passos do tutorial mas infelizmente o código não pego. Sad
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

while1 while1  • Qui 23 Jun 2016 - 12:45

Staff Online Empty Re: Staff Online Qui 23 Jun 2016 - 12:45

Reputação da mensagem: 100% (1 votos)
Olá, pelo que eu vi estais a utilizar esse código em seu widget:
Código:
<script type="text/javascript">
</div><div>
     myStaff = ['/u1'];
</div><div>
     staff_cache_time = 4*60*1000; // mm*ss*ms;
</div><div>
     </script>
</div><div>
   <div id="theStaff">
</div><div>
   </div>
</div><div>
   
</div><div>
   <div id="theContent" style="display:none">
</div><div>
   </div><script type="text/javascript">
</div><div>
     if (localStorage.staffOn && localStorage.staffEx > +new Date - staff_cache_time) jQuery('#theStaff').html(localStorage.staffOn);
</div><div>
     else loadStaff();
</div><div>
     function loadStaff() {
</div><div>
       jQuery('#theContent').load('/viewonline #main-content a, a.gen', function() {
</div><div>
         for (i=0; i<myStaff.length; i++) jQuery('#theContent a').filter(function() { return jQuery(this).attr('href') === myStaff[i] }).appendTo('#theStaff').wrap('<div class="myStaff">');
</div><div>
         if (!jQuery('#theStaff .myStaff').length) jQuery('#theStaff').html('No staff online');
</div><div>
         jQuery('.myStaff a').each(function() {
</div><div>
           var href = jQuery(this).attr('href');
</div><div>
           jQuery(this).before('<span class="monAva"></span>').prev().load(href + ' #profile-advanced-right .module:first div img:first,.forumline td.row1.gensmall:first > img, .frm-set.profile-view.left dd img,dl.left-box.details:first dd img, .row1 b .gen:first img, .real_avatar img', function() {
</div><div>
             if (window.localStorage) {
</div><div>
               localStorage.staffOn = jQuery('#theStaff').html();
</div><div>
               localStorage.staffEx = +new Date;
</div><div>
             }
</div><div>
           });
</div><div>
         });
</div><div>
       });
</div><div>
     }
</div><div>
     </script>

Troque por este:
Código:
<script type="text/javascript">
  myStaff = ['/u1'];
  staff_cache_time = 4*60*1000; // mm*ss*ms;
  </script>
<div id="theStaff">
</div>
 
<div id="theContent" style="display:none">
</div><script type="text/javascript">
  if (localStorage.staffOn && localStorage.staffEx > +new Date - staff_cache_time) jQuery('#theStaff').html(localStorage.staffOn);
  else loadStaff();
  function loadStaff() {
    jQuery('#theContent').load('/viewonline #main-content a, a.gen', function() {
      for (i=0; i<myStaff.length; i++) jQuery('#theContent a').filter(function() { return jQuery(this).attr('href') === myStaff[i] }).appendTo('#theStaff').wrap('<div class="myStaff">');
      if (!jQuery('#theStaff .myStaff').length) jQuery('#theStaff').html('No staff online');
      jQuery('.myStaff a').each(function() {
        var href = jQuery(this).attr('href');
        jQuery(this).before('<span class="monAva"></span>').prev().load(href + ' #profile-advanced-right .module:first div img:first,.forumline td.row1.gensmall:first > img, .frm-set.profile-view.left dd img,dl.left-box.details:first dd img, .row1 b .gen:first img, .real_avatar img', function() {
          if (window.localStorage) {
            localStorage.staffOn = jQuery('#theStaff').html();
            localStorage.staffEx = +new Date;
          }
        });
      });
    });
  }
  </script>

Deve resultar.
Até mais.

Zeek Zeek  • Qui 23 Jun 2016 - 12:51

Staff Online Empty Re: Staff Online Qui 23 Jun 2016 - 12:51

Sem resultado.

Zeek Zeek  • Sex 24 Jun 2016 - 23:52

Staff Online Empty Re: Staff Online Sex 24 Jun 2016 - 23:52

#UP [Tens de ter uma conta e sessão iniciada para poderes visualizar este link] alguém poderia ajudar?

while1 while1  • Sáb 25 Jun 2016 - 11:43

Staff Online Empty Re: Staff Online Sáb 25 Jun 2016 - 11:43

Reputação da mensagem: 100% (1 votos)
Perdão, não sou ativo aqui nesse fórum.
Troque por esse código (no widget):

Código:
<script type="text/javascript">
myStaff = ['Admin'];
staff_cache_time = 4*60*1000; // mm*ss*ms;
</script>
<div id="theStaff">
</div>
<div style="display:none" id="theContent">
</div><noscript><div style="color:red;font-size:9px">Functionality of this widget is not possible, as JavaScript is disabled or unsupported.</div></noscript> <script type="text/javascript">
if (localStorage.staffOn && localStorage.staffEx > +new Date - staff_cache_time) jQuery('#theStaff').html(localStorage.staffOn);
else loadStaff();
function loadStaff() {
  jQuery('#theContent').load('/viewonline #main-content a, a.gen', function() {
    for (i=0; i<myStaff.length; i++) jQuery('#theContent a').filter(function() { return jQuery(this).text() === myStaff[i] }).appendTo('#theStaff').wrap('<div class="myStaff">');
    if (!jQuery('#theStaff .myStaff').length) jQuery('#theStaff').html('No staff online');
    if (window.localStorage) {
      localStorage.staffOn = jQuery('#theStaff').html();
      localStorage.staffEx = +new Date;
    }
  })
}
</script>

Até mais.

Zeek Zeek  • Sáb 25 Jun 2016 - 12:06

Staff Online Empty Re: Staff Online Sáb 25 Jun 2016 - 12:06

Sem problemas, mas não resultou a maioria dos widget acontece isso quando tento adicionar algum código. silent

while1 while1  • Sáb 25 Jun 2016 - 12:23

Staff Online Empty Re: Staff Online Sáb 25 Jun 2016 - 12:23

Reputação da mensagem: 100% (1 votos)
Então já sei o que seria!
Acesse:
Painel de Controle -> Modulos -> HTML & Javascripts -> Gestão das códigos Javascripts
Habilitar o gerenciamento dos códigos JavaScript Deixe em sim!

Agora funciona?
Até mais.

Zeek Zeek  • Sáb 25 Jun 2016 - 12:43

Staff Online Empty Re: Staff Online Sáb 25 Jun 2016 - 12:43

Opá já esta habilitado. Smile

Zeek Zeek  • Dom 26 Jun 2016 - 9:14

Staff Online Empty Re: Staff Online Dom 26 Jun 2016 - 9:14

#UP

Zeek Zeek  • Ter 5 Jul 2016 - 15:21

Staff Online Empty Re: Staff Online Ter 5 Jul 2016 - 15:21

Obrigado pela ajuda e pode fechar.

while1 while1  • Sex 2 Set 2016 - 15:08

Staff Online Empty Re: Staff Online Sex 2 Set 2016 - 15:08

[sucesso=Tópico Resolvido; e Bloqueado][/sucesso]

Conteúdo patrocinado  • 

Staff Online Empty Re: Staff Online

Permissões neste sub-fórum
Não podes responder a tópicos