Widget Ultimos assuntos

4 participantes

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

Tópico resolvido Widget Ultimos assuntos

Mensagem por William_iHarDz 21.09.17 18:51

Detalhes da questão


Endereço do fórum: http://www.bpfsamp.com
Versão do fórum: PunBB

Descrição


Widget ultimos assuntos bugado, bom eu gostaria de ajuda para resolver esse problema do widget eu ia pedir no tópico onde era ajustado mais fui aconselhado a abrir outro para tal bug

estão vamos lá no local onde mostra "Tópico iniciado por, em:" não mostra nada está bugado esse é o problema
William_iHarDz

William_iHarDz
****

Membro desde : 09/06/2014
Mensagens : 259
Pontos : 404

http://www.playfatal.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Widget Ultimos assuntos

Mensagem por iScroll 21.09.17 18:56

iScroll

iScroll
Super Membro

Membro desde : 08/03/2015
Mensagens : 1701
Pontos : 2311

http://ultimatelife.forumeiros.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Widget Ultimos assuntos

Mensagem por William_iHarDz 21.09.17 19:20

nenhum resultou!
William_iHarDz

William_iHarDz
****

Membro desde : 09/06/2014
Mensagens : 259
Pontos : 404

http://www.playfatal.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Widget Ultimos assuntos

Mensagem por Kyo Panda 21.09.17 19:25

Poderia postar o script usado?
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: Widget Ultimos assuntos

Mensagem por William_iHarDz 21.09.17 19:30

Código:
$(function() {
 $('head').append(
 '<style type="text/css">' +
 '.recentTopics .main-content {' +
 '  font-family: helvetica, arial, sans-serif !important;' +
 '  line-height: 15px;' +
 '  padding: 0;' +
 '}' +
 '.recentTopics ul {' +
 '  padding-left: 0 !important;' +
 '}' +
 '.mini_photo {' +
 '  margin-right: 5px;' +
 '}' +
 'li.recentPost {' +
 '  min-height: 50px;' +
 '  padding: 1em 1em 0.5em 1em;' +
 '  list-style-type: none;' +
 '  border-bottom: 1px solid #f3f3f3;' +
 '}' +
 '.recentPost a[href^="/t"] {' +
 '  font-size: 14px;' +
 '  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 ";' +
 '}' +
 '.creator_post:after {' +
 '  content: ", Em: ";' +
 '}' +
 '.recentTopics {' +
 '  margin: 15px 0;' +
 '}' +
 '</style>'
 );
 
 var jModuleRecentPosts = $('.module:contains("Últimos assuntos")');
 
 jModuleRecentPosts
 .clone() // Clonando widget de últimos assuntos
 .prependTo('#main-content') // 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)
                  {
                    alert("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)
                  {
                    alert("AJAX error in request (Last posts)");
                  }
          });
      });
 });
});
William_iHarDz

William_iHarDz
****

Membro desde : 09/06/2014
Mensagens : 259
Pontos : 404

http://www.playfatal.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Widget Ultimos assuntos

Mensagem por Kyo Panda 21.09.17 19:53

Troque por esse:

Código:
$(function() {
 $('head').append(
 '<style type="text/css">' +
 '.recentTopics .main-content {' +
 '  font-family: helvetica, arial, sans-serif !important;' +
 '  line-height: 15px;' +
 '  padding: 0;' +
 '}' +
 '.recentTopics ul {' +
 '  padding-left: 0 !important;' +
 '}' +
 '.mini_photo {' +
 '  margin-right: 5px;' +
 '}' +
 'li.recentPost {' +
 '  min-height: 50px;' +
 '  padding: 1em 1em 0.5em 1em;' +
 '  list-style-type: none;' +
 '  border-bottom: 1px solid #f3f3f3;' +
 '}' +
 '.recentPost a[href^="/t"] {' +
 '  font-size: 14px;' +
 '  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 ";' +
 '}' +
 '.creator_post:after {' +
 '  content: ", Em: ";' +
 '}' +
 '.recentTopics {' +
 '  margin: 15px 0;' +
 '}' +
 '</style>'
 );
 
 var jModuleRecentPosts = $('.module:contains("Últimos assuntos")');
 
 jModuleRecentPosts
 .clone() // Clonando widget de últimos assuntos
 .prependTo('#main-content') // 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)
                  {
                    alert("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 + ' span[itemprop="creator name"]:first a', function() {
                            $(this).text($(this).text());
                      });
                  } else {
                      jCreator = $('span[itemprop="creator name"]:first a', recent).text();
                      jThis.parents('.recentPost').find('.creator_post').text(jCreator);
                  }
                  },
                  error: function(err)
                  {
                    alert("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: Widget Ultimos assuntos

Mensagem por William_iHarDz 21.09.17 20:02

certo resolveu esses 2 erros mais não aparece o resto depois da setinha exp esse aqui http://brasilplayultimate.forumeiros.com/forum
William_iHarDz

William_iHarDz
****

Membro desde : 09/06/2014
Mensagens : 259
Pontos : 404

http://www.playfatal.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Widget Ultimos assuntos

Mensagem por Kyo Panda 21.09.17 20:07

Troque por esse:

Código:
$(function() {
 $('head').append(
 '<style type="text/css">' +
 '.recentTopics .main-content {' +
 '  font-family: helvetica, arial, sans-serif !important;' +
 '  line-height: 15px;' +
 '  padding: 0;' +
 '}' +
 '.recentTopics ul {' +
 '  padding-left: 0 !important;' +
 '}' +
 '.mini_photo {' +
 '  margin-right: 5px;' +
 '}' +
 'li.recentPost {' +
 '  min-height: 50px;' +
 '  padding: 1em 1em 0.5em 1em;' +
 '  list-style-type: none;' +
 '  border-bottom: 1px solid #f3f3f3;' +
 '}' +
 '.recentPost a[href^="/t"] {' +
 '  font-size: 14px;' +
 '  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 ";' +
 '}' +
 '.creator_post:after {' +
 '  content: ", Em: ";' +
 '}' +
 '.recentTopics {' +
 '  margin: 15px 0;' +
 '}' +
 '</style>'
 );
 
 var jModuleRecentPosts = $('.module:contains("Últimos assuntos")');
 
 jModuleRecentPosts
 .clone() // Clonando widget de últimos assuntos
 .prependTo('#main-content') // 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)
                  {
                    alert("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 = $('.pun-crumbs:first a.nav', recent).filter(function() {
                     return $.trim($(this).text());
                  }).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 + ' span[itemprop="creator name"]:first a', function() {
                            $(this).text($(this).text());
                      });
                  } else {
                      jCreator = $('span[itemprop="creator name"]:first a', recent).text();
                      jThis.parents('.recentPost').find('.creator_post').text(jCreator);
                  }
                  },
                  error: function(err)
                  {
                    alert("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: Widget Ultimos assuntos

Mensagem por William_iHarDz 21.09.17 20:25

Muito bom pode fechar ajudou muito ! tks
William_iHarDz

William_iHarDz
****

Membro desde : 09/06/2014
Mensagens : 259
Pontos : 404

http://www.playfatal.forumeiros.com/forum

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Widget Ultimos assuntos

Mensagem por Luiz 21.09.17 20:26

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