Wie kann ich sowohl Disqus- als auch Google+ Kommentare in Blogger verwenden?


7

Ich habe einen Blog mit Blogger. Ich habe Disqus schon einmal benutzt und es gibt viele Kommentare dazu. Jetzt möchte ich jedoch Google+ Kommentare in Blogger verwenden, da ich häufig Google+ verwende. Ich kann jedoch keine Lösung finden, um beide gleichzeitig in Blogger zu verwenden.

Ich habe andere Lösungen gefunden, um sowohl Blogger-Standardkommentare als auch Google+ Kommentare zu verwenden, jedoch nicht Disqus. Wie kann ich das machen?


Sprechen Sie über Ihr eigenes Blogger-Blog oder verwenden Sie Ihr Disqus / Google + -Konto in Blogs anderer Personen?
Vidar S. Ramdal

@ VidarS.Ramdal Ich spreche von meinem eigenen Blogger.
Einverne

Antworten:


1

Installieren Sie Disqus wie gewohnt in Blogger:

  1. Melden Sie sich bei Disqus an
  2. Fügen Sie Disqus zu Ihrer Site hinzu
  3. Registrieren Sie die Site und fügen Sie den bereitgestellten Widget-Code zu Ihrer Blogger-Site hinzu.

Fügen Sie dann Google+ Kommentare zu Blogger hinzu, indem Sie zwei mehrzeilige Abschnitte der HTML-Vorlage bearbeiten:

  1. Blogger ➜ Dashboard ➜ Vorlage ➜ HTML-Editor
  2. Ersetzen Sie den Codeblock von

      <b:includable id='comment_picker' var='post'>...</b:includable>
    

    mit

        <b:includable id='comment_picker' var='post'>
      <b:if cond='data:post.forceIframeComments'>
        <b:include data='post' name='iframe_comments'/>
        <b:if cond='data:post.showThreadedComments'>
          <b:include data='post' name='threaded_comments'/>
        <b:else/>
          <b:include data='post' name='comments'/>
        </b:if>
      <b:else/>
        <b:if cond='data:post.commentSource == 1'>
          <b:include data='post' name='iframe_comments'/>
        <b:else/>
          <b:if cond='data:post.showThreadedComments'>
            <b:include data='post' name='threaded_comments'/>
          <b:else/>
            <b:include data='post' name='threaded_comments'/>
          </b:if>
        </b:if>
      </b:if>
    </b:includable>
    
  3. Ersetzen Sie den Codeblock von

      <b:includable id='threaded_comments' var='post'>...</b:includable>
    

    mit

    <b:includable id='threaded_comments' var='post'>
    <div id='comment-header'>
      <img class='comment-on' id='comments-norm' src='http://3.bp.blogspot.com/-S3w45s75Yio/Uoe5OPXkFjI/AAAAAAAADcA/vmtzeVI2wFg/s50/disqus-social-icon-blue-transparent.png' title='view Blogger comments'/>
      <div class='choice'>Comment With Your Choice</div>
    <image id='comments-gplus' src='http://lh6.googleusercontent.com/-wnTb7SHAGEE/UXVi6xoHXAI/AAAAAAAAILY/6vx5Em5w8MI/s50/plus_off.png' title='view Google+ comments'/>
    </div>
    <div id='comment-zone'>
      <div class='comments' id='comments'>
        <a name='comments'/>
        <h4><data:post.commentLabelFull/>:</h4>
    
        <div class='comments-content'>
          <b:if cond='data:post.embedCommentForm'>
            <b:include data='post' name='threaded_comment_js'/>
          </b:if>
          <div id='comment-holder'>
             <data:post.commentHtml/>
          </div>
        </div>
    
        <p class='comment-footer'>
          <b:if cond='data:post.allowNewComments'>
            <b:include data='post' name='threaded-comment-form'/>
          <b:else/>
            <data:post.noNewCommentsText/>
          </b:if>
        </p>
    
        <b:if cond='data:showCmtPopup'>
          <div id='comment-popup'>
            <iframe allowtransparency='true' frameborder='0' id='comment-actions' name='comment-actions' scrolling='no'>
            </iframe>
          </div>
        </b:if>
    
        <div id='backlinks-container'>
        <div expr:id='data:widget.instanceId + &quot;_backlinks-container&quot;'>
           <b:if cond='data:post.showBacklinks'>
             <b:include data='post' name='backlinks'/>
           </b:if>
        </div>
        </div>
      </div>
      <div id='gcontainer'><div id='gcomments'/></div>
    <script src='http://apis.google.com/js/plusone.js'/>
    <script>
    gapi.comments.render('gcomments', {
        href: window.location,
        width: '750',
        first_party_property: 'BLOGGER',
        view_type: 'FILTERED_POSTMOD'
    });
    $('#comments-norm').click(function(){
     // switch to normal comments displaying
     $('#gcontainer').css('display','none');
     $('#comments').css('display','block');
     $('#comments-norm').addClass('comment-on');
     $('#comments-gplus').removeClass('comment-on');
     $('#comments-norm').attr('src','http://3.bp.blogspot.com/-S3w45s75Yio/Uoe5OPXkFjI/AAAAAAAADcA/vmtzeVI2wFg/s50/disqus-social-icon-blue-transparent.png');
     $('#comments-gplus').attr('src','http://lh6.googleusercontent.com/-wnTb7SHAGEE/UXVi6xoHXAI/AAAAAAAAILY/6vx5Em5w8MI/s50/plus_off.png');
    });
    $('#comments-gplus').click(function(){
     // switch to google plus comments displaying
     $('#comments').css('display','none');
     $('#gcontainer').css('display','block');
     $('#comments-norm').removeClass('comment-on');
     $('#comments-gplus').addClass('comment-on');
     $('#comments-norm').attr('src','http://2.bp.blogspot.com/-31izM0JEWCs/Uoe6Uf7eqoI/AAAAAAAADcI/AC8mXw1gUcg/s50/disqus-social-icon-dark-transparent.png');
     $('#comments-gplus').attr('src','http://lh3.googleusercontent.com/-oNlD347wl3k/UXVi7AiBdHI/AAAAAAAAILc/NxAyb8fwEfI/s50/plus_on.png');
    });
    $('#comments-norm').hover(
     // switch to normal comments displaying
     function(){
      if (!$('#comments-norm').hasClass('comment-on')){ $('#comments-norm').attr('src','http://3.bp.blogspot.com/-S3w45s75Yio/Uoe5OPXkFjI/AAAAAAAADcA/vmtzeVI2wFg/s50/disqus-social-icon-blue-transparent.png');} 
     },  function(){
      if (!$('#comments-norm').hasClass('comment-on')){ $('#comments-norm').attr('src','http://2.bp.blogspot.com/-31izM0JEWCs/Uoe6Uf7eqoI/AAAAAAAADcI/AC8mXw1gUcg/s50/disqus-social-icon-dark-transparent.png');} 
     }
    );
    $('#comments-gplus').hover(
     // switch to gplus comments displaying
     function(){
      if (!$('#comments-gplus').hasClass('comment-on')){ $('#comments-gplus').attr('src','http://lh3.googleusercontent.com/-oNlD347wl3k/UXVi7AiBdHI/AAAAAAAAILc/NxAyb8fwEfI/s50/plus_on.png');} 
     },  function(){
      if (!$('#comments-gplus').hasClass('comment-on')){ $('#comments-gplus').attr('src','http://lh6.googleusercontent.com/-wnTb7SHAGEE/UXVi6xoHXAI/AAAAAAAAILY/6vx5Em5w8MI/s50/plus_off.png');} 
     }
    
    
    );</script>
    </div>
    </b:includable>
    
  4. Vorlage speichern.
Durch die Nutzung unserer Website bestätigen Sie, dass Sie unsere Cookie-Richtlinie und Datenschutzrichtlinie gelesen und verstanden haben.
Licensed under cc by-sa 3.0 with attribution required.