Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
//JomComment
if ($params->get('jomcomment','0') == 0) {
$query = 'SELECT count(id) FROM #__jomcomment WHERE user_id="'.$user->id.'" AND published = 1 AND voted > 0';
$_CB_database->setQuery($query);
$numComments=$_CB_database->loadResult();
if ($numComments>=1) {
if ($numComments>=$jc1) {
getAutoAwardsTab::AddAwards(
$user->id
,$jc1id
,$jc1reason
);
if ($numComments>=$jc2) {
getAutoAwardsTab::AddAwards(
$user->id
,$jc2id
,$jc2reason
);
if ($numComments>=$jc3) {
getAutoAwardsTab::AddAwards(
$user->id
,$jc3id
,$jc3reason
);
if ($numComments>=$jc4) {
getAutoAwardsTab::AddAwards(
$user->id
,$jc4id
,$jc4reason
);
if ($numComments>=$jc5) {
getAutoAwardsTab::AddAwards(
$user->id
,$jc5id
,$jc5reason
);
if ($numComments>=$jc6) {
getAutoAwardsTab::AddAwards(
$user->id
,$jc6id
,$jc6reason
);
if ($numComments>=$jc7) {
getAutoAwardsTab::AddAwards(
$user->id
,$jc7id
,$jc7reason
);
if ($numComments>=$jc8) {
getAutoAwardsTab::AddAwards(
$user->id
,$jc8id
,$jc8reason
);
}
}
}
}
}
}
}
}
}
}
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="jomcomment" type="radio" default='1' label="JomComment" description="Grants users awards based on the amount of their positive voted comments.">
<option value='0'>On</option>
<option value='1'>Off</option>
</param>
//Comments
$jc1id = "14";
$jc1reason = "Awarded for posting 1 comment with a positive score.";
$jc1 = "1";
$jc2id = "15";
$jc2reason = "Awarded for posting 5 comments with a positive score.";
$jc2 = "5";
$jc3id = "16";
$jc3reason = "Awarded for posting 10 comments with a positive score.";
$jc3 = "10";
$jc4id = "17";
$jc4reason = "Awarded for posting 20 comments with a positive score.";
$jc4 = "20";
$jc5id = "18";
$jc5reason = "Awarded for posting 40 comments with a positive score.";
$jc5 = "40";
$jc6id = "19";
$jc6reason = "Awarded for posting 80 comments with a positive score.";
$jc6 = "80";
$jc7id = "20";
$jc7reason = "Awarded for posting 160 comments with a positive score.";
$jc7 = "160";
$jc8id = "21";
$jc8reason = "Awarded for posting 320 comments with a positive score.";
$jc8 = "320";
Please Log in to join the conversation.
Please Log in to join the conversation.