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


PHP Addons::addonsHook方法代码示例

本文整理汇总了PHP中Addons::addonsHook方法的典型用法代码示例。如果您正苦于以下问题:PHP Addons::addonsHook方法的具体用法?PHP Addons::addonsHook怎么用?PHP Addons::addonsHook使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Addons的用法示例。


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

示例1: checkNewTarget

 public function checkNewTarget()
 {
     $url = "https://www.sidatz.com/";
     require 'addons/library/phpQuery/QueryList.class.php';
     $reg = array("content" => array("ul.news:eq(0)", "text"));
     $hj = new QueryList($url, $reg);
     $arr_content = $hj->jsonArr;
     //dump($arr_content);
     if (stripos($arr_content[0]["content"], "暂无新标") > 0) {
         $this->ajaxReturn(null, "无新标", 0);
     }
     $arr['content'] = $arr_content[0]['content'];
     //echo $hj->getJSON();
     //$arr['content']=iconv("gb2312","utf-8",$arr_content[0]['content']);
     //dump($arr_content);
     //exit(urldecode(json_encode(array('status'=>1,'info'=>'教务通知详情','data'=>$arr))));
     $push_user_alias = "*";
     $_POST['n_title'] = "有新标了,来看看吧0.0";
     $_POST['n_content'] = "四达投资有新标了,快去用抢标助手抢标吧!";
     $_POST['n_extras'] = "";
     $_POST['push_user_alias'] = $push_user_alias;
     //推送所有人
     $_POST['getPushResult'] = 0;
     Addons::addonsHook("JPush", "doAddPush", array(), true);
     $this->ajaxReturn($arr, "新标情况", 1);
 }
开发者ID:lyhiving,项目名称:icampus,代码行数:26,代码来源:IndexAction.class.php

示例2: doAdmin

 public function doAdmin()
 {
     $addonInfo = model('Addons')->getAddon($_GET['pluginid']);
     $result = array('status' => true, 'info' => "");
     Addons::addonsHook($addonInfo['name'], $_GET['page'], array('result' => &$result));
     //dump($result);
     if ($result['status']) {
         $this->success($result['info']);
     } else {
         $this->error($result['info']);
     }
 }
开发者ID:armebayelm,项目名称:thinksns-vietnam,代码行数:12,代码来源:AddonsAction.class.php

示例3: displayAddons

 public function displayAddons()
 {
     $result = array();
     $param['res'] =& $result;
     $param['type'] = $_REQUEST['type'];
     Addons::addonsHook(t($_GET['addon']), t($_GET['hook']), $param);
     isset($result['url']) && $this->assign("jumpUrl", $result['url']);
     isset($result['title']) && $this->setTitle($result['title']);
     isset($result['jumpUrl']) && $this->assign('jumpUrl', $result['jumpUrl']);
     if (isset($result['status']) && !$result['status']) {
         $this->error($result['info']);
     }
     if (isset($result['status']) && $result['status']) {
         $this->success($result['info']);
     }
 }
开发者ID:yang7hua,项目名称:hunshe,代码行数:16,代码来源:WidgetAction.class.php

示例4: displayAddons

 public function displayAddons()
 {
     $result = array();
     $param['res'] =& $result;
     $param['type'] = $_REQUEST['type'];
     $config = model('AddonData')->lget('login');
     if (!in_array($param['type'], $config['open'])) {
         $this->error("该同步操作管理员已关闭");
     }
     Addons::addonsHook($_GET['addon'], $_GET['hook'], $param);
     isset($result['url']) && $this->assign("jumpUrl", $result['url']);
     isset($result['title']) && $this->setTitle($result['title']);
     isset($result['jumpUrl']) && $this->assign('jumpUrl', $result['jumpUrl']);
     if (isset($result['status']) && !$result['status']) {
         $this->error($result['info']);
     }
     if (isset($result['status']) && $result['status']) {
         $this->success($result['info']);
     }
 }
开发者ID:naliduo,项目名称:ThinkSNS,代码行数:20,代码来源:WidgetAction.class.php

示例5: doAdmin

 public function doAdmin()
 {
     $addonInfo = model('Addon')->getAddon(intval($_GET['pluginid']));
     $result = array('status' => true, 'info' => "");
     F('Cache_App', null);
     Addons::addonsHook($addonInfo['name'], t($_GET['page']), array('result' => &$result), true);
     //dump($result);
     if ($result['status']) {
         $_POST['jumpUrl'] && $this->assign('jumpUrl', $_POST['jumpUrl']);
         $this->success($result['info']);
     } else {
         $this->error($result['info']);
     }
 }
开发者ID:lyhiving,项目名称:icampus,代码行数:14,代码来源:AddonsAction.class.php

示例6: addonsRequest

 public function addonsRequest()
 {
     Addons::addonsHook(t($_REQUEST['addon']), t($_REQUEST['hook']));
 }
开发者ID:armebayelm,项目名称:thinksns-vietnam,代码行数:4,代码来源:WidgetAction.class.php

示例7: posterDetail

 public function posterDetail()
 {
     $posterTypeDao = D('PosterType');
     $poster = D('Poster');
     $id = intval($_GET['id']);
     if ($id == 0) {
         $this->error("错误的信息地址.请检查后再访问");
         exit;
     }
     $posterData = $poster->getPoster($id, $this->mid);
     if (!$posterData) {
         $this->assign('jumpUrl', U('poster/Index/index'));
         $this->error("这个信息被删除或者不允许查看");
         exit;
     }
     $posterType = $posterTypeDao->getType($posterData['pid']);
     $posterTypeExtraField = $posterTypeDao->getExtraField($posterType['extraField']);
     unset($posterType['extraField']);
     if ($posterData['uid'] == $this->mid) {
         $posterData['name'] = '我';
         $this->assign('admin', 1);
     } else {
         $posterData['name'] = getUserName($posterData['uid']);
     }
     $this->assign('poster', $posterData);
     $this->assign('uid', $posterData['uid']);
     $this->assign('extraField', $posterTypeExtraField);
     $this->assign('type', $posterType);
     //话题符号
     $huati = $posterData['posterSmallType'] == NULL ? "" : "#" . $posterData['posterSmallType'] . "#";
     $huati = "#" . $posterData['posterType'] . "#" . $huati;
     $this->assign('huati', $huati);
     //dump($_SESSION);
     //自动分享微博
     if ($_GET["autoShare"]) {
         $_POST["content"] = "";
         $_POST["body"] = "我在" . $huati . "中发布了'" . $posterData['title'] . "'。来看看吧0.0!";
         $_POST['source_url'] = U('//posterDetail', array('id' => $id));
         $_POST['type'] = $posterData['attach_id'] == NULL ? "post" : "postimage";
         $_POST['app_name'] = "public";
         $_POST['attach_id'] = $posterData['attach_id'];
         //exit(dump($_POST));
         $this->My_PostFeed();
         //发微博
     }
     //自动弹框分享微博
     if ($_GET['user_to_share']) {
         $_SESSION['new_poster'] = $posterData['attach_id'] ? $posterData['attach_id'] : 1;
     }
     // dump($posterData);
     // //发私信提醒
     if ($_GET['auto_to_sendMessage']) {
         $FollowUserList = D('PosterTypeFollow')->getFollowUserList($posterData['pid']);
         $push_user_alias = "";
         foreach ($FollowUserList as $key => $value) {
             $d['to'] = $value['uid'];
             $d['content'] = "我在您关注的#" . $posterData['posterType'] . "#中发布了'" . $posterData['title'] . "'。来看看吧0.0->点击" . U('//posterDetail', array('id' => $id));
             $d['attach_ids'] = $posterData['attach_id'];
             $this->my_doPostMessage($d);
             $push_user_alias = $push_user_alias . $value['uid'] . ",";
             //推送
             if ($key % 1000 == 999 || count($FollowUserList) - 1 == $key) {
                 $_POST['n_title'] = "新的提醒";
                 $_POST['n_content'] = "有人在您关注的分类中发布了‘" . $posterData['title'] . "’,来看看吧0.0";
                 $_POST['n_extras'] = json_encode(array('go_url' => SITE_URL, 'app' => 'poster', 'posterDetail' => $id));
                 $_POST['push_user_alias'] = $push_user_alias;
                 //推送所有人
                 $_POST['getPushResult'] = 0;
                 Addons::addonsHook("JPush", "doAddPush", array(), true);
                 $push_user_alias = "";
                 //还原
             }
         }
         $FollowUserList = D('PosterSmallTypeFollow')->getFollowUserList($posterData['type']);
         $push_user_alias = "";
         foreach ($FollowUserList as $key => $value) {
             $d['to'] = $value['uid'];
             $d['content'] = "我在您关注的#" . $posterData['posterSmallType'] . "#中发布了'" . $posterData['title'] . "'。来看看吧0.0->点击" . U('//posterDetail', array('id' => $id));
             $d['attach_ids'] = $posterData['attach_id'];
             $this->my_doPostMessage($d);
             //推送
             $push_user_alias = $push_user_alias . $value['uid'] . ",";
             if ($key % 1000 == 999 || count($FollowUserList) - 1 == $key) {
                 $_POST['n_title'] = "新的提醒";
                 $_POST['n_content'] = "有人在您关注的分类中发布了‘" . $posterData['title'] . "’,来看看吧0.0";
                 $_POST['n_extras'] = json_encode(array('go_url' => SITE_URL, 'app' => 'poster', 'posterDetail' => $id));
                 $_POST['push_user_alias'] = $push_user_alias;
                 //推送所有人
                 $_POST['getPushResult'] = 0;
                 Addons::addonsHook("JPush", "doAddPush", array(), true);
                 $push_user_alias = "";
                 //还原
             }
         }
     }
     //exit;
     $this->display();
 }
开发者ID:lyhiving,项目名称:icampus,代码行数:98,代码来源:IndexAction.class.php


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