Home > Website > Get Recent Comments

Get Recent Comments

get-recent-comments
最近のコメント一覧表示

Get Recent Commentsは、wordpressのサイドバーに「最近のコメント」を表示するwidgetです。 エントリごとに、コメントをまとめたいと思い導入しました。

FC2ブログでは普通に実装されていたと思うんだけど、それに慣れちゃって、気になっていたんですよね。

検索してみると、日本語に対応していないとか文字化けするとかありましたが、現時点のバージョン Version: 2.0.6 Last Updated: 2009-3-31 では問題なし。

設定ではマクロが使えて自由自在って感じです。

一カ所だけ、日時のフォーマットがシステムのデフォルトに固定されていたので、そこだけソースをいじりました。

get-recent-comments.php

$comment_date = mysql2date(get_settings('date_format'),$comment->comment_date);

get_settings(‘date_format’)を、むりやり ‘y/m/d’ に書き換え。

$comment_date = mysql2date('y/m/d',$comment->comment_date);

設定で、Template for the comments. の欄を、

<li><a href="%comment_link" title="%post_title, %post_date">%comment_author san: <span class="NREW-Date">(%comment_date)</span></a></li>

こんな感じにして、”最近の投稿(拡張版)widget“と表示をそろえたりして。
そろえてみると、こっちにも New!マークが欲しくなってきたりして。

でもこうやって人様のソースをいじると、ついうっかり、プラグインの自動アップデートしちゃって修正を失ってしまうんだようなぁ。 :(

コメント:0

コメント投稿欄
お名前を記憶しましょうか?

:wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :arrow: :?: :-| :-x :-o :-P :-D :-? :) :( :!: 8-O 8)

Trackbacks:0

Trackback URL for this entry
http://nosaku.net/archives/1352/trackback
Listed below are links to weblogs that reference
Get Recent Comments from 写真をめざせ!(略して写め)

Home > Website > Get Recent Comments

Calendar
« 2012 年 5月 »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
アーカイブ
メタ情報
RSS Feed
これ!おすすめ
Image of スカイ・イクリプス
Counter

521568 Visitors

Return to page top