アーカイブ - 8月 29, 2012

コメントの添付ファイル

淮さんのユーザアバター

悟空さん、こんにちは。
コメントの添付ファイルは、ゲストでもダウンできるようですが、それでよかったでしょうか?(淮)

新規トピックに投稿者を表示してみました。

悟空さんのユーザアバター

 コメントには署名が自動で入るのですが、新規トピックは入りません。その都度書くのも面倒ですし、書かれないと誰が書いたのかはアバターを見るしか有りません。

 他のテーマだと問題無く表示するのですが、ここで使っているAdmire Grungeはどうしても出してくれません。

 設定では無理なので、template.phpとstyle.cssに少し手を入れました。

 試行錯誤の結果、何とかチューブのような形ができたので、変更しました。ご意見をお聞かせください。この形でも最後にサインを入れた方が良いのは確かですが。

 変更箇所は以下のとおりです。

 ☆template.php

function admire_grunge_node_submitted($node) {
return t('@day
@datetime',
array(
// '!username' => theme('username', $node),
'@day' => format_date($node->created,'custom','D'),
'@datetime' => format_date($node->created,'custom','m/d/y'),

 を

function admire_grunge_node_submitted($node) {
return t('@day @datetime by !username',
array(
'!username' => theme('username', $node),
'@day' => format_date($node->created,'custom','D'),
'@datetime' => format_date($node->created,'custom','Y.m.d H:i'),

 に変更。これが新規トピック部分。

function admire_grunge_comment_submitted($comment) {
return t('@day @datetime by !username',
array(
'!username' => theme('username', $comment),
'@day' => format_date($comment->timestamp,'custom','D'),
'@datetime' => format_date($comment->timestamp,'custom','m/d/y'),

 を

function admire_grunge_comment_submitted($comment) {
return t('@day @datetime by !username',
array(
'!username' => theme('username', $comment),
'@day' => format_date($comment->timestamp,'custom','D'),
'@datetime' => format_date($comment->timestamp,'custom','Y.m.d H:i'),

 に変更。これがコメント部分。

 ☆style.css

#wrap_center div.submitted{
width:61px;
height:48px;
font-size:11px;
background:url(images/submitted.jpg) center center no-repeat;
color:#f1eddf;

 を

#wrap_center div.submitted{
width:350px;
height:40px;
font-size:15px;
background:url(images/submitted.jpg) center center no-repeat;
color:#000000;

 に変更

コンテンツ配信