Edit Comments*コメントを編集するプラグイン

Edit Commentsのダウンロード

Theron Parlin様のサイトからedit_comments.zipをダウンロードする。

ファイルをPluginフォルダへ入れて、Upload

ダウンロードしたフォルダを解凍し、プラグインフォルダに入れてアップロードし、プラグインを有効にする。

comments.phpの編集

使用しているテーマフォルダの中のcomments.phpを開き編集する。
(念のため、バックアップをお忘れなく。)

下記のタグを探す。

<?php foreach ($comments as $comment) : ?>
<?php endforeach; /* end for each comment */ ?>

間に下記のタグを入れる。

<?php jal_edit_comment_link(); ?>

例:

<small class=”commentmetadata”><?php comment_date(‘F jS, Y’) ?> at <?php comment_time() ?> | <?php jal_edit_comment_link(); ?>

下記のタグを探して、

<?php if ( $user_ID ) : ?>

以下のように書き換える。

<?php
if ( isset($_GET['jal_edit_comments']) ) : $jal_comment = jal_edit_comment_init(); if (!$jal_comment) : return; endif;
?>
<?php elseif ( $user_ID ) : ?>

下記のタグを探して、

<textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″></textarea>

以下のように書き換える。

<textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″><?php jal_comment_content($jal_comment); ?></textarea>

下記のタグを探して、

<h3 id=”respond”>Leave a Reply</h3>

以下のように書き換える。

<h3 id=”respond”>< ?php echo (isset($_GET['jal_edit_comments'])) ? "Edit your Comment" : "Leave a Reply"; ?></h3>

保存し、アップロードする。

詳細は同封されている、INSTALL.txtに書いてあります(英文です(^^;

Tags:

HOME » WordPress » プラグイン関連 » Edit Comments*コメントを編集するプラグイン
Page 1 of 0