當前位置: 首頁>>代碼示例>>PHP>>正文


PHP runhooks函數代碼示例

本文整理匯總了PHP中runhooks函數的典型用法代碼示例。如果您正苦於以下問題:PHP runhooks函數的具體用法?PHP runhooks怎麽用?PHP runhooks使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了runhooks函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: MasterObject

 function MasterObject(&$config, $auto_run = false)
 {
     global $_J;
     $this->Config = $config;
     $this->Get =& $_GET;
     $this->Post =& $_POST;
     $this->Module = get_param('mod');
     $this->Code = get_param('code');
     $this->DatabaseHandler =& Obj::registry('DatabaseHandler');
     if (!jget('uninitmember')) {
         $this->initMemberHandler();
     }
     if ($this->Config['seccode_enable'] > 1 && $this->Config['seccode_pub_key'] && $this->Config['seccode_pri_key']) {
         $this->yxm_html = jlogic('seccode')->GetYXM();
         $this->yxm_title = jlogic('seccode')->TitleYXM();
     }
     if (!isset($_J['plugins'])) {
         jlogic('plugin')->loadplugincache();
     }
     runhooks('global');
     if ($this->auto_run || $auto_run) {
         $this->auto_run();
     }
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:24,代碼來源:master.mod.php

示例2: define

 *      $Id: group.php 31307 2012-08-10 02:10:56Z zhengqingpeng $
 *	Modified by Valery Votintsev, codersclub.org
 */

define('APPTYPEID', 3);
define('CURSCRIPT', 'group');


require './source/class/class_core.php';

$discuz = C::app();

$cachelist = array('grouptype', 'groupindex', 'diytemplatenamegroup');
$discuz->cachelist = $cachelist;
$discuz->init();

/*vot*/	settings_localize(); // Localize Navigation & Settings

$_G['disabledwidthauto'] = 0;

$modarray = array('index', 'my', 'attentiongroup');
$mod = !in_array($_G['mod'], $modarray) ? 'index' : $_G['mod'];

define('CURMODULE', $mod);

runhooks();

$navtitle = str_replace('{bbname}', $_G['setting']['bbname'], $_G['setting']['seotitle']['group']);

require DISCUZ_ROOT.'./source/module/group/group_'.$mod.'.php';
開發者ID:xDiglett,項目名稱:discuzx30,代碼行數:30,代碼來源:group.php

示例3: define

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: home.php 32932 2013-03-25 06:53:01Z zhangguosheng $
 */
define('APPTYPEID', 1);
define('CURSCRIPT', 'home');
if (!empty($_GET['mod']) && ($_GET['mod'] == 'misc' || $_GET['mod'] == 'invite')) {
    define('ALLOWGUEST', 1);
}
require_once './source/class/class_core.php';
require_once './source/function/function_home.php';
$discuz = C::app();
$cachelist = array('magic', 'userapp', 'usergroups', 'diytemplatenamehome');
$discuz->cachelist = $cachelist;
$discuz->init();
$space = array();
$mod = getgpc('mod');
if (!in_array($mod, array('space', 'spacecp', 'misc', 'magic', 'editor', 'invite', 'task', 'medal', 'rss', 'follow'))) {
    $mod = 'space';
    $_GET['do'] = 'home';
}
if ($mod == 'space' && ((empty($_GET['do']) || $_GET['do'] == 'index') && $_G['inajax'])) {
    $_GET['do'] = 'profile';
}
$curmod = !empty($_G['setting']['followstatus']) && (empty($_GET['diy']) && empty($_GET['do']) && $mod == 'space' || $_GET['do'] == 'follow') ? 'follow' : $mod;
define('CURMODULE', $curmod);
runhooks($_GET['do'] == 'profile' && $_G['inajax'] ? 'card' : $_GET['do']);
require_once libfile('home/' . $mod, 'module');
開發者ID:MCHacker,項目名稱:discuz-docker,代碼行數:30,代碼來源:home.php


注:本文中的runhooks函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。