Tuesday, May 17, 2016

thêm comment google plus cho blogpsot


Nếu bạn dùng template blogspot mặc định thì khi vào phần nhận xết bật cái mũi tên màu xanh như hình dưới này thì nó sẽ tự động có
tim xem có 2 đoạn này trong blogspot chưa nếu chưa có thì thêm vào

chọn id là Blog1
nếu chưa có thì thêm 2 đoạn trước đoạn này trước thẻ đóng </ b: widget>
đoạn 1
đoạn 1<b:includable id='iframe_comments' var='post'>
<b:if cond='data:post.allowIframeComments'>
<script expr:src='data:post.iframeCommentSrc' type='text/javascript'/>
<div class='cmt_iframe_holder' expr:data-href='data:post.canonicalUrl' expr:data-viewtype='data:post.viewType'/>

<b:if cond='data:post.embedCommentForm == &quot;false&quot;'>
<a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:postCommentMsg/></a>
</b:if>
</b:if>
</b:includable>


đoạn 2
đoạn 2<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.showThrdedComments'>
<b:include data='post' name='thrded_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.showThrdedComments'>
<b:include data='post' name='thrded_comments'/>
<b:else/>
<b:include data='post' name='comments'/>
</b:if>
</b:if>
</b:if>
</b:includable>


Giờ đến phần hiển thị
Tìm đoạn mã sau:<b:includable id='main' var='top'>
Hay nằm sau 1 trong 2 mã này
<b:include data='post' name='post'/>
thay 1 băng 2

đoạn 1<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<b:if cond='data:post.showThrdedComments'>
<b:include data='post' name='thrded_comments'/>
<b:else/>
<b:include data='post' name='comments'/>
</b:if>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:if cond='data:post.showThrdedComments'>
<b:include data='post' name='thrded_comments'/>
<b:else/>
<b:include data='post' name='comments'/>
</b:if>
</b:if>
Hoặc có thể là
đoạn 1-1<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<b:include data='post' name='comments'/>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:include data='post' name='comments'/>

Thay bằng đoạn sau

đoạn 2<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<b:include data='post' name='comment_picker'/>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:include data='post' name='comment_picker'/>
</b:if>

No comments:

Post a Comment