close

就是將 找到 有 "貴姓" 的檔案 換字元為 姓名 , 與將 大名 隱藏

首先來換 貴姓

找到 有 "貴姓" 的檔案 換字元為 "姓名"

1. 找出有 "貴姓" 的檔案

grep -r  貴姓 > /tmp/a

2. 更名為 .old (在此之前要 vi 一下 ... 第一行怪怪的 要拿掉 :$_['text_firstname'] 這字元

catalog/language/zh-tw/mail/register.php:$_['text_firstname']
catalog/language/zh-tw/mail/affiliate.php
catalog/language/zh-tw/account/register.php
catalog/language/zh-tw/account/register.php
catalog/language/zh-tw/account/address.php
catalog/language/zh-tw/account/address.php
catalog/language/zh-tw/account/edit.php
catalog/language/zh-tw/account/edit.php
catalog/language/zh-tw/account/return.php
catalog/language/zh-tw/account/return.php
catalog/language/zh-tw/affiliate/register.php
catalog/language/zh-tw/affiliate/register.php
catalog/language/zh-tw/checkout/checkout.php
catalog/language/zh-tw/checkout/checkout.php
catalog/language/zh-tw/api/payment.php
catalog/language/zh-tw/api/customer.php
catalog/language/zh-tw/api/shipping.php
admin/language/zh-tw/sale/order.php
admin/language/zh-tw/sale/return.php
admin/language/zh-tw/sale/return.php
admin/language/zh-tw/user/user.php
admin/language/zh-tw/user/user.php

3. 將有抓出來的檔 更名為  .old

cat /tmp/a  | awk '{FS=":";print "mv "$1" "$1".old"}' > /tmp/b
sh /tmp/b

4.  將 貴姓 換成 姓名

cat /tmp/a | awk '{print "sed '"'"'s/貴姓/姓名/g'"'"' "$1".old > "$1}' > /tmp/b
sh /tmp/b

5. 將 old 檔移除

cat /tmp/a | awk '{print "rm -rf "$1".old"}' > /tmp/b
sh  /tmp/b

再來 找 control 資訊 注解 那 lastname 不處理

執行 ... grep 來找 .....  

grep -r lastname |grep utf8_strlen |grep -v "//" 

找到檔名加上註解 ....不給予執行 ... 那 grep -v 就是排除已註解的 檔案 不再顯示

找到加上注解的是 ..

//
//              if ((utf8_strlen(trim($this->request->post['lastname'])) < 1) || (utf8_strlen(trim($this->request->post['lastname'])) > 32)) {
//                      $this->error['lastname'] = $this->language->get('error_lastname');
//              }

找 view 去修改不必輸入 lastname 

 grep -r input-lastname | grep -v "+="

找到檔名(都是 tpl 檔) 

將 input-lastname 上面的  

 <div class="form-group required"> 開始到 </div> 結束的地方刪除

   例如 :

           <div class="form-group required">
            <label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>
            <div class="col-sm-10">
              <input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />
              {% if error_lastname %}
              <div class="text-danger">{{ error_lastname }}</div>
              {% endif %}
            </div>
          </div>

未完 .... 發現還有寫成 .....  
$_['entry_lastname'] = '姓氏';

給他 XD

 

arrow
arrow
    全站熱搜

    echochio 發表在 痞客邦 留言(0) 人氣()