PIGCMS: how to disable chatbots: pigcms chatbots. PIGCMS: how to disable chatbots? pigcms: brainless chatbots: 1. find the WeixinAction. class. php file. path: your PigCmsLibActionHome2. query fu PIGCMS: how to disable chatbots. pigcms chatbots
Example of brainless operations
1. find the WeixinAction. class. php file. path: your version \ PigCms \ Lib \ Action \ Home
2. query the function chat and modify the return value in the chat () function.
The code is as follows:
Return 'Str _ replace ('highsea', 'hi', $ str) '; // example
Is as follows:
Return ', please wait for the customer service to reply ~ ';
3. (optional) comment out the "yellow chicken" section (either not commented or ):
The code is as follows:
/* 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 ('prompt: ', $ this-> my. 'remind you: ', str_replace (' {br} ', "\ n", $ json ['content']); */
• Conclusion: this operation will not affect the reply of other keywords of the public account. it will only reply directly to questions that cannot be answered (originally a request for Xiaohuang chicken): "Dear, please wait for the customer service reply ~"; If you need to modify the source code of other operations
• If optimized, you can:
Configure a uniform answer (or request your own Interface Server). when a visitor replies, such as a "yellow chicken", the system then requests the interface of the chicken ...... The source code is not used as an example ~
I hope this article will help you learn how to disable chatbots in PIGCMS.
Http://www.bkjia.com/PHPjc/957130.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/957130.htmlTechArticlePIGCMS how to close the chatbot, pigcms chatbot brainless operation example 1, find WeixinAction. class. php file, path: your version \ PigCms \ Lib \ Action \ Home 2, query fu...