Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible)

3 participants

Voir le sujet précédent Voir le sujet suivant Aller en bas

Résolu Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible)

Message par Trw Ven 24 Juin 2022 - 4:02

Détails techniques


Version du forum : phpBB2
Poste occupé : Fondateur
Navigateur(s) concerné(s) : Google Chrome
Personnes concernées par le problème : Tous les utilisateurs
Lien du forum : https://nigrum-times.forumactif.com/

Description du problème

Alors, pour commencer, Bonjour ou Bonsoir Smile

J'ai mis en place il y a peu des Icones de Messages pour notre Forum Rpg afin de mettre des TW dans les Sujets, ce qui permettrais aux membres de savoir si un sujet va contenir des sujets sensibles.

Aussi, je voulais savoir s'il était possible de mettre les icones de Messages comme vous avez sur Ce Forum avec le titre du sujet juste la:
Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible) ZjehquV

J'aurais aimer également savoir s'il était possible de mettre au titre du sujet la description du sujet?

Exemple: Le Ben Barnes étant la description/sous-titre
Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible) UGHwZFI

Pouvoir le mettre ainsi en dessous du titre du sujet, dans la même case?
Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible) EDojwpm

Je peux ainsi vous laisser le codage de notre template viewtopic_body:

Code:
<script type="text/javascript">
//<![CDATA[
var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}', _atr = '{JS_DIR}addthis/', _ati = '{PATH_IMG_FA}addthis/'{ADDTHIS_LANG}, addthis_localize = { share_caption: "{L_SHARE_CAPTION}", email: "{L_EMAIL}", email_caption: "{L_EMAIL_CAPTION}", favorites: "{L_SHARE_BOOKMARKS}", print: "{L_PRINT}", more: "{L_MORE}" };
$(function(){
    if(typeof(_atc) == "undefined") {
        _atc = {  };
    }
});

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>
<a name="{postrow.displayed.U_POST_ID}" style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></a>

<div class="mp_nouveau_rep">
  <!-- BEGIN switch_user_authpost -->
 <a href="{U_POST_NEW_TOPIC}" rel="nofollow" style="text-transform: uppercase;font-size:15px; padding:10px; margin:5px; color: #9d9d9d;">Nouveau
               
  </a>
 <!-- END switch_user_authpost -->
 <!-- BEGIN switch_user_authreply -->
 <a href="{U_POST_REPLY_TOPIC}" style="text-transform: uppercase;font-size:15px; padding:10px; margin:5px; color: #9d9d9d;">Répondre
  </a>
 <!-- END switch_user_authreply -->
</div>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
  <tr>
      <td class="nav" valign="middle" width="100%">
        <span class="nav">
                <a class="nav" href="{U_INDEX}"><span>{L_INDEX}</span></a>
                <!--{NAV_SEP}<a class="nav" href="{U_ALBUM}"><span>{L_ALBUM}</span></a>-->
                {NAV_CAT_DESC_SECOND}
            </span>
      </td>     
  </tr>
</table>

<table class="message_profil" width="100%" border="0" cellspacing="1" cellpadding="0" >
 <tr>
 <td colspan="2">
 <div class="mp_titre">
                        {TOPIC_TITLE}
                  </div>
 </td>
 </tr>
 <!-- BEGIN topicpagination -->
  <div class="mp_pagination">
                  {PAGINATION}
  </div>
 <!-- END topicpagination -->
 {POLL_DISPLAY}
 <!-- BEGIN postrow -->
  <!-- BEGIN hidden -->
  <tr>
      <td class="postdetails {postrow.hidden.ROW_CLASS}" colspan="3" align="center">{postrow.hidden.MESSAGE}</td>
  </tr>
  <!-- END hidden -->
  <!-- BEGIN displayed -->
  <tr class="post post--{postrow.displayed.U_POST_ID}" id="p{postrow.displayed.U_POST_ID}" style="{postrow.displayed.DISPLAYABLE_STATE}">
      <td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="150">
                  <div class="fondprofil"><a name="{postrow.displayed.U_POST_ID}" id="{postrow.displayed.U_POST_ID}"><div class="name"> {postrow.displayed.POSTER_NAME} </div></a>
                                      <center><div id="beckyy"> <div class="avatar_membre">{postrow.displayed.POSTER_AVATAR}</div>
                                        <div {postrow.displayed.AWARDS_SHOW} class="dd_award {postrow.displayed.PROFILE_POSITION}">{postrow.displayed.AWARDS}</div>
 <div class="award_more"></div>
 <br>
            <!-- BEGIN contact_field --> {postrow.displayed.contact_field.CONTENT}<!-- END contact_field --></div></div>
                                  </center>
                 
                      <center><div class="rang1">{postrow.displayed.POSTER_RANK}</div></center>
                      <div class="profil2"><div class="content" style="height:300px;"><!-- BEGIN profile_field -->
                                    <span class="postdetails poster-profile" style="display:flex; flex-direction:column"><span class="ChampsProfil"> {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}</span>
                                  <!-- END profile_field -->
                                      {postrow.displayed.POSTER_RPG}</span></div></div>
                    <center><div id="online">{postrow.displayed.ONLINE_IMG}</div></center>
                  </div>         

      </td>
      <td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="100%" height="28" colspan="2">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><span class="postdetails"><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}" title="{postrow.displayed.L_MINI_POST_ALT}" border="0" /> ( <a class="linkhoover" href="#{postrow.displayed.U_POST_ID}" style= "font-size: 12px;"> ◭ </a>)  {L_POST_SUBJECT}: {postrow.displayed.POST_SUBJECT} &nbsp; &nbsp;<img src="{postrow.displayed.MINI_TIME_IMG}" alt="" border="0" />{postrow.displayed.POST_DATE}
                <br /> <br />                                    
                                    {postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG}
                <br />
                </td>
            </tr>
            <tr>
               
 <tr>
 <td colspan="2">
 <!-- BEGIN switch_vote_active -->
 <div class="vote gensmall">
 <!-- BEGIN switch_vote -->
 <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}">+</a></div>
 <!-- END switch_vote -->

 <!-- BEGIN switch_bar -->
 <div class="vote-bar" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}">
 <!-- BEGIN switch_vote_plus -->
 <div class="vote-bar-plus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_plus.HEIGHT_PLUS}px;"></div>
 <!-- END switch_vote_plus -->

 <!-- BEGIN switch_vote_minus -->
 <div class="vote-bar-minus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_minus.HEIGHT_MINUS}px;"></div>
 <!-- END switch_vote_minus -->
 </div>
 <!-- END switch_bar -->

 <!-- BEGIN switch_no_bar -->
 <div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar">----</div>
 <!-- END switch_no_bar -->

 <!-- BEGIN switch_vote -->
 <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}">-</a></div>
 <!-- END switch_vote -->
 </div>
 <!-- END switch_vote_active -->
<br />
 <div class="postbody">

 <div>{postrow.displayed.MESSAGE}</div>

 <!-- BEGIN switch_attachments -->
 <dl class="attachbox">
 <dt>{postrow.displayed.switch_attachments.L_ATTACHMENTS}</dt>
 <dd>
 <!-- BEGIN switch_post_attachments -->
 <dl class="file">
 <dt>
 <img src="{postrow.displayed.switch_attachments.switch_post_attachments.U_IMG}" alt="" />

 <!-- BEGIN switch_dl_att -->
 <a class="postlink" href="{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.U_ATTACHMENT}">{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT}</a> {postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT_DEL}
 <!-- END switch_dl_att -->

 <!-- BEGIN switch_no_dl_att -->
 {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT} {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT_DEL}
 <!-- END switch_no_dl_att -->
 </dt>

 <!-- BEGIN switch_no_comment -->
 <dd>
 <em>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_comment.ATTACHMENT_COMMENT}</em>
 </dd>
 <!-- END switch_no_comment -->

 <!-- BEGIN switch_no_dl_att -->
 <dd>
 <em><strong>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.TEXT_NO_DL}</strong></em>
 </dd>
 <!-- END switch_no_dl_att -->

 <dd>({postrow.displayed.switch_attachments.switch_post_attachments.FILE_SIZE}) {postrow.displayed.switch_attachments.switch_post_attachments.NB_DL}</dd>
 </dl>
 <!-- END switch_post_attachments -->
 </dd>
 </dl>
 <!-- END switch_attachments -->

 <div class="clear"></div>
 <!-- BEGIN switch_signature -->
 <div class="signature_div">
 {postrow.displayed.SIGNATURE}
 </div>
 <!-- END switch_signature --> <br />

 </div>
  <span class="gensmall" style="display:none">{postrow.displayed.EDITED_MESSAGE}</span>
 </td>
 </tr>
 </table>
 </td>
 </tr>
 <!-- BEGIN first_post_br -->
</table>
<hr />
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
 <!-- END first_post_br -->
 <!-- END displayed -->
 <!-- END postrow -->
 <!-- BEGIN no_post -->
 <tr align="center">
 <td class="row1" colspan="2" height="28">
 <span class="genmed">{no_post.L_NO_POST}</span>
 </td>
 </tr>
 <!-- END no_post -->
</table>

<div class="mp_pagination_surveiller">
  <div class="mp_surveiller">
          <!-- BEGIN switch_user_logged_in -->
 <!-- BEGIN watchtopic -->
          {S_WATCH_TOPIC}
 <!-- END watchtopic -->
 <!-- END switch_user_logged_in -->
  </div>    </br>
 <table width="100%" border="0" cellspacing="2" cellpadding="0">
  <tr>
      <td class="nav" valign="middle" width="100%">
        <span class="nav">
                <a class="nav" href="{U_INDEX}"><span>{L_INDEX}</span></a>
   
                <!--{NAV_SEP}<a class="nav" href="{U_ALBUM}"><span>{L_ALBUM}</span></a>-->
                {NAV_CAT_DESC_SECOND}
            </span>
      </td>     
  </tr>
</table>
 <!-- BEGIN topicpagination -->
  <div class="mp_pagination">
                  {PAGINATION}
  </div>
 <!-- END topicpagination -->
</div>

<!-- BEGIN promot_trafic -->
<!-- END promot_trafic -->

<!-- BEGIN switch_forum_rules -->
<!-- END switch_forum_rules -->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr>
 <td class="row2" colspan="2" align="center" style="padding:0px">
 <!-- BEGIN switch_user_logged_in -->
 <a name="quickreply"></a>
 {QUICK_REPLY_FORM}<br />
 <!-- END switch_user_logged_in -->
 </td>
 </tr>
 <tr>
 <td colspan="2">
                  <div class="mp_moderer_nouveau">
                              <div class="mp_nouveau">
                                  <!-- BEGIN switch_user_authpost -->
 <a href="{U_POST_NEW_TOPIC}" rel="nofollow" style="text-transform: uppercase;font-size:15px; padding:10px; margin:5px; color: #9d9d9d;">Nouveau
  </a>
 <!-- END switch_user_authpost -->
 
                                  <!-- BEGIN switch_user_authreply -->
 <a href="{U_POST_REPLY_TOPIC}" style="text-transform: uppercase;font-size:15px; padding:10px; margin:5px; color: #9d9d9d;">Répondre
  </a>
 <!-- END switch_user_authreply -->
                              </div>
                       
                          <div class="mp_moderer">
                                  <!-- BEGIN show_permissions -->
 {S_AUTH_LIST}
 <!-- END show_permissions -->
                          </div>
                  </div>
 </td>
 </tr>
 
</table>

<div class="mp_outils">
 <!-- BEGIN viewtopic_bottom -->
  {S_TOPIC_ADMIN}
 <!-- END viewtopic_bottom -->
</div>

<!-- BEGIN viewtopic_bottom -->
<!-- END viewtopic_bottom -->

<!-- BEGIN switch_image_resize -->
<script type="text/javascript">
//<![CDATA[
$(resize_images({ 'selector' : '.postbody', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
//]]>
</script>
       
     
<!-- END switch_image_resize -->
        <dl.length;i++){
  dl[i].hasChildNodes()&&dl[i].firstChild.nodeType===Node.TEXT_NODE&&dl[i].removeChild(dl[i].firstChild);
}
}catch(e){}
});
     
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=forumotion" type="text/javascript"></script>

Merci à vous si vous vous penchez sur le sujet vous nous aideriez à améliorer l'esthétique de notre petit bébé!
Trw

Trw
**

Autre / Ne pas divulguer
Messages : 73
Inscrit(e) le : 17/04/2020

https://nigrum-times.forumactif.com/
Trw a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible)

Message par Kaehlyth Ven 24 Juin 2022 - 9:33

Bonjour, si je ne m'abuse et ne me trompe guère dans votre demande , vous devez aller dans :

Panneau d'administration > affichage > gestion des images > icône de message.

C'est ici que vous pourrez choisir de rajouter une icône de message pour prévenir de scènes choquantes ou d'annonce ou autre.

Vous devez ensuite aller dans le sujet que vous avez créé, et vous pourrez changer l'icône de message qui apparaîtra. thumleft
Kaehlyth

Kaehlyth
***

Messages : 165
Inscrit(e) le : 27/04/2022

https://albastrya.bbactif.com/
Kaehlyth a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible)

Message par Trw Ven 24 Juin 2022 - 13:42

Hello Smile

J'ai déjà rajouter des icônes et elles n'apparaissent que dans la liste des sujets Very Happy
Trw

Trw
**

Autre / Ne pas divulguer
Messages : 73
Inscrit(e) le : 17/04/2020

https://nigrum-times.forumactif.com/
Trw a été remercié(e) par l'auteur de ce sujet.
  • 0

Résolu Re: Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible)

Message par Toryudo Dim 26 Juin 2022 - 12:51

Bonjour !
Je viens de voir que la variable n'est pas utilisée par défaut dans les template phpBB2, c'est pour ça que l’icône n'apparait pas dans le sujet.
Vous pouvez placer {postrow.displayed.ICON} où vous voulez dans votre Template viewtopic_body pour afficher l’icône qui aura été choisie !

Par contre, la description, je ne la vois jamais apparaitre dans un sujet, quelle que soit la version choisie...
Je suppose que si vous la voulez vraiment, il va falloir passer par une suggestion ici : https://forum.forumactif.com/f55-suggestions-ameliorations
Toryudo

Toryudo
Aidactif
Aidactif

Masculin
Messages : 1372
Inscrit(e) le : 31/03/2020

https://deus-academia.forumactif.com/
Toryudo a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible)

Message par Kaehlyth Dim 26 Juin 2022 - 15:13

Après vérification, en effet dans mon template j'ai le {postrow.displayed.ICON} apparant qui a été replacé.
La description, elle, je ne la vois pas MAIS on la voit en passant la souris sur le lien en question.

C'est ainsi que je vois les descriptions thumleft
Kaehlyth

Kaehlyth
***

Messages : 165
Inscrit(e) le : 27/04/2022

https://albastrya.bbactif.com/
Kaehlyth a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mettre l'icone de message dans le titre du sujet (+la description du sujet si possible)

Message par Trw Dim 26 Juin 2022 - 20:27

Hello!
Merci beaucoup! Du coup je peux passer en Résolu!

Pour la description j'ai bien l'impression qu'il faudrait passer en Suggestion...
Trw

Trw
**

Autre / Ne pas divulguer
Messages : 73
Inscrit(e) le : 17/04/2020

https://nigrum-times.forumactif.com/
Trw a été remercié(e) par l'auteur de ce sujet.

Voir le sujet précédent Voir le sujet suivant Revenir en haut

- Sujets similaires

Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum