当前位置: 首页>>代码示例>>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;未经允许,请勿转载。