Configuring reputation points
In AnsPress when configuring the reputation options, you can change points per event and change events that where points are awarded.
where could I find the list of event available for reputation?
What social plugin could we use, so we could award users, reputation points for sharing questions on social media?
I have already answered that before: https://anspress.io/questions/question/reputation-for-referring-user/?show_answer=8579#answer_8579
I will say again: it should work in a different way. Not as list of constants to look up to, but list of events (actions), that anspress automatically hooks into, automatically awarding set number of reputation.
Here is a sample code how it was supposed to be implemented:
$reputation_actions = ap_get_reputation_actions(); // from db foreach($reputation_actions as $ra) { if(is_not_null_and_stuff($ra) && $ra->reputation_gain != 0) { add_action($ra->action_name, 'ap_auto_add_reputation'); } } function ap_auto_add_reputation() { $rep_gain = ap_get_rep_gain($current_action_name); ap_meta_change_stuff($proper_user_id, $some, $params, $rep_gain); } // Now the only thing author of addon needs to do is to handle his own stuff, and then call do_action('my_plugin_add_rep', $userid, $some, $params)
Removing rep should work ok this way as well. Please consider.