vbBux / vbPlaza Test Forum  

Go Back   vbBux / vbPlaza Test Forum > vbBux / vbPlaza World > General Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2009, 09:48 AM
tavenger5 tavenger5 is offline
Junior Member
 
Join Date: Sep 2007
Posts: 25
tavenger5 is on a distinguished road
Points: 206,348.22
Bank: 18,555.89
Total Points: 224,904.11
Reputation points not being given

I'm currently using this mod to give reputation points: http://www.vbulletin.org/forum/showthread.php?t=204117

however, when a user gets a 'good post' or 'bad post' they are not receiving vbplaza points.

Any ideas?
Reply With Quote
  #2  
Old 04-21-2009, 10:49 AM
CMX's Avatar
CMX CMX is offline
vbPlaza Owner / Operator
 
Join Date: Jul 2006
Posts: 1,238
CMX has disabled reputation
Points: 1,436,609.24
Bank: 327,034,842.26
Total Points: 328,471,451.50
No Message - chatzworld Try Opening It - Slim thanks for all your help - mysit Have a drink on me - aranthorn for helping - Mr.Stormshadow 
No Message - Wizzy Thank you! - UncoderMom Here your Beer CMX - bryan No Message - mackanga No Message - AdamD 
No Message - AdamD No Message - AdamD hi - corn No Message - bryan testing the vbplaza - merk51 
Mourning - Anti-Gang - Melanoma - CMX Breast Cancer - Birth Parents - <poke> Troop and Military Support - Amber Alert - Bladder Cancer - Endometriosis - Equality - Liver Cancer - Liver Disease - Missing Children - POW/MIA - Spina Bifida - Suicide - Rsmiley AIDS/HIV - DARE - DUI Awareness - Epidermolysis Bullosa - Heart Disease - Lymphoma - MADD - Substance Abuse - Mendel Eating Disorders - Esophageal Cancer - Gastroesophageal Reflux Disease - Irritable Bowel Syndrome - Pulmonary Hypertension - CMX 
Alzheimer's - Crohn's &amp; Colitis - Cystic Fibrosis - Domestic Violence - Fibromyalgia - Leimyosarcoma - Lupus - bryan 
This system does not modify user reputation, it puts a query into a table that is used for the "post" itself's rating, not the user?

-CMX
Reply With Quote
  #3  
Old 04-21-2009, 11:15 AM
tavenger5 tavenger5 is offline
Junior Member
 
Join Date: Sep 2007
Posts: 25
tavenger5 is on a distinguished road
Points: 206,348.22
Bank: 18,555.89
Total Points: 224,904.11
Right - but doesn't it give the user points for good/bad reputation?

vbBux Per Good Reputation
vbBux Per Bad Reputation

Last edited by tavenger5; 04-21-2009 at 11:17 AM.
Reply With Quote
  #4  
Old 04-21-2009, 12:00 PM
CMX's Avatar
CMX CMX is offline
vbPlaza Owner / Operator
 
Join Date: Jul 2006
Posts: 1,238
CMX has disabled reputation
Points: 1,436,609.24
Bank: 327,034,842.26
Total Points: 328,471,451.50
No Message - chatzworld Try Opening It - Slim thanks for all your help - mysit Have a drink on me - aranthorn for helping - Mr.Stormshadow 
No Message - Wizzy Thank you! - UncoderMom Here your Beer CMX - bryan No Message - mackanga No Message - AdamD 
No Message - AdamD No Message - AdamD hi - corn No Message - bryan testing the vbplaza - merk51 
Mourning - Anti-Gang - Melanoma - CMX Breast Cancer - Birth Parents - <poke> Troop and Military Support - Amber Alert - Bladder Cancer - Endometriosis - Equality - Liver Cancer - Liver Disease - Missing Children - POW/MIA - Spina Bifida - Suicide - Rsmiley AIDS/HIV - DARE - DUI Awareness - Epidermolysis Bullosa - Heart Disease - Lymphoma - MADD - Substance Abuse - Mendel Eating Disorders - Esophageal Cancer - Gastroesophageal Reflux Disease - Irritable Bowel Syndrome - Pulmonary Hypertension - CMX 
Alzheimer's - Crohn's &amp; Colitis - Cystic Fibrosis - Domestic Violence - Fibromyalgia - Leimyosarcoma - Lupus - bryan 
Not according to the code it has. The rating system is entirely separate than the user reputation. If you search for the word "rep" inside their script, it's not found anywhere.

-CMX
Reply With Quote
  #5  
Old 04-21-2009, 12:09 PM
tavenger5 tavenger5 is offline
Junior Member
 
Join Date: Sep 2007
Posts: 25
tavenger5 is on a distinguished road
Points: 206,348.22
Bank: 18,555.89
Total Points: 224,904.11
I see what you're saying now. I was referring to vbplaza in the last post, sorry.

Helpful answers does give rep points for helpful answers. The section of code that does this is under "Helpful Answers -- Rep System", in the xml.
Reply With Quote
  #6  
Old 04-28-2009, 02:27 PM
CMX's Avatar
CMX CMX is offline
vbPlaza Owner / Operator
 
Join Date: Jul 2006
Posts: 1,238
CMX has disabled reputation
Points: 1,436,609.24
Bank: 327,034,842.26
Total Points: 328,471,451.50
No Message - chatzworld Try Opening It - Slim thanks for all your help - mysit Have a drink on me - aranthorn for helping - Mr.Stormshadow 
No Message - Wizzy Thank you! - UncoderMom Here your Beer CMX - bryan No Message - mackanga No Message - AdamD 
No Message - AdamD No Message - AdamD hi - corn No Message - bryan testing the vbplaza - merk51 
Mourning - Anti-Gang - Melanoma - CMX Breast Cancer - Birth Parents - <poke> Troop and Military Support - Amber Alert - Bladder Cancer - Endometriosis - Equality - Liver Cancer - Liver Disease - Missing Children - POW/MIA - Spina Bifida - Suicide - Rsmiley AIDS/HIV - DARE - DUI Awareness - Epidermolysis Bullosa - Heart Disease - Lymphoma - MADD - Substance Abuse - Mendel Eating Disorders - Esophageal Cancer - Gastroesophageal Reflux Disease - Irritable Bowel Syndrome - Pulmonary Hypertension - CMX 
Alzheimer's - Crohn's &amp; Colitis - Cystic Fibrosis - Domestic Violence - Fibromyalgia - Leimyosarcoma - Lupus - bryan 
I'll have to look into it more next week. Ran out of time today.

-CMX
Reply With Quote
  #7  
Old 05-13-2009, 10:50 AM
tavenger5 tavenger5 is offline
Junior Member
 
Join Date: Sep 2007
Posts: 25
tavenger5 is on a distinguished road
Points: 206,348.22
Bank: 18,555.89
Total Points: 224,904.11
any ideas on this?
Reply With Quote
  #8  
Old 05-14-2009, 06:53 PM
CMX's Avatar
CMX CMX is offline
vbPlaza Owner / Operator
 
Join Date: Jul 2006
Posts: 1,238
CMX has disabled reputation
Points: 1,436,609.24
Bank: 327,034,842.26
Total Points: 328,471,451.50
No Message - chatzworld Try Opening It - Slim thanks for all your help - mysit Have a drink on me - aranthorn for helping - Mr.Stormshadow 
No Message - Wizzy Thank you! - UncoderMom Here your Beer CMX - bryan No Message - mackanga No Message - AdamD 
No Message - AdamD No Message - AdamD hi - corn No Message - bryan testing the vbplaza - merk51 
Mourning - Anti-Gang - Melanoma - CMX Breast Cancer - Birth Parents - <poke> Troop and Military Support - Amber Alert - Bladder Cancer - Endometriosis - Equality - Liver Cancer - Liver Disease - Missing Children - POW/MIA - Spina Bifida - Suicide - Rsmiley AIDS/HIV - DARE - DUI Awareness - Epidermolysis Bullosa - Heart Disease - Lymphoma - MADD - Substance Abuse - Mendel Eating Disorders - Esophageal Cancer - Gastroesophageal Reflux Disease - Irritable Bowel Syndrome - Pulmonary Hypertension - CMX 
Alzheimer's - Crohn's &amp; Colitis - Cystic Fibrosis - Domestic Violence - Fibromyalgia - Leimyosarcoma - Lupus - bryan 
Replace the plugin with this code for plugin: helpfulanswers_dorate

Code:
// only run this code if rep is being used AND the feature is enabled for HA 
// for good measure we should be sure they aren't rating their own post too
if ($vbulletin->options['reputationenable'] AND $vbulletin->options['helpans_rep_use'] AND $userid != $vbulletin->userinfo['userid']){
 
// first we setup the reputation type
if($vbulletin->GPC['rank'] AND !$vbulletin->options['helpans_rank_ten']){
$reputation = 'pos'; 
} else if (!$vbulletin->options['helpans_rank_ten'] AND $vbulletin->GPC['rank'] > 5){
$reputation = 'pos'; 
} else {
$reputation = 'neg'; 
}
 
// check if negative rep is allowed and if so, is it on in HA
if($reputation == 'pos' OR ($reputation == 'neg' AND ($vbulletin->bf_ugp_genericpermissions['cannegativerep'] AND $vbulletin->options['helpans_rep_neg']))){ 
 
// now we get the user's info
$userinfo = fetch_userinfo($postinfo['userid']);
cache_permissions($userinfo);
if ($reputation == 'pos')
{
// grab points
$points = $userinfo['permissions']['vbbux_pergoodrep'];
}
else
{
// grab points
$points = $userinfo['permissions']['vbbux_perbadrep'];
}
@vbplaza_quick_add_points($userinfo['userid'], $points);
 
// then we get their rep power
if($vbulletin->options['helpans_rep_solid'] AND $vbulletin->options['helpans_rep_solidnum']){
// options say to use a predefined score
$score = $vbulletin->options['helpans_rep_solidnum'];
if($reputation == 'neg'){ $score = $score * -1; }
} else {
// options say to use the user's real score
require_once(DIR . '/includes/functions_reputation.php'); 
$score = fetch_reppower($vbulletin->userinfo, $permissions, $reputation);
 
if($vbulletin->options['helpans_rep_part']){
// options say to diminish the power of the real score
$score = $score * $vbulletin->options['helpans_rep_partnum'];
}
}
 
$userinfo['reputation'] += $score; // update the score
// Determine this user's reputationlevelid.
$reputationlevel = $db->query_first_slave("
SELECT reputationlevelid
FROM " . TABLE_PREFIX . "reputationlevel
WHERE $userinfo[reputation] >= minimumreputation
ORDER BY minimumreputation
DESC LIMIT 1
");
// init user data manager
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('reputation', $userinfo['reputation']);
$userdata->set('reputationlevelid', intval($reputationlevel['reputationlevelid']));
 
$userdata->pre_save();
if($reputation == 'pos'){
$rate_reason = $vbphrase['helpfulans_rate_pos'];
} else {
$rate_reason = $vbphrase['helpfulans_rate_neg'];
}
/*insert query*/
$db->query_write("
INSERT IGNORE INTO " . TABLE_PREFIX . "reputation (postid, reputation, userid, whoadded, reason, dateline)
VALUES ($postid, $score, ". $postinfo['userid'] .", " . $vbulletin->userinfo['userid'] . ", '". $rate_reason ."' ,'" . TIMENOW . "')
"); 
$userdata->save();
Haven't tested it for obvious reasons, so it will need testing.

-CMX
Reply With Quote
  #9  
Old 05-21-2009, 09:46 PM
tavenger5 tavenger5 is offline
Junior Member
 
Join Date: Sep 2007
Posts: 25
tavenger5 is on a distinguished road
Points: 206,348.22
Bank: 18,555.89
Total Points: 224,904.11
That works great!

Thanks for helping me with this!

Last edited by tavenger5; 05-21-2009 at 09:51 PM.
Reply With Quote
  #10  
Old 05-21-2009, 10:39 PM
CMX's Avatar
CMX CMX is offline
vbPlaza Owner / Operator
 
Join Date: Jul 2006
Posts: 1,238
CMX has disabled reputation
Points: 1,436,609.24
Bank: 327,034,842.26
Total Points: 328,471,451.50
No Message - chatzworld Try Opening It - Slim thanks for all your help - mysit Have a drink on me - aranthorn for helping - Mr.Stormshadow 
No Message - Wizzy Thank you! - UncoderMom Here your Beer CMX - bryan No Message - mackanga No Message - AdamD 
No Message - AdamD No Message - AdamD hi - corn No Message - bryan testing the vbplaza - merk51 
Mourning - Anti-Gang - Melanoma - CMX Breast Cancer - Birth Parents - <poke> Troop and Military Support - Amber Alert - Bladder Cancer - Endometriosis - Equality - Liver Cancer - Liver Disease - Missing Children - POW/MIA - Spina Bifida - Suicide - Rsmiley AIDS/HIV - DARE - DUI Awareness - Epidermolysis Bullosa - Heart Disease - Lymphoma - MADD - Substance Abuse - Mendel Eating Disorders - Esophageal Cancer - Gastroesophageal Reflux Disease - Irritable Bowel Syndrome - Pulmonary Hypertension - CMX 
Alzheimer's - Crohn's &amp; Colitis - Cystic Fibrosis - Domestic Violence - Fibromyalgia - Leimyosarcoma - Lupus - bryan 
Great, glad I could help!

-CMX
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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


Points Per Thread View: 1.00
Points Per Thread: 15.00
Points Per Post: 5.00
Forum Jump


All times are GMT -6. The time now is 11:06 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.