Đây là plugin cho WordPress 2.6+ có nhiệm vụ phát hiện và hiển thị thông tin về quốc gia, trình duyệt web và hệ điều hành của những vị khách đã viết comment (phản hồi) trên blog của bạn. Cách thức hoạt động của plugin rất đơn giản, nó sẽ chuyển địa chỉ IP và User Agent (được WordPress lưu lại trong database khi có người submit comment) từ số và chữ sang code HTML để hiển thị trên blog.
Tính năng:
- Phát hiện và hiển thị cờ quốc gia, trình duyệt và hệ điều hành của người viết comment.
- Có khả năng nhận ra nhiều loại trình duyệt cũng như hệ điều hành phổ biến hiện nay, kể cả các trackbacks và pingbacks từ các blog và các loại điện thoại, smartphone.
- Tốc độ quét IP khá nhanh do dùng database đã được dịch thành file nhị phân của Webhosting.info (hoặc Software77.net)
- Kết quả trả về (code HTML) có thể tùy biến trong phần quản lý plugin
Screenshot:

Download:
Cài đặt:
- Download plugin sau đó giải nén
- Upload hết thư mục "comment-info-detector" vào "/wp-content/plugins/"
- Kích hoạt plugin trong mục 'Plugins' của WP-Admin
- Sau đó vào 'WP-Admin -> Settings -> Comment Info Detector' để cấu hình plugin
Nâng cấp:
Để nâng cấp phiên bản mới cho plugin này, bạn hãy deactivate nó => xóa thư mục chứa plugin cũ trên host của bạn => upload thư mục chứa plugin mới lên => activate lại plugin mới.
Cách sử dụng:
- Bạn mở file comments.php trong thư mục chứa theme bạn đang dùng
- Tìm dòng sau: (vòng lặp for)
1
foreach ($comments as $comment)
- Sau đó chèn đoạn code dưới đây vào bên dưới vòng lặp ở trên:
1
<?php if (function_exists("CID_init")) { CID_print_comment_flag(); echo ' '; CID_print_comment_browser(); } ?>
- Ngoài ra, bạn có thể thay đổi style cho các biểu tượng bằng cách sửa file dưới đây:
/wp-content/plugins/comment-info-detector/comment-info-detector.css
Lời cám ơn
Comment Info Detector được viết bởi tôi, HieuDT. Cám ơn Priyadi Iman Nurcahyo về code phát hiện trình duyệt web và hệ điều hành, Omry Yadan về thư viện IP2Country.
Các phiên bản:
- 1.0.0 [15-12-2008]: Lần đầu tiên ra mắt.
- 1.0.1 [16-12-2008]: Thêm hai quick-tag cho trình duyệt web và hệ điều hành để kết quả trả về tốt hơn.
- 1.0.2 [12-01-2009]: Cập nhật database mới cho thư viện ip2country và tăng khả năng phát hiện thêm một số trình duyệt - hệ điều hành mới.
- 1.0.3 [18-01-2009]: Thêm chức năng tự động hiển thị các icon mà không cần chèn code trong file comments.php.
- 1.0.4 [02-03-2009]: Cập nhật database mới cho thư viện ip2country và thêm icon cho IE8, Vista.
- 1.0.5 [07-09-2009]: Cập nhật database mới cho thư viện ip2country và thêm icon cho Windows 7.
Hiện tôi vẫn đang tiếp tục phát triển plugin này và tôi rất mong nhận được ý kiến phản hồi từ các bạn. Nếu bạn cảm thấy plugin còn thiếu sót hay hoạt động chưa tốt, phát hiện sai thông tin thì rất hoan nghênh bạn, hãy thông báo cho tôi biết nhé!













UNITED STATES và đang sừ dụng không?
147 phản hồi cho “WP Plugin: Comment Info Detector”
Bạn chỉ cho mình cách tự chèn vào phần comments với, nó tự động chèn bị lệch mất
với lại chỉ cho mình cách làm nó hiện trên widget luôn cái
Muốn đưa vào sidebar thì 1 là dùng code trực tiếp, 2 là thêm widget nhưng cách 2 thì plugin chưa hỗ trợ (vì ban đầu mình dự tính là chỉ hiện ở phần comment thôi), tạm thời 2 bạn cứ add code trực tiếp vào file sidebar.php của theme.
Nhớ thay đổi nội dung lại cho phù hợp nhé!
thanh kiều
Cảm ơn
pác hiếudt cho em hỏi làm cái trích dẫn + reply như của pác làm kiểu gì thía
em mò mãi mà chả thấy code nào cóa cả
mới cả cái thanh công cụ text nữa :-0 công nhận là trông gọn thật
pác chỉ giúp em với
Can you please update the IP Database + the OS like Windows 7
Thanks.
Anh Hiếu ơi, sao em đã cài và active plugin đó được rồi, Nhưng không thể tìm ra cái dòng foreach ($comments as $comment) trong comment.php.
Còn chèn thử một vài chổ trong comment.php thì nó hiện ra trước mục comment mới chứ không hiện giống như anh được
Đó là do theme của bạn dùng hàm wp_list_comments() để hiển thị comment nên bạn ko tìm thấy vòng lặp đó nhưng bạn vẫn có thể dùng chức năng tự động hiện các icon kế bên tên người comment mà.
Chức năng đó thì hiện như thế nào vậy ???
Anh có thể rõ hơn giùm em không,
Hiện tại thì em chỉ chèn vô trước khung để comment mới thôi chứ không thể đưa vô giống như của anh
Anh xem thử ở đây nha
Bạn cài plugin vô xong rồi vào trang settings của plugin để cấu hình, trong đó có chỗ bật chức năng tự động hiện icon kế bên tên của người comment, nên bạn khỏi cần đụng đến code cũng được.
Err... The plugin doesn't work with mein WP 2.8
I add the code into the foreach, but the icons doesnt appear.
I'm using the LightWord Theme (available on WP.org) and the comment control of this theme is confuse.
Could you help me?
Same misfortune here. I do like lightword too.
I tried sticking it everywhere to no avail.
My functions.php is available at http://gmills.homelinux.net/wordpress/wp-content/uploads/2009/08/functions.php. A relevant post is on my blog too.
Could you please update to include Windows 7? Thanks in advance.
I will release the next version soon!
Thanks in advance.
And when? :-/
hix, sao của em nó toàn ghi cờ Mĩ không vậy, mặc dù em vào bằng ip VN
cho em hỏi luôn làm sao anh đưa code vào cái khung đẹp thế ạ
Mình dùng css thôi bạn ạ, nó cũng đơn giản lắm, nếu bạn biết chút ít về html với css thì bạn sẽ làm được thôi.
anh chỉ giúp em chỉnh ở đâu ko ạ, em cũng biết qua qua về css thôi
Hi,
I'm using the theme inove and wordpress 2.8 and i have trouble finding the comment loop in comment.php
I don't really know were to put the code
Inove uses the WordPress built-in commment loop to show comments, that function is "wp_list_comments" and you can not put plugin's code into this function because it is placed in WordPress core files, so you should turn on the feature that displays icons automatically beside commenter's name in the plugin's options page.
Hiếu ơi, mình cài Plugin này nhưng sao nó chỉ hiện mỗi OS, Browse và Flag không ah? Không thấy hiện đầy đủ text là sao? Chỉ mình cách sửa với. Làm sao cho hiện đầy đủ cả text và icon ý. Thanks nhiều
Ý quên, site mình: http://36kn.info
Any chance of an update to support Windows 7 detection? At the moment it incorrectly picks it up as "Windows NT". If you need the useragent here's the ones from my machine:
Chrome;
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.43 Safari/530.5
IE8:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Firefox:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
Safari:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9.1
Opera:
Opera/9.80 (Windows NT 6.1; U; en) Presto/2.2.15 Version/10.00
Thanks friend!
Oh and here's one for IE8 on Windows 2008 R2
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727)
bác Hiếu tối ưu hóa data sql của plugin dc ko? nhìu người comment, plugin lưu ip nên data phình ra to quá
backup, restore cực quá.
Plugin này ko có lưu gì vào database hết bác ạ, nó chỉ chuyển từ IP sang tên nước mà thôi, chuyển trực tiếp lúc WP show các comment ấy nên ko ảnh hưởng gì đến việc backup hay restore.
bác Hiếu có thể send em bản mới nhất 1.0.4 dc ko? trên wp.org tải cả ngày nay ko dc
đang cần gấp.
mail của em: lcvanz[at]gmail.com
thanks bác
Đã gửi cho bạn!
Thanks for the update but why i can't see the country- (The browser and os i can see)
there must be a problem in the zip file. theres an error when I try to extract it from the zip file.
I think there is a bug, When the user use mobile phone such as BlackBerry , the OS can't be displayed
screenshots: http://i36.tinypic.com/11vktxl.jpg
thanks very much!!!!!!!!
Làm cái quote thế nào đó anh Hieudt ơi
So many people use FF.
What a great brower!
Can you please update your databases to avoid detecting false WordPress trackbacks?
I use Topsy Widget's plugin and the tweetbacks are being identified as "Wordpress 0.9.3"...
A typical Topsys UserAgent is "Topsy plugin for WordPress v0.9.3".
Maybe WordPress regexp should have an "^" to force begin of line, and other browsers should be identified as "Unknown"... BTW, if you agree to do that, can you add the option to define the word to be used as "Unknown" on the options page?
có vẻ như plugin này chưa hỗ trợ wordpress 2.8.5, mình cài nhưng không sử dụng được
Tiện thể bác HieuDT có thể cho mình bện pháp thay thế cho plugin Autohyperlink Urls (tự động nhận dạng url và email) không. Plugin này không hoạt động đúng trên wordpress 2.8.5
Could you please add the React Operation System (www.reactos.org) in the future versions? Will be very usefull for us identify if the system are been used. Thanks!
Anh Hiếu à,sao em không cho vao Comment được,
em vào Comment.php>tìm dòng như anh nói >chèn dòng...sau nó báo Lỗi
testing...
Detecting iPhone would be nice
Amazing plug-in! Thanks a lot.
I got a doubt and a suggestion.
1) I got a comment that shows PHP icon, where does it save the database for it related to this comment post?
2) When the webmaster make a post, it would have an option to chose to use the default PHP icon or allow to upload its own icon.
Cheers.
I have no clue why mine shows PHP, as you can check the post above, if I'm using Mozilla FireFox 3.5.6. Is it because it isn't updated for FF 3.5.6?
omg this is so cool
thanks!!
Plug-in hay đó ! để mình thử xem.
How can I use Software77.net CSV file with your plugin ?? cause I can't find any bin files @ Software77.net
Been using this plugin for quite a while now and I really love it. However, I noticed that some certain browsers aren't recognized and I don't know which one is it as the only info shown is this - class="WB-OS"
Would appreciate any help I could get to figure this one out. Thanks!
See the post above mine, there is no flag showing. I had a visitor from Germany and it didn't show the Germany Flag. Do we have the Germany flag listed as png?
Besides that, I have no clue why mine shows PHP, as you can check my post, what is wrong if I'm using Mozilla FireFox 3.5.6 that is supported?
Btw, about Germany mentioned above, here is what shows about browser info in the Database:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727)
Is it missing the country?
Country is detected from your IP rather than the User Agent.
Test comment posting from Taiwan, Fedora 12 KDE Konqueror 4.3.3
Mozilla/5.0 (compatible; Konqueror/4.3; Linux) KHTML/4.3.3 (like Gecko) Fedora/4.3.3-4.fc12
Can you change the regexp on line 212 to '#^WordPress[ /]([a-zA-Z0-9.]*)#i' and including a test for Topsy plugin? It could be something like:
} elseif (preg_match('#Topsy plugin for WordPress[ /]([a-zA-Z0-9.]*)#i', $ua, $matches)) {
$browser_name = 'Twitter - Topsy';
$browser_code = 'bonecho';
$browser_ver = $matches[1];
I've found that WordPress' detection code should not be altered or WordPress detection would be affected.
It suffice to include the suggested Topsy detection part before WordPress one...
Any feedback on the Lucato's comments below will be appreciated. ;0)
Any feedback on this comment will be appreciated, once I still didn't get to figure it out.
Thanks in advance.
I am very happy with this plugin. However, there are some things I wanted to ask. After I setting in 'WP-Admin -> Settings -> Comment Info Detector' with auto option. But I do not find the code 'foreach ($ comments as $ comment)' at the comment.php, I use free_wp_premium theme. Please explanation and assistance so that I could use this plugin on my blog.
Sorry everyone, because I have no time to continue with this plugin (just too busy) so I cannot answer your questions right now, just give me some days, I will come back later with a new plugin's version. Thanks for using my plugin!
Muy buen plugin, felicitaciones un muy buen trabajo.
hi,
please help. i want to add the country flag of the comment authors next to their names. i tried copying this to the comments.php but i'm not sure where to place it.
see http://www.raimongonzales.com
found out that the comment itself is not in the comments.php and it's in wp-includes/comment-template.php. but again i don't know where to place the php code so that the flag will appear next to the name of the comment author.
hope you can help.
thanks!
raimon
Tính năng này có vẻ hay nhỉ ... ko biết cái site mình đang làm có ứng dụng được vào việc gì ko ?
ồ, cái này hay thật đấy, bác quả là cao thủ...
cannot support windows 7
Everything appears to be working perfectly except that it isn't resolving South African IP addresses...
And being a South African website makes that pretty important
Could you point me in the right direction to update the database?
Thanks!
Hay qua', ban tich hop cai nay vo multiply duoc khong
Hi, mình chỉ vọc WordPress thôi bạn ạ, Multiply mình ko rành lắm