Botão de mensagens visível a convidados

2 participantes

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

Tópico resolvido Botão de mensagens visível a convidados

Mensagem por vcapelli 26.11.22 21:12

Detalhes da questão


Endereço do fórum: https://teste-testando.forumeiros.com/forum
Versão do fórum: ModernBB

Descrição


Estou adaptando meu tema do fórum ao Bootstrap, até o momento está dando certo. Entretanto, eu mexi em algo enquanto programava e agora esses botões de ação de cada mensagem aparece mesmo quando não estou logando. Triste

Botão de mensagens visível a convidados HEMGrJa

Meu viewtopic_body:
Código:
<!-- BEGIN switch_plus_menu -->
<script type="text/javascript">
   //<![CDATA[
   var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}';
</script>
<!-- END switch_plus_menu -->
<script type="text/javascript">

var hiddenMsgLabel = { visible:'{JS_HIDE_HIDDEN_MESSAGE}', hidden:'{JS_SHOW_HIDDEN_MESSAGE}' };
showHiddenMessage = function(id) {
    try {
        var regId = parseInt(id, 10);
        if( isNaN(regId) ) { regId = 0; }

        if( regId > 0) {
            $('.post--' + id).toggle(0, function() {
            if( $(this).is(":visible") ) {
               $('#hidden-title--' + id).html(hiddenMsgLabel.visible);
            } else {
               $('#hidden-title--' + id).html(hiddenMsgLabel.hidden);
            }
         });
        }
    } catch(e) { }

   return false;
};

//]]>
</script>

<div class="sub-header">
   <div class="sub-header-info">
      <h1 class="page-title">
         <a href="{TOPIC_URL}">{TOPIC_TITLE}</a>
      </h1>
      <div class="sub-header-path">
         <a class="nav" href="{U_INDEX}"><span>{L_INDEX}</span></a>
         {NAV_CAT_DESC}
      </div>
   </div>

   <div class="sub-header-buttons">
      <!-- BEGIN switch_user_authpost -->
         <a href="{U_POST_NEW_TOPIC}" rel="nofollow" {S_POST_NEW_TOPIC} title="{T_POST_NEW_TOPIC}" class="btn btn-primary me-3">{L_POST_NEW_TOPIC}</a>
      <!-- END switch_user_authpost -->
      <!-- BEGIN switch_user_authreply -->
         <a href="{U_POST_REPLY_TOPIC}" {S_POST_REPLY_TOPIC} title="{T_POST_REPLY_TOPIC}" class="btn btn-primary">{L_POST_REPLY_TOPIC}</a>
      <!-- END switch_user_authreply -->
   </div>
</div>

<div class="btn-toolbar justify-content-between my-3">
    <!-- BEGIN switch_isconnect -->
     <div class="btn-group">
   <a href="{U_VIEW_OLDER_TOPIC}" class="btn btn-outline-secondary"><i class="fas fa-angle-left"></i></a>
     </div>
    <!-- END switch_isconnect -->
    <!-- BEGIN switch_isconnect -->
     <div class="btn-group">
   <a href="{U_VIEW_NEWER_TOPIC}" class="btn btn-outline-secondary"><i class="fas fa-angle-right"></i></a>
     </div>
    <!-- END switch_isconnect -->
</div>

{POLL_DISPLAY}

<!-- BEGIN postrow -->
   <!-- BEGIN hidden -->
      <div class="post {postrow.hidden.ROW_COUNT}">
         <p style="text-align:center">{postrow.hidden.MESSAGE}</p>
      </div>
   <!-- END hidden -->
   <!-- BEGIN displayed -->
      <div id="p{postrow.displayed.U_POST_ID}" class="card mb-3 shadow-sm" style="{postrow.displayed.DISPLAYABLE_STATE}">
            <div style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>
                  <div class="row g-0">
         <div class="col-md-3" id="profile{postrow.displayed.U_POST_ID}">
            <div class="px-3 py-4">
                  <div id="user-avatar">
                                                  <img src="">
                                                </div>
                  <h3 id="user-name" class="text-center">
                     {postrow.displayed.POSTER_NAME}
                  </h3>
                  <div id="user-rank">
                  </div>
               <dd class="postprofile-info">
                  <!-- BEGIN profile_field -->
                     {postrow.displayed.profile_field.LABEL}
                     {postrow.displayed.profile_field.CONTENT}
                     {postrow.displayed.profile_field.SEPARATOR}
                  <!-- END profile_field -->
                  {postrow.displayed.POSTER_RPG}
               </dd>
            </div>
         </div>
         <div class="col-md-8">
            <div class="card-body">
                                     <h2 class="card-title d-none">{postrow.displayed.POST_SUBJECT}</h2>
               <p class="card-text">{postrow.displayed.MESSAGE}</p>
            </div>
            <div class="edited-message">
               {postrow.displayed.EDITED_MESSAGE}
            </div>
            <!-- BEGIN switch_signature -->
               <div class="signature_div" id="sig{postrow.displayed.U_POST_ID}">{postrow.displayed.SIGNATURE_NEW}</div>
            <!-- END switch_signature -->
         </div>
                        <div class="card-footer text-muted d-flex align-items-center justify-content-between">
                                  <p class="mb-0">{postrow.displayed.POST_DATE_NEW}</p>
                                  <div class="btn-group me-2" role="group" aria-label="First group">
                <a href="{postrow.displayed.QUOTE_URL}" class="btn btn-outline-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Citar"><i class="fas fa-quote-right"></i></a>
                <a href="{postrow.displayed.EDIT_URL}" class="btn btn-outline-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Editar"><i class="fas fa-pen"></i></a>
                <a href="{postrow.displayed.DELETE_URL}" class="btn btn-outline-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Apagar"><i class="fas fa-trash"></i></a>
                <a href="{postrow.displayed.IP_URL}" class="btn btn-outline-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Ver informações"><i class="fas fa-info"></i></a>
              </div>
                             </div>
                    </div>
      </div>
      <!-- BEGIN first_post_br -->
      <hr id="first-post-br" />
      <!-- END first_post_br -->
   <!-- END displayed -->
<!-- END postrow -->

<a name="bottomtitle"></a>

<div class="btn-toolbar justify-content-between my-3">
    <!-- BEGIN switch_isconnect -->
     <div class="btn-group">
   <a href="{U_VIEW_OLDER_TOPIC}" class="btn btn-outline-secondary"><i class="fas fa-angle-left"></i></a>
     </div>
    <!-- END switch_isconnect -->
    <!-- BEGIN switch_isconnect -->
     <div class="btn-group">
   <a href="{U_VIEW_NEWER_TOPIC}" class="btn btn-outline-secondary"><i class="fas fa-angle-right"></i></a>
     </div>
    <!-- END switch_isconnect -->
</div>

<div class="topic-actions bottom">
   <!-- BEGIN topicpagination -->
      <div class="pagination">
         {PAGINATION}
      </div>
   <!-- END topicpagination -->

   <div class="topic-actions-buttons">
      <!-- BEGIN switch_user_authpost -->
         <a href="{U_POST_NEW_TOPIC}" rel="nofollow" title="{T_POST_NEW_TOPIC}" {S_POST_NEW_TOPIC} class="btn btn-primary me-3">{L_POST_NEW_TOPIC}</a>
      <!-- END switch_user_authpost -->
      <!-- BEGIN switch_user_authreply -->
         <a href="{U_POST_REPLY_TOPIC}" title="{T_POST_REPLY_TOPIC}" {S_POST_REPLY_TOPIC} class="btn btn-primary">{L_POST_REPLY_TOPIC}</a>
      <!-- END switch_user_authreply -->
   </div>
</div>

<!-- BEGIN switch_forum_rules -->
<div class="post row1" id="forum_rules">
   <div class="h3">{L_FORUM_RULES}</div>
   <div class="clear"></div>
   <table class="postbody">
      <tr>
         <!-- BEGIN switch_forum_rule_image -->
         <td class="logo">
            <img src="{RULE_IMG_URL}" alt="" />
         </td>
         <!-- END switch_forum_rule_image -->
         <td class="rules content">
            {RULE_MSG}
         </td>
      </tr>
   </table>
</div>
<!-- END switch_forum_rules -->

<!-- BEGIN switch_user_logged_in -->
   <a name="quickreply"></a>
        <div id="resp-rap">{QUICK_REPLY_FORM}</div>
<!-- END switch_user_logged_in -->

<!-- BEGIN show_permissions -->
   <div class="card shadow-sm my-4">
          <div class="card-body">
             <h3 class="card-title fs-2 mb-4"><i class="fas fa-users-cog me-3"></i>{L_TABS_PERMISSIONS}</h3>
      <p class="card-text">{S_AUTH_LIST}</p>
          </div>
   </div>
<!-- END show_permissions -->

<!-- BEGIN switch_image_resize -->
<script type="text/javascript">
//<![CDATA[
$(resize_images({ 'selector' : '.postbody .content', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
//]]>
</script>
<!-- END switch_image_resize -->

<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/github-gist.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/go.min.js"></script>
<script>
$(document).ready(function() {
   $('pre, code').each(function(i, block) {
      hljs.highlightBlock(block);
   });

   $('.post').each(function() {
      if($(this).find('.postprofile-avatar').html() !== undefined) {
         if (!$(this).find('.postprofile-avatar').html().length) {
            $(this).find('.postprofile-rank').css('border-bottom', 'none');
            $(this).find('.postprofile > dl > dt').css('min-height', $(this).find('.post-head').innerHeight());
         }
      }
   });
});
</script>
vcapelli

vcapelli
****

Membro desde : 17/02/2018
Mensagens : 210
Pontos : 417

https://sistema-forum.forumeiros.com/ https://www.facebook.com/capellindao https://twitter.com/vitorcapee

Ir para o topo Ir para baixo

Admineiro
  • 0

Tópico resolvido Re: Botão de mensagens visível a convidados

Mensagem por tikky 29.11.22 1:57

Olá @vcapelli,

É um comportamento normal dos fórum. Uma solução é a seguinte:
Código:
.btn-group a[href=""] {
  display: none !important;
}
Cordialmente,
pedxz.
tikky

tikky
Admineiro
Admineiro

Membro desde : 13/01/2017
Mensagens : 7806
Pontos : 9049

Ir para o topo Ir para baixo

Tópico resolvido Re: Botão de mensagens visível a convidados

Mensagem por vcapelli 04.12.22 15:03

Funcionou muito bem, obrigado Party
vcapelli

vcapelli
****

Membro desde : 17/02/2018
Mensagens : 210
Pontos : 417

https://sistema-forum.forumeiros.com/ https://www.facebook.com/capellindao https://twitter.com/vitorcapee

Ir para o topo Ir para baixo

Admineiro

Tópico resolvido Re: Botão de mensagens visível a convidados

Mensagem por tikky 05.12.22 10:22

Tópico resolvido


Movido para "Questões resolvidas".
tikky

tikky
Admineiro
Admineiro

Membro desde : 13/01/2017
Mensagens : 7806
Pontos : 9049

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