• [织梦吧]唯一域名:www.dedecms8.com,织梦DedeCMS学习平台.

当前位置: > CMS教程 > discuz教程 >

Discuz! 关于注册的邀请码分析(4)

来源: www.dedecms8.com 编辑:织梦吧 时间:2012-02-07点击:

往common_invite表里更新相应的值,同时更新邀请注册的统计。

在731行附近

  1. if($invite['uid']) {  
  2.                                 if($this->setting['inviteconfig']['inviteaddcredit']) {  
  3.                                         updatemembercount($uid, array($this->setting['inviteconfig']['inviterewardcredit'] => $this->setting['
    inviteconfig']['inviteaddcredit']));  
  4.                                 }  
  5.                                 if($this->setting['inviteconfig']['invitedaddcredit']) {  
  6.                                         updatemembercount($invite['uid'], array($this->setting['inviteconfig']['inviterewardcredit'] => $this-
    >setting['inviteconfig']['invitedaddcredit']));  
  7.                                 }  
  8.                                 require_once libfile('function/friend');  
  9.                                 friend_make($invite['uid'], $invite['username'], false);  
  10.                                 notification_add($invite['uid'], 'friend', 'invite_friend', array('actor' => '<a href="home.php?mod=space&uid=
    '.$invite['uid'].'"
     target="_blank">'.$invite['username'].'</a>'), 1);  
  11.  
  12.                                 space_merge($invite, 'field_home');  
  13.                                 if(!empty($invite['privacy']['feed']['invite'])) {  
  14.                                         require_once libfile('function/feed');  
  15.                                         $tite_data = array('username' => '<a href="home.php?mod=space&uid='.$_G['uid'].'">'.$_G['username'].'</a>');  
  16.                                         feed_add('friend', 'feed_invite', $tite_data, '', array(), '', array(), array(), '', '', '', 0, 0, '', $i
    nvite['uid'], $invite['username']);  
  17.                                 }  
  18.                                 if($invite['appid']) {  
  19.                                         updatestat('appinvite');  
  20.                                 }  
  21.                         } 

About D8

  • ©2014 织梦吧(d8) DedeCMS学习交流平台
  • 唯一网址 www.DedeCMS8.com 网站地图
  • 联系我们 1978130638@qq.com ,  QQ