Your Ad Here

Home | Karma2 Forums | Karma2 Downloads | Contact

  Home arrow Karma2 Forums

The Karma2 Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:jomcomment integration (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: Re:jomcomment integration
#40
implicateorder (User)
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
jomcomment integration 1 Year, 3 Months ago  
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->id5"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->id5"Comment Submission"); break;

Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
 
Report to moderator   Logged Logged  
  Reply Quote
#43
MindArchr (Admin)
Vows made in storms are forgotten in calm.
Admin
Posts: 19
graph
User Offline Click here to see the profile of this user
Gender: Female Digital Remarks MindArchrx DefiantMystery@msn.com Mindresort Location: Los Angeles, CA, USA Birthdate: 1985-12-11
Re:jomcomment integration 1 Year, 3 Months ago  
MindArchr wrote:
Here's an alternative in case the above does not work:

On line 306, where it shows:
Code: :

 function ajaxAddComment($xajaxArgs) {

right under *Add a new comment

add the following:
Code: :

  global $mainframe,$my;                 require_once( $mainframe->getCfg('absolute_path') . '/components/com_karma/karma.class.php');                 $points CLASS_karma::getConfig("Custom3");                 CLASS_karma::addPoints($my->id5"Posted A Comment");



so that it displays like:
Code: :

  /**          * Add a new comment          */         function ajaxAddComment($xajaxArgs) {                 global $mainframe,$my;                 require_once( $mainframe->getCfg('absolute_path') . '/components/com_karma/karma.class.php');                 $points CLASS_karma::getConfig("Custom3");                 CLASS_karma::addPoints($my->id5"Posted A Comment");                 error_reporting(E_ALL);                 global $_JC_CONFIG$mainframe;                                  $this->cms->load('libraries','user');                 $this->cms->load('libraries''input');



Again, this is only an alternative method if the above one does not work. This is for JomComment version 2.2 Build 536 and these changes can be implemented in the same file (main.jomcomment.php)
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
 
Report to moderator   Logged Logged  
  Reply Quote
#59
dfdsfasd (Visitor)
Click here to see the profile of this user
Birthdate:
Re:jomcomment integration 8 Months, 1 Week ago  
MindArchr wrote:
MindArchr wrote:
Here's an alternative in case the above does not work:

On line 306, where it shows:
Code: :

 function ajaxAddComment($xajaxArgs) {

right under *Add a new comment

add the following:
Code: :

  global $mainframe,$my;                 require_once( $mainframe->getCfg('absolute_path') . '/components/com_karma/karma.class.php');                 $points CLASS_karma::getConfig("Custom3");                 CLASS_karma::addPoints($my->id5"Posted A Comment");



so that it displays like:
Code: :

  /**          * Add a new comment          */         function ajaxAddComment($xajaxArgs) {                 global $mainframe,$my;                 require_once( $mainframe->getCfg('absolute_path') . '/components/com_karma/karma.class.php');                 $points CLASS_karma::getConfig("Custom3");                 CLASS_karma::addPoints($my->id5"Posted A Comment");                 error_reporting(E_ALL);                 global $_JC_CONFIG$mainframe;                                  $this->cms->load('libraries','user');                 $this->cms->load('libraries''input');



Again, this is only an alternative method if the above one does not work. This is for JomComment version 2.2 Build 536 and these changes can be implemented in the same file (main.jomcomment.php)
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
 
Report to moderator   Logged Logged  
  Reply Quote
Go to top Post Reply
Powered by FireBoard



Warning: fopen(/home/review7/public_html/www1/test/components/com_sef/cache/shCacheContent.php) [function.fopen]: failed to open stream: Permission denied in /home/review7/public_html/www1/test/components/com_sef/shCache.php on line 108