当前位置: 首页>>代码示例>>PHP>>正文


PHP feed_add函数代码示例

本文整理汇总了PHP中feed_add函数的典型用法代码示例。如果您正苦于以下问题:PHP feed_add函数的具体用法?PHP feed_add怎么用?PHP feed_add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了feed_add函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _updateUser

 private function _updateUser($res, $gender, $avatar)
 {
     global $_G;
     include_once libfile('function/profile');
     $setarr['gender'] = intval($gender);
     if ($setarr) {
         C::t('common_member_profile')->update($_G['uid'], $setarr);
     }
     manyoulog('user', $uid, 'update');
     $operation = 'gender';
     include_once libfile('function/feed');
     feed_add('profile', 'feed_profile_update_' . $operation, array('hash_data' => 'profile'));
     countprofileprogress();
     // ob_start();
     // $this->getController()->forward('user/uploadavatar', false);
     // $result = ob_get_clean();
     // $picInfo = WebUtils::jsonDecode($result, true);
     // $avatar = $picInfo['pic_path'];
     // $avatar = !empty($_GET['avatar']) ? $_GET['avatar'] : '';
     if (!empty($avatar)) {
         $_GET = array_merge($_GET, array('avatar' => $avatar));
         ob_start();
         $this->getController()->forward('user/saveavatar', false);
         $result = ob_get_clean();
         $result = WebUtils::jsonDecode($result);
         if (WebUtils::checkError($result)) {
             return $this->makeErrorInfo($res, 'user_info_avatar_error');
         }
     }
     return $this->makeErrorInfo($res, lang('message', 'profile_succeed'), array('noError' => 1));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:31,代码来源:UpdateUserInfoAction.php

示例2: space_open

function space_open($uid, $username, $gid = 0, $email = '')
{
    global $_SGLOBAL, $_SCONFIG;
    if (empty($uid) || empty($username)) {
        return array();
    }
    //验证空间是否被管理员删除
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spacelog') . " WHERE uid='{$uid}' AND flag='-1'");
    if ($value = $_SGLOBAL['db']->fetch_array($query)) {
        showmessage('the_space_has_been_closed');
    }
    $space = array('uid' => $uid, 'username' => $username, 'dateline' => $_SGLOBAL['timestamp'], 'groupid' => $gid);
    inserttable('space', $space, 0, true);
    inserttable('spacefield', array('uid' => $uid, 'email' => $email), 0, true);
    //发送PM
    if ($_SGLOBAL['supe_uid'] && $_SGLOBAL['supe_uid'] != $uid) {
        include_once S_ROOT . './uc_client/client.php';
        uc_pm_send($_SGLOBAL['supe_uid'], $uid, cplang('space_open_subject'), cplang('space_open_message', array(getsiteurl())), 1, 0, 0);
    }
    //产生feed
    include_once S_ROOT . './source/function_cp.php';
    $_uid = $_SGLOBAL['supe_uid'];
    $_username = $_SGLOBAL['supe_username'];
    $_SGLOBAL['supe_uid'] = $uid;
    $_SGLOBAL['supe_username'] = addslashes($username);
    feed_add('profile', cplang('feed_space_open'));
    $_SGLOBAL['supe_uid'] = $_uid;
    $_SGLOBAL['supe_username'] = $_username;
    return $space;
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:30,代码来源:function_space.php

示例3: publishTemplatizedAction

	function publishTemplatizedAction($uId, $appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral = '', $image1 = '', $image1Link = '', $image2 = '', $image2Link = '', $image3 = '', $image3Link = '', $image4 = '', $image4Link = '', $targetIds = '', $privacy = '', $hashTemplate = '', $hashData = '') {
		$friend = ($privacy == 'public') ? 0 : ($privacy == 'friends' ? 1 : 2);
		
		$images = array($image1, $image2, $image3, $image4);
		$image_links = array($image1Link, $image2Link, $image3Link, $image4Link);
		$result = feed_add($appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral, $images, $image_links, $targetIds, $friend, 0, 1);
		
		return new APIResponse($result);
	}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:9,代码来源:Feed.php

示例4: publishTemplatizedAction

 function publishTemplatizedAction($uId, $appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral = '', $image1 = '', $image1Link = '', $image2 = '', $image2Link = '', $image3 = '', $image3Link = '', $image4 = '', $image4Link = '', $targetIds = '', $privacy = '', $hashTemplate = '', $hashData = '', $specialAppid = 0)
 {
     global $_SGLOBAL;
     $friend = $privacy == 'public' ? 0 : ($privacy == 'friends' ? 1 : 2);
     $images = array($image1, $image2, $image3, $image4);
     $image_links = array($image1Link, $image2Link, $image3Link, $image4Link);
     include_once S_ROOT . './source/function_cp.php';
     $result = feed_add($appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral, $images, $image_links, $targetIds, $friend, $specialAppid, 1);
     return new APIResponse($result);
 }
开发者ID:shiyake,项目名称:php-ihome,代码行数:10,代码来源:Feed.php

示例5: onFeedPublishTemplatizedAction

 public function onFeedPublishTemplatizedAction($uId, $appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral = '', $image1 = '', $image1Link = '', $image2 = '', $image2Link = '', $image3 = '', $image3Link = '', $image4 = '', $image4Link = '', $targetIds = '', $privacy = '', $hashTemplate = '', $hashData = '', $specialAppid = 0)
 {
     $res = $this->getUserSpace($uId);
     if (!$res) {
         return new Cloud_Service_Server_ErrorResponse('1', "User({$uId}) Not Exists");
     }
     $friend = $privacy == 'public' ? 0 : ($privacy == 'friends' ? 1 : 2);
     $images = array($image1, $image2, $image3, $image4);
     $image_links = array($image1Link, $image2Link, $image3Link, $image4Link);
     require_once libfile('function/feed');
     $result = feed_add($appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral, $images, $image_links, $targetIds, $friend, $specialAppid, 1);
     return $result;
 }
开发者ID:softhui,项目名称:discuz,代码行数:13,代码来源:Feed.php

示例6: usesubmit

 function usesubmit()
 {
     global $_G;
     $uid = $_G['uid'];
     $_G['uid'] = 0;
     $avatar = avatar($uid, 'middle', true);
     include_once libfile('function/feed');
     feed_add('thunder', 'magicuse_thunder_announce_title', array('uid' => $uid, 'username' => "<a href=\"home.php?mod=space&uid={$uid}\">{$_G['username']}</a>"), 'magicuse_thunder_announce_body', array('uid' => $uid, 'magic_thunder' => 1), '', array($avatar), array("home.php?mod=space&uid={$uid}"));
     $_G['uid'] = $uid;
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', '0', 'uid', $_G['uid']);
     showmessage('magics_thunder_message', '', array('magicname' => $_G['setting']['magics']['thunder']), array('showdialog' => 1));
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:13,代码来源:magic_thunder.php

示例7: _userFriendSetting

 private function _userFriendSetting($res, $uid, $gid, $note)
 {
     global $_G;
     require_once libfile('function/friend');
     require_once libfile('function/spacecp');
     require_once libfile('function/home');
     if (!checkperm('allowfriend')) {
         return $this->makeErrorInfo($res, 'no_privilege_addfriend');
     }
     if ($uid == $_G['uid']) {
         return $this->makeErrorInfo($res, 'friend_self_error');
     }
     if (friend_check($uid)) {
         return $this->makeErrorInfo($res, 'you_have_friends');
     }
     $tospace = getuserbyuid($uid);
     if (empty($tospace)) {
         return $this->makeErrorInfo($res, 'space_does_not_exist');
     }
     if (isblacklist($tospace['uid'])) {
         return $this->makeErrorInfo($res, 'is_blacklist');
     }
     // $res['body']['gidInfo'] = $this->_getFriendGroupList();
     space_merge($space, 'count');
     space_merge($space, 'field_home');
     $maxfriendnum = checkperm('maxfriendnum');
     if ($maxfriendnum && $space['friends'] >= $maxfriendnum + $space['addfriend']) {
         if ($_G['magic']['friendnum']) {
             return $this->makeErrorInfo($res, 'enough_of_the_number_of_friends_with_magic');
         } else {
             return $this->makeErrorInfo($res, 'enough_of_the_number_of_friends');
         }
     }
     if (friend_request_check($uid)) {
         // if(submitcheck('add2submit')) {
         $_POST['gid'] = intval($gid);
         friend_add($uid, $uid);
         if (ckprivacy('friend', 'feed')) {
             require_once libfile('function/feed');
             feed_add('friend', 'feed_friend_title', array('touser' => "<a href=\"home.php?mod=space&uid={$tospace['uid']}\">{$tospace['username']}</a>"));
         }
         notification_add($uid, 'friend', 'friend_add');
         // showmessage('friends_add', dreferer(), array('username' => $tospace['username'], 'uid'=>$uid, 'from' => $_GET['from']), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
         return $this->makeErrorInfo($res, 'friends_add', array('{username}' => $tospace['username']));
         // }
         // $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 (C::t('home_friend_request')->count_by_uid_fuid($uid, $_G['uid'])) {
             return $this->makeErrorInfo($res, 'waiting_for_the_other_test');
         }
         $_POST['gid'] = $gid;
         $_POST['note'] = censor(htmlspecialchars(cutstr($note, strtolower(CHARSET) == 'utf-8' ? 30 : 20, '')));
         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&amp;op=request');
         sendmail_touser($uid, lang('spacecp', 'friend_subject', $values), '', 'friend_add');
         return $this->makeErrorInfo($res, 'request_has_been_sent');
     }
     return $res;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:66,代码来源:UserAdminAction.php

示例8: array

     }
 } else {
     $setarr = array();
 }
 $feednew['dateline'] = trim($feednew['dateline']);
 if ($feednew['dateline']) {
     require_once libfile('function/home');
     $newtimestamp = strtotime($feednew['dateline']);
     if ($newtimestamp > $_G['timestamp']) {
         $_G['timestamp'] = $newtimestamp;
     }
 }
 if (empty($feedid)) {
     $_G['uid'] = 0;
     require_once libfile('function/feed');
     $feedid = feed_add('sitefeed', trim($feednew['title_template']), array(), trim($feednew['body_template']), array(), trim($feednew['body_general']), array(trim($feednew['image_1']), trim($feednew['image_2']), trim($feednew['image_3']), trim($feednew['image_4'])), array(trim($feednew['image_1_link']), trim($feednew['image_2_link']), trim($feednew['image_3_link']), trim($feednew['image_4_link'])), '', '', '', 1);
 } else {
     if (empty($feednew['feeduid'])) {
         $setarr['body_general'] = trim($feednew['body_general']);
     }
     $setarr['image_1'] = trim($feednew['image_1']);
     $setarr['image_1_link'] = trim($feednew['image_1_link']);
     $setarr['image_2'] = trim($feednew['image_2']);
     $setarr['image_2_link'] = trim($feednew['image_2_link']);
     $setarr['image_3'] = trim($feednew['image_3']);
     $setarr['image_3_link'] = trim($feednew['image_3_link']);
     $setarr['image_4'] = trim($feednew['image_4']);
     $setarr['image_4_link'] = trim($feednew['image_4_link']);
     $setarr['dateline'] = $newtimestamp;
     $setarr['hot'] = intval($feednew['hot']);
     C::t('home_feed')->update('', $setarr, '', '', $feedid);
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:admincp_feed.php

示例9: cplang

            $note_type = 'clickthread';
            $q_note = cplang('note_click_thread', array("space.php?uid={$item['uid']}&do=thread&id={$item['tid']}", $item['subject']));
            break;
        case 'picid':
            $fs['title_template'] = cplang('feed_click_pic');
            $fs['title_data'] = array('touser' => "<a href=\"space.php?uid={$item['uid']}\">{$_SN[$item['uid']]}</a>", 'click' => $click['name']);
            $fs['images'] = array(pic_get($item['filepath'], $item['thumb'], $item['remote']));
            $fs['image_links'] = array("space.php?uid={$item['uid']}&do=album&picid={$item['picid']}");
            $fs['body_general'] = $item['title'];
            $note_type = 'clickpic';
            $q_note = cplang('note_click_pic', array("space.php?uid={$item['uid']}&do=album&picid={$item['picid']}"));
            break;
    }
    //Event Publishing
    if (empty($item['friend']) && ckprivacy('click', 1)) {
        feed_add('click', $fs['title_template'], $fs['title_data'], '', array(), $fs['body_general'], $fs['images'], $fs['image_links']);
    }
    //Reward visitors
    getreward('click', 1, 0, $idtype . $id);
    //Statistics
    updatestat('click');
    //Notice
    notification_add($item['uid'], $note_type, $q_note);
    showmessage('click_success', $_SGLOBAL['refer']);
} elseif ($_GET['op'] == 'show') {
    foreach ($clicks as $key => $value) {
        $value['clicknum'] = $item["click_{$key}"];
        $value['classid'] = mt_rand(1, 4);
        if ($value['clicknum'] > $maxclicknum) {
            $maxclicknum = $value['clicknum'];
        }
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:cp_click.php

示例10: exit

<?php

if (!defined('iBUAA')) {
    exit('Access Denied');
}
//À×ÃùÖ®Éù
if (submitcheck("usesubmit")) {
    magic_use($mid, array(), true);
    //·¢È«Õ¾feed
    $uid = $_SGLOBAL['supe_uid'];
    realname_set($_SGLOBAL['supe_uid'], $_SGLOBAL['supe_username']);
    realname_get();
    $_SGLOBAL['supe_uid'] = 0;
    include_once S_ROOT . './source/function_cp.php';
    $avatar = ckavatar($uid) ? avatar($uid, 'middle', true) : UC_API . '/images/noavatar_middle.gif';
    feed_add('thunder', cplang('magicuse_thunder_announce_title'), array('uid' => $uid, 'username' => "<a href=\"space.php?uid={$uid}\">{$_SN[$uid]}</a>"), cplang('magicuse_thunder_announce_body'), array('uid' => $uid, 'magic_thunder' => 1), '', array($avatar), array("space.php?uid={$uid}"));
    showmessage('magicuse_success', $_POST['refer'], 0);
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:18,代码来源:magic_thunder.php

示例11: getstr

     $magvalues['type'] = $commentcable[$type];
 }
 $arr['body_general'] = getstr($_POST['general'], 150, 1, 1, 1);
 $arr['body_general'] = censor($arr['body_general']);
 if (censormod($arr['body_general']) || $_G['group']['allowsharemod']) {
     $arr['status'] = 1;
 } else {
     $arr['status'] = 0;
 }
 $arr['type'] = $type;
 $arr['uid'] = $_G['uid'];
 $arr['username'] = $_G['username'];
 $arr['dateline'] = $_G['timestamp'];
 if ($arr['status'] == 0 && ckprivacy('share', 'feed')) {
     require_once libfile('function/feed');
     feed_add('share', '{actor} ' . $arr['title_template'], array('hash_data' => $feed_hash_data), $arr['body_template'], $arr['body_data'], $arr['body_general'], array($arr['image']), array($arr['image_link']));
 }
 $arr['body_data'] = serialize($arr['body_data']);
 $setarr = daddslashes($arr);
 $sid = DB::insert('home_share', $setarr, 1);
 switch ($type) {
     case 'space':
         DB::query("UPDATE " . DB::table('common_member_status') . " SET sharetimes=sharetimes+1 WHERE uid='{$id}'");
         break;
     case 'blog':
         DB::query("UPDATE " . DB::table('home_blog') . " SET sharetimes=sharetimes+1 WHERE blogid='{$id}'");
         break;
     case 'album':
         DB::query("UPDATE " . DB::table('home_album') . " SET sharetimes=sharetimes+1 WHERE albumid='{$id}'");
         break;
     case 'pic':
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:spacecp_share.php

示例12: addfeed

 function addfeed($get, $post)
 {
     global $_SGLOBAL;
     if (!API_ADDFEED) {
         return API_RETURN_FORBIDDEN;
     }
     $_SGLOBAL['supe_uid'] = intval($post['uid']);
     $_SGLOBAL['supe_username'] = trim($post['username']);
     $images = array($post['image_1'], $post['image_2'], $post['image_3'], $post['image_4']);
     $image_links = array($post['image_1_link'], $post['image_2_link'], $post['image_3_link'], $post['image_4_link']);
     include_once S_ROOT . './source/function_cp.php';
     return feed_add($post['icon'], $post['title_template'], $post['title_data'], $post['body_template'], $post['body_data'], $post['body_general'], $images, $image_links, $post['target_ids'], '', $post['appid']);
 }
开发者ID:NaturalWill,项目名称:UCQA,代码行数:13,代码来源:uc.php

示例13: array

         $n_url = "home.php?mod=space&uid={$tospace['uid']}&do=share&id={$id}&cid={$cid}";
         $note_type = 'sharecomment';
         $note = 'share_comment';
         $note_values = array('url' => $n_url);
         $q_note = 'share_comment_reply';
         $q_values = array('url' => $n_url);
         $msg = 'do_success';
         $magvalues = array();
         break;
 }
 if (empty($comment)) {
     if ($tospace['uid'] != $_G['uid']) {
         if (ckprivacy('comment', 'feed')) {
             require_once libfile('function/feed');
             $fs['title_data']['hash_data'] = "{$idtype}{$id}";
             feed_add($fs['icon'], $fs['title_template'], $fs['title_data'], $fs['body_template'], $fs['body_data'], $fs['body_general'], $fs['images'], $fs['image_links'], $fs['target_ids'], $fs['friend']);
         }
         $note_values['from_id'] = $_POST['id'];
         $note_values['from_idtype'] = $_POST['idtype'];
         $note_values['url'] .= "&goto=new#comment_{$cid}_li";
         notification_add($tospace['uid'], $note_type, $note, $note_values);
     }
 } elseif ($comment['authorid'] != $_G['uid']) {
     notification_add($comment['authorid'], $note_type, $q_note, $q_values);
 }
 if ($stattype) {
     include_once libfile('function/stat');
     updatestat($stattype);
 }
 if ($tospace['uid'] != $_G['uid']) {
     $needle = $id;
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:spacecp_comment.php

示例14: elseif

	
} elseif(submitcheck('showsubmit')) {
	
	$showcredit = intval($_POST['showcredit']);
	if($showcredit > $space['credit']) $showcredit = $space['credit'];
	if($showcredit < 1) {
		showmessage('showcredit_error');
	}
	$_POST['note'] = getstr($_POST['note'], 100, 1, 1, 1);
	
	//增加
	$count = getcount('show', array('uid'=>$_SGLOBAL['supe_uid']));
	if($count) {
		$notesql = $_POST['note']?", note='$_POST[note]'":'';
		$_SGLOBAL['db']->query("UPDATE ".tname('show')." SET credit=credit+$showcredit $notesql WHERE uid='$_SGLOBAL[supe_uid]'");
	} else {
		inserttable('show', array('uid'=>$_SGLOBAL['supe_uid'], 'username'=>$_SGLOBAL['supe_username'], 'credit'=>$showcredit, 'note'=>$_POST['note']), 0, true);
	}

	//减少自己的积分
	$_SGLOBAL['db']->query("UPDATE ".tname('space')." SET credit=credit-$showcredit WHERE uid='$space[uid]'");
	
	//feed
	if(ckprivacy('show', 1)) {
		feed_add('show', cplang('feed_showcredit_self'), array('credit'=>$showcredit), '', array(), $_POST['note']);
	}
		
	showmessage('showcredit_do_success', "space.php?do=top");
}

?>
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:30,代码来源:cp_top.php

示例15: foreach

        foreach ($_POST['info'] as $key => $value) {
            $value = getstr($value, 500, 1, 1);
            $friend = intval($_POST['info_friend'][$key]);
            $inserts[] = "('{$space['uid']}','info','{$key}','{$value}','{$friend}')";
        }
        if ($inserts) {
            $_SGLOBAL['db']->query("DELETE FROM " . tname('spaceinfo') . " WHERE uid='{$space['uid']}' AND type='info'");
            $_SGLOBAL['db']->query("INSERT INTO " . tname('spaceinfo') . "\r\n\t\t\t\t(uid,type,subtype,title,friend)\r\n\t\t\t\tVALUES " . implode(',', $inserts));
        }
        //变更记录
        if ($_SCONFIG['my_status']) {
            inserttable('userlog', array('uid' => $_SGLOBAL['supe_uid'], 'action' => 'update', 'dateline' => $_SGLOBAL['timestamp'], 'type' => 2), 0, true);
        }
        //产生feed
        if (ckprivacy('profile', 1)) {
            feed_add('profile', cplang('feed_profile_update_info'));
        }
        $url = 'cp.php?ac=profile&op=info';
        showmessage('update_on_successful_individuals', $url);
    }
    //隐私
    $list = $friends = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spaceinfo') . " WHERE uid='{$space['uid']}' AND type='info'");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        $list[$value['subtype']] = $value;
        $friends[$value['subtype']][$value['friend']] = ' selected';
    }
}
$cat_actives = array($_GET['op'] => ' class="active"');
if ($_GET['op'] == 'edu' || $_GET['op'] == 'work') {
    $yearhtml = '';
开发者ID:AlexChien,项目名称:ey_uhome,代码行数:31,代码来源:cp_profile.php


注:本文中的feed_add函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。