To add karma2 to jomcomment, add this following snippet of code to /components/jom_comment/main.jomcomment.php --
This starts with the switch case statement in line 638. Add the following after line 657
| Code: : |
global $mainframe,$my;
require_once( $mainframe->getCfg('absolute_path') . '/components/com_karma/karma.class.php');
$points = CLASS_karma::getConfig("Custom2");
CLASS_karma::addPoints($my->id, 5, "Comment Submission");
|
| Code: : |
switch ($status) {
case JC_STATUS_OK :
$styles = explode(",", $_JC_CONFIG->get('cyclestyle'));
array_walk($styles, "jcTrim");
$numstyle = count($styles);
$styleCount = $this->_dataMgr->getNumComment($data->contentid, $data->option);
$count = $styleCount;
$style = $styleCount % $numstyle;
// Need to make sure that hidden value is set to false to make sure this comment gets shown
// Otherwise, it will be marked as 'lowly rated comment'
$data->hidden = false;
$newComment = $this->_viewMgr->getCommentsHTML($data);
$newComment = $this->_viewMgr->_cleaupOutput($newComment);
$objResponse->addAssign('jc_busyDiv', 'innerHTML', $responseMsg);
$objResponse->addscriptCall("jc_insertNewEntry", $newComment, "pc_" . $data->id);
$objResponse->addClear('jc_comment', 'value');
$objResponse->addClear('jc_title', 'value');
$objResponse->addAssign('jc_numComment', 'innerHTML', $this->_dataMgr->getNumComment($data->contentid, $data->option));
global $mainframe,$my;
require_once( $mainframe->getCfg('absolute_path') . '/components/com_karma/karma.class.php');
$points = CLASS_karma::getConfig("Custom2");
CLASS_karma::addPoints($my->id, 5, "Comment Submission");
break;
|