Boas-vindas ao Power Pixel

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

Optimus Optimus  • Ter 8 Jul 2014 - 16:13

Titlebox não carregando criador do tópico Empty Titlebox não carregando criador do tópico Ter 8 Jul 2014 - 16:13

Minha questão:
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

[infos=]Está é a parte do titlebox que está aplicada no fórum, mas a mesma não carrega o criador do tópico.[/infos]

Código:
<!-- #region TitleBox_Viewtopic_body -->
    <!-- BEGIN switch_user_logged_in -->
    <!-- BEGIN watchtopic -->
   <div class="ipbfs_titlebox">
    <div class="__like right" id="watchtopic" data-isfave="" data-relid="" data-area="topics" data-app="forums">
       <span data-tooltip="0 membro(s) segue(m) este tópico" class="ipsButton_extra right _fmore clickable" data-title="0 membro(s) segue(m) este tópico">
            <img src="http://i78.servimg.com/u/f78/18/17/62/92/icon_u10.png"> <strong>0</strong>
        </span>
        <iframe name="iframe_watchtopic" height="0px" width="0px" frameborder="0"></iframe>
        <a class="ftoggle ipsButton_secondary" title="" href="" target="iframe_watchtopic" onclick="watchtopic();window.location.reload();"></a>
    </div>
    <!-- END watchtopic -->
    <!-- END switch_user_logged_in -->
    <a class="ipsUserPhotoLink left" href="#">
        <img class="ipsUserPhoto ipsUserPhoto_medium" alt="Foto" src="http://r26.imgfast.net/users/2617/31/90/74/avatars/1-40.png">
    </a>
    <div class="ipsBox_withphoto" itemtype="http://schema.org/Article" itemscope="">

            <!-- BEGIN switch_user_logged_in -->

            <!-- END switch_user_logged_in -->
            
      
       <h1 class="ipsType_pagetitle" itemprop="name">{TOPIC_TITLE}</h1>
       <div class="desc lighter blend_links">
            Criado por <span itemprop="creator"><a title="" href="" class="url fn name"><span itemprop="name"></span></a></span>, <span itemprop="dateCreated"> </span>
       </div>
        <span id="tags_search"></span>
        <br>
        <meta content="UserComments:3" itemprop="interactionCount">
    </div> </div>
    <br>
    <script type="text/javascript">
        //<![CDATA[
        jQuery(document).ready(function(){
            var target = $('.post:first');
            var imgdata = target.find('div.user-basic-info');
            var autor_dat = target.find('div.author');
            var autor_url = autor_dat.attr('href');
            var autor_txt = autor_dat.text();
            var date = target.find('span.data-post').html();
            var topic_title = '{TOPIC_TITLE}';
            var tags = topic_title.split(' ');
            var follow = '{S_WATCH_TOPIC}';
          
            $('.ipsUserPhotoLink.left').attr('href', imgdata.find('a').attr('href'));
            $('.ipsUserPhoto.ipsUserPhoto_medium').attr('src', imgdata.find('img').attr('src'));
            $('span[itemprop="creator"]').find('a').attr('title', autor_txt).attr('href', autor_url);
            $('span[itemprop="name"]').text(autor_txt);
            $('span[itemprop="dateCreated"]').html(date);
          
            /* Remove duplicates values in array!
            -> If you find something better than this, telme please. */
            tags = tags.filter(
                function(a){
                    if (!this[a]) {
                        this[a] = 1;
                        return a;
                    }
                }
            );
            /* Sets tag search... */
            $.each(tags, function(index, data) {
                if(data.length > 5) {
                    $('#tags_search').append(
                        '<a id="tag_search_' + index + '" class="ipsTag" title="Localizar mais conteúdo com tag ' + data + '" href="/search?search_keywords=' + data + '">' +
                        '    <span>' + data + '</span>' +
                        '</a>'
                    );
                }
            });
            /* Whatch topic */
            <!-- BEGIN switch_user_logged_in -->
            <!-- BEGIN watchtopic -->
            watchtopic();
            function watchtopic() {
                var target = $('#watchtopic').find('a.ftoggle.ipsButton_secondary');
                if (follow.indexOf("?watch=") != -1) {
                    target.attr('title', 'Seguir este tópico e receber notificações de atualizações');
                    target.attr('href', '{TOPIC_URL}?watch=topic');
                    target.text('Seguir este tópico');
                } else {
                    target.attr('title', 'Não seguir este tópico e não receber notificações de atualizações');
                    target.attr('href', '{TOPIC_URL}?unwatch=topic');
                    target.text('Não seguir este tópico');
                }
            }
            <!-- END watchtopic -->
            <!-- END switch_user_logged_in -->
        });
        //]]>
    </script>


Endereço do meu fórum:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

Versão:
PunBB

DeeW. DeeW.  • Ter 8 Jul 2014 - 16:38

Titlebox não carregando criador do tópico Empty Re: Titlebox não carregando criador do tópico Ter 8 Jul 2014 - 16:38

Libere o fórum para que podemos ver o problema!

Optimus Optimus  • Ter 8 Jul 2014 - 19:58

DeeW. DeeW.  • Ter 8 Jul 2014 - 20:40

Titlebox não carregando criador do tópico Empty Re: Titlebox não carregando criador do tópico Ter 8 Jul 2014 - 20:40

Amigo, sem tópico de testes não podemos ajuda-lo.

Optimus Optimus  • Qui 10 Jul 2014 - 8:04

zfutuca zfutuca  • Qui 10 Jul 2014 - 8:18

Titlebox não carregando criador do tópico Empty Re: Titlebox não carregando criador do tópico Qui 10 Jul 2014 - 8:18

Olá,
Ja tem algum JavaScript sobre a titlebox?
Se tem, substitui, se não tem, crie um com investimento nos tópicos:
Código:
jQuery(document).ready(function() {
  var url=$('.post:first .postmain .postbody .user .user-ident .user-basic-info a img').attr('src');
  $('.teste').attr('src',url);
  var url2=jQuery('.post:first .postmain .postbody .user .user-ident .user-basic-info a').attr('href');
  jQuery('.teste2').attr('href',url2);
  var url3=jQuery('.post:first .postmain .postbody .user .user-ident .username').html();
  jQuery('span[itemprop="creator"]').html(url3);
  var url5=jQuery('span.data-post').html();
  jQuery('span[itemprop="data_post"]').html(url5);
});

Até Mais....

Optimus Optimus  • Qui 10 Jul 2014 - 8:41

Titlebox não carregando criador do tópico Empty Re: Titlebox não carregando criador do tópico Qui 10 Jul 2014 - 8:41

O Script que uso está na primeira mensagem. Fiz a troca e bugou tudo em vez de apenas só não carregar o criador.

DeeW. DeeW.  • Qui 10 Jul 2014 - 10:24

Titlebox não carregando criador do tópico Empty Re: Titlebox não carregando criador do tópico Qui 10 Jul 2014 - 10:24

Substitua o atual por este:

Código:

<!-- #region TitleBox_Viewtopic_body -->
    <!-- BEGIN switch_user_logged_in -->
    <!-- BEGIN watchtopic -->
  <div class="ipbfs_titlebox">
    <div class="__like right" id="watchtopic" data-isfave="" data-relid="" data-area="topics" data-app="forums">
      <span data-tooltip="0 membro(s) segue(m) este tópico" class="ipsButton_extra right _fmore clickable" data-title="0 membro(s) segue(m) este tópico">
            <img src="http://i78.servimg.com/u/f78/18/17/62/92/icon_u10.png"> <strong>0</strong>
        </span>
        <iframe name="iframe_watchtopic" height="0px" width="0px" frameborder="0"></iframe>
        <a class="ftoggle ipsButton_secondary" title="" href="" target="iframe_watchtopic" onclick="watchtopic();window.location.reload();"></a>
    </div>
    <!-- END watchtopic -->
    <!-- END switch_user_logged_in -->
    <a class="ipsUserPhotoLink left" href="#">
        <img class="ipsUserPhoto ipsUserPhoto_medium" alt="Foto" src="http://r26.imgfast.net/users/2617/31/90/74/avatars/1-40.png">
    </a>
    <div class="ipsBox_withphoto" itemtype="http://schema.org/Article" itemscope="">

            <!-- BEGIN switch_user_logged_in -->

            <!-- END switch_user_logged_in -->
           
     
      <h1 class="ipsType_pagetitle" itemprop="name">{TOPIC_TITLE}</h1>
      <div class="desc lighter blend_links">
            Criado por <span itemprop="creator"><a title="" href="" class="url fn name"><span itemprop="name"></span></a></span>, <span itemprop="dateCreated"> </span>
      </div>
        <span id="tags_search"></span>
        <br>
        <meta content="UserComments:3" itemprop="interactionCount">
    </div> </div>
    <br>
    <script type="text/javascript">
        //<![CDATA[
        jQuery(document).ready(function(){
            var target = $('.post:first');
            var imgdata = target.find('div.user-basic-info');
            var autor_dat = target.find('.username');
            var autor_url = autor_dat.attr('href');
            var autor_txt = autor_dat.text();
            var date = target.find('span.data-post').html();
            var topic_title = '{TOPIC_TITLE}';
            var tags = topic_title.split(' ');
            var follow = '{S_WATCH_TOPIC}';
         
            $('.ipsUserPhotoLink.left').attr('href', imgdata.find('a').attr('href'));
            $('.ipsUserPhoto.ipsUserPhoto_medium').attr('src', imgdata.find('img').attr('src'));
            $('span[itemprop="creator"]').find('a').attr('title', autor_txt).attr('href', autor_url);
            $('span[itemprop="name"]').text(autor_txt);
            $('span[itemprop="dateCreated"]').html(date);
         
            /* Remove duplicates values in array!
            -> If you find something better than this, telme please. */
            tags = tags.filter(
                function(a){
                    if (!this[a]) {
                        this[a] = 1;
                        return a;
                    }
                }
            );
            /* Sets tag search... */
            $.each(tags, function(index, data) {
                if(data.length > 5) {
                    $('#tags_search').append(
                        '<a id="tag_search_' + index + '" class="ipsTag" title="Localizar mais conteúdo com tag ' + data + '" href="/search?search_keywords=' + data + '">' +
                        '    <span>' + data + '</span>' +
                        '</a>'
                    );
                }
            });
            /* Whatch topic */
            <!-- BEGIN switch_user_logged_in -->
            <!-- BEGIN watchtopic -->
            watchtopic();
            function watchtopic() {
                var target = $('#watchtopic').find('a.ftoggle.ipsButton_secondary');
                if (follow.indexOf("?watch=") != -1) {
                    target.attr('title', 'Seguir este tópico e receber notificações de atualizações');
                    target.attr('href', '{TOPIC_URL}?watch=topic');
                    target.text('Seguir este tópico');
                } else {
                    target.attr('title', 'Não seguir este tópico e não receber notificações de atualizações');
                    target.attr('href', '{TOPIC_URL}?unwatch=topic');
                    target.text('Não seguir este tópico');
                }
            }
            <!-- END watchtopic -->
            <!-- END switch_user_logged_in -->
        });
        //]]>
    </script>

Optimus Optimus  • Qui 10 Jul 2014 - 10:37

Conteúdo patrocinado  • 

Titlebox não carregando criador do tópico Empty Re: Titlebox não carregando criador do tópico

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