お蔵入り
カスタマイズでコメントとトラックバックのつけ方
ライブドアブログにないテンプレートを使っているのですが、そのテンプレートにはコメントとトラックバックがついていません。コメントやトラックバックをつけるには、どのようなHTMLをどこに書けばいいのですか?
わかる方がいたらお願いします。
2006-03-07 18:40の質問
この質問は、30日間解決しなかったために自動的に質問が一旦閉じられました。
Ads By Google
回答(4)
1.
2006-03-08 00:26:35
テンプレート上に必要なタグを書き出してみることにします。長いので分けて投稿します。
<IfArticleAllowPing>
<div class="trackbackurltop"></div>
<div class="trackbackurlbody">
<h3 class="trackbackurlttl">トラックバックURL</h3>
<div class="trackbackurl">
<table cellspacing="0" cellspacing="5" border="0">
<tr>
<td width="99%"><input type="text" value="<$ArticleTrackBackUrl$>" class="trackbackbox"></td>
<td width="1%" align="right"><input type="button" value="クイック" onClick="quickTrackBack('<$ArticlePermalink$>'); return false;"></td>
</tr>
</table>
</div>
</div>
<div class="trackbackurlbottom"></div>
</IfArticleAllowPing>
<a name="trackback"></a>
<IfArticlePingCount>
<div id="trackbacktop"></div>
<div id="trackback">
<h3 class="trackbackhead">この記事へのトラックバック</h3>
<div id="trackbackbody">
<TrackBacksLoop>
<div class="trackbackttl"><$TrackBackNumber$>. <a target="_blank" href="<$PingBlogUrl$>" class="posttitle"><$PingTitle ESCAPE$></a> [ <$PingBlogName ESCAPE$> ] <span><$PingDateTime$></span></div>
<div class="trackbacktext"><IfTrackBackRating><$TrackBackRatingIcon$></IfTrackBackRating><$PingExcerpt ESCAPE$></div>
</TrackBacksLoop>
</div>
</div>
<div id="trackbackbottom"></div>
</IfArticlePingCount>
<IfArticleAllowPing>
<div class="trackbackurltop"></div>
<div class="trackbackurlbody">
<h3 class="trackbackurlttl">トラックバックURL</h3>
<div class="trackbackurl">
<table cellspacing="0" cellspacing="5" border="0">
<tr>
<td width="99%"><input type="text" value="<$ArticleTrackBackUrl$>" class="trackbackbox"></td>
<td width="1%" align="right"><input type="button" value="クイック" onClick="quickTrackBack('<$ArticlePermalink$>'); return false;"></td>
</tr>
</table>
</div>
</div>
<div class="trackbackurlbottom"></div>
</IfArticleAllowPing>
<a name="trackback"></a>
<IfArticlePingCount>
<div id="trackbacktop"></div>
<div id="trackback">
<h3 class="trackbackhead">この記事へのトラックバック</h3>
<div id="trackbackbody">
<TrackBacksLoop>
<div class="trackbackttl"><$TrackBackNumber$>. <a target="_blank" href="<$PingBlogUrl$>" class="posttitle"><$PingTitle ESCAPE$></a> [ <$PingBlogName ESCAPE$> ] <span><$PingDateTime$></span></div>
<div class="trackbacktext"><IfTrackBackRating><$TrackBackRatingIcon$></IfTrackBackRating><$PingExcerpt ESCAPE$></div>
</TrackBacksLoop>
</div>
</div>
<div id="trackbackbottom"></div>
</IfArticlePingCount>
2.
2006-03-08 00:27:02
<a name="comments"></a>
<IfArticleCommentCount>
<div id="commenttop"></div>
<div id="comment">
<h3 class="commenthead">この記事へのコメント</h3>
<div id="commentbody">
<CommentsLoop>
<div class="commentttl"><$CommentNumber$>. Posted by <IfCommentUrl><a href="<$CommentUrl$>" class="posttitle"><$CommentAuthor ESCAPE$></a><ElseIfCommentEmail><a href="mailto:<$CommentEmail ESCAPE$>" class="posttitle"><$CommentAuthor ESCAPE$></a><Else><$CommentAuthor ESCAPE$></IfCommentUrl> <span><$CommentDateTime$></span></div>
<div class="commenttext"><IfCommentRating><$CommentRatingIcon$></IfCommentRating><$CommentBody$></div>
</CommentsLoop>
</div>
</div>
<div id="commentbottom"></div>
</IfArticleCommentCount>
<IfArticleAllowComment>
<div class="formbodytop"></div>
<div id="takecomment">
<h3 class="takecommenthead">この記事にコメントする</h3>
<$CommentPostError$>
<div id="takecommentbody">
<IfCommentNeedAuth>
<script language="JavaScript">
<!--
if(authorized_name) {
document.write('<div class="loginon">ようこそ' + authorized_name + 'さん <a href="<$CommentLogoutUrl$>">ログアウト</a></div>');
}
else {
document.write('<div class="loginoff">このBlogにコメントするには<a href="<$CommentLoginUrl$>">ログイン</a>が必要です。</div>');
}
-->
</script>
</IfCommentNeedAuth>
</div>
</div>
<IfArticleCommentCount>
<div id="commenttop"></div>
<div id="comment">
<h3 class="commenthead">この記事へのコメント</h3>
<div id="commentbody">
<CommentsLoop>
<div class="commentttl"><$CommentNumber$>. Posted by <IfCommentUrl><a href="<$CommentUrl$>" class="posttitle"><$CommentAuthor ESCAPE$></a><ElseIfCommentEmail><a href="mailto:<$CommentEmail ESCAPE$>" class="posttitle"><$CommentAuthor ESCAPE$></a><Else><$CommentAuthor ESCAPE$></IfCommentUrl> <span><$CommentDateTime$></span></div>
<div class="commenttext"><IfCommentRating><$CommentRatingIcon$></IfCommentRating><$CommentBody$></div>
</CommentsLoop>
</div>
</div>
<div id="commentbottom"></div>
</IfArticleCommentCount>
<IfArticleAllowComment>
<div class="formbodytop"></div>
<div id="takecomment">
<h3 class="takecommenthead">この記事にコメントする</h3>
<$CommentPostError$>
<div id="takecommentbody">
<IfCommentNeedAuth>
<script language="JavaScript">
<!--
if(authorized_name) {
document.write('<div class="loginon">ようこそ' + authorized_name + 'さん <a href="<$CommentLogoutUrl$>">ログアウト</a></div>');
}
else {
document.write('<div class="loginoff">このBlogにコメントするには<a href="<$CommentLoginUrl$>">ログイン</a>が必要です。</div>');
}
-->
</script>
</IfCommentNeedAuth>
</div>
</div>
3.
2006-03-08 00:27:57
<div id="formbody">
<table cellpadding="0" cellspacing="0" border="0" class="form">
<form action="<$ArticleCommentUrl$>#errors" method="POST" name="comment_form" onSubmit="javacript:setCommentAuthor(this); return submitOnce(this.button);">
<tr>
<th nowrap class="auther">名前: </th>
<td colspan="3"><IfCommentNeedAuth><script language="JavaScript"><!--
if(authorized_name)
document.write(authorized_name);
else
document.write('<input id="author" name="author">');
--></script><Else><input id="author" name="author"></IfCommentNeedAuth></td>
</tr>
<tr>
<th nowrap class="email">メール: </th>
<td colspan="3"><input id="email" name="email" /></td>
</tr>
<tr>
<th nowrap class="url">URL: </th>
<td colspan="3"><input id="url" name="url" /></td>
</tr>
<tr>
<td nowrap> </td>
<td nowrap>情報を記憶:
<input id="bake" type="checkbox" name="cookie" style="padding:0;margin:0px;" /></td>
<td align="right" nowrap>評価:
<select id="rank" name="rating">
<option value="">--</option>
<option value="1">1(最低)</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5(最高)</option>
</select></td>
<td align="right" nowrap><input type="radio" id="radio" value="face" name="rating_icon">
顔
<input type="radio" id="radio" value="star" name="rating_icon">
星</td>
</tr>
<table cellpadding="0" cellspacing="0" border="0" class="form">
<form action="<$ArticleCommentUrl$>#errors" method="POST" name="comment_form" onSubmit="javacript:setCommentAuthor(this); return submitOnce(this.button);">
<tr>
<th nowrap class="auther">名前: </th>
<td colspan="3"><IfCommentNeedAuth><script language="JavaScript"><!--
if(authorized_name)
document.write(authorized_name);
else
document.write('<input id="author" name="author">');
--></script><Else><input id="author" name="author"></IfCommentNeedAuth></td>
</tr>
<tr>
<th nowrap class="email">メール: </th>
<td colspan="3"><input id="email" name="email" /></td>
</tr>
<tr>
<th nowrap class="url">URL: </th>
<td colspan="3"><input id="url" name="url" /></td>
</tr>
<tr>
<td nowrap> </td>
<td nowrap>情報を記憶:
<input id="bake" type="checkbox" name="cookie" style="padding:0;margin:0px;" /></td>
<td align="right" nowrap>評価:
<select id="rank" name="rating">
<option value="">--</option>
<option value="1">1(最低)</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5(最高)</option>
</select></td>
<td align="right" nowrap><input type="radio" id="radio" value="face" name="rating_icon">
顔
<input type="radio" id="radio" value="star" name="rating_icon">
星</td>
</tr>
4.
2006-03-08 00:28:05
<tr>
<td nowrap> </td>
<td colspan="3"><a href="javascript:void(0);" id="emojiLink1" onClick="showEmojiPanel(this.id, 'text')"><img src="http://parts.blog.livedoor.jp/img/usr/cmn/tool.gif...; id="tool" width="18" height="18" border="0"></a></td>
</tr>
<tr>
<td nowrap> </td>
<td colspan="3"><textarea id="text" name="body" rows="10" cols="50"></textarea><div id="emoji" style="position:absolute; background-color:#FFFFFF; left: 30px; border:1 solid #000000; margin:0 0 0 0; padding:0 0 0 0; display:none;"></div></td>
</tr>
<tr>
<td nowrap> </td>
<td colspan="3" align="center"><input type="submit" value=" 投稿する " class="button" name="button" /></td>
</tr>
</form>
</table>
</div>
<div class="formbodybottom"></div>
</IfArticleAllowComment>
<td nowrap> </td>
<td colspan="3"><a href="javascript:void(0);" id="emojiLink1" onClick="showEmojiPanel(this.id, 'text')"><img src="http://parts.blog.livedoor.jp/img/usr/cmn/tool.gif...; id="tool" width="18" height="18" border="0"></a></td>
</tr>
<tr>
<td nowrap> </td>
<td colspan="3"><textarea id="text" name="body" rows="10" cols="50"></textarea><div id="emoji" style="position:absolute; background-color:#FFFFFF; left: 30px; border:1 solid #000000; margin:0 0 0 0; padding:0 0 0 0; display:none;"></div></td>
</tr>
<tr>
<td nowrap> </td>
<td colspan="3" align="center"><input type="submit" value=" 投稿する " class="button" name="button" /></td>
</tr>
</form>
</table>
</div>
<div class="formbodybottom"></div>
</IfArticleAllowComment>
Ads By Google
コメント(5)
#1. 試験利用者
2006-03-08 00:29:53
テンプレート部分でも、コメントとトラックバックに必要なものは結構な量があります。他にも分からない点があれば、解決できるよう努めるので、コメント欄から教えてください。
#2. hoo
2006-03-09 17:13:37
教えていただいたタグを入れてみたところ使えるようになりました!ありがとうございます!
でもサイドメニュー(カテゴリなどの欄)が下に行ってしまいました。これは直すことができますか?できればお願いします。
#3. 試験利用者
2006-03-12 23:18:07
おや、今日、コメントに気付いてしまいました。ちょっと見てみますね。
#4. 試験利用者
2006-03-12 23:19:11
ごめんなさい。ブログのurlが分からないと調整のしようがないですね。想像で書いていくのですが、本文の部分が短すぎるのではないかなと思っています。
#5. 試験利用者
2006-03-12 23:20:20
指定に対応するスタイルシートにおける幅を修正して対応するのですが、ブログのurlを教えて下さったら、ちょっと試すようにします。
