Discuz教程网

加为好友代码里是不是有邮件通知呀?

[复制链接]
authicon pWDXvqHs 发表于 2013-2-7 15:11:20 | 显示全部楼层 |阅读模式
下面的是原文件中的代码,好友执行了邮件方式通知,但功能在那里设置?
真搞不明白官方下面代码写的什么

  • if(friend_request_check($uid)) {

  • if(submitcheck('add2submit')) {

  • $_POST['gid'] = intval($_POST['gid']);
  • friend_add($uid, $_POST['gid']);

  • if(ckprivacy('friend', 'feed')) {
  • require_once libfile('function/feed');
  • feed_add('friend', 'feed_friend_title', array('touser'=>"[url=https://www.discuz.1314study.com/home.php?mod=space&uid=$tospace[uid]]$tospace[username][/url]"));
  • }

  • notification_add($uid, 'friend', 'friend_add');
  • showmessage('friends_add', dreferer(), array('username' => $tospace['username'], 'uid'=>$uid, 'from' => $_G['gp_from']), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
  • }

  • $op = 'add2';
  • $groupselect = empty($space['privacy']['groupname']) ? array(1 => ' checked') : array();
  • $navtitle = lang('core', 'title_friend_add');
  • include template('home/spacecp_friend');
  • exit();

  • } else {

  • if(getcount('home_friend_request', array('uid'=>$uid, 'fuid'=>$_G['uid']))) {
  • showmessage('waiting_for_the_other_test');
  • }

  • if(submitcheck('addsubmit')) {

  • $_POST['gid'] = intval($_POST['gid']);
  • $_POST['note'] = censor($_POST['note']);
  • friend_add($uid, $_POST['gid'], $_POST['note']);

  • $note = array(
  • 'uid' => $_G['uid'],
  • 'url' => 'home.php?mod=spacecp&ac=friend&op=add&uid='.$_G['uid'].'&from=notice',
  • 'from_id' => $_G['uid'],
  • 'from_idtype' => 'friendrequest',
  • 'note' => !empty($_POST['note']) ? lang('spacecp', 'friend_request_note', array('note' => $_POST['note'])) : ''
  • );

  • notification_add($uid, 'friend', 'friend_request', $note);

  • require_once libfile('function/mail');
  • $values = array(
  • 'username' => $tospace['username'],
  • 'url' => getsiteurl().'home.php?mod=spacecp&ac=friend&op=request'
  • );
  • sendmail_touser($uid, lang('spacecp', 'friend_subject', $values), '', 'friend_add');
  • showmessage('request_has_been_sent', dreferer(), array(), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));

  • } else {
  • include_once template('home/spacecp_friend');
  • exit();
  • } }

复制代码



上一篇:战略建议:抓住眼下的黄金,手边的肥肉
下一篇:让UC这个用户中心给用户用上还有很多建议
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-3 01:47

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表