Afficher la boîte de dialogue pour le commentaire à la fin de chaque message (articles)





Vous avez toujours voulu voir une boîte de commentaire s’afficher à la fin de chacun de vos articles (messages) sur blogger, c’est maintenant possible. Cette petite trouvaille est à mettre au crédit de Jackbook et de Loui$$ de chez qui je tire ce hack que j’ai essayé sur Le blog la joie chez michaël sankinka et sur celui-ci (vous pouvez le voirau bas de la page )et ça a marché.

Voici ce qu’il faut faire pour l’avoir sur votre blog blogger :


1. Allez sur modèle puis sur " Modifier le code HTML "

2. Sélectionnez " développer des modèles de gadgets ".

Trouvez le code ci dessous

</head>

Copiez tout le code suivant, et collez-le juste après le code </head>


<!-- www.jackbook.com -->
<!-- this to hide and show el -->
<script languange='javascript'>function showcomment(a,b){var jackbookdotcom = document.getElementById(a);jackbookdotcom.style.display = 'none';jackbookdotcom = document.getElementById(b);jackbookdotcom.style.display = 'block';}</script>
<!-- www.jackbook.com -->


3. Trouvez le code html suivant:

<b:includable id='comments' var='post'>
<div class='comments' id='comments'>
<a name='comments'/>
<b:if cond='data:post.allowComments'>
<h4>
<b:if cond='data:post.numComments == 1'>
1 <data:commentLabel/>:
<b:else/>
<data:post.numComments/> <data:commentLabelPlural/>:
</b:if>
</h4>

<dl id='comments-block'>
<b:loop values='data:post.comments' var='comment'>
<dt class='comment-author' expr:id='"comment-" + data:comment.id'>
<a expr:name='"comment-" + data:comment.id'/>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
<data:commentPostedByMsg/>
</dt>
<dd class='comment-body'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>
<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='"#comment-" + data:comment.id' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
</b:loop>
</dl>

<p class='comment-footer'>
<a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:postCommentMsg/></a>
</p>
</b:if>

<div id='backlinks-container'>
<div expr:id='data:widget.instanceId + "_backlinks-container"'>
<b:if cond='data:post.showBacklinks'>
<b:include data='post' name='backlinks'/>
</b:if>
</div>
</div>
</div>
</b:includable>




4. Remplacez tout le code ci-haut (en rouge) par le code suivant (en bleu) :

<b:includable id='comments' var='post'>
<div class='comments' id='comments'>
<a name='comments'/>
<b:if cond='data:post.allowComments'>

<!-- jackbook.com part 1 start -->
<!--
<h4>
<b:if cond='data:post.numComments == 1'>
1 <data:commentLabel/>:
<b:else/>
<data:post.numComments/> <data:commentLabelPlural/>:
</b:if>
</h4>

<dl id='comments-block'>
<b:loop values='data:post.comments' var='comment'>
<dt class='comment-author' expr:id='"comment-" + data:comment.id'>
<a expr:name='"comment-" + data:comment.id'/>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
<data:commentPostedByMsg/>
</dt>
<dd class='comment-body'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>
<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='"#comment-" + data:comment.id' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
</b:loop>
</dl>

<p class='comment-footer'>
<a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:postCommentMsg/></a>
</p>
-->
<!-- jackbook.com part 1 ends -->
<!-- actually i almost do nothing with your template, just add that comment, you did it :) -->

<div id='comment-parent' onmouseover='showcomment("hoverme", "comment-child");'>
<h3 id='hoverme' style='display:block;'>
<img alt='Your cOmment"s Here! Hover Your cUrsOr to leave a cOmment.' src='http://lifewg.googlepages.com/html-code-leave-comment.gif' title='Your cOmment"s Here! Hover Your cUrsOr to leave a cOmment.'/>
</h3>

<!-- this iframe below is your comment form. you can change the height, or add more style property into it -->
<div id='comment-child' style='display:none; background: #edf5fa; height:400px; border: 1px solid #FCO; height: 700px;'>
<iframe expr:src='data:post.addCommentUrl' height='100%' scrolling='yes' width='100%'/>
</div>
<!-- end of iframe -->
</div>
</b:if>
<div id='backlinks-container'>
<div expr:id='data:widget.instanceId + "_backlinks-container"'>
<b:if cond='data:post.showBacklinks'>
<b:include data='post' name='backlinks'/>
</b:if>
</div>
</div>
</div>
</b:includable>


5. Cliquez sur sauvegarder le modèle.


6. Dites merci à Jack, à Loui$ et bien sûr à Moi (Rodney)

Si cet article vous a plus, vous pouvez souscrire à mon feed rss ou à ma newsletter pour rester à jour ou encore rejoindre ma communauté sur Mybloglog et celle sur Blogcatolog. N'oubliez pas d'ajouter ce blog à vos favoris sur Technorati.

Et n'oubliez pas de donner un point de plus à cet article en cliquant sur le petit bouton rouge .

Commentaires

  1. Excuse moi, j'ai essayé 4 fois, mais cela ne fonctionne pas, il y a des problèmes xms semble-t-il

    RépondreSupprimer
  2. Bonjour Rodney, c'est encore moi, j'ai trouvé ce qui n'allait pas. Le texte de l'étape 2 doit être mis sous head et non au dessus. Louis$$ dit bien below.
    Bien amicalement

    RépondreSupprimer
  3. merci pour la correction, yves collignon

    RépondreSupprimer
  4. Magnifique travail, et un bon effort, je vous remercie pour votre sujet :)
    Dans le même cadre, je voudrais vous proposer ce merveilleux programme où vous pouvez obtenir des milliers de visiteurs sans le moindre effort:
    Une explication complète du programme des visiteurs et l'inscription des membres et des listes de diffusion: Rusers

    bon chance :)

    RépondreSupprimer
    Réponses
    1. le lien: http://www.drupalstudy.com/2013/07/une-explication-complete-du-programme.html

      Supprimer