Qibo CMS WeChat custom reply plug-in

Source: Internet
Author: User

A friend's website's medical representative network was built with qibo CMSv7. After the Chinese New Year, I had no mood to do the project, so I made this custom reply plug-in for fun. It seems like the website is out of date with different public accounts ~. I am not familiar with alignbo CMS, so I only have three or four days of contact. I have to go to work during the day and spend some time writing plug-ins to my friends at night. I also want to watch Sui Tang romance and the legend of Chu and Han, so busy... The plug-in is not easy to do, so it is enough for small websites.

Installation steps:

1. decompress the downloaded package and upload the weixinrespond folder to the hack directory under the root directory using ftp. The package contains a weixin. php file, which is uploaded to the website root directory (directory where index. php is located ). In fact, this file can not be. Later.

2. Background installation. Choose system functions> plug-in Management> automatically install new plug-ins. If you upload the weixinrespond folder to the hack directory, this will happen. Click Install.

  

 

3. Set the plug-in permission after installation. Select "Custom reply plug-in" and submit it.

  

 

4. Plug-in settings. Plug-in management-Out-Of-site function-custom reply plug-in. Currently, there are five options: text list, and other settings. Note that this is a custom reply plug-in, not a plug-in that pushes messages to users. The plug-in can only obtain messages sent by users to your public account, and return corresponding text or text based on the messages. Currently, only message replies in text and plain text formats are supported.

5. other settings are described.

TOKEN: Any token that corresponds to the TOKEN of the public platform. (Later)

Mobile website URL: a text message will contain a hyperlink. You can click "view full text" of the text message to jump to this URL. If your website has a mobile phone version, you can enter the address of the mobile phone version, such as wap.yoursite.com m.yoursite.com. If you do not have one, enter your domain name. The current smartphone can also view the PC Desktop website, but the webpage is scaled almost. When entering this information, follow the prompts in the input box. This document is not emphasized.

Figure Directory: The image text message is returned. CMS is an article. If there is a graph in the article, the program will capture the first graph from the article and return it. If there is no graph in the article, it will capture the graph randomly from the graph directory and return it. We recommend that you create a new weixin_img folder under the upload_files (default Image Upload directory of qibo cms) folder under the root directory to upload images.

Number of drawings: the number of images in the figure directory that can be captured by a program. The image name must be consecutive Arabic numerals in jpg format. For example, if you fill in 10, the program will capture any image in 1.jpg-10.jpg from the attached figure.

Maximum number of text and text messages: When the keywords entered by the user match multiple results in the database, several results are returned to the user. Currently, a text message supports up to 10 text messages.

Automatically reply to added friends: when a new user adds your public account, what text is returned to the user. The plug-in currently only supports the return of text messages.

Automatic reply when no matching word exists: when the user input words cannot match the results in the database, a text message is returned to the user by default.

6. Set up a public platform

  

 

Enter your personal information. URL filled with: http://www.xxx.com/weixin.php? M = weixin & a = valid

Replace www.xxx.com with your domain name. In the url, weixin. php is the weixin. php file that is decompressed in step 1 and uploaded to the root directory of the website. As mentioned above, this file may not be used. If you didn't upload this file, the URL here should be written like this: http://www.xxx.com/hack/weixinrespond/weixin.php? M = weixin & a = valid

Enter the Token value you set in the background.

After entering the information, click the submit button below. If a green text is displayed on the top of the page, the interface address is verified and can be used properly.

7. Test. Open and test what to reply to after adding a friend (if you have added your own public account, cancel the following and add it again. Enter a word in your website article to see what to reply. If a text message is returned, it proves that the user-defined reply interface can reply your website article to the user.

8 additional features. Only "other settings" are mentioned above. What do you mean by the text and text in the plug-in. Follow the tutorial to add a text, enter the keyword "hello", select "exact match", enter the reply "Hello everyone", and then submit. Open, talk to your public account, and enter "hello" to see if the public account has replied to the text "Hello, hello, everyone. If yes, you did it!

The image and text settings must be more complex.

The number of periods refers to the year, month, and day when the image is published, for example, 20130119. To make this plug-in more suitable for marketing personnel, we need to set this field here. Users are constantly adding your public account as friends. The topic messages you recommended to users yesterday are not visible to the users you joined today. In addition, if you want to view the messages pushed to users a month ago on your mobile phone, you can only search for them on the public platform. If a website needs to be pushed to users, it must be something that the webmaster thinks is valuable. How can we not see the previous wonderful recommendations when users join the website later?

Here, after sending a message to the public platform every day, fill in the address, image address, and date of the message in the plug-in based on the number of periods, with appropriate keywords, save it first. Whether you are a user or a user, you only need to enter the number of periods to obtain the text message that you pushed on the public platform that day. Of course, this requires you to use the guidance when the user joins. For more information, see.

The text and text messages added here are not limited to recording mass message archives on the public platform. You can also do this:

It doesn't matter if you enter the number of periods. Enter the keyword "Gemini", enter an image address, and enter a URL for the access content. Enter "Gemini" to your public account and you will still be able to get this image.

Let's explore more ways. You can take a look at "dureis" to see how people play with marketing and user-defined replies. This plug-in has also implemented the custom reply function of "Durex.

  

 

9 other instructions

① Access the website is using dynamic links to access (different site configuration of the static link structure is not the same), such as http://www.xxx.com/bencandy.php? Fid = 10 & aid = 100. If your site has a wap version, access addresses like http://wap.xxx.com/bencandy.php? Fid = 10 & aid = 100. For example. Change my domain name to yours. If your website disables Dynamic Link Access, you must enable or modify the plug-in code. If your website mobile edition uses Baidu's site app for transcoding, use the primary domain name.

② The CMS version of V7 is used during development. If your site is not V7, try it first. If you have any questions, leave a message. During development, V7 is gbk encoded. I do not know if qibo has UTF8, and the returned string is UTF-8 encoded. There is encoding conversion in the program. If you are using the source code of UTF8, you need to remove the transcoding code from the program. If you have any questions, please leave a message.

③ Matching order. First match the text message set in the plug-in, followed by text message, and then search for the keyword from the CMS Article data table. Do not set text and text keywords the same, or you may not get the expected results. Fuzzy match and exact match can be set for each message, with exact match given priority.

④ The data set in the plug-in is written into the hack_weixinrespond data table (the table is automatically created when the plug-in is installed). When the plug-in is uninstalled, the data table is also detached. Therefore, when you uninstall the plug-in, make sure that the data in this table is no longer needed.

For the time being, I will continue to add this article. If you have any questions, please leave a message. I will give some answers and study qibo CMS together.

Reprinted Please note: original from the root of the http://www.icaigen.com/post/17

Related Article

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.