XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
point.controller.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
8 class pointController extends point
9 {
13  function init()
14  {
15  }
16 
21  {
22  // Get the point module information
23  $oModuleModel = getModel('module');
24  $config = $oModuleModel->getModuleConfig('point');
25  // Get the member_srl of the newly registered member
26  $member_srl = $obj->member_srl;
27  // Get the points of the member
28  $oPointModel = getModel('point');
29  $cur_point = $oPointModel->getPoint($member_srl, true);
30 
31  $point = $config->signup_point;
32  // Increase the point
33  $cur_point += $point;
34  $this->setPoint($member_srl,$cur_point, 'signup');
35 
36  return new BaseObject();
37  }
38 
43  {
44  $member_srl = $obj->member_srl;
45  if(!$member_srl) return new BaseObject();
46  // If the last login is not today, give the points
47  if(substr($obj->last_login,0,8)==date("Ymd")) return new BaseObject();
48  // Get the point module information
49  $oModuleModel = getModel('module');
50  $config = $oModuleModel->getModuleConfig('point');
51  // Get the points of the member
52  $oPointModel = getModel('point');
53  $cur_point = $oPointModel->getPoint($member_srl, true);
54 
55  $point = $config->login_point;
56  // Increase the point
57  $cur_point += $point;
58  $this->setPoint($member_srl,$cur_point);
59 
60  return new BaseObject();
61  }
62 
67  {
68  $oDocumentModel = getModel('document');
69  if($obj->status != $oDocumentModel->getConfigStatus('temp'))
70  {
71  $module_srl = $obj->module_srl;
72  $member_srl = $obj->member_srl;
73  if(!$module_srl || !$member_srl) return new BaseObject();
74  // The fix to disable giving points for saving the document temporarily
75  if($module_srl == $member_srl) return new BaseObject();
76  // Get the point module information
77  $oModuleModel = getModel('module');
78  $config = $oModuleModel->getModuleConfig('point');
79  $module_config = $oModuleModel->getModulePartConfig('point',$module_srl);
80  // Get the points of the member
81  $oPointModel = getModel('point');
82  $cur_point = $oPointModel->getPoint($member_srl, true);
83 
84  $point = $module_config['insert_document'];
85  if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_document;
86  $cur_point += $point;
87  // Add points for attaching a file
88  $point = $module_config['upload_file'];
89  if(strlen($point) == 0 && !is_int($point)) $point = $config->upload_file;
90  if($obj->uploaded_count) $cur_point += $point * $obj->uploaded_count;
91  // Increase the point
92  $this->setPoint($member_srl,$cur_point);
93  }
94 
95  return new BaseObject();
96  }
97 
103  {
104  $oDocumentModel = getModel('document');
105  $document_srl = $obj->document_srl;
106  $oDocument = $oDocumentModel->getDocument($document_srl);
107 
108  // if status is TEMP or PUBLIC... give not point, only status is empty
109  if($oDocument->get('status') == $oDocumentModel->getConfigStatus('temp') && $obj->status != $oDocumentModel->getConfigStatus('temp'))
110  {
111  $oModuleModel = getModel('module');
112 
113  // Get the point module information
114  $config = $oModuleModel->getModuleConfig('point');
115  $module_config = $oModuleModel->getModulePartConfig('point',$obj->module_srl);
116  // Get the points of the member
117  $oPointModel = getModel('point');
118  $cur_point = $oPointModel->getPoint($oDocument->get('member_srl'), true);
119 
120  $point = $module_config['insert_document'];
121  if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_document;
122  $cur_point += $point;
123  // Add points for attaching a file
124  $point = $module_config['upload_file'];
125  if(strlen($point) == 0 && !is_int($point)) $point = $config->upload_file;
126  if($obj->uploaded_count) $cur_point += $point * $obj->uploaded_count;
127  // Increase the point
128  $this->setPoint($oDocument->get('member_srl'), $cur_point);
129  }
130 
131  return new BaseObject();
132  }
133 
138  {
139  $document_srl = $obj->document_srl;
140  $member_srl = $obj->member_srl;
141 
142  $oDocumentModel = getModel('document');
143  $oDocument = $oDocumentModel->getDocument($document_srl);
144  if(!$oDocument->isExists()) return new BaseObject();
145  // Get the point module information
146  $oModuleModel = getModel('module');
147  $config = $oModuleModel->getModuleConfig('point');
148  $module_config = $oModuleModel->getModulePartConfig('point',$oDocument->get('module_srl'));
149  // The process related to clearing the post comments
150  $comment_point = $module_config['insert_comment'];
151  if(strlen($comment_point) == 0 && !is_int($comment_point)) $comment_point = $config->insert_comment;
152  // If there are comment points, attempt to deduct
153  if($comment_point>0) return new BaseObject();
154  // Get all the comments related to this post
155  $cp_args = new stdClass();
156  $cp_args->document_srl = $document_srl;
157  $output = executeQueryArray('point.getCommentUsers', $cp_args);
158  // Return if there is no object
159  if(!$output->data) return new BaseObject();
160  // Organize the member number
161  $member_srls = array();
162  $cnt = count($output->data);
163  for($i=0;$i<$cnt;$i++)
164  {
165  if($output->data[$i]->member_srl<1) continue;
166  $member_srls[abs($output->data[$i]->member_srl)] = $output->data[$i]->count;
167  }
168  // Remove the member number who has written the original post
169  if($member_srl) unset($member_srls[abs($member_srl)]);
170  if(!count($member_srls)) return new BaseObject();
171  // Remove all the points for each member
172  $oPointModel = getModel('point');
173  // Get the points
174  $point = $module_config['download_file'];
175  foreach($member_srls as $member_srl => $cnt)
176  {
177  $cur_point = $oPointModel->getPoint($member_srl, true);
178  $cur_point -= $cnt * $comment_point;
179  $this->setPoint($member_srl,$cur_point);
180  }
181 
182  return new BaseObject();
183  }
184 
189  {
190  $oDocumentModel = getModel('document');
191 
192  if($obj->status != $oDocumentModel->getConfigStatus('temp'))
193  {
194  $module_srl = $obj->module_srl;
195  $member_srl = $obj->member_srl;
196  // The process related to clearing the post object
197  if(!$module_srl || !$member_srl) return new BaseObject();
198  // Run only when logged in
199  $logged_info = Context::get('logged_info');
200  if(!$logged_info->member_srl) return new BaseObject();
201  // Get the points of the member
202  $oPointModel = getModel('point');
203  $cur_point = $oPointModel->getPoint($member_srl, true);
204  // Get the point module information
205  $oModuleModel = getModel('module');
206  $config = $oModuleModel->getModuleConfig('point');
207  $module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
208 
209  $point = $module_config['insert_document'];
210  if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_document;
211  // if the point is set to decrease when writing a document, make sure it does not increase the points when deleting an article
212  if($point < 0) return new BaseObject();
213  $cur_point -= $point;
214  // Increase the point
215  $this->setPoint($member_srl,$cur_point);
216  }
217 
218  return new BaseObject();
219  }
220 
225  {
226  $module_srl = $obj->module_srl;
227  $member_srl = $obj->member_srl;
228  if(!$module_srl || !$member_srl) return new BaseObject();
229  // Do not increase the points if the member is the author of the post
230  $document_srl = $obj->document_srl;
231  $oDocumentModel = getModel('document');
232  $oDocument = $oDocumentModel->getDocument($document_srl);
233  if(!$oDocument->isExists() || abs($oDocument->get('member_srl'))==abs($member_srl)) return new BaseObject();
234  // Get the point module information
235  $oModuleModel = getModel('module');
236  $config = $oModuleModel->getModuleConfig('point');
237  $module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
238  // Get the points of the member
239  $oPointModel = getModel('point');
240  $cur_point = $oPointModel->getPoint($member_srl, true);
241 
242  $point = $module_config['insert_comment'];
243  if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_comment;
244  // Increase the point
245  $cur_point += $point;
246  $this->setPoint($member_srl,$cur_point);
247 
248  return new BaseObject();
249  }
250 
255  {
256  $oModuleModel = getModel('module');
257  $oPointModel = getModel('point');
258  $oDocumentModel = getModel('document');
259 
260  $module_srl = $obj->module_srl;
261  $member_srl = abs($obj->member_srl);
262  $document_srl = $obj->document_srl;
263  if(!$module_srl || !$member_srl) return new BaseObject();
264  // Get the original article (if the original article is missing or if the member is its author, do not apply the points)
265  $oDocument = $oDocumentModel->getDocument($document_srl);
266  if(!$oDocument->isExists()) return new BaseObject();
267  if($oDocument->get('member_srl')==$member_srl) return new BaseObject();
268  // Get the point module information
269  $config = $oModuleModel->getModuleConfig('point');
270  $module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
271  // Get the points of the member
272  $cur_point = $oPointModel->getPoint($member_srl, true);
273 
274  $point = $module_config['insert_comment'];
275  if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_comment;
276  // if the point is set to decrease when writing a comment, make sure it does not increase the points when deleting a comment
277  if($point < 0) return new BaseObject();
278  // Increase the point
279  $cur_point -= $point;
280  $this->setPoint($member_srl,$cur_point);
281 
282  return new BaseObject();
283  }
284 
290  {
291  return new BaseObject();
292  }
293 
299  {
300  if($obj->isvalid != 'Y') return new BaseObject();
301 
302  $module_srl = $obj->module_srl;
303  $member_srl = $obj->member_srl;
304  if(!$module_srl || !$member_srl) return new BaseObject();
305  // Get the point module information
306  $oModuleModel = getModel('module');
307  $config = $oModuleModel->getModuleConfig('point');
308  $module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
309  // Get the points of the member
310  $oPointModel = getModel('point');
311  $cur_point = $oPointModel->getPoint($member_srl, true);
312 
313  $point = $module_config['upload_file'];
314  if(strlen($point) == 0 && !is_int($point)) $point = $config->upload_file;
315  // Increase the point
316  $cur_point -= $point;
317  $this->setPoint($member_srl,$cur_point);
318 
319  return new BaseObject();
320  }
321 
326  {
327  $logged_info = Context::get('logged_info');
328  $member_srl = $logged_info->member_srl;
329  $module_srl = $obj->module_srl;
330  if(!$module_srl) return new BaseObject();
331 
332  // Pass if it is your file
333  if($member_srl && abs($obj->member_srl) == $member_srl) return new BaseObject();
334  $oModuleModel = getModel('module');
335  $config = $oModuleModel->getModuleConfig('point');
336  $module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
337  if (isset($module_config['download_file']))
338  {
339  $point = intval($module_config['download_file']);
340  }
341  else
342  {
343  $point = intval($config->download_file);
344  }
345 
346  // If the user is not logged in and download requires points, deny access.
347  if(!Context::get('is_logged'))
348  {
349  if($config->disable_download == 'Y' && $point)
350  {
351  return new BaseObject(-1,'msg_not_permitted_download');
352  }
353  else
354  {
355  return new BaseObject();
356  }
357  }
358 
359  // Get the points of the member
360  $oPointModel = getModel('point');
361  $cur_point = $oPointModel->getPoint($member_srl, true);
362 
363  // If the member does not have enough points, deny access.
364  if ($config->disable_download == 'Y' && $cur_point + $point < 0)
365  {
366  return new BaseObject(-1,'msg_cannot_download');
367  }
368 
369  // Otherwise, points will be adjusted after downloading (triggerDownloadFile).
370  return new BaseObject();
371  }
372 
377  {
378  // Run only when logged in
379  $logged_info = Context::get('logged_info');
380  if(!$logged_info->member_srl) return new BaseObject();
381  $module_srl = $obj->module_srl;
382  $member_srl = $logged_info->member_srl;
383  if(!$module_srl) return new BaseObject();
384 
385  // Pass if it is your file
386  if($member_srl && abs($obj->member_srl) == $member_srl) return new BaseObject();
387 
388  // Get the point module information
389  $oModuleModel = getModel('module');
390  $config = $oModuleModel->getModuleConfig('point');
391  $module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
392  if (isset($module_config['download_file']))
393  {
394  $point = intval($module_config['download_file']);
395  }
396  else
397  {
398  $point = intval($config->download_file);
399  }
400 
401  // Get the points of the member
402  $oPointModel = getModel('point');
403  $cur_point = $oPointModel->getPoint($member_srl, true);
404 
405  // Increase or decrease points.
406  if ($point)
407  {
408  $this->setPoint($member_srl, $cur_point += $point);
409  }
410  return new BaseObject();
411  }
412 
418  {
419  $oModuleModel = getModel('module');
420  $oPointModel = getModel('point');
421  // Get visitor information
422  $logged_info = Context::get('logged_info');
423  $member_srl = $logged_info->member_srl;
424  // Get the original author number
425  $target_member_srl = abs($obj->get('member_srl'));
426  // Pass without increasing the hits if the viewer is the same as the author
427  if($target_member_srl == $member_srl) return new BaseObject();
428  // Get the point information for each module
429  $config = $oModuleModel->getModuleConfig('point');
430  $module_config = $oModuleModel->getModulePartConfig('point', $obj->get('module_srl'));
431  // Get hits points
432  $point = $module_config['read_document'];
433  if(strlen($point) == 0 && !is_int($point)) $point = $config->read_document;
434  // Pass if there are no requested points
435  if(!$point) return new BaseObject();
436  // In case of a registered member, if it is read but cannot just pass, then get the current points
437  if($member_srl)
438  {
439  $args->member_srl = $member_srl;
440  $args->document_srl = $obj->document_srl;
441  $output = executeQuery('document.getDocumentReadedLogInfo', $args);
442  if($output->data->count) return new BaseObject();
443  $cur_point = $oPointModel->getPoint($member_srl, true);
444  }
445  else
446  {
447  $cur_point = 0;
448  }
449  // Get the defaul configurations of the Point Module
450  $config = $oModuleModel->getModuleConfig('point');
451  // When the requested points are negative, compared it with the current point
452  $_SESSION['banned_document'][$obj->document_srl] = false;
453  if($config->disable_read_document == 'Y' && $point < 0 && abs($point)>$cur_point)
454  {
455  $message = sprintf(Context::getLang('msg_disallow_by_point'), abs($point), $cur_point);
456  $obj->add('content', $message);
457  $_SESSION['banned_document'][$obj->document_srl] = true;
458  return new BaseObject(-1, $message);
459  }
460  // If not logged in, pass
461  if(!$logged_info->member_srl) return new BaseObject();
462  // Pass, if there are no requested points
463  if(!$point) return new BaseObject();
464  // If the read record is missing, leave it
465  $output = executeQuery('document.insertDocumentReadedLog', $args);
466  // Increase the point
467  $cur_point += $point;
468  $this->setPoint($member_srl,$cur_point);
469 
470  return new BaseObject();
471  }
472 
477  {
478  $module_srl = $obj->module_srl;
479  $member_srl = $obj->member_srl;
480  if(!$module_srl || !$member_srl) return new BaseObject();
481 
482  $oModuleModel = getModel('module');
483  $config = $oModuleModel->getModuleConfig('point');
484  $module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
485 
486  $oPointModel = getModel('point');
487  $cur_point = $oPointModel->getPoint($member_srl, true);
488 
489  if( $obj->point > 0 )
490  {
491  $point = $module_config['voted'];
492  if(strlen($point) == 0 && !is_int($point)) $point = $config->voted;
493  }
494  else
495  {
496  $point = $module_config['blamed'];
497  if(strlen($point) == 0 && !is_int($point)) $point = $config->blamed;
498  }
499 
500  if(!$point) return new BaseObject();
501  // Increase the point
502  $cur_point += $point;
503  $this->setPoint($member_srl,$cur_point);
504 
505  return new BaseObject();
506  }
507 
511  function setPoint($member_srl, $point, $mode = null)
512  {
513  $member_srl = abs($member_srl);
514  $mode_arr = array('add', 'minus', 'update', 'signup');
515  if(!$mode || !in_array($mode,$mode_arr)) $mode = 'update';
516 
517  // Get configuration information
518  $oMemberModel = getModel('member');
519  $oModuleModel = getModel('module');
520  $oPointModel = getModel('point');
521  $config = $oModuleModel->getModuleConfig('point');
522 
523  // Get the default configuration information
524  $current_point = $oPointModel->getPoint($member_srl, true);
525  $current_level = $oPointModel->getLevel($current_point, $config->level_step);
526 
527  // Change points
528  $args = new stdClass();
529  $args->member_srl = $member_srl;
530  $args->point = $current_point;
531 
532  switch($mode)
533  {
534  case 'add' :
535  $args->point += $point;
536  break;
537  case 'minus' :
538  $args->point -= $point;
539  break;
540  case 'update' :
541  case 'signup' :
542  $args->point = $point;
543  break;
544  }
545  if($args->point < 0) $args->point = 0;
546  $point = $args->point;
547 
548  // Call a trigger (before)
549  $trigger_obj = new stdClass();
550  $trigger_obj->member_srl = $args->member_srl;
551  $trigger_obj->mode = $mode;
552  $trigger_obj->current_point = $current_point;
553  $trigger_obj->current_level = $current_level;
554  $trigger_obj->set_point = $point;
555  $trigger_output = ModuleHandler::triggerCall('point.setPoint', 'before', $trigger_obj);
556  if(!$trigger_output->toBool())
557  {
558  return $trigger_output;
559  }
560 
561  // begin transaction
562  $oDB = &DB::getInstance();
563  $oDB->begin();
564 
565  // If there are points, update, if no, insert
566  if($current_point > 0)
567  {
568  $output = executeQuery("point.updatePoint", $args);
569  }
570  else
571  {
572  // 많은 동접시 넣는 과정에서 insert가 미리 이루어졌지만 이 공간으로 넘어올 경우 다시 한번 더 업데이트를 처리.
573  $output = executeQuery("point.insertPoint", $args);
574  if(!$output->toBool())
575  {
576  $output = executeQuery("point.updatePoint", $args);
577  }
578  }
579 
580  if(!$output->toBool())
581  {
582  $oDB->rollback();
583  return $output;
584  }
585 
586  // Get a new level
587  $level = $oPointModel->getLevel($point, $config->level_step);
588 
589  // If existing level and a new one are different attempt to set a point group
590  if($level != $current_level)
591  {
592  // Check if the level, for which the current points are prepared, is calculate and set the correct group
593  $point_group = $config->point_group;
594  // If the point group exists
595  if($point_group && is_array($point_group) && count($point_group) )
596  {
597  // Get the default group
598  $default_group = $oMemberModel->getDefaultGroup();
599  // Get the removed group and the newly granted group
600  $del_group_list = array();
601  $new_group_list = array();
602 
603  asort($point_group);
604  // Reset group after initialization
605  if($config->group_reset != 'N')
606  {
607  // If the new level is in the right group
608  if(in_array($level, $point_group))
609  {
610  // Delete all groups except the one which the current level belongs to
611  foreach($point_group as $group_srl => $target_level)
612  {
613  $del_group_list[] = $group_srl;
614  if($target_level == $level) $new_group_list[] = $group_srl;
615  }
616  }
617  // Otherwise, in case the level is reduced, add the recent group
618  else
619  {
620  $i = $level;
621  while($i > 0)
622  {
623  if(in_array($i, $point_group))
624  {
625  foreach($point_group as $group_srl => $target_level)
626  {
627  if($target_level == $i)
628  {
629  $new_group_list[] = $group_srl;
630  }
631  }
632  $i = 0;
633  }
634  $i--;
635  }
636  }
637  // Delete the group of a level which is higher than the current level
638  foreach($point_group as $group_srl => $target_level)
639  {
640  if($target_level > $level) $del_group_list[] = $group_srl;
641  }
642  $del_group_list[] = $default_group->group_srl;
643  }
644  // Grant a new group
645  else
646  {
647  // Check until the current level by rotating setting the configurations of the point groups
648  foreach($point_group as $group_srl => $target_level)
649  {
650  $del_group_list[] = $group_srl;
651  if($target_level <= $level) $new_group_list[] = $group_srl;
652  }
653  }
654  // If there is no a new group, granted the default group
655  if(!$new_group_list[0]) $new_group_list[0] = $default_group->group_srl;
656  // Remove linkage group
657  if($del_group_list && count($del_group_list))
658  {
659  $del_group_args = new stdClass;
660  $del_group_args->member_srl = $member_srl;
661  $del_group_args->group_srl = implode(',', $del_group_list);
662  $del_group_output = executeQuery('point.deleteMemberGroup', $del_group_args);
663  }
664  // Grant a new group
665  foreach($new_group_list as $group_srl)
666  {
667  $new_group_args = new stdClass;
668  $new_group_args->member_srl = $member_srl;
669  $new_group_args->group_srl = $group_srl;
670  executeQuery('member.addMemberToGroup', $new_group_args);
671  }
672  }
673  }
674 
675  // Call a trigger (after)
676  $trigger_obj->new_group_list = $new_group_list;
677  $trigger_obj->del_group_list = $del_group_list;
678  $trigger_obj->new_level = $level;
679  $trigger_output = ModuleHandler::triggerCall('point.setPoint', 'after', $trigger_obj);
680  if(!$trigger_output->toBool())
681  {
682  $oDB->rollback();
683  return $trigger_output;
684  }
685 
686  $oDB->commit();
687 
688  // Cache Settings
689  $cache_path = sprintf('./files/member_extra_info/point/%s/', getNumberingPath($member_srl));
690  FileHandler::makedir($cache_path);
691 
692  $cache_filename = sprintf('%s%d.cache.txt', $cache_path, $member_srl);
693  FileHandler::writeFile($cache_filename, $point);
694 
695  $oCacheHandler = CacheHandler::getInstance('object', null, true);
696  if($new_group_list && $del_group_list && $oCacheHandler->isSupport())
697  {
698  $object_key = 'member_groups:' . getNumberingPath($member_srl) . $member_srl . '_0';
699  $cache_key = $oCacheHandler->getGroupKey('member', $object_key);
700  $oCacheHandler->delete($cache_key);
701  }
702 
703  $oCacheHandler = CacheHandler::getInstance('object');
704  if($new_group_list && $del_group_list && $oCacheHandler->isSupport())
705  {
706  $object_key = 'member_info:' . getNumberingPath($member_srl) . $member_srl;
707  $cache_key = $oCacheHandler->getGroupKey('member', $object_key);
708  $oCacheHandler->delete($cache_key);
709  }
710 
711  return $output;
712  }
713 
715  {
716  $oModuleModel = getModel('module');
717  $pointConfig = $oModuleModel->getModulePartConfig('point', $obj->originModuleSrl);
718 
719  $oModuleController = getController('module');
720  if(is_array($obj->moduleSrlList))
721  {
722  foreach($obj->moduleSrlList AS $key=>$moduleSrl)
723  {
724  $oModuleController->insertModulePartConfig('point', $moduleSrl, $pointConfig);
725  }
726  }
727  }
728 }
729 /* End of file point.controller.php */
730 /* Location: ./modules/point/point.controller.php */
$oModuleModel
Definition: ko.install.php:236
getController($module_name)
Definition: func.inc.php:90
triggerInsertMember(&$obj)
Membership point application trigger.
getNumberingPath($no, $size=3)
Definition: func.inc.php:1081
triggerInsertFile(&$obj)
Add the file registration trigger To prevent taking points for invalid file registration this method ...
$obj
Definition: ko.install.php:262
init()
Initialization.
$output
Definition: ko.install.php:193
& getInstance($target= 'object', $info=null, $always_use_file=false)
triggerInsertComment(&$obj)
A trigger which gives points for entering a comment.
writeFile($filename, $buff, $mode="w")
triggerInsertDocument(&$obj)
A trigger to add points to the member for creating a post.
triggerUpdateVotedCount(&$obj)
Points for voting up or down.
$cache_path
Definition: config.inc.php:425
$module_srl
integer value to represent a run-time instance of Module (XE Module)
The parent class of the point module.
Definition: point.class.php:8
triggerDownloadFile(&$obj)
The trigger to give or take points for downloading the file.
triggerDeleteDocument(&$obj)
A trigger to give points for deleting the post.
triggerUpdateReadedCount(&$obj)
Give points for hits increase Run it even if there are no points.
$args
Definition: ko.install.php:185
Controller class of point modules.
$document_srl
Definition: ko.install.php:279
$oDocumentModel
Definition: ko.install.php:259
setPoint($member_srl, $point, $mode=null)
Set points.
getInstance($db_type=NULL)
Definition: DB.class.php:142
triggerAfterLogin(&$obj)
A trigger to add points to the member for login.
triggerUpdateDocument(&$obj)
The trigger to give points for normal saving the temporarily saved document Temporary storage at the ...
getLang($code)
triggerDeleteFile(&$obj)
A trigger to give points for deleting a file Remove points only in case an invalid file is being dele...
triggerDeleteComment(&$obj)
A trigger which gives points for deleting a comment.
getModel($module_name)
Definition: func.inc.php:145
executeQueryArray($query_id, $args=NULL, $arg_columns=NULL)
Definition: func.inc.php:219
triggerBeforeDownloadFile(&$obj)
The trigger called before a file is downloaded.
triggerBeforeDeleteDocument(&$obj)
The trigger which deducts the points related to post comments before deleting the post itself...
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
Definition: func.inc.php:203
$oModuleController
Definition: ko.install.php:287
triggerCall($trigger_name, $called_position, &$obj)