![]() |
[AJAX] Helpful Answers - Allow users to rate individual posts
Every day your users contribute hundreds if not thousands of posts making it hard for new members and guests to separate out the best answers from those that are less helpful. The Helpful Answers System offers your members a quick way (AJAX) to rate individual posts as either helpful or not allowing future visitors to understand the benefits of each post.
Designed for maximum flexibility: This addon is built to be flexible and offers several customization options including:
Modification Installation: This addon requires uploading multiple files, installing a vBulletin product and enabling the feature in any forums you wish. No template modifications are required. Please see the included install file for detailed instructions. If you are not seeing the rating bar double check that you have enabled the feature in the forum you are in and insure the Manual Template override option is not enabled. Rating Review & Deletion: To identify and remove abuse a reporting system is included with this addon and can be found in your vBulletin ACP under the Helpful Answers tab. Through this panel you will be able to view a user's overall rating history and individual ratings and can remove either if necessary. Users can also be explicitly banned from the system. Reputation System Integration: Helpful Answers can be extended to directly tie into your reputation system giving users positive or negative points based on the ratings of their posts. There are numerous options on how to handle ratings that can be found in a separate Helpful Answers Reputation part of your vBulletin Settings page. Anonymous Stats Tracking (optional): vBulletin forums reach millions of consumers around the world yet little is known about their habits and opinions. This addon was released to the public out of requests but also to further the research of forum user's behaviors and actions through collecting the most basic data on thousands of sites. By default this addon will pass basic rating data (positive or negative) to a 3rd party site for statistical purposes. Only the most basic data is captured (the vote and your site name) and no user information or specific forum details are logged, not even an IP address. While you may disable this feature through the administrative options I ask that you consider leaving it in place to help this research effort and insure the continued support of the addon. The tracking feature uses the php library cURL on a 5 second timeout. If cURL is not installed this option is automatically disabled. History of this addon: This addon was originally developed for private use in 2006 for a site of mine but after getting several past clients requested requests and messages I decided to package it up for public release. |
Tips & Tricks Using Template Variables:
While the Helpful Answers section may appear to only add to a small part of your post it can be used much more extensively to change the color of an entire post, to add a special icon or just about anything else you like. Here are list of the variables available for your templates and a few sample conditions you can use with them: Code:
$post[totalrank] - The total number of ratings I'm pleased with this addon so far but plan to extend it as feedback comes in so please share your comments and suggestions as they will be read and responded too. Coming soon... A page showcasing your top 10 (or 20 or 30 or 100) posts. |
Thanks for the private feedback; I've added a simple page showing the Most Helpful Answers. This can be disabled through the options and the number of results to show can also be configured.
|
Brill, will download and install later. Thanks
|
Any chance of getting this to work on 3.8x?
|
Quote:
|
help here please, got errors:
Database error in vBulletin 3.7.0: Invalid SQL: SELECT post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted, user.*, userfield.*, usertextfield.*, icon.title as icontitle, icon.iconpath, avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight, spamlog.postid AS spamlog_postid, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason, editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline, editlog.reason AS edit_reason, editlog.hashistory, postparsed.pagetext_html, postparsed.hasimages, sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages, sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid ,post.goodrank,post.totalrank,helpfulanswer.helpfu lanswerid FROM post AS post LEFT JOIN user AS user ON(user.userid = post.userid) LEFT JOIN userfield AS userfield ON(userfield.userid = user.userid) LEFT JOIN usertextfield AS usertextfield ON(usertextfield.userid = user.userid) LEFT JOIN icon AS icon ON(icon.iconid = post.iconid) LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid) LEFT JOIN spamlog AS spamlog ON(spamlog.postid = post.postid) LEFT JOIN deletionlog AS deletionlog ON(post.postid = deletionlog.primaryid AND deletionlog.type = 'post') LEFT JOIN editlog AS editlog ON(editlog.postid = post.postid) LEFT JOIN postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = 4 AND postparsed.languageid = 3) LEFT JOIN sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = 4 AND sigparsed.languageid = 3) LEFT JOIN sigpic AS sigpic ON(sigpic.userid = post.userid) LEFT JOIN helpfulanswer AS helpfulanswer ON(helpfulanswer.postid = post.postid and helpfulanswer.userid = 1) WHERE post.postid IN (0,210,231) ORDER BY post.dateline; MySQL Error : Table 'mysite_fph.helpfulanswer' doesn't exist Error Number : 1146 Request Date : Wednesday, February 4th 2009 @ 11:26:54 AM Error Date : Wednesday, February 4th 2009 @ 11:26:54 AM Script : http://www.mysite.co.il/showthread.php?t=188 Referrer : http://www.mysite.co.il/forumdisplay.php?f=3 IP Address : XX.XXX.XX.XXX Username : PCTech Classname : vB_Database MySQL Version : 5.0.37-standard |
Quote:
https://vborg.vbsupport.ru/showpost....91&postcount=8 |
hi Ted
i've created the sql table manually using the link i posted above. but now, i get other sql errors. this time: when i click Yes / No the AJAX effect doesn't work, instead, a window pops up and says: Quote:
MySQL Error : Unknown column 'post.goodrank' in 'field list' please advise ted |
i added the query that u advised me..
thank u very much! |
i am getting the same error.i will wait for stable hack
|
cool!. now you may face the next same prob as i am
|
hrm - I like this idea, although I've already modified the wording of the reputation system to resemble something similar.
|
My appologies to those who have experienced bugs with the system. 3 issues were identified (2 with queries like the errors above show) and 1 in the creation of the table. An updated version has been released which solves all known issues.
|
Note: Version 1.3.3 has been released which fixes several small issues related to creating the mySQL table for this addon and with two queries. With this update the current mysql query errors will go away and the table will be properly created.
All users are advised to upgrade while those who have experienced database errors should uninstall and then upgrade. To upgrade simply upload the new version of helpfulanswer.php and install the new plugin file. |
awesome man working great ,i am putting this for MOTM,good work thanks.can you add 1 option like if i wanna allow it only for first post?and to show total amount of ranks a user recieved in postbit,thanks
|
yup now it works beautifully :)
please expand this mod as much as you can!! it's great |
Ted - would you consider adding functionality to add to a users reputation and points for vbplaza?
|
Quote:
|
suggestion:
Instead of manually enable forum by forum, consider having the options in setting control to enable a group of forums. for example: Enable (Forum ID) : 1,3,4,5 Disable: 2,6,8 |
Quote:
I'm not sure that's any more effective. Many sites have 50 or 100 or more forums and getting all their ids would not be fun. perhaps a bulk upload tool would make more sense. |
Quote:
|
Version 1.3.4 has been releases which addresses several minor bugs and adds functionality. Here's a complete list of the changes:
- Bug Fix: Templates 'helpful_answers_top' and 'helpful_answers_top_bit' are now cached. - Bug Fix: English text in topanswers routine now uses phrases - Bug Fix: Users may not rate their own posts (see new feature) - New template: 'helpful_answers_error' is used to show ajax errors - New feature: Admins may require a minimum number of posts before a user can rate posts - New feature: Admins may now enable self rating to let users rate their own posts - New feature: User related errors now print back to ajax users (allows user to understand issue) Updating is recommended but not required. |
Quote:
Quote:
Quote:
|
For my tech support forum this is ideal - many thanks Ted!
I'm testing this at the moment in a private forum - just one small problem though, I can't get the "Did you find this post helpful? Yes | No" box to show up when using the standard postbit template yet it shows just fine with postbit legacy. In my case, my primary style is uses the standard postbit and I also offer a child style of the primary which uses the postbit legacy template as the default. I can confirm that the template hook $template_hook[postbit_controls] appears in both templates. To troubleshoot this, I next added the template code $helpful_answers to the default VB templates and the same thing happened - it showed up when the legacy template is used but not with the standard postbit template. Any ideas? :confused: |
I just tried this myself; Try placing the variable before "<!-- message, attachments, sig -->".
If that doesn't work let me know. |
Nope, sorry - same result - this is very puzzling - can't think of a logical reason for it.
|
Interesting. Can you think of any Addons which may impact the postbit template? If you view source do you see the <hr ...> tag?
|
yes - just after the title as per:
Code:
<!-- icon and title --> Should I post my posbit template code here? |
Well that's good progress. It doesn't sound like another addon conflict as the script is making it to rendering.
It looks like there's no vote to show and for some reason no rights for you to vote on that post. Are you sure the addon is (1) enabled for the forum with the postbit style and (2) not your own post? |
Quote:
I'm running it in my hidden management forum. When I select the style with postbit legacy it shows - when I switch styles to the one using standard postbit it disappears. This confirms that it's switched on and working just fine - just not with one of the templates. Give me a few secs and I'll post 2 screenies of the same post in the same forum . . . |
Ok, I reviewed the code you posted before and this is strange. While you have the HR tag I don't see the DIV tag that wraps the entire element (it should be <div id="helpfulanswers_box_ ... >). Does that appear?
|
OK - 2 screenies - same post.
1. Postbit 2. Postbit legacy I know that it won't provide any clues - just to confirm that the forum's been correctly selected and that the mod is working. |
Quote:
Code:
<div id="helpfulanswers_box_237366"> |
Well that makes even less sense. Revert the template helpful_answers in that style and be sure it starts with:
Code:
<if condition="$show['helpfulanswer']"> |
Revert wasn't an option so I guess it's still original - and I confirm it starts as you describe.
|
I've just re-installed and overwritten (just in case) and no change. :(
|
I'm sorry to keep making you work on this but I can't duplicate on any of my test sites.
Can you edit the template helpful_answers and change the <hr> line (add some random text) and see if that shows up when you view? |
Think I'm getting somewhere - I'll get back to in a few ;)
Thanks for your patience :) |
All fixed Ted - I can't really tell you what the problem was but I reverted the faulty template, added back my hacks and then re9nstalled your mod and all's well.
Thanks for your assistance. One more question - once someone clicks that the post was helpful, is there an easy way to have the cell background change color to highlight it? Mike :) |
All times are GMT. The time now is 10:19 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|