Ever since WP released the comment support/disapproval function plug-in, I have been waiting for zblog to release one. The final result is that it is better to seek help from others than to ask for yourself.
Plug-in description:
The most popular application of this feature should be in NetEase reviews. However, since this function was harmonized during the National Day, similar functions on major websites have been hidden one after another. So I only developed the "support" currently used by NetEase, and I didn't write "oppose". It doesn't sound good, it's harmonious.
Since zblog is static, when calling the support number of each comment, I initially wanted to directly modify the zblog library function, such as adding a similar <#article/comment/dig#>, and then read it out in c_system_lib in advance. Calling it in the template again has an advantage: it can reduce the http requests for the article page. There are also obvious shortcomings: it is inconvenient to upgrade and it is troublesome to modify. I estimate that I will spend a long time writing here to teach people how to modify and where to modify those files. In the end, it was made directly into a plug-in.
After activating the plug-in, you need to add two lines of code at the appropriate location in the b_article_comment.html template. For details, see the plug-in management page.
Since this function involves asp, js, and ajax, I tested it using FF3.5 and IE8 on my own machine. If there are any other problems, please report them here in time.
For specific effects, please see the comment area on the Sanqibadan article page.
Plug-in download:
ZBlog blog comments support/anti function plug-in, the attachment is in rar format, please decompress it to zpi mode first and then install it.
ZBlog forum release page: http://bbs.rainbowsoft.org/thread-44851-1-1.html
Question collection
1. Brother Cat: The support function of the guestbook is not displayed properly.
Reason: The js call for this function is the same as the moonlight rating js and is placed in the article content. The guestbook has no article content.
Solution: Just add js calls to the guestbook template.
<Script language="javascript" type="text/javascript" src=" http://www.378Q.com.cn/PLUGIN/CommDig/dig.js"></script >
2. Lu Songsong: Can the person with the most support or the most opposition be put in the most prominent position?
Under development.
3. Update at 17:00 on January 15th: For those who can only like one when using the plug-in, please download it again, then unzip it into a zpi file and re-import it. Then you will be prompted that you do not need to upgrade. You choose Just cover it.
The reason is: There is an error in the database. The ID field is selected as "Number" instead of "AutoNumber".
4. Memory box: Do you support/oppose that you only use js in the browser to record click behavior? Because if I close the browser and reopen it, I can click again.
It is recommended to record the clicker's IP address to avoid closing the browser and clicking again. In addition, displaying the most supported items and the most opposed items at the front is the ultimate purpose of making this plug-in.
Sanqibadan: Session is used to record click behavior. The situation you mentioned can be recorded using cookies.
The method is written here: Change Session("ID"&ID) = ID in dig.asp to write the ID into the cookie, and then Response.Cookies("ID"&ID).Expires = date() +10, which means Set the life cycle of cookies to be valid for 10 days from today. Or use a database to record, refer to the moonlight scoring method, and record the IP.
This may be modified depending on the situation.
As for displaying the most supported ones in the front, you need to modify the zblog library file. This change will make it inconvenient to upgrade. I think it is better to make another list, such as the list with the most comments within 30 days. This feature is under development.
5. Update at 11:00 on January 16th: Please download it again above, then decompress it into a zpi file and re-import it. Then you will be prompted that you do not need to upgrade, just choose to overwrite it.
Updated content: Added [Objection] function. In addition, adding two lines of code to the appropriate position in the b_article_comment.html template also needs to be modified. For details, see the plug-in management page.
For original articles, please indicate the source of the reprint: Sanqibadan Article address: http://www.378Q.com.cn/post/162.html
Thank you Sanqibadan for your contribution