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


PHP vBulletinHook::init方法代碼示例

本文整理匯總了PHP中vBulletinHook::init方法的典型用法代碼示例。如果您正苦於以下問題:PHP vBulletinHook::init方法的具體用法?PHP vBulletinHook::init怎麽用?PHP vBulletinHook::init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vBulletinHook的用法示例。


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

示例1: foreach

            }
            $vbulletin->datastore =& new $datastore_class($vbulletin, $db);
        }
    }
    // ## Load latest bitfields, overwrite datastore versions (if they exist)
    // ## (so latest upgrade script can access any new permissions)
    require_once DIR . '/includes/class_bitfield_builder.php';
    if (vB_Bitfield_Builder::build_datastore() !== false) {
        $myobj =& vB_Bitfield_Builder::init();
        require_once DIR . '/includes/functions.php';
        require_once DIR . '/includes/functions_misc.php';
        foreach (array_keys($myobj->datastore) as $group) {
            $vbulletin->{'bf_' . $group} =& $myobj->datastore["{$group}"];
            foreach (array_keys($myobj->datastore["{$group}"]) as $subgroup) {
                $vbulletin->{'bf_' . $group . '_' . $subgroup} =& $myobj->datastore["{$group}"]["{$subgroup}"];
            }
        }
    } else {
        trigger_error('Error Building Bitfields', E_USER_ERROR);
    }
}
// setup an empty hook class in case we run some of the main vB code
require_once DIR . '/includes/class_hook.php';
$hookobj =& vBulletinHook::init();
$vbulletin->pluginlist = '';
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:39, Wed May 30th 2012
|| # CVS: $RCSfile$ - $Revision: 39862 $
|| ####################################################################
\*======================================================================*/
開發者ID:benyamin20,項目名稱:vbregistration,代碼行數:31,代碼來源:init.php

示例2: fetch_hookusage

 /**
  * Fetches the array of hooks that have been used.
  */
 function fetch_hookusage()
 {
     $obj =& vBulletinHook::init();
     return $obj->hookusage;
 }
開發者ID:benyamin20,項目名稱:vbregistration,代碼行數:8,代碼來源:class_hook.php

示例3: _handlePlugins

 /**
  * Handles importing of plugins into memory for a given project.
  * @param   VDE_Project
  */
 protected function _handlePlugins($project)
 {
     $hookObj = vBulletinHook::init();
     foreach ($project->getPlugins() as $hook => $code) {
         if ($hook == 'init_startup') {
             $this->_initCode .= "\n{$code}\n";
         } else {
             $hookObj->pluginlist[$hook] .= "\n" . $code . "\n";
         }
     }
 }
開發者ID:Hasann,項目名稱:vBulletin-Development-Environment,代碼行數:15,代碼來源:runtime.php

示例4: registerHook

 /**
  * Adds phpcode to a given hook as if a plugin containing that code was
  * defined for that hook.
  *
  * @param string $hook
  * @param string $phpcode
  */
 private function registerHook($hook, $phpcode)
 {
     $list =& vBulletinHook::init()->pluginlist;
     // Make sure the key exists, even if as an empty string
     if (empty($list[$hook])) {
         $list[$hook] = '';
     }
     // Append new code
     $list[$hook] .= "\n{$phpcode}";
 }
開發者ID:benyamin20,項目名稱:vbregistration,代碼行數:17,代碼來源:vBNexus.php

示例5: goldbrick_inject_plugin

/**
 * Injects plugin code at run-time.
 * 
 * @param	string		Hook name
 * @param	string		Code to inject
 */
function goldbrick_inject_plugin($hook, $code)
{
    $hook_obj =& vBulletinHook::init();
    if (!isset($hook_obj->pluginlist[$hook])) {
        $hook_obj->pluginlist[$hook] = $code;
    } else {
        $hook_obj->pluginlist[$hook] .= "\n{$code}\n";
    }
}
開發者ID:holandacz,項目名稱:nb4,代碼行數:15,代碼來源:functions_public.php


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