Mall user comment Optimization

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.