Pigcms How to turn off the chat robot _php instance

Source: Internet
Author: User

No brain operation examples

1, find WeixinAction.class.php file, path: your version \pigcms\lib\action\home

2, Query function chat, in the chat () function to modify the return value

Copy Code code as follows:

Return ' Str_replace (' Highsea ', ' Hi ', $str) ';//For example

For, as follows:
Return ' Pro, please reply to the Hospitality service ~ ';

3, (optional) The final comment off the "Small Yellow Chicken" section (you can not note can also):

Copy Code code as follows:

* * Small YELLOW chicken/*
/* $str = ' http://api.bd001.com/iMicms_com/api.php?key=free&appid=0&msg= '. UrlEncode ($name);
$json = Http::fsockopendownload ($STR);
if ($json = = False) {
$json = file_get_contents ($STR);
}
$json = Json_decode ($json, true);
$str = Str_replace (' Highsea ', $this->my, Str_replace (' Hint: ', $this->my. ' Remind you: ', Str_replace (' {br} ', ' \ n ', $json [' content ']])

• Summary: The operation will not affect the public number of other key words reply, only for the answer does not come up with the question (originally is the request of small yellow chicken) now directly reply: "Pro, please wait for the hospitality service reply ~"; If you need to modify other operating source code

• If optimized, you can do this:

First the unified configuration of a response (or request their own interface server), when the visitor replies such as "small yellow chicken" and then request the small yellow chicken interface ... The source code is not an example ~

Small partners Learn how to shut down the chat robot in the pigcms, hope this article can be helpful to everyone.

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.