Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
[AJAX] Helpful Answers - Allow users to rate individual posts Details »»
[AJAX] Helpful Answers - Allow users to rate individual posts
Version: 2.4.2, by Ted S Ted S is offline
Developer Last Online: Nov 2020 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.x.x Rating:
Released: 01-15-2010 Last Update: 08-11-2012 Installs: 592
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Helpful Answers has been used to record over 6 MILLION times on more than 2,000 forums. If you're not using HA your users are looking for it!

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
to rate individual posts as either helpful or not allowing future visitors to understand the value of each post.

Designed to be flexible, HA has over 30 configurable settings:
  • Use image or text ratings AJAX or traditional links.
  • Offer yes/no or scaled 1-10 point ranking.
  • Turn off negative ratings for a positive only system.
  • Decide which forums are open for helpful answer ratings.
  • Audit the system and identify top users and potential abusers.
  • Ban specific members from using the system.
  • Customize the message shown after a post is rated.
  • Show a page with the top helpful posts.
  • Show rating stats on a user's profile.
  • Hide posts that rate "too low"
  • Template driven so you can customize it all for your forum.
For advanced users template conditionals and variables let you further extend the functionality to color highlight good or bad posts, include ratings in user?s profiles and much more.

Modification Installation [Must Read]:


Step 1: Upload the addon files found in the upload/ folder to your forum directory
Step 2: Install the plugin through your vB Administration area
Step 3: Configure settings & enable the mod in individual forums


You must configure settings & enable forums before voting will show up.

Anonymous Stats Tracking (optional):

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. You can disable this through the admin.


Mod Philosophy -- Drive Your Own Success:

All of my mods are inspired by my work in digital marketing and are designed to drive registrations, interaction or other engagement activities the core platform does not address.

Each is designed to fit a general need by providing a starting point but it's on you to decide how to make things work to their best possible outcome. Feel free to suggest what you'd like to see next but don't wait to have what everyone else has; figure out what your forum needs and customize away.

Download Now

File Type: zip Helpful Answers vb - 2.4.2.zip (42.0 KB, 999 views)

Screenshots

File Type: jpg 1-16-2010 1-11-43 PM.jpg (41.6 KB, 0 views)
File Type: gif admin-stats1.gif (15.5 KB, 0 views)
File Type: gif admin-stats2.gif (11.3 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
10 благодарности(ей) от:
Baja, Eole, piratarg, PoorGuysGarage, tbworld, TheLastSuperman, thompson, U-Fig

Comments
  #412  
Old 06-11-2010, 10:58 AM
FractalizeR's Avatar
FractalizeR FractalizeR is offline
 
Join Date: Oct 2005
Location: Russia, Moscow
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ted, if you need help with mod... Why not to thematically split it into several *.php files so that there are only require_once() statements left in *.xml and use Launchpad for example for development?

It's hard to code in one big xml file and checkins/checkouts by several devs are not possible in this way.

I think there will be several devs, that are interested in helping with development including me.
Reply With Quote
  #413  
Old 06-11-2010, 05:36 PM
Ted S Ted S is offline
 
Join Date: Dec 2003
Location: SoCal
Posts: 3,954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FractalizeR View Post
Ted, if you need help with mod... Why not to thematically split it into several *.php files so that there are only require_once() statements left in *.xml and use Launchpad for example for development?

It's hard to code in one big xml file and checkins/checkouts by several devs are not possible in this way.

I think there will be several devs, that are interested in helping with development including me.
Completely open on bringing others in here, what functions do you see adding includes support for?
Reply With Quote
  #414  
Old 06-12-2010, 07:04 AM
FractalizeR's Avatar
FractalizeR FractalizeR is offline
 
Join Date: Oct 2005
Location: Russia, Moscow
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I suggested to split *.xml into several *.php files only to ease collaboration. For example, I can work on adding mod data to user's profile and for that there should be ha_userprofile.php with the code for appropriate hook. And you just require_once() this file in main *.xml. I will be able to checkin/checkout this file independently from others and will not interrupt any other work.
Reply With Quote
  #415  
Old 06-12-2010, 10:45 AM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FractalizeR, is not a panacea
Reply With Quote
  #416  
Old 06-13-2010, 12:31 PM
FractalizeR's Avatar
FractalizeR FractalizeR is offline
 
Join Date: Oct 2005
Location: Russia, Moscow
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Panacea for what? I don't get you.
Reply With Quote
  #417  
Old 06-13-2010, 05:18 PM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Выводить код в файлы для увеличения производительности. Плюс получим небольшое неудобство в редактировании
Reply With Quote
  #418  
Old 06-14-2010, 04:13 AM
Ted S Ted S is offline
 
Join Date: Dec 2003
Location: SoCal
Posts: 3,954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FractalizeR View Post
I suggested to split *.xml into several *.php files only to ease collaboration. For example, I can work on adding mod data to user's profile and for that there should be ha_userprofile.php with the code for appropriate hook. And you just require_once() this file in main *.xml. I will be able to checkin/checkout this file independently from others and will not interrupt any other work.
I'm not seeing the added benefit of the require files for splitting things up but I am all for making this extendable, and not just by me.

How about I add a hook to cover additional modules, you write your profile data tool and make it an addon release. I'm glad to support any modifications to the core code but this would help avoid the multiple devs working on the same source that you identified.

Aside from the profile I'm actually rather low on user input so I'm crafting up more ideas of my own. Lots of the stuff to do is really documenting... things like profile votes exist (for showing in posts), I just need to educate on how to use them better.
Reply With Quote
  #419  
Old 06-14-2010, 07:13 AM
FractalizeR's Avatar
FractalizeR FractalizeR is offline
 
Join Date: Oct 2005
Location: Russia, Moscow
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mad@Max View Post
To push code out to files to increase performance. Plus we will get a minor inconvenience for code editing
Please speak English here. I am not suggesting to split code out to files to increase performance. However, that will increase it if server have APC or similar op cache installed. VBulletin is executing it's hooks via eval() and that sucks in performance.

I am suggesting to split plugin into several files by functionality to improve the ability to collaborate. Editing one XML is like editing a... I don't know... Will you be able to code editor like Microsoft Paint all in one C++ source code file? Is that convenient? Of course, you can pull code parts out of XML at least to have some code highlighting and after editing - put it back there. But is that convenient? I prefer rich IDEs like Zend Studio for writing code. And they are, of course, no suitable for editing XML files with embedded PHP code.

Also if something like Git will be used, we will be able to push code for review by Ted and he will be able to easily pull it and import into the project.

Quote:
Originally Posted by Ted S
Aside from the profile I'm actually rather low on user input so I'm crafting up more ideas of my own. Lots of the stuff to do is really documenting... things like profile votes exist (for showing in posts), I just need to educate on how to use them better.
So... should we craft some code example on integrating data to user profile? Can you send me your latest plugin XML so that I could try to do that? FractalizeR@yandex.ru.
Reply With Quote
  #420  
Old 06-15-2010, 04:38 AM
Ted S Ted S is offline
 
Join Date: Dec 2003
Location: SoCal
Posts: 3,954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FractalizeR View Post
So... should we craft some code example on integrating data to user profile? Can you send me your latest plugin XML so that I could try to do that? FractalizeR@yandex.ru.
I was actually suggesting you write what you want and I'll make it work as an addon. This way you can modify as you see fit, and I can build any support needed to make it work.

I don't see a check in/ checkout system making sense for this mod as it's a pretty small project but am very open to supporting other coders working on addons / edits for it as needed.
Reply With Quote
  #421  
Old 06-21-2010, 06:35 AM
FractalizeR's Avatar
FractalizeR FractalizeR is offline
 
Join Date: Oct 2005
Location: Russia, Moscow
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Patch for member profile info for 2.3.0:

1. Add to cache_templates hook:

PHP Code:
                if (THIS_SCRIPT == 'member')
                {
                    if(
$vbulletin->options['helpans_stats_ten']) {
                        
$cache[] = 'helpful_statsbit_ten';
                    } else {
                        
$cache[] = 'helpful_statsbit';
                    }
                } 


2. Delete member_build_blocks_start hook and make member_profileblock_fetch_unwrapped hook with the following contents instead:
PHP Code:
        <plugin active="1" executionorder="100">
            <
title>Helpful Answers -- Profile Stats</title>
            <
hookname>member_profileblock_fetch_unwrapped</hookname>
            <
phpcode><![CDATA[
            
            if (
$this->registry->options['helpans_stats_votes'] OR $this->registry->options['helpans_stats_ranks'] OR $this->registry->options['helpans_stats_ten']){
                
                
// if we're using standard 0/1 voting show counts
                
if(!$this->registry->options['helpans_rank_ten']){
                
                    if (
$this->registry->options['helpans_stats_votes']){
                    
$helpfulanswer $this->registry->db->query_first_slave("
                        SELECT COUNT(helpfulanswerid) as count 
                        FROM " 
TABLE_PREFIX "helpfulanswer as helpfulanswer
                        WHERE userid = " 
intval($userinfo['userid']) . "
                    "
);    
                    }
                    
                    if (
$this->registry->options['helpans_stats_ranks']){
                    
$helpfulposts $this->registry->db->query_first_slave("
                        SELECT SUM(helpfulpost.goodrank) as goodranks,SUM(helpfulpost.totalrank) as totalranks
                        FROM " 
TABLE_PREFIX "helpfulpost as helpfulpost
                        INNER JOIN " 
TABLE_PREFIX "post AS post ON(post.postid = helpfulpost.postid)
                        WHERE post.userid = " 
intval($userinfo['userid']) . "
                        GROUP by post.userid
                    "
);
                    }
                    
                    
$helpfulposts['badranks'] = $helpfulposts['totalranks'] - $helpfulposts['goodranks'];
                    if(
$helpfulposts['goodranks'] > AND $helpfulposts['totalranks'] > 0){ $helpfulposts['average'] = ($helpfulposts['goodranks'] / $helpfulposts['totalranks']); }
                    
                    (
$hook =  vBulletinHook::fetch_hook('helpfulanswers_user_stats')) ? eval($hook) : false;
                    
                    
$templater vB_Template::create('helpful_statsbit');
                    
$templater->register('helpfulanswer_count'$helpfulanswer['count']);
                    
$templater->register('helpfulanswer_goodranks'$helpfulposts['goodranks']);
                    
$templater->register('helpfulanswer_totalranks'$helpfulposts['totalranks']);
                    
$templater->register('helpfulanswer_badranks'$helpfulposts['badranks']);
                    
$templater->register('helpfulanswer_average'$helpfulposts['average']);
                    
$template_hook['profile_stats_last'] .= $templater->render();
                                
                
                
// if we're using 10 scale votes show different
                
} else {
                
                    if (
$this->registry->options['helpans_stats_ten']){
                    
                        
$helpfulposts $this->registry->db->query_first_slave("
                            SELECT SUM(helpfulpost.goodrank) as goodrank, SUM(helpfulpost.totalrank) as totalranks
                            FROM " 
TABLE_PREFIX "helpfulpost as helpfulpost
                            INNER JOIN " 
TABLE_PREFIX "post AS post ON(post.postid = helpfulpost.postid)
                            WHERE post.userid = " 
intval($userinfo['userid']) . "
                            GROUP by post.userid
                        "
);
                        
                        if(
$helpfulposts['goodrank'] && $helpfulposts['totalranks'] > 0){ $helpfulposts['avgrank'] = $helpfulposts['goodrank'] / $helpfulposts['totalranks']; }
                        
$helpfulposts['avgrank'] = number_format($helpfulposts['avgrank'], 1'.'' ');
                        
                        
$templater vB_Template::create('helpful_statsbit_ten');
                        
$templater->register('helpfulanswer_goodranks'$helpfulposts['goodranks']);
                        
$templater->register('helpfulanswer_totalranks'$helpfulposts['totalranks']);
                        
$templater->register('helpfulanswer_badranks'$helpfulposts['badranks']);
                        
$templater->register('helpfulanswer_average'$helpfulposts['average']);
                        
$template_hook['profile_stats_last'] .= $templater->render();
                        
                    }
                
                }
    
            }
            
            ]]></
phpcode>
        </
plugin
Also you can find ideas for next versions here: https://vborg.vbsupport.ru/showpost....&postcount=362
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07989 seconds
  • Memory Usage 2,416KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (8)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete