Criação de Emblemas AwesomeBB

2 participantes

Ver o tópico anterior Ver o tópico seguinte Ir para baixo

Tópico resolvido Criação de Emblemas AwesomeBB

Mensagem por Rike100 12.10.22 0:13

Detalhes da questão


Endereço do fórum: http://dsapm.forumeiros.com
Versão do fórum: AwesomeBB

Descrição


Qual java script e CSS eu utilizo para funcionar emblemas em meu fórum?

Seria possível também fazer para que esses emblemas seja setado igual script de rank autómático de acordo com o grupo?

Exemplo:

Criação de Emblemas AwesomeBB BwAAAABJRU5ErkJggg==


Última edição por Rike100 em 16.10.22 17:22, editado 1 vez(es)
Rike100

Rike100
*

Membro desde : 20/06/2020
Mensagens : 47
Pontos : 84

https://www.policiacrn.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Criação de Emblemas AwesomeBB

Mensagem por Rike100 16.10.22 17:21

Já achei. Pode fechar.

Código:
(function ($) {
          'use strict';
     
          $(function () {
            $('#field_id3 img, .post-author-details:contains("Emblemas") img').each(function() {
              var $this = $(this);
              var $label = $this.next();
     
              $this.replaceWith($('<div>', {
                'class': 'rcc-emblems-div',
                style: 'background-image: url(' + $this.attr('src') + ')',
                alt: $.trim($label.text())
              }));
           
              $label.remove();
            });
     
            $('.post-aside').each(function () {
              var $profile = $(this);
         
              $profile
                .find('.post-author-details .label:contains("Emblemas")')
                .parent()
                .hide();
     
              $profile
                .find('.rcc-emblems-div:first')
                .before([
                  '<div class="rcc-emblems-global-wrapper">',
                  '  <div class="only-8-em"></div>',
                  '  <div class="default-em" style="display: none;"></div>',
                  '  <a class="show-more-em" href="javascript:void(0);" style="display: none;">Mostrar todos</a>',
                  '</div>',
                  '',
                  '<!-- @ignore | Estilos Opcionais -->',
                  '<style>',
                  '  .rcc-emblems-global-wrapper * {',
                  '    transition: initial !important;',
                  '  }',
                  '',
                  '  .show-more-em {',
                  '    margin-top: 10px;',
                  '    display: block;',
                  '  }',
                  '',
                  '  .default-em:empty + a {',
                  '    display: none !important;',
                  '  }',
                  '.default-em.no-animation { overflow: initial !important; }',
                  '</style>'
                ].join('\n'))
              ;
     
              $profile
                .find('.rcc-emblems-div')
                .each(function () {
                  var $this = $(this);
     
                  $this
                    .next('br')
                    .hide()
                  ;
     
                  $this.appendTo($profile.find('.default-em'));
                })
              ;
         
              var label = $('.postprofile > dl > dd.postprofile-info > .label:contains("Localização")');
              if(label.length > 0) {
                label
                  .next('br')
                  .hide()
                ;
              }
     
              $profile
                .find('.default-em')
                .find('.rcc-emblems-div')
                .each(function (index, self) {
                  if (index > 7) {
                    return;
                  }
     
                  $profile.find('.show-more-em').show();
                  $(this).appendTo($profile.find('.only-8-em'));
                })
              ;
     
              $profile
                .find('.show-more-em')
                .on('click', function () {
                  var $this = $(this);
     
                  if ($this.is('.clicked')) {
                    $this.removeClass('clicked').text('Mostrar todos');
                    $profile.find('.default-em').removeClass('no-animation').slideUp(300, function () {
                      $(this).addClass('no-animation');
                    });
     
                    return;
                  }
     
                  $this.addClass('clicked').text('Mostrar menos');
                  $profile.find('.default-em').removeClass('no-animation').slideDown(300, function () {
                    $(this).addClass('no-animation');
                  });
                })
              ;
            });
          });
        }(jQuery));
Rike100

Rike100
*

Membro desde : 20/06/2020
Mensagens : 47
Pontos : 84

https://www.policiacrn.com

Ir para o topo Ir para baixo

Admineiro

Tópico resolvido Re: Criação de Emblemas AwesomeBB

Mensagem por tikky 17.10.22 10:58

Tópico resolvido


Movido para "Questões resolvidas".
tikky

tikky
Admineiro
Admineiro

Membro desde : 13/01/2017
Mensagens : 7816
Pontos : 9062

Ir para o topo Ir para baixo

Ver o tópico anterior Ver o tópico seguinte Ir para o topo

- Tópicos semelhantes

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