Boas-vindas ao Power Pixel

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

Leonardo Silva Leonardo Silva  • Dom 29 Mar 2015 - 17:15

Problema no "ultimas mensagens"  Empty Problema no "ultimas mensagens" Dom 29 Mar 2015 - 17:15

  • Descrição:
Olá pessoal, não faço a mínima ideia de como arrumar este problema em meu templete, eu já pesquisei diversos casos no fórum antes de vim pedir ajuda, porem não obtive sucesso algum, alguém ajuda como resolver?

obs: Já permiti acesso aos avatares pelo painel do fórum, no caso na coluna.

[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
  • Informações:
Fórum:progames.forumbrasil.netVersão:PUNBB
Tipo:Erros diversosTags:Problema,ultimas,mensagens

Leonardo Silva Leonardo Silva  • Dom 29 Mar 2015 - 19:25

Cepheus Cepheus  • Dom 29 Mar 2015 - 20:06

Problema no "ultimas mensagens"  Empty Re: Problema no "ultimas mensagens" Dom 29 Mar 2015 - 20:06

Leonardo Silva escreveu:Ajuda alguém por favor?

[alerta="Alerta!"]Só é permitido dar up nos tópicos após 24 horas! você foi alertado com 20% da sua barra de notificação[/alerta]

Poderia postar seu index_box?

Leonardo Silva Leonardo Silva  • Dom 29 Mar 2015 - 21:27

Problema no "ultimas mensagens"  Empty Re: Problema no "ultimas mensagens" Dom 29 Mar 2015 - 21:27

sim, claro.
Código:

<!-- Backup
<div class="pun-crumbs">
 <p class="crumbs"><a href="{U_INDEX}">{L_INDEX}</a><strong>{NAV_CAT_DESC}</strong></p>
</div>
-->
<div class="main">
<!-- BEGIN catrow -->
 <!-- BEGIN tablehead -->
 <div class="main-head">
 <div class="page-title">{catrow.tablehead.L_FORUM}</div>
 </div>
 <div class="main-content">
 <table cellspacing="0" class="table">
                <!-- Backup
 <thead>
 <tr>
 <th class="tcl">{L_FORUM}</th>
 <th class="tc2">{L_TOPICS}</th>
 <th class="tc3">{L_POSTS}</th>
 <th class="tcr">{L_LASTPOST}</th>
 </tr>
 </thead>
                -->
 <tbody class="statused">
 <!-- END tablehead -->

 <!-- BEGIN forumrow -->
 <tr>
                        <!-- Column for Icons -->
 <td class="tc_icon">
 <span class="status">
 <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
 </span>
 </td>
                       
                        <!-- Column for Title & Description -->
 <td class="tcl"> <!-- Backup style="padding-right: {catrow.forumrow.INC_LEVEL_RIGHT}; padding-left: {catrow.forumrow.INC_LEVEL_LEFT};"> -->
 <!-- Backup
 <span class="status" style="margin-right: -{catrow.forumrow.INC_WIDTH_ICON}; margin-left: -{catrow.forumrow.INC_WIDTH_ICON};">
 <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
 </span>
 -->
 <h{catrow.forumrow.LEVEL} class="hierarchy">
                                <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a>
                            </h{catrow.forumrow.LEVEL}>
 <br />
                            <div class="desc ipsType_small">
 {catrow.forumrow.FORUM_DESC}
 <!-- BEGIN switch_moderators_links -->
 <br />
 {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
 <!-- END switch_moderators_links -->
 {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
 <strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}
 </div>
 </td>
 <!-- Backup <td class="tc2"></td> -->
                       
                        <!-- Column for Topic info -->
 <td class="tc3 ipsType_small">
                            <strong id="index_topics">{catrow.forumrow.TOPICS}</strong> tópicos<br />
                            <strong id="index_replies">{catrow.forumrow.POSTS}</strong> respostas
                        </td>
                       
                        <!-- Column for Last Post -->
 <td class="tcr">
 <!-- Backup
 <span>
 <a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
 {catrow.forumrow.USER_LAST_POST}
 </span>
 -->
 <!-- BEGIN switch_topic_title -->
 <a href="" class="ipsUserPhoto">
                                <img src="http://invision-virus.com/forum/public/style_images/light/profile/default_large.png" alt="User image" class="ipsUserPhoto_mini">
                            </a>
 <!-- END switch_topic_title -->
 <ul class="last_post ipsType_small">
 <li>
 <!-- BEGIN switch_topic_title -->
 <a title="{catrow.forumrow.LATEST_TOPIC_TITLE}" href="{catrow.forumrow.U_LATEST_TOPIC}">{catrow.forumrow.LATEST_TOPIC_NAME}</a>
 <!-- END switch_topic_title -->
 </li>
 <li class="desc lighter blend_links">{catrow.forumrow.USER_LAST_POST}</li>
 </ul>
 </td>
 </tr>
 <!-- END forumrow -->

 <!-- BEGIN tablefoot -->
 </tbody>
 </table>
 </div>
 <!-- END tablefoot -->
<!-- END catrow -->

<script type="text/javascript">
    //<![CDATA[
    var target = $('td.tcr').find('li.desc.lighter.blend_links');
    target.each(function(index){
        var UserURL = $(this).find('a.gensmall').attr('href');
        var Desc = $(this).parent().find('li a');
       
        if (Desc.text() == '') {
            Desc.text('Não há posts para visualizar');
        }
        if($.trim(UserURL) !== '') {
            var found = $(this).parent().parent().find('.ipsUserPhoto_mini');
            var caching_time = 24*60*60*1000;
            var caching_error = 60*1000;
           
            if(localStorage.getItem('avatar_date' + index) <+new Date-caching_time || localStorage.getItem('avatar_date' + index) <+new Date-caching_error) {
                $.get(UserURL, function(data){
                    var avtPrf = $('#profile_tabs p img', data).attr('src');
                    /*
                    if(avtPrf.length > 0) {
                        found.attr('src', avtPrf);
                    }*/
                    found.attr('src', avtPrf);
                    localStorage.setItem('avatar_img' + index, avtPrf);
                    localStorage.setItem('avatar_date' + index, +new Date);
                });
            } else {
                found.attr('src', localStorage.getItem('avatar_img'+ index));
            }
        };
    });
   
    var target = $('td.tc3.ipsType_small');
    target.each(function(index){
        var adjust = $(this).find('#index_replies');
        var repplies = adjust.text();
        adjust.text(repplies - $(this).find('#index_topics').text());
    });
    $(document).ready(function() {
        var UserURL = $('#statistics').find('li.lastUser strong a').attr('href');
        var recmb = $('#recent_member');
        /*
        var storeData = sessionStorage.getItem('recent_member');
        if (storeData) {
            $('#recent_member').html(storeData);
            return false
        }*/
        recmb.load(UserURL + ' #profile_background .ipsVerticalTabbed', function() {
            var prof = $('#recent_member #profile_content_main');
            recmb.find('ul.clear2').hide();
            var panes = recmb.find('#profile_panes_wrap');
            panes.hide();
            prof.css('margin-bottom', '0');
            prof.find('#user_status_cell').hide();
            prof.find('#user_utility_links').css('float', 'right');
            recmb.find('#profile_photo').css({ 'max-height' : '138px', 'max-width' : '138px' });
            recmb.find('.ipsVerticalTabbed_content').css({ 'min-height' : '100px', 'max-height' : '238px' });
            recmb.find('div.warn_panel').remove();
            $('#profile_tabs').append('<p style="text-align: center;"><strong>Seja bem vindo!</strong></p>');
            /*sets default user image*/
            var $Sel = $('#profile_tabs').find('p.short.photo_holder');
            if($.trim($Sel.find('img').attr('src')) =='') {
                $Sel.append('<img alt="- foto" src="http://2img.net/i/fa/invision/pp-blank-thumb.png" id="profile_photo" class="ipsUserPhoto">');
                $('#photo_popup_inner #ips_currentPhoto').append('<img alt="- foto" src="http://2img.net/i/fa/invision/pp-blank-thumb.png" id="profile_photo" class="ipsUserPhoto">');
            } else {
                $Sel.find('img').attr('id','profile_photo').addClass('ipsUserPhoto');
            }
            /*sets joined in*/
            $('#user_info_cell').find('span.joined_in').html($('#field_id-4').find('div.field_uneditable').text()); /*id-4 => "Data de inscrição"*/
           /*sets state*/
            if($.trim($('#user_status').text()) == 'conectado') {
                $('#user_info_cell #user_connected').html('online').addClass('ipsBadge_green').removeClass('ipsBadge_lightgrey');
            } else {
                $('#user_info_cell #user_connected').html('offline').addClass('ipsBadge_lightgrey').removeClass('ipsBadge_green');
            };
            var inter = $.trim(panes.find('#field_id-11 div.field_uneditable').text());
            var magic = $.trim(panes.find('#field_id-9 div.field_uneditable').text());
            if (inter == '-'){inter = "Sem informações";}
            if (magic == '-'){magic = "Sem informações";}
            prof.append(
                '<br><div class="general_box clearfix" style="margin-top: 25px; margin-bottom: 5px;"><h3 style="padding: 2px;"></h3></div>',
                '<p><strong>Localização: </strong>' + inter + '</p><p><strong>Emprego/Lazer: </strong>' + magic + '</p>'
            );
            /*sessionStorage.setItem('recent_member', $('#recent_member').html());*/
       });
    });
    //]]>
</script>

<!-- BEGIN switch_on_index -->
<div class="main-box clearfix" style="display: none;">
 <ul>
 <li><a href="{U_TODAY_ACTIVE}">{L_TODAY_ACTIVE}</a></li>
 <li><a href="{U_TODAY_POSTERS}">{L_TODAY_POSTERS}</a></li>
 <li><a href="{U_OVERALL_POSTERS}">{L_OVERALL_POSTERS}</a></li>
 </ul>
 <!-- BEGIN switch_delete_cookies -->
 <p class="right">
 <a href="{switch_on_index.switch_delete_cookies.U_DELETE_COOKIES}">{switch_on_index.switch_delete_cookies.L_DELETE_COOKIES}</a>
 </p>
 <!-- END switch_delete_cookies -->
</div>
<!-- END switch_on_index -->

Bruno_Michael Bruno_Michael  • Seg 30 Mar 2015 - 13:45

Problema no "ultimas mensagens"  Empty Re: Problema no "ultimas mensagens" Seg 30 Mar 2015 - 13:45

Olá amigo , coloque esse template. 
Código:

<!-- Backup
<div class="pun-crumbs">
 <p class="crumbs"><a href="{U_INDEX}">{L_INDEX}</a><strong>{NAV_CAT_DESC}</strong></p>
</div>
-->
<div class="main">
<!-- BEGIN catrow -->
 <!-- BEGIN tablehead -->
 <div class="main-head">
 <div class="page-title">{catrow.tablehead.L_FORUM}</div>
 </div>
 <div class="main-content">
 <table cellspacing="0" class="table">
                <!-- Backup
 <thead>
 <tr>
 <th class="tcl">{L_FORUM}</th>
 <th class="tc2">{L_TOPICS}</th>
 <th class="tc3">{L_POSTS}</th>
 <th class="tcr">{L_LASTPOST}</th>
 </tr>
 </thead>
                -->
 <tbody class="statused">
 <!-- END tablehead -->

 <!-- BEGIN forumrow -->
 <tr>
                        <!-- Column for Icons -->
 <td class="tc_icon">
 <span class="status">
 <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
 </span>
 </td>
                        
                        <!-- Column for Title & Description -->
 <td class="tcl"> <!-- Backup style="padding-right: {catrow.forumrow.INC_LEVEL_RIGHT}; padding-left: {catrow.forumrow.INC_LEVEL_LEFT};"> -->
 <!-- Backup
 <span class="status" style="margin-right: -{catrow.forumrow.INC_WIDTH_ICON}; margin-left: -{catrow.forumrow.INC_WIDTH_ICON};">
 <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
 </span>
 -->
 <h{catrow.forumrow.LEVEL} class="hierarchy">
                                <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a>
                            </h{catrow.forumrow.LEVEL}>
 <br />
                            <div class="desc ipsType_small">
 {catrow.forumrow.FORUM_DESC}
 <!-- BEGIN switch_moderators_links -->
 <br />
 {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
 <!-- END switch_moderators_links -->
 {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
 <strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}
 </div>
 </td>
 <!-- Backup <td class="tc2"></td> -->
                        
                        <!-- Column for Topic info -->
 <td class="tc3 ipsType_small">
                            <strong id="index_topics">{catrow.forumrow.TOPICS}</strong> tópicos<br />
                            <strong id="index_replies">{catrow.forumrow.POSTS}</strong> respostas
                        </td>
                           <td class="tcr"> <!-- BEGIN avatar -->
                            <span class="lastpost-avatar">{catrow.forumrow.avatar.LAST_POST_AVATAR}</span>
                            <!-- END avatar -->
                        <!-- Column for Last Post -->
 <td class="tcr">
 <!-- Backup
 <span>
 <a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
 {catrow.forumrow.USER_LAST_POST}
 </span>
 -->
 <!-- BEGIN switch_topic_title -->
 <a href="" class="ipsUserPhoto">
                                <img src="http://invision-virus.com/forum/public/style_images/light/profile/default_large.png" alt="User image" class="ipsUserPhoto_mini">
                            </a>
 <!-- END switch_topic_title -->
 <ul class="last_post ipsType_small">
 <li>
 <!-- BEGIN switch_topic_title -->
 <a title="{catrow.forumrow.LATEST_TOPIC_TITLE}" href="{catrow.forumrow.U_LATEST_TOPIC}">{catrow.forumrow.LATEST_TOPIC_NAME}</a>
 <!-- END switch_topic_title -->
 </li>
 <li class="desc lighter blend_links">{catrow.forumrow.USER_LAST_POST}</li>
 </ul>
 </td>
 </tr>
 <!-- END forumrow -->

 <!-- BEGIN tablefoot -->
 </tbody>
 </table>
 </div>
 <!-- END tablefoot -->
<!-- END catrow -->

<script type="text/javascript">
    //<![CDATA[
    var target = $('td.tcr').find('li.desc.lighter.blend_links');
    target.each(function(index){
        var UserURL = $(this).find('a.gensmall').attr('href');
        var Desc = $(this).parent().find('li a');
        
        if (Desc.text() == '') {
            Desc.text('Não há posts para visualizar');
        }
        if($.trim(UserURL) !== '') {
            var found = $(this).parent().parent().find('.ipsUserPhoto_mini');
            var caching_time = 24*60*60*1000;
            var caching_error = 60*1000;
            
            if(localStorage.getItem('avatar_date' + index) <+new Date-caching_time || localStorage.getItem('avatar_date' + index) <+new Date-caching_error) {
                $.get(UserURL, function(data){
                    var avtPrf = $('#profile_tabs p img', data).attr('src');
                    /*
                    if(avtPrf.length > 0) {
                        found.attr('src', avtPrf);
                    }*/
                    found.attr('src', avtPrf);
                    localStorage.setItem('avatar_img' + index, avtPrf);
                    localStorage.setItem('avatar_date' + index, +new Date);
                });
            } else {
                found.attr('src', localStorage.getItem('avatar_img'+ index));
            }
        };
    });
    
    var target = $('td.tc3.ipsType_small');
    target.each(function(index){
        var adjust = $(this).find('#index_replies');
        var repplies = adjust.text();
        adjust.text(repplies - $(this).find('#index_topics').text());
    });
    $(document).ready(function() {
        var UserURL = $('#statistics').find('li.lastUser strong a').attr('href');
        var recmb = $('#recent_member');
        /*
        var storeData = sessionStorage.getItem('recent_member');
        if (storeData) {
            $('#recent_member').html(storeData);
            return false
        }*/
        recmb.load(UserURL + ' #profile_background .ipsVerticalTabbed', function() {
            var prof = $('#recent_member #profile_content_main');
            recmb.find('ul.clear2').hide();
            var panes = recmb.find('#profile_panes_wrap');
            panes.hide();
            prof.css('margin-bottom', '0');
            prof.find('#user_status_cell').hide();
            prof.find('#user_utility_links').css('float', 'right');
            recmb.find('#profile_photo').css({ 'max-height' : '138px', 'max-width' : '138px' });
            recmb.find('.ipsVerticalTabbed_content').css({ 'min-height' : '100px', 'max-height' : '238px' });
            recmb.find('div.warn_panel').remove();
            $('#profile_tabs').append('<p style="text-align: center;"><strong>Seja bem vindo!</strong></p>');
            /*sets default user image*/
            var $Sel = $('#profile_tabs').find('p.short.photo_holder');
            if($.trim($Sel.find('img').attr('src')) =='') {
                $Sel.append('<img alt="- foto" src="http://2img.net/i/fa/invision/pp-blank-thumb.png" id="profile_photo" class="ipsUserPhoto">');
                $('#photo_popup_inner #ips_currentPhoto').append('<img alt="- foto" src="http://2img.net/i/fa/invision/pp-blank-thumb.png" id="profile_photo" class="ipsUserPhoto">');
            } else {
                $Sel.find('img').attr('id','profile_photo').addClass('ipsUserPhoto');
            }
            /*sets joined in*/
            $('#user_info_cell').find('span.joined_in').html($('#field_id-4').find('div.field_uneditable').text()); /*id-4 => "Data de inscrição"*/
           /*sets state*/
            if($.trim($('#user_status').text()) == 'conectado') {
                $('#user_info_cell #user_connected').html('online').addClass('ipsBadge_green').removeClass('ipsBadge_lightgrey');
            } else {
                $('#user_info_cell #user_connected').html('offline').addClass('ipsBadge_lightgrey').removeClass('ipsBadge_green');
            };
            var inter = $.trim(panes.find('#field_id-11 div.field_uneditable').text());
            var magic = $.trim(panes.find('#field_id-9 div.field_uneditable').text());
            if (inter == '-'){inter = "Sem informações";}
            if (magic == '-'){magic = "Sem informações";}
            prof.append(
                '<br><div class="general_box clearfix" style="margin-top: 25px; margin-bottom: 5px;"><h3 style="padding: 2px;"></h3></div>',
                '<p><strong>Localização: </strong>' + inter + '</p><p><strong>Emprego/Lazer: </strong>' + magic + '</p>'
            );
            /*sessionStorage.setItem('recent_member', $('#recent_member').html());*/
       });
    });
    //]]>
</script>

<!-- BEGIN switch_on_index -->
<div class="main-box clearfix" style="display: none;">
 <ul>
 <li><a href="{U_TODAY_ACTIVE}">{L_TODAY_ACTIVE}</a></li>
 <li><a href="{U_TODAY_POSTERS}">{L_TODAY_POSTERS}</a></li>
 <li><a href="{U_OVERALL_POSTERS}">{L_OVERALL_POSTERS}</a></li>
 </ul>
 <!-- BEGIN switch_delete_cookies -->
 <p class="right">
 <a href="{switch_on_index.switch_delete_cookies.U_DELETE_COOKIES}">{switch_on_index.switch_delete_cookies.L_DELETE_COOKIES}</a>
 </p>
 <!-- END switch_delete_cookies -->
</div>
<!-- END switch_on_index -->

Certifique - se a opção  (Mostrar avatar na coluna "Última mensagem" ) está marcada "SIM"!
Espero ter ajudado.

Leonardo Silva Leonardo Silva  • Seg 30 Mar 2015 - 23:58

Problema no "ultimas mensagens"  Empty Re: Problema no "ultimas mensagens" Seg 30 Mar 2015 - 23:58

O código não funcionou, apareceu o avatar mais ainda está bugado, veja:

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

consegue me ajudar?

Bruno_Michael Bruno_Michael  • Ter 31 Mar 2015 - 10:43

Problema no "ultimas mensagens"  Empty Re: Problema no "ultimas mensagens" Ter 31 Mar 2015 - 10:43

Troque o codigo por este :



Código:
<!-- Backup
<div class="pun-crumbs">
 <p class="crumbs"><a href="{U_INDEX}">{L_INDEX}</a><strong>{NAV_CAT_DESC}</strong></p>
</div>
-->
<div class="main">
<!-- BEGIN catrow -->
 <!-- BEGIN tablehead -->
 <div class="main-head">
 <div class="page-title">{catrow.tablehead.L_FORUM}</div>
 </div>
 <div class="main-content">
 <table cellspacing="0" class="table">
                <!-- Backup
 <thead>
 <tr>
 <th class="tcl">{L_FORUM}</th>
 <th class="tc2">{L_TOPICS}</th>
 <th class="tc3">{L_POSTS}</th>
 <th class="tcr">{L_LASTPOST}</th>
 </tr>
 </thead>
                -->
 <tbody class="statused">
 <!-- END tablehead -->

 <!-- BEGIN forumrow -->
 <tr>
                        <!-- Column for Icons -->
 <td class="tc_icon">
 <span class="status">
 <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
 </span>
 </td>
                        
                        <!-- Column for Title & Description -->
 <td class="tcl"> <!-- Backup style="padding-right: {catrow.forumrow.INC_LEVEL_RIGHT}; padding-left: {catrow.forumrow.INC_LEVEL_LEFT};"> -->
 <!-- Backup
 <span class="status" style="margin-right: -{catrow.forumrow.INC_WIDTH_ICON}; margin-left: -{catrow.forumrow.INC_WIDTH_ICON};">
 <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
 </span>
 -->
 <h{catrow.forumrow.LEVEL} class="hierarchy">
                                <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a>
                            </h{catrow.forumrow.LEVEL}>
 <br />
                            <div class="desc ipsType_small">
 {catrow.forumrow.FORUM_DESC}
 <!-- BEGIN switch_moderators_links -->
 <br />
 {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
 <!-- END switch_moderators_links -->
 {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
 <strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}
 </div>
 </td>
 <!-- Backup <td class="tc2"></td> -->
                        
                        <!-- Column for Topic info -->
 <td class="tc3 ipsType_small">
                            <strong id="index_topics">{catrow.forumrow.TOPICS}</strong> tópicos<br />
                            <strong id="index_replies">{catrow.forumrow.POSTS}</strong> respostas
                        </td>
                           <td class="tcr"> <!-- BEGIN avatar -->
                            <span class="lastpost-avatar">{catrow.forumrow.avatar.LAST_POST_AVATAR}</span>
                            <!-- END avatar -->
                        <!-- Column for Last Post -->
 <td class="tcr">
 <!-- Backup
 <span>
 <a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
 {catrow.forumrow.USER_LAST_POST}
 </span>
 -->
 <ul class="last_post ipsType_small">
 <li>
 <!-- BEGIN switch_topic_title -->
 <a title="{catrow.forumrow.LATEST_TOPIC_TITLE}" href="{catrow.forumrow.U_LATEST_TOPIC}">{catrow.forumrow.LATEST_TOPIC_NAME}</a>
 <!-- END switch_topic_title -->
 </li>
 <li class="desc lighter blend_links">{catrow.forumrow.USER_LAST_POST}</li>
 </ul>
 </td>
 </tr>
 <!-- END forumrow -->

 <!-- BEGIN tablefoot -->
 </tbody>
 </table>
 </div>
 <!-- END tablefoot -->
<!-- END catrow -->

<script type="text/javascript">
    //<![CDATA[
    var target = $('td.tcr').find('li.desc.lighter.blend_links');
    target.each(function(index){
        var UserURL = $(this).find('a.gensmall').attr('href');
        var Desc = $(this).parent().find('li a');
        
        if (Desc.text() == '') {
            Desc.text('Não há posts para visualizar');
        }
        if($.trim(UserURL) !== '') {
            var found = $(this).parent().parent().find('.ipsUserPhoto_mini');
            var caching_time = 24*60*60*1000;
            var caching_error = 60*1000;
            
            if(localStorage.getItem('avatar_date' + index) <+new Date-caching_time || localStorage.getItem('avatar_date' + index) <+new Date-caching_error) {
                $.get(UserURL, function(data){
                    var avtPrf = $('#profile_tabs p img', data).attr('src');
                    /*
                    if(avtPrf.length > 0) {
                        found.attr('src', avtPrf);
                    }*/
                    found.attr('src', avtPrf);
                    localStorage.setItem('avatar_img' + index, avtPrf);
                    localStorage.setItem('avatar_date' + index, +new Date);
                });
            } else {
                found.attr('src', localStorage.getItem('avatar_img'+ index));
            }
        };
    });
    
    var target = $('td.tc3.ipsType_small');
    target.each(function(index){
        var adjust = $(this).find('#index_replies');
        var repplies = adjust.text();
        adjust.text(repplies - $(this).find('#index_topics').text());
    });
    $(document).ready(function() {
        var UserURL = $('#statistics').find('li.lastUser strong a').attr('href');
        var recmb = $('#recent_member');
        /*
        var storeData = sessionStorage.getItem('recent_member');
        if (storeData) {
            $('#recent_member').html(storeData);
            return false
        }*/
        recmb.load(UserURL + ' #profile_background .ipsVerticalTabbed', function() {
            var prof = $('#recent_member #profile_content_main');
            recmb.find('ul.clear2').hide();
            var panes = recmb.find('#profile_panes_wrap');
            panes.hide();
            prof.css('margin-bottom', '0');
            prof.find('#user_status_cell').hide();
            prof.find('#user_utility_links').css('float', 'right');
            recmb.find('#profile_photo').css({ 'max-height' : '138px', 'max-width' : '138px' });
            recmb.find('.ipsVerticalTabbed_content').css({ 'min-height' : '100px', 'max-height' : '238px' });
            recmb.find('div.warn_panel').remove();
            $('#profile_tabs').append('<p style="text-align: center;"><strong>Seja bem vindo!</strong></p>');
            /*sets default user image*/
            var $Sel = $('#profile_tabs').find('p.short.photo_holder');
            if($.trim($Sel.find('img').attr('src')) =='') {
                $Sel.append('<img alt="- foto" src="http://2img.net/i/fa/invision/pp-blank-thumb.png" id="profile_photo" class="ipsUserPhoto">');
                $('#photo_popup_inner #ips_currentPhoto').append('<img alt="- foto" src="http://2img.net/i/fa/invision/pp-blank-thumb.png" id="profile_photo" class="ipsUserPhoto">');
            } else {
                $Sel.find('img').attr('id','profile_photo').addClass('ipsUserPhoto');
            }
            /*sets joined in*/
            $('#user_info_cell').find('span.joined_in').html($('#field_id-4').find('div.field_uneditable').text()); /*id-4 => "Data de inscrição"*/
           /*sets state*/
            if($.trim($('#user_status').text()) == 'conectado') {
                $('#user_info_cell #user_connected').html('online').addClass('ipsBadge_green').removeClass('ipsBadge_lightgrey');
            } else {
                $('#user_info_cell #user_connected').html('offline').addClass('ipsBadge_lightgrey').removeClass('ipsBadge_green');
            };
            var inter = $.trim(panes.find('#field_id-11 div.field_uneditable').text());
            var magic = $.trim(panes.find('#field_id-9 div.field_uneditable').text());
            if (inter == '-'){inter = "Sem informações";}
            if (magic == '-'){magic = "Sem informações";}
            prof.append(
                '<br><div class="general_box clearfix" style="margin-top: 25px; margin-bottom: 5px;"><h3 style="padding: 2px;"></h3></div>',
                '<p><strong>Localização: </strong>' + inter + '</p><p><strong>Emprego/Lazer: </strong>' + magic + '</p>'
            );
            /*sessionStorage.setItem('recent_member', $('#recent_member').html());*/
       });
    });
    //]]>
</script>

<!-- BEGIN switch_on_index -->
<div class="main-box clearfix" style="display: none;">
 <ul>
 <li><a href="{U_TODAY_ACTIVE}">{L_TODAY_ACTIVE}</a></li>
 <li><a href="{U_TODAY_POSTERS}">{L_TODAY_POSTERS}</a></li>
 <li><a href="{U_OVERALL_POSTERS}">{L_OVERALL_POSTERS}</a></li>
 </ul>
 <!-- BEGIN switch_delete_cookies -->
 <p class="right">
 <a href="{switch_on_index.switch_delete_cookies.U_DELETE_COOKIES}">{switch_on_index.switch_delete_cookies.L_DELETE_COOKIES}</a>
 </p>
 <!-- END switch_delete_cookies -->
</div>
<!-- END switch_on_index -->


Faça um Backup do antigo.
Espero ter ajudado !

Cepheus Cepheus  • Ter 31 Mar 2015 - 12:23

Problema no "ultimas mensagens"  Empty Re: Problema no "ultimas mensagens" Ter 31 Mar 2015 - 12:23

Só ressaltando que mesmo usando o código acima postado pelo Bruno_Michael ficará ainda com um pequeno problema na tabela, repare que a coluna onde se encontra os avatares está separada individualmente o que acarretará em um espaçamento do "Titulo, Data e nick".
Repare na imagem, a modificação apenas apagará o avatar que não está aparecendo, porem ficará com um espaço muito grande.
O correto seria adicionar na mesma coluna para evitar esse pequeno problema.

Abaixo deixei o código já modificado.
Até!
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

Código:
<!-- Backup
<div class="pun-crumbs">
 <p class="crumbs"><a href="{U_INDEX}">{L_INDEX}</a><strong>{NAV_CAT_DESC}</strong></p>
</div>
-->
<div class="main">
<!-- BEGIN catrow -->
 <!-- BEGIN tablehead -->
 <div class="main-head">
 <div class="page-title">{catrow.tablehead.L_FORUM}</div>
 </div>
 <div class="main-content">
 <table cellspacing="0" class="table">
                <!-- Backup
 <thead>
 <tr>
 <th class="tcl">{L_FORUM}</th>
 <th class="tc2">{L_TOPICS}</th>
 <th class="tc3">{L_POSTS}</th>
 <th class="tcr">{L_LASTPOST}</th>
 </tr>
 </thead>
                -->
 <tbody class="statused">
 <!-- END tablehead -->

 <!-- BEGIN forumrow -->
 <tr>
                        <!-- Column for Icons -->
 <td class="tc_icon">
 <span class="status">
 <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
 </span>
 </td>
                        
                        <!-- Column for Title & Description -->
 <td class="tcl"> <!-- Backup style="padding-right: {catrow.forumrow.INC_LEVEL_RIGHT}; padding-left: {catrow.forumrow.INC_LEVEL_LEFT};"> -->
 <!-- Backup
 <span class="status" style="margin-right: -{catrow.forumrow.INC_WIDTH_ICON}; margin-left: -{catrow.forumrow.INC_WIDTH_ICON};">
 <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
 </span>
 -->
 <h{catrow.forumrow.LEVEL} class="hierarchy">
                                <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a>
                            </h{catrow.forumrow.LEVEL}>
 <br />
                            <div class="desc ipsType_small">
 {catrow.forumrow.FORUM_DESC}
 <!-- BEGIN switch_moderators_links -->
 <br />
 {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
 <!-- END switch_moderators_links -->
 {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
 <strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}
 </div>
 </td>
 <!-- Backup <td class="tc2"></td> -->
                        
                        <!-- Column for Topic info -->
 <td class="tc3 ipsType_small">
                            <strong id="index_topics">{catrow.forumrow.TOPICS}</strong> tópicos<br />
                            <strong id="index_replies">{catrow.forumrow.POSTS}</strong> respostas
                        </td>
                          
                        <!-- Column for Last Post -->
 <td class="tcr">
 <!-- Backup
 <span>
 <a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
 {catrow.forumrow.USER_LAST_POST}
 </span>
 --><!-- BEGIN avatar -->
                            <span class="lastpost-avatar">{catrow.forumrow.avatar.LAST_POST_AVATAR}</span>
                            <!-- END avatar -->
 <ul class="last_post ipsType_small">
 <li>
 <!-- BEGIN switch_topic_title -->
 <a title="{catrow.forumrow.LATEST_TOPIC_TITLE}" href="{catrow.forumrow.U_LATEST_TOPIC}">{catrow.forumrow.LATEST_TOPIC_NAME}</a>
 <!-- END switch_topic_title -->
 </li>
 <li class="desc lighter blend_links">{catrow.forumrow.USER_LAST_POST}</li>
 </ul>
 </td>
 </tr>
 <!-- END forumrow -->

 <!-- BEGIN tablefoot -->
 </tbody>
 </table>
 </div>
 <!-- END tablefoot -->
<!-- END catrow -->

<script type="text/javascript">
    //<![CDATA[
    var target = $('td.tcr').find('li.desc.lighter.blend_links');
    target.each(function(index){
        var UserURL = $(this).find('a.gensmall').attr('href');
        var Desc = $(this).parent().find('li a');
        
        if (Desc.text() == '') {
            Desc.text('Não há posts para visualizar');
        }
        if($.trim(UserURL) !== '') {
            var found = $(this).parent().parent().find('.ipsUserPhoto_mini');
            var caching_time = 24*60*60*1000;
            var caching_error = 60*1000;
            
            if(localStorage.getItem('avatar_date' + index) <+new Date-caching_time || localStorage.getItem('avatar_date' + index) <+new Date-caching_error) {
                $.get(UserURL, function(data){
                    var avtPrf = $('#profile_tabs p img', data).attr('src');
                    /*
                    if(avtPrf.length > 0) {
                        found.attr('src', avtPrf);
                    }*/
                    found.attr('src', avtPrf);
                    localStorage.setItem('avatar_img' + index, avtPrf);
                    localStorage.setItem('avatar_date' + index, +new Date);
                });
            } else {
                found.attr('src', localStorage.getItem('avatar_img'+ index));
            }
        };
    });
    
    var target = $('td.tc3.ipsType_small');
    target.each(function(index){
        var adjust = $(this).find('#index_replies');
        var repplies = adjust.text();
        adjust.text(repplies - $(this).find('#index_topics').text());
    });
    $(document).ready(function() {
        var UserURL = $('#statistics').find('li.lastUser strong a').attr('href');
        var recmb = $('#recent_member');
        /*
        var storeData = sessionStorage.getItem('recent_member');
        if (storeData) {
            $('#recent_member').html(storeData);
            return false
        }*/
        recmb.load(UserURL + ' #profile_background .ipsVerticalTabbed', function() {
            var prof = $('#recent_member #profile_content_main');
            recmb.find('ul.clear2').hide();
            var panes = recmb.find('#profile_panes_wrap');
            panes.hide();
            prof.css('margin-bottom', '0');
            prof.find('#user_status_cell').hide();
            prof.find('#user_utility_links').css('float', 'right');
            recmb.find('#profile_photo').css({ 'max-height' : '138px', 'max-width' : '138px' });
            recmb.find('.ipsVerticalTabbed_content').css({ 'min-height' : '100px', 'max-height' : '238px' });
            recmb.find('div.warn_panel').remove();
            $('#profile_tabs').append('<p style="text-align: center;"><strong>Seja bem vindo!</strong></p>');
            /*sets default user image*/
            var $Sel = $('#profile_tabs').find('p.short.photo_holder');
            if($.trim($Sel.find('img').attr('src')) =='') {
                $Sel.append('<img alt="- foto" src="http://2img.net/i/fa/invision/pp-blank-thumb.png" id="profile_photo" class="ipsUserPhoto">');
                $('#photo_popup_inner #ips_currentPhoto').append('<img alt="- foto" src="http://2img.net/i/fa/invision/pp-blank-thumb.png" id="profile_photo" class="ipsUserPhoto">');
            } else {
                $Sel.find('img').attr('id','profile_photo').addClass('ipsUserPhoto');
            }
            /*sets joined in*/
            $('#user_info_cell').find('span.joined_in').html($('#field_id-4').find('div.field_uneditable').text()); /*id-4 => "Data de inscrição"*/
           /*sets state*/
            if($.trim($('#user_status').text()) == 'conectado') {
                $('#user_info_cell #user_connected').html('online').addClass('ipsBadge_green').removeClass('ipsBadge_lightgrey');
            } else {
                $('#user_info_cell #user_connected').html('offline').addClass('ipsBadge_lightgrey').removeClass('ipsBadge_green');
            };
            var inter = $.trim(panes.find('#field_id-11 div.field_uneditable').text());
            var magic = $.trim(panes.find('#field_id-9 div.field_uneditable').text());
            if (inter == '-'){inter = "Sem informações";}
            if (magic == '-'){magic = "Sem informações";}
            prof.append(
                '<br><div class="general_box clearfix" style="margin-top: 25px; margin-bottom: 5px;"><h3 style="padding: 2px;"></h3></div>',
                '<p><strong>Localização: </strong>' + inter + '</p><p><strong>Emprego/Lazer: </strong>' + magic + '</p>'
            );
            /*sessionStorage.setItem('recent_member', $('#recent_member').html());*/
       });
    });
    //]]>
</script>

<!-- BEGIN switch_on_index -->
<div class="main-box clearfix" style="display: none;">
 <ul>
 <li><a href="{U_TODAY_ACTIVE}">{L_TODAY_ACTIVE}</a></li>
 <li><a href="{U_TODAY_POSTERS}">{L_TODAY_POSTERS}</a></li>
 <li><a href="{U_OVERALL_POSTERS}">{L_OVERALL_POSTERS}</a></li>
 </ul>
 <!-- BEGIN switch_delete_cookies -->
 <p class="right">
 <a href="{switch_on_index.switch_delete_cookies.U_DELETE_COOKIES}">{switch_on_index.switch_delete_cookies.L_DELETE_COOKIES}</a>
 </p>
 <!-- END switch_delete_cookies -->
</div>
<!-- END switch_on_index -->

Leonardo Silva Leonardo Silva  • Qui 2 Abr 2015 - 23:14

Problema no "ultimas mensagens"  Empty Re: Problema no "ultimas mensagens" Qui 2 Abr 2015 - 23:14

Problema resolvido, obrigado a todos presente no tópico.

Estou com outra dúvida agora, como altero a cor da barra de menu cinza e também como coloco imagem no lugar das colunas:

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

Leonardo Silva Leonardo Silva  • Dom 5 Abr 2015 - 18:38

Conteúdo patrocinado  • 

Problema no "ultimas mensagens"  Empty Re: Problema no "ultimas mensagens"

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