Corrigir alinhamento do avatar nos últimos assuntos

4 participantes

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

  • 0

Tópico resolvido Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 06.09.17 10:41

Detalhes da questão


Endereço do fórum: http://www.malokeirosdoshacker.com
Versão do fórum: ModernBB

Descrição


Ola bom dia eu gostariua de tirar esse bug aqui dos meus ultimos assuntos olha: https://imgur.com/a/S7IZT pois ja abri um tópico e o cara disse que a parte do avatar dos ultimos assuntos nao estava aparecendo porque poderi ter conflito nos js mas eu ja tinha desativado 1 por 1 e mesmo assim o erro persistiu se poderem me ajudar estarei grato <3


Última edição por weverson lopes em 15.09.17 18:07, editado 1 vez(es)
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por Hancki 06.09.17 12:23

Olá!

Leia este tópico: https://ajuda.forumeiros.com/t93908-

Hancki
Hancki

Hancki
Membro Entusiasta
Membro Entusiasta

Membro desde : 03/10/2009
Mensagens : 8190
Pontos : 12245

https://ajuda.forumeiros.com/

Ir para o topo Ir para baixo

  • 0

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 06.09.17 14:04

nao sei se foi sua intenção mas nao me ajudou mt
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

  • 0

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 07.09.17 8:22

up pfvr
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

  • 0

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 08.09.17 8:14

pow flr me qajuda
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por Kyo Panda 12.09.17 15:15

Adicione ao seu CSS:

Código:
.recentInline {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.recentInline a {
    text-decoration: none;
}

.recentInline > br {
    display: none;
}

.lastpost-avatar {
    order: -1;
}

.lastpost-avatar + a {
    margin-right: 5px;
}
Kyo Panda

Kyo Panda
Hiper Membro

Membro desde : 08/01/2012
Mensagens : 4641
Pontos : 5939

https://ajuda.forumeiros.com

Ir para o topo Ir para baixo

  • 0

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 13.09.17 19:50

ainda o mesmo erro
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por Luiz 13.09.17 20:00

De qual bug o senhor diz?
-> http://prntscr.com/gks92n
Luiz

Luiz
Membro Entusiasta
Membro Entusiasta

Membro desde : 23/04/2016
Mensagens : 6645
Pontos : 7451

https://luizfelipe.dev

Ir para o topo Ir para baixo

  • 0

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 13.09.17 20:03

repara nas fotos ta todas como se não tivessem fotos https://imgur.com/a/S7IZT
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por Luiz 13.09.17 20:20

Qual o código que o senhor está usando?
Luiz

Luiz
Membro Entusiasta
Membro Entusiasta

Membro desde : 23/04/2016
Mensagens : 6645
Pontos : 7451

https://luizfelipe.dev

Ir para o topo Ir para baixo

  • 0

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 13.09.17 20:21

Código:
$(function () {
    $('.module.main:contains("Últimos assuntos")').attr('style', 'height: 280px;overflow: scroll;overflow-x: hidden;');
});
$(function() {
 $('head').append(
 '<style type="text/css">' +
 '.recentTopics {' +
 '  font-family: helvetica, arial, sans-serif !important;' +
 '  line-height: 15px;' +
 '  padding: 0;' +
 '}' +
 '.recentTopics div.h3 {' +
  'background-color: rgb(55, 147, 255);' +
 'color: rgb(255, 255, 255);' +
 'font-size: 1.3rem;' +
 'font-weight: 400;' +
 'text-transform: none;' +
 'border-bottom: none;' +
 'border-radius: 3px 3px 0px 0px;' +
 'margin: -18px -18px 18px;' +
 'padding: 12px 18px;' +
 '}' +
 '.recentTopics ul {' +
 '  padding-left: 0 !important;' +
 '}' +
 '.mini_photo {' +
 '  margin-right: 5px;' +
 '}' +
 'li.recentPost {' +
 '  min-height: 70px;' +
 '  padding: 1em 1em 0.5em 1em;' +
 '  list-style-type: none;' +
 '  border-bottom: 1px solid rgba(38, 49, 55, 0.08);' +
 '}' +
 '.recentPost a[href^="/t"] {' +
 '  font-size: 13.8px;' +
 '  text-decoration: none;' +
 '  font-weight: bold;' +
 '}' +
 '.recentInline {' +
 '  min-width: 30%;' +
 '  font-size: 12px;' +
 '  float: right;' +
 '}' +
 '.small_links {' +
 '  display: table;' +
 '  margin-top: 10px;' +
 '}' +
 '.local {' +
 '  font-size: 0;' +
 '}' +
 '.local a:after {' +
 '  content: " → ";' +
 '}' +
 '.local a:last-child:after {' +
 '  content: "";' +
 '}' +
 '.small_links, .small_links a {' +
 '  color: #a4a4a4 !important;' +
 '  font-size: 12px !important;' +
 '  text-decoration: none !important;' +
 '}' +
 '.creator_post:before {' +
 '  content: "Tópico iniciado por ";' +
 '}' +
  'span.mod-recent-info {' +
 'clear: both;' +
 'display: block;' +
 'float: right;' +
 'line-height: 20px;' +
 'width: 30%;' +
 '}' +
 '.creator_post:after {' +
 '  content: ", Em: ";' +
 '}' +
 '.recentTopics {' +
 '  margin: 15px 0;' +
 '}' +
    ' #right {' +
    ' position: relative;' +
    ' top: -354px;' +
'}' +
    '</style>'
    );
   
    var jModuleRecentPosts = $('.module:contains("Últimos assuntos")');
   
    jModuleRecentPosts
    .remove() // Clonando widget de últimos assuntos
    .prependTo('#wrapper') // Inserindo no main-content
    .addClass('recentTopics') // Adicionando nova classe
    .removeClass('module'); // Removendo classe existente
   
    $('.recentTopics').each(function() {
          $(this).html(
                  $(this).html()
                    .replace(/\»/g, '')
                    .replace(/\<a href="\/t(.*?)\-/g,'<li class="recentPost"><a href="/t$1-')
                    .replace(/\<\/a\><br\>/g, '</a><div class="recentInline">')
                    .replace(/\<a href="\/u([0-9])"\>(.*?)<\/a\>/g, '<a href="/u$1">$2</a><br>')
          ).find('li').wrapAll('<ul></ul>');
        $('a[href^="/u"]', this).each(function() {
          var jLinkUser = $(this).attr('href');
          $(this).before(
          '<a href="' + jLinkUser + '" class="user_photo lastpost-avatar">' +
          '    <img src="http://r26.imgfast.net/users/2617/31/90/74/avatars/1-40.png" alt="no_photo" class="mini_photo" />' +
          '</a>'
          );
          var jImg = $(this).prev().find('img'),
                jUser = sessionStorage.getItem(jLinkUser);
          if(jUser) {
              jImg.attr('src', jUser);
          } else {
          $.ajax({
                  url: jLinkUser + "?change_version=punbb",
                  type: 'GET',
                  success: function(data) {
                    var jImage = $('#profile-advanced-right .module:first img:first', data).attr('src');
                          jImg.attr('src', jImage);
                          sessionStorage.setItem(jLinkUser, jImage);
                  },
                  error: function(err)
                  {
                    console.log("AJAX error in request (Last posts)");
                  }
          });
          }
      });
          $('a[href^="/t"]', this).each(function() {
              var jThis = $(this),
                    jLinkTpc = jThis.attr('href').split('#')[0];
              $.ajax({
                  url: jLinkTpc + "?change_version=punbb",
                  type: 'GET',
                  success: function(recent) {
                  var jCreator = '',
                        jLocal = $('.crumbs:first a.nav', recent).wrapAll('<div></div>').parent().html(),
                        jPaging = $('.paging', recent)[0];
                  jThis.parents('.recentPost').append(
                  '<div class="small_links">' +
                  '    <span class="creator_post">Carregando...</span>' +
                  '    <span class="local">' + jLocal + '</span>' +
                  '</div>'
                  ).find('a[href*="change_version"]').each(function() {
                    var jHref = $(this).attr('href').split('?')[0];
                    $(this).attr('href', jHref);
                  });
                  if(jPaging) {
                      jCreator = $('a:contains("1")', jPaging).attr('href');
                      jThis.parents('.recentPost').find('.creator_post').load(jCreator + ' .username:first', function() {
                            $(this).text($(this).text());
                      });
                  } else {
                      jCreator = $('.username:first', recent).text();
                      jThis.parents('.recentPost').find('.creator_post').text(jCreator);
                  }
                  },
                  error: function(err)
                  {
                    console.log("AJAX error in request (Last posts)");
                  }
          });
      });
 });
});
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por Luiz 13.09.17 20:37

Tente trocar por este:
Código:
$(function () {
    $('.module.main:contains("Últimos assuntos")').attr('style', 'height: 280px;overflow: scroll;overflow-x: hidden;');
});
$(function() {
 $('head').append(
 '<style type="text/css">' +
 '.recentTopics {' +
 '  font-family: helvetica, arial, sans-serif !important;' +
 '  line-height: 15px;' +
 '  padding: 0;' +
 '}' +
 '.recentTopics div.h3 {' +
  'background-color: rgb(55, 147, 255);' +
 'color: rgb(255, 255, 255);' +
 'font-size: 1.3rem;' +
 'font-weight: 400;' +
 'text-transform: none;' +
 'border-bottom: none;' +
 'border-radius: 3px 3px 0px 0px;' +
 'margin: -18px -18px 18px;' +
 'padding: 12px 18px;' +
 '}' +
 '.recentTopics ul {' +
 '  padding-left: 0 !important;' +
 '}' +
 '.mini_photo {' +
 '  margin-right: 5px;' +
 '}' +
 'li.recentPost {' +
 '  min-height: 70px;' +
 '  padding: 1em 1em 0.5em 1em;' +
 '  list-style-type: none;' +
 '  border-bottom: 1px solid rgba(38, 49, 55, 0.08);' +
 '}' +
 '.recentPost a[href^="/t"] {' +
 '  font-size: 13.8px;' +
 '  text-decoration: none;' +
 '  font-weight: bold;' +
 '}' +
 '.recentInline {' +
 '  min-width: 30%;' +
 '  font-size: 12px;' +
 '  float: right;' +
 '}' +
 '.small_links {' +
 '  display: table;' +
 '  margin-top: 10px;' +
 '}' +
 '.local {' +
 '  font-size: 0;' +
 '}' +
 '.local a:after {' +
 '  content: " → ";' +
 '}' +
 '.local a:last-child:after {' +
 '  content: "";' +
 '}' +
 '.small_links, .small_links a {' +
 '  color: #a4a4a4 !important;' +
 '  font-size: 12px !important;' +
 '  text-decoration: none !important;' +
 '}' +
 '.creator_post:before {' +
 '  content: "Tópico iniciado por ";' +
 '}' +
  'span.mod-recent-info {' +
 'clear: both;' +
 'display: block;' +
 'float: right;' +
 'line-height: 20px;' +
 'width: 30%;' +
 '}' +
 '.creator_post:after {' +
 '  content: ", Em: ";' +
 '}' +
 '.recentTopics {' +
 '  margin: 15px 0;' +
 '}' +
    ' #right {' +
    ' position: relative;' +
    ' top: -354px;' +
'}' +
    '</style>'
    );
   
    var jModuleRecentPosts = $('.module:contains("Últimos assuntos")');
   
    jModuleRecentPosts
    .remove() // Clonando widget de últimos assuntos
    .prependTo('#wrapper') // Inserindo no main-content
    .addClass('recentTopics') // Adicionando nova classe
    .removeClass('module'); // Removendo classe existente
   
    $('.recentTopics').each(function() {
          $(this).html(
                  $(this).html()
                    .replace(/\»/g, '')
                    .replace(/\<a href="\/t(.*?)\-/g,'<li class="recentPost"><a href="/t$1-')
                    .replace(/\<\/a\><br\>/g, '</a><div class="recentInline">')
                    .replace(/\<a href="\/u([0-9])"\>(.*?)<\/a\>/g, '<a href="/u$1">$2</a><br>')
          ).find('li').wrapAll('<ul></ul>');
        $('a[href^="/u"]', this).each(function() {
          var jLinkUser = $(this).attr('href');
          $(this).before(
          '<a href="' + jLinkUser + '" class="user_photo lastpost-avatar">' +
          '    <img src="http://r26.imgfast.net/users/2617/31/90/74/avatars/1-40.png" alt="no_photo" class="mini_photo" />' +
          '</a>'
          );
          var jImg = $(this).prev().find('img'),
                jUser = sessionStorage.getItem(jLinkUser);
          if(jUser) {
              jImg.attr('src', jUser);
          } else {
          $.ajax({
                  url: jLinkUser + "?change_version=punbb",
                  type: 'GET',
                  success: function(data) {
                    var jImage = $('.ipsUserPhoto', data).attr('src');
                          jImg.attr('src', jImage);
                          sessionStorage.setItem(jLinkUser, jImage);
                  },
                  error: function(err)
                  {
                    console.log("AJAX error in request (Last posts)");
                  }
          });
          }
      });
          $('a[href^="/t"]', this).each(function() {
              var jThis = $(this),
                    jLinkTpc = jThis.attr('href').split('#')[0];
              $.ajax({
                  url: jLinkTpc + "?change_version=punbb",
                  type: 'GET',
                  success: function(recent) {
                  var jCreator = '',
                        jLocal = $('.crumbs:first a.nav', recent).wrapAll('<div></div>').parent().html(),
                        jPaging = $('.paging', recent)[0];
                  jThis.parents('.recentPost').append(
                  '<div class="small_links">' +
                  '    <span class="creator_post">Carregando...</span>' +
                  '    <span class="local">' + jLocal + '</span>' +
                  '</div>'
                  ).find('a[href*="change_version"]').each(function() {
                    var jHref = $(this).attr('href').split('?')[0];
                    $(this).attr('href', jHref);
                  });
                  if(jPaging) {
                      jCreator = $('a:contains("1")', jPaging).attr('href');
                      jThis.parents('.recentPost').find('.creator_post').load(jCreator + ' .username:first', function() {
                            $(this).text($(this).text());
                      });
                  } else {
                      jCreator = $('.username:first', recent).text();
                      jThis.parents('.recentPost').find('.creator_post').text(jCreator);
                  }
                  },
                  error: function(err)
                  {
                    console.log("AJAX error in request (Last posts)");
                  }
          });
      });
 });
});

o/
Luiz

Luiz
Membro Entusiasta
Membro Entusiasta

Membro desde : 23/04/2016
Mensagens : 6645
Pontos : 7451

https://luizfelipe.dev

Ir para o topo Ir para baixo

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 13.09.17 20:53

sem resultados
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por Luiz 13.09.17 21:01

Tente:
Código:
$(function () {
    $('.module.main:contains("Últimos assuntos")').attr('style', 'height: 280px;overflow: scroll;overflow-x: hidden;');
});
$(function() {
 $('head').append(
 '<style type="text/css">' +
 '.recentTopics {' +
 '  font-family: helvetica, arial, sans-serif !important;' +
 '  line-height: 15px;' +
 '  padding: 0;' +
 '}' +
 '.recentTopics div.h3 {' +
  'background-color: rgb(55, 147, 255);' +
 'color: rgb(255, 255, 255);' +
 'font-size: 1.3rem;' +
 'font-weight: 400;' +
 'text-transform: none;' +
 'border-bottom: none;' +
 'border-radius: 3px 3px 0px 0px;' +
 'margin: -18px -18px 18px;' +
 'padding: 12px 18px;' +
 '}' +
 '.recentTopics ul {' +
 '  padding-left: 0 !important;' +
 '}' +
 '.mini_photo {' +
 '  margin-right: 5px;' +
 '}' +
 'li.recentPost {' +
 '  min-height: 70px;' +
 '  padding: 1em 1em 0.5em 1em;' +
 '  list-style-type: none;' +
 '  border-bottom: 1px solid rgba(38, 49, 55, 0.08);' +
 '}' +
 '.recentPost a[href^="/t"] {' +
 '  font-size: 13.8px;' +
 '  text-decoration: none;' +
 '  font-weight: bold;' +
 '}' +
 '.recentInline {' +
 '  min-width: 30%;' +
 '  font-size: 12px;' +
 '  float: right;' +
 '}' +
 '.small_links {' +
 '  display: table;' +
 '  margin-top: 10px;' +
 '}' +
 '.local {' +
 '  font-size: 0;' +
 '}' +
 '.local a:after {' +
 '  content: " → ";' +
 '}' +
 '.local a:last-child:after {' +
 '  content: "";' +
 '}' +
 '.small_links, .small_links a {' +
 '  color: #a4a4a4 !important;' +
 '  font-size: 12px !important;' +
 '  text-decoration: none !important;' +
 '}' +
 '.creator_post:before {' +
 '  content: "Tópico iniciado por ";' +
 '}' +
  'span.mod-recent-info {' +
 'clear: both;' +
 'display: block;' +
 'float: right;' +
 'line-height: 20px;' +
 'width: 30%;' +
 '}' +
 '.creator_post:after {' +
 '  content: ", Em: ";' +
 '}' +
 '.recentTopics {' +
 '  margin: 15px 0;' +
 '}' +
    ' #right {' +
    ' position: relative;' +
    ' top: -354px;' +
'}' +
    '</style>'
    );
   
    var jModuleRecentPosts = $('.module:contains("Últimos assuntos")');
   
    jModuleRecentPosts
    .remove() // Clonando widget de últimos assuntos
    .prependTo('#wrapper') // Inserindo no main-content
    .addClass('recentTopics') // Adicionando nova classe
    .removeClass('module'); // Removendo classe existente
   
    $('.recentTopics').each(function() {
          $(this).html(
                  $(this).html()
                    .replace(/\»/g, '')
                    .replace(/\<a href="\/t(.*?)\-/g,'<li class="recentPost"><a href="/t$1-')
                    .replace(/\<\/a\><br\>/g, '</a><div class="recentInline">')
                    .replace(/\<a href="\/u([0-9])"\>(.*?)<\/a\>/g, '<a href="/u$1">$2</a><br>')
          ).find('li').wrapAll('<ul></ul>');
        $('a[href^="/u"]', this).each(function() {
          var jLinkUser = $(this).attr('href');
          $(this).before(
          '<a href="' + jLinkUser + '" class="user_photo lastpost-avatar">' +
          '    <img src="http://r26.imgfast.net/users/2617/31/90/74/avatars/1-40.png" alt="no_photo" class="mini_photo" />' +
          '</a>'
          );
          var jImg = $(this).prev().find('img'),
                jUser = sessionStorage.getItem(jLinkUser);
          if(jUser) {
              jImg.attr('src', jUser);
          } else {
          $.ajax({
                  url: jLinkUser,
                  type: 'GET',
                  success: function(data) {
                    var jImage = $('.ipsUserPhoto', data).attr('src');
                          jImg.attr('src', jImage);
                          sessionStorage.setItem(jLinkUser, jImage);
                  },
                  error: function(err)
                  {
                    console.log("AJAX error in request (Last posts)");
                  }
          });
          }
      });
          $('a[href^="/t"]', this).each(function() {
              var jThis = $(this),
                    jLinkTpc = jThis.attr('href').split('#')[0];
              $.ajax({
                  url: jLinkTpc + "?change_version=punbb",
                  type: 'GET',
                  success: function(recent) {
                  var jCreator = '',
                        jLocal = $('.crumbs:first a.nav', recent).wrapAll('<div></div>').parent().html(),
                        jPaging = $('.paging', recent)[0];
                  jThis.parents('.recentPost').append(
                  '<div class="small_links">' +
                  '    <span class="creator_post">Carregando...</span>' +
                  '    <span class="local">' + jLocal + '</span>' +
                  '</div>'
                  ).find('a[href*="change_version"]').each(function() {
                    var jHref = $(this).attr('href').split('?')[0];
                    $(this).attr('href', jHref);
                  });
                  if(jPaging) {
                      jCreator = $('a:contains("1")', jPaging).attr('href');
                      jThis.parents('.recentPost').find('.creator_post').load(jCreator + ' .username:first', function() {
                            $(this).text($(this).text());
                      });
                  } else {
                      jCreator = $('.username:first', recent).text();
                      jThis.parents('.recentPost').find('.creator_post').text(jCreator);
                  }
                  },
                  error: function(err)
                  {
                    console.log("AJAX error in request (Last posts)");
                  }
          });
      });
 });
});

o/
Luiz

Luiz
Membro Entusiasta
Membro Entusiasta

Membro desde : 23/04/2016
Mensagens : 6645
Pontos : 7451

https://luizfelipe.dev

Ir para o topo Ir para baixo

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 13.09.17 21:06

eita mesmo assim sem resultados eu em
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 14.09.17 15:48

up pfvr
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por Kyo Panda 15.09.17 13:02

Troque por esse:

Código:
$(function () {
    $('.module.main:contains("Últimos assuntos")').attr('style', 'height: 280px;overflow: scroll;overflow-x: hidden;');
});
$(function() {
 $('head').append(
 '<style type="text/css">' +
 '.recentTopics {' +
 '  font-family: helvetica, arial, sans-serif !important;' +
 '  line-height: 15px;' +
 '  padding: 0;' +
 '}' +
 '.recentTopics div.h3 {' +
  'background-color: rgb(55, 147, 255);' +
 'color: rgb(255, 255, 255);' +
 'font-size: 1.3rem;' +
 'font-weight: 400;' +
 'text-transform: none;' +
 'border-bottom: none;' +
 'border-radius: 3px 3px 0px 0px;' +
 'margin: -18px -18px 18px;' +
 'padding: 12px 18px;' +
 '}' +
 '.recentTopics ul {' +
 '  padding-left: 0 !important;' +
 '}' +
 '.mini_photo {' +
 '  margin-right: 5px;' +
 '}' +
 'li.recentPost {' +
 '  min-height: 70px;' +
 '  padding: 1em 1em 0.5em 1em;' +
 '  list-style-type: none;' +
 '  border-bottom: 1px solid rgba(38, 49, 55, 0.08);' +
 '}' +
 '.recentPost a[href^="/t"] {' +
 '  font-size: 13.8px;' +
 '  text-decoration: none;' +
 '  font-weight: bold;' +
 '}' +
 '.recentInline {' +
 '  min-width: 30%;' +
 '  font-size: 12px;' +
 '  float: right;' +
 '}' +
 '.small_links {' +
 '  display: table;' +
 '  margin-top: 10px;' +
 '}' +
 '.local {' +
 '  font-size: 0;' +
 '}' +
 '.local a:after {' +
 '  content: " → ";' +
 '}' +
 '.local a:last-child:after {' +
 '  content: "";' +
 '}' +
 '.small_links, .small_links a {' +
 '  color: #a4a4a4 !important;' +
 '  font-size: 12px !important;' +
 '  text-decoration: none !important;' +
 '}' +
 '.creator_post:before {' +
 '  content: "Tópico iniciado por ";' +
 '}' +
  'span.mod-recent-info {' +
 'clear: both;' +
 'display: block;' +
 'float: right;' +
 'line-height: 20px;' +
 'width: 30%;' +
 '}' +
 '.creator_post:after {' +
 '  content: ", Em: ";' +
 '}' +
 '.recentTopics {' +
 '  margin: 15px 0;' +
 '}' +
    ' #right {' +
    ' position: relative;' +
    ' top: -354px;' +
'}' +
    '</style>'
    );
   
    var jModuleRecentPosts = $('.module:contains("Últimos assuntos")');
   
    jModuleRecentPosts
    .remove() // Clonando widget de últimos assuntos
    .prependTo('#wrapper') // Inserindo no main-content
    .addClass('recentTopics') // Adicionando nova classe
    .removeClass('module'); // Removendo classe existente
   
    $('.recentTopics').each(function() {
          $(this).html(
                  $(this).html()
                    .replace(/\»/g, '')
                    .replace(/\<a href="\/t(.*?)\-/g,'<li class="recentPost"><a href="/t$1-')
                    .replace(/\<\/a\><br\>/g, '</a><div class="recentInline">')
                    .replace(/\<a href="\/u([0-9])"\>(.*?)<\/a\>/g, '<a href="/u$1">$2</a><br>')
          ).find('li').wrapAll('<ul></ul>');
        $('a[href^="/u"]', this).each(function() {
          var jLinkUser = $(this).attr('href');
          $(this).before(
          '<a href="' + jLinkUser + '" class="user_photo lastpost-avatar">' +
          '    <img src="http://r26.imgfast.net/users/2617/31/90/74/avatars/1-40.png" alt="no_photo" class="mini_photo" />' +
          '</a>'
          );
          var jImg = $(this).prev().find('img'),
                jUser = sessionStorage.getItem(jLinkUser);
          if(jUser) {
              jImg.attr('src', jUser);
          } else {
          $.ajax({
                  url: jLinkUser,
                  type: 'GET',
                  success: function(data) {
                    var jImage = $('img[alt="avatar"]', data).attr('src');
                          jImg.attr('src', jImage);
                          sessionStorage.setItem(jLinkUser, jImage);
                  },
                  error: function(err)
                  {
                    console.log("AJAX error in request (Last posts)");
                  }
          });
          }
      });
          $('a[href^="/t"]', this).each(function() {
              var jThis = $(this),
                    jLinkTpc = jThis.attr('href').split('#')[0];
              $.ajax({
                  url: jLinkTpc + "?change_version=punbb",
                  type: 'GET',
                  success: function(recent) {
                  var jCreator = '',
                        jLocal = $('.crumbs:first a.nav', recent).wrapAll('<div></div>').parent().html(),
                        jPaging = $('.paging', recent)[0];
                  jThis.parents('.recentPost').append(
                  '<div class="small_links">' +
                  '    <span class="creator_post">Carregando...</span>' +
                  '    <span class="local">' + jLocal + '</span>' +
                  '</div>'
                  ).find('a[href*="change_version"]').each(function() {
                    var jHref = $(this).attr('href').split('?')[0];
                    $(this).attr('href', jHref);
                  });
                  if(jPaging) {
                      jCreator = $('a:contains("1")', jPaging).attr('href');
                      jThis.parents('.recentPost').find('.creator_post').load(jCreator + ' .username:first', function() {
                            $(this).text($(this).text());
                      });
                  } else {
                      jCreator = $('.username:first', recent).text();
                      jThis.parents('.recentPost').find('.creator_post').text(jCreator);
                  }
                  },
                  error: function(err)
                  {
                    console.log("AJAX error in request (Last posts)");
                  }
          });
      });
 });
});
Kyo Panda

Kyo Panda
Hiper Membro

Membro desde : 08/01/2012
Mensagens : 4641
Pontos : 5939

https://ajuda.forumeiros.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por weverson lopes 15.09.17 18:07

muito obrigado ajudou mt
weverson lopes

weverson lopes
*****

Membro desde : 01/04/2017
Mensagens : 410
Pontos : 595

http://www.mdhoficial.net/

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Corrigir alinhamento do avatar nos últimos assuntos

Mensagem por Luiz 15.09.17 18:07

Questão marcada como Resolvida ou o Autor solicitou que ela fosse arquivada.
Tópico marcado como Resolvido e movido para Questões resolvidas.
Luiz

Luiz
Membro Entusiasta
Membro Entusiasta

Membro desde : 23/04/2016
Mensagens : 6645
Pontos : 7451

https://luizfelipe.dev

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