After optimization, the result is displayed:
The procedure is as follows:
1. Modify/admin/comment_manage.php
$ Smarty-> assign ('admin _ info', $ admin_info); // administrator Information
Replace:
$ Smarty-> assign ('user _ name', $ comment_info ['user _ name']); // reviewer username $ smarty-> assign ('user _ address ', $ comment_info ['email ']); // reviewer's email
Delete the following statement:
$sql = "SELECT user_name, email FROM ". $ecs->table(‘admin_user‘). " WHERE user_id = ‘$_SESSION[admin_id]‘"; $admin_info = $db->getRow($sql);
2. Modify/admin/templates/comment_info.htm
<tr><td>{$lang.user_name}:</td><td><input name="user_name" type="text" {if $reply_info.user_name eq ""}value="{$admin_info.user_name}"{else} value="{$reply_info.user_name}"{/if} size="30" readonly="true" /></td></tr><tr><td>{$lang.email}:</td><td><input name="email" type="text" {if $reply_info.email eq ""}value="{$admin_info.email}"{else} value="{$reply_info.email}"{/if} size="30" readonly="true" /></td></tr>
Replace:
<tr><td>{$lang.user_name}:</td><td><input name="user_name" type="text" {if $user_name}value="{$user_name}"{else} value="{$lang.anonymous}"{/if} size="30" readonly="true" /></td></tr><tr><td>{$lang.email}:</td><td><input name="email" type="text" value="{$user_email}" size="30" readonly="true" /></td></tr>
Note: I am a hobbyist. If you say something wrong, Do not spray it. Communication and learning are king!
Modify the file library \ comments_list.lbi to modify the text input box and disable editing. Find name = "email" id = "email" and add readonly = "readonly" to the <input> label as the read-only attribute.
Mall user comment Optimization