看板 Blog 關於我們 聯絡資訊
有板友來信回報 他的網誌留言下面雖然有出現回覆的按鈕,但是點了會沒反應 研判可能是缺少了關鍵的JavaScript 一樣是展開小裝置範本→找到下面這段: <b:includable id='shareButtons' var='post'> (中間省略五百字) </b:includable> 這裡 <b:includable id='backlinks' var='post'> (中間略過不貼) </b:includable> 檢查看看黃色標示處或附近有無下語法,沒有的話複製貼上或許就可以了 <b:includable id='threaded_comment_js' var='post'> <script defer='defer' expr:src='data:post.commentSrc' type='text/javascript'/> <script type='text/javascript'> (function() { var items = <data:post.commentJso/>; var msgs = <data:post.commentMsgs/>; var postId = &#39;<data:post.id/>&#39;; var feed = &#39;<data:post.commentFeed/>&#39;; var authorName = &#39;<data:post.author/>&#39;; var authorUrl = &#39;<data:post.authorUrl/>&#39;; var blogId = &#39;<data:top.id/>&#39;; var baseUri = &#39;<data:post.commentBase/>&#39;; // <![CDATA[ feed += '?alt=json&v=2&orderby=published&reverse=false&max-results=50'; var cursor = null; if (items && items.length > 0) { cursor = parseInt(items[items.length - 1].timestamp) + 1; } var bodyFromEntry = function(entry) { if (entry.gd$extendedProperty) { for (var k in entry.gd$extendedProperty) { if (entry.gd$extendedProperty[k].name == 'blogger.contentRemoved') { return '<span class="deleted-comment">' + entry.content.$t + '</span>'; } } } return entry.content.$t; } var parse = function(data) { cursor = null; var comments = []; if (data && data.feed && data.feed.entry) { for (var i = 0, entry; entry = data.feed.entry[i]; i++) { var comment = {}; // comment ID, parsed out of the original id format var id = /blog-(\d+).post-(\d+)/.exec(entry.id.$t); comment.id = id ? id[2] : null; comment.body = bodyFromEntry(entry); comment.timestamp = Date.parse(entry.published.$t) + ''; if (entry.author && entry.author.constructor === Array) { var auth = entry.author[0]; if (auth) { comment.author = { name: (auth.name ? auth.name.$t : undefined), profileUrl: (auth.uri ? auth.uri.$t : undefined), avatarUrl: (auth.gd$image ? auth.gd$image.src : undefined) }; } } if (entry.link) { if (entry.link[2]) { comment.link = comment.permalink = entry.link[2].href; } if (entry.link[3]) { var pid = /.*comments\/default\/(\d+)\?.*/.exec(entry.link[3].href); if (pid && pid[1]) { comment.parentId = pid[1]; } } } comment.deleteclass = 'item-control blog-admin'; if (entry.gd$extendedProperty) { for (var k in entry.gd$extendedProperty) { console.log(entry.gd$extendedProperty[k].name + ' - ' + entry.gd$extendedProperty[k].value); if (entry.gd$extendedProperty[k].name == 'blogger.itemClass') { comment.deleteclass += ' ' + entry.gd$extendedProperty[k].value; } } } comments.push(comment); } } return comments; }; var paginator = function(callback) { if (hasMore()) { var url = feed; if (cursor) { url += '&published-min=' + new Date(cursor).toISOString(); } window.bloggercomments = function(data) { var parsed = parse(data); cursor = parsed.length < 50 ? null : parseInt(parsed[parsed.length - 1].timestamp) + 1 callback(parsed); window.bloggercomments = null; } url += '&callback=bloggercomments'; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = url; document.getElementsByTagName('head')[0].appendChild(script); } }; var hasMore = function() { return !!cursor; }; var getMeta = function(key, comment) { if ('iswriter' == key) { var matches = !!comment.author && comment.author.name == authorName && comment.author.profileUrl == authorUrl; return matches ? 'true' : ''; } else if ('deletelink' == key) { return baseUri + '/delete-comment.g?blogID=' + blogId + '&postID=' + comment.id; } else if ('deleteclass' == key) { return comment.deleteclass; } return ''; }; var replybox = null; var replyUrlParts = null; var replyParent = undefined; var onReply = function(commentId, domId) { if (replybox == null) { // lazily cache replybox, and adjust to suit this style: replybox = document.getElementById('comment-editor'); if (replybox != null) { replybox.height = '250px'; replybox.style.display = 'block'; replyUrlParts = replybox.src.split('#'); } } if (replybox && (commentId !== replyParent)) { document.getElementById(domId).insertBefore(replybox, null); replybox.src = replyUrlParts[0] + (commentId ? '&parentID=' + commentId : '') + '#' + replyUrlParts[1]; replyParent = commentId; } }; var tok = 'comment-form_'; var hash = window.location.hash || ''; var startThread = hash.indexOf(tok) == 1 ? hash.substring(tok.length + 1) : undefined; // Configure commenting API: var configJso = { 'maxDepth': 2 }; var provider = { 'id': postId, 'data': items, 'loadNext': paginator, 'hasMore': hasMore, 'getMeta': getMeta, 'onReply': onReply, 'rendered': true, 'initReplyThread': startThread, 'config': configJso, 'messages': msgs }; var render = function() { if (window.goog && window.goog.comments) { var holder = document.getElementById('comment-holder'); window.goog.comments.render(holder, provider); } }; // render now, or queue to render when library loads: if (window.goog && window.goog.comments) { render(); } else { window.goog = window.goog || {}; window.goog.comments = window.goog.comments || {}; window.goog.comments.loadQueue = window.goog.comments.loadQueue || []; window.goog.comments.loadQueue.push(render); } })(); // ]]> </script> </b:includable> ※ 引述《b0339576 (<( ̄︶ ̄)>)》之銘言: : 簡略翻譯騙騙P幣~~原文在此:http://goo.gl/aj66L : 1. Settings(設定) → Other(其他) → 將允許網誌資訊提供的選項改成Full(完整) : 2. Settings(設定) → Posts and Comments(文章和留言) :  → 將留言位置設定成Embedded(嵌入) : 基本上一般人的網誌應該都是這樣的設定 : 如果沒有動過範本的話就可以直接開始使用了 : 有動過範本才需要進行下面的步驟: : (記得先備份範本以防萬一~~) : 3. 修改範本範本→將展開小裝置範本打勾→找到下面這段語法: :  <b:includable id='main' var='top'> : (中間略) : <b:include data='post' name='post'/> : <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'/> : </b:if> : 4. 用下面的語法取代上面黃色標示的部分 :   <b:if cond='data:blog.pageType == &quot;static_page&quot;'> : <b:if cond='data:post.showThreadedComments'> : <b:include data='post' name='threaded_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.showThreadedComments'> : <b:include data='post' name='threaded_comments'/> : <b:else/> : <b:include data='post' name='comments'/> : </b:if> : </b:if> : 存檔收工。 : ※ 引述《Nekki1409 (我只是代PO而已)》之銘言: : : Blogger推出新的串連式留言了 : : 可以針對某個留言者的留言底下回覆 : : 其實這還算蠻常見的功能 : : Blogger總算是做出來了 : : 官網教學: : : http://buzz.blogger.com/2012/01/engage-with-your-readers-through.html : : 官方中文介紹 : : http://support.google.com/blogger/bin/answer.py?hl=zh-Hant&answer=1725597 : : 修改很簡單,但是第三方模板還是改不出來XD : : 像我就是,只好等高手寫出簡單的語法修改了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.27.158.233
b0339576:如果還是不行 樓上網址提供的方法也可以試試看 01/16 15:33