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


PHP Help::getHelp方法代码示例

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


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

示例1: getSearchPath

 function getSearchPath($locale = null)
 {
     if ($locale == '') {
         $help =& Help::getHelp();
         $locale = $help->getLocale();
     }
     return 'help' . DIRECTORY_SEPARATOR . $locale;
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:8,代码来源:OJSHelpMappingFile.inc.php

示例2: toc

 function toc()
 {
     parent::validate();
     HelpHandler::setupTemplate();
     $templateMgr =& TemplateManager::getManager();
     $help =& Help::getHelp();
     $templateMgr->assign_by_ref('helpToc', $help->getTableOfContents());
     $templateMgr->display('help/helpToc.tpl');
 }
开发者ID:Jouper,项目名称:jouper,代码行数:9,代码来源:HelpHandler.inc.php

示例3: toc

 /**
  * Display help table of contents.
  * @param $args array
  * @param $request PKPRequest
  */
 function toc($args, &$request)
 {
     $this->validate();
     $this->setupTemplate();
     $templateMgr =& TemplateManager::getManager();
     import('classes.help.Help');
     $help =& Help::getHelp();
     $templateMgr->assign_by_ref('helpToc', $help->getTableOfContents());
     $templateMgr->display('help/helpToc.tpl');
 }
开发者ID:yuricampos,项目名称:ojs,代码行数:15,代码来源:HelpHandler.inc.php

示例4: unset

 function &getMappingFile($tocId)
 {
     $help =& Help::getHelp();
     $mappingFiles =& $help->getMappingFiles();
     for ($i = 0; $i < count($mappingFiles); $i++) {
         // "foreach by reference" hack
         $mappingFile =& $mappingFiles[$i];
         if ($mappingFile->containsToc($tocId)) {
             return $mappingFile;
         }
         unset($mappingFile);
     }
     $returner = null;
     return $returner;
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:15,代码来源:HelpTocDAO.inc.php

示例5: _tocCacheMiss

 function _tocCacheMiss(&$cache, $id)
 {
     // Keep a secondary cache of the TOC so that a few
     // cache misses won't destroy the server
     $toc =& Registry::get('pkpHelpTocData', true, null);
     if ($toc === null) {
         $helpToc = array();
         $topicId = 'index/topic/000000';
         $help =& Help::getHelp();
         $helpToc = $help->buildTopicSection($topicId);
         $toc =& $help->buildToc($helpToc);
         $cache->setEntireCache($toc);
     }
     return null;
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:15,代码来源:PKPHelp.inc.php

示例6: addHelpData

 /**
  * Add help data for this plugin.
  * @param $locale string
  * @return boolean
  */
 function addHelpData($locale = null)
 {
     if ($locale == '') {
         $locale = AppLocale::getLocale();
     }
     import('help.Help');
     $help =& Help::getHelp();
     import('help.PluginHelpMappingFile');
     $pluginHelpMapping = new PluginHelpMappingFile($this);
     $help->addMappingFile($pluginHelpMapping);
     return true;
 }
开发者ID:sedici,项目名称:ocs,代码行数:17,代码来源:PKPPlugin.inc.php

示例7: _tocCacheMiss

 function _tocCacheMiss(&$cache, $id)
 {
     // Keep a secondary cache of the TOC so that a few
     // cache misses won't destroy the server
     static $toc;
     if (!isset($toc)) {
         $helpToc = array();
         $topicId = 'index/topic/000000';
         $help =& Help::getHelp();
         $helpToc = $help->buildTopicSection($topicId);
         $toc =& $help->buildToc($helpToc);
         $cache->setEntireCache($toc);
     }
     return null;
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:15,代码来源:Help.inc.php

示例8: smartyHelpTopic

 /**
  * Smarty usage: {help_topic key="(dir)*.page.topic" text="foo"}
  *
  * Custom Smarty function for creating anchor tags
  * @params $params array associative array
  * @params $smarty Smarty
  * @return anchor link to related help topic
  */
 function smartyHelpTopic($params, &$smarty)
 {
     import('classes.help.Help');
     $help =& Help::getHelp();
     if (isset($params) && !empty($params)) {
         $translatedKey = isset($params['key']) ? $help->translate($params['key']) : $help->translate('');
         $link = Request::url(null, 'help', 'view', explode('/', $translatedKey));
         $text = isset($params['text']) ? $params['text'] : '';
         return "<a href=\"{$link}\">{$text}</a>";
     }
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:19,代码来源:TemplateManager.inc.php

示例9: currentUrl

//Save current page url into session for login/logout redirect............ well it does not work anyway! could be a SMF Bug.
if (!strpos(currentUrl(), 'login') && !strpos(currentUrl(), 'logout') && !strpos(currentUrl(), 'includes') && !strpos(currentUrl(), 'styles') && !strpos(currentUrl(), 'img') && !strpos(currentUrl(), 'kb')) {
    $_SESSION['login_url'] = currentUrl();
    $_SESSION['logout_url'] = currentUrl();
    $_SESSION['old_url'] = currentUrl();
    $_SESSION['redirect'] = currentUrl();
}
$_SESSION['previous_page'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : $link['url'];
// var_dump($_SESSION['redirect']);
//Get user avatar or use the default avatar
$user_avatar = $context['user']['avatar'] != null ? $context['user']['avatar']['href'] : $link['url'] . 'img/usersmall.jpg';
//Get the musicbee satble and beta release data
$releaseData['stable'] = getVersionInfo(0, 'byCurrentVersion')[0];
$releaseData['beta'] = getVersionInfo(1, 'byCurrentVersion')[0];
//Contains EVERYTHING in single multidimensional array! DO NOT REMOVE IT!
$mb = array('website' => array('ver' => '1.9.0', 'show_warning' => false, 'is_test' => false, 'github_link' => 'https://github.com/Avik-B/mb_web/'), 'charset' => 'UTF-8', 'user' => array('id' => $context['user']['id'], 'is_logged' => $context['user']['is_logged'], 'is_guest' => $context['user']['is_guest'], 'is_admin' => $context['user']['is_admin'], 'is_mod' => $context['user']['is_mod'], 'is_elite' => false, 'is_newbie' => false, 'rank_name' => null, 'need_approval' => true, 'can_mod' => $context['user']['can_mod'], 'username' => $context['user']['name'], 'email' => $context['user']['email'], 'name' => $context['user']['name'], 'messages' => $context['user']['messages'], 'unread_messages' => $context['user']['unread_messages'], 'avatar' => $user_avatar), 'session_var' => $context['session_var'], 'session_id' => $context['session_id'], 'current_time' => array('date' => date("F j, Y"), 'date_time' => date("F j, Y, g:i a")), 'main_menu' => array('dashboard' => array('title' => $lang['dashboard'], 'href' => $link['addon']['dashboard'], 'restriction' => 'login', 'sub_menu' => array()), 'member-panel' => array('title' => '<img src="' . $user_avatar . '" class="user_avatar">', 'href' => $link['forum'] . '?action=profile', 'restriction' => 'login', 'sub_menu' => array('user-profile' => array('title' => '' . sprintf($lang['hey_username'], $context['user']['name']) . '', 'href' => $link['forum'] . '?action=profile'), 'line1' => array('title' => $lang['line']), 'admin-panel' => array('title' => $lang['web_admin'], 'href' => $link['addon']['dashboard'] . '#admin_setting', 'icon' => $lang['20'], 'restriction' => 'admin'), 'forum-admin' => array('title' => $lang['forum_admin'], 'href' => $link['admin']['forum-panel'], 'icon' => $lang['21'], 'restriction' => 'admin'), 'line2' => array('title' => $lang['line']), 'sign-out' => array('title' => $lang['sign_out'], 'href' => $link['logout'], 'icon' => $lang['23']))), 'download' => array('title' => $lang['download'], 'href' => $link['download'], 'sub_menu' => array()), 'add-ons' => array('title' => $lang['addons'], 'href' => $link['addon']['home'], 'sub_menu' => array('1' => array('title' => $lang['skins'], 'href' => $link['addon']['home'] . "s/?type=1", 'icon' => $lang['24'], 'desc' => $lang['description_1'], 'id' => 1), '2' => array('title' => $lang['plugins'], 'href' => $link['addon']['home'] . "s/?type=2", 'icon' => $lang['25'], 'desc' => $lang['description_2'], 'id' => 2), '3' => array('title' => $lang['visualizer'], 'href' => $link['addon']['home'] . "s/?type=3", 'icon' => $lang['26'], 'desc' => $lang['description_3'], 'id' => 3), '4' => array('title' => $lang['theater_mode'], 'href' => $link['addon']['home'] . "s/?type=4", 'icon' => $lang['28'], 'desc' => $lang['description_5'], 'id' => 4), '5' => array('title' => $lang['misc'], 'href' => $link['addon']['home'] . "s/?type=5", 'icon' => $lang['29'], 'desc' => $lang['description_6'], 'id' => 5))), 'forum' => array('title' => $lang['forum'], 'href' => $link['forum'], 'sub_menu' => array()), 'help' => array('title' => $lang['help'], 'href' => $link['faq'], 'sub_menu' => array('faq' => array('title' => $lang['faq'], 'href' => $link['faq'], 'icon' => $lang['faq_icon']), 'api' => array('title' => $lang['dev_api'], 'href' => $link['api'], 'icon' => $lang['code_icon']), 'line2' => array('title' => $lang['line']), 'release-note' => array('title' => $lang['release-note'], 'href' => $link['release-note'], 'icon' => $lang['note_icon']), 'press' => array('title' => $lang['press'], 'href' => $link['press'], 'icon' => $lang['press_icon']), 'line3' => array('title' => $lang['line']), 'bug' => array('title' => $lang['report_bug'], 'href' => $link['bugreport'], 'icon' => $lang['bug_icon'], 'hide' => true), 'wiki' => array('title' => $lang['mb_wiki'], 'href' => $setting['wikiaLink'], 'icon' => $lang['wiki_icon'], 'target' => '_blank', 'hide' => true)))), 'musicbee_download' => array('stable' => array('appname' => isset($releaseData['stable']['appname']) ? $releaseData['stable']['appname'] : "NA", 'version' => isset($releaseData['stable']['version']) ? $releaseData['stable']['version'] : "NA", 'release_date' => isset($releaseData['stable']['release_date']) ? $releaseData['stable']['release_date'] : "NA", 'supported_os' => isset($releaseData['stable']['supported_os']) ? $releaseData['stable']['supported_os'] : "NA", 'download' => array('available' => isset($releaseData['stable']['available']) ? $releaseData['stable']['available'] : 0, 'installer' => array('link1' => isset($releaseData['stable']['DownloadLink']) ? $releaseData['stable']['DownloadLink'] : "NA", 'link2' => isset($releaseData['stable']['MirrorLink1']) ? $releaseData['stable']['MirrorLink1'] : null, 'link3' => isset($releaseData['stable']['MirrorLink2']) ? $releaseData['stable']['MirrorLink2'] : null), 'portable' => array('link1' => isset($releaseData['stable']['PortableLink']) ? $releaseData['stable']['PortableLink'] : "NA"))), 'beta' => array('appname' => isset($releaseData['beta']['appname']) ? $releaseData['beta']['appname'] : "NA", 'version' => isset($releaseData['beta']['version']) ? $releaseData['beta']['version'] : "NA", 'release_date' => isset($releaseData['beta']['release_date']) ? $releaseData['beta']['release_date'] : "NA", 'supported_os' => isset($releaseData['beta']['supported_os']) ? $releaseData['beta']['supported_os'] : "NA", 'download' => array('available' => isset($releaseData['beta']['available']) ? $releaseData['beta']['available'] : 0, 'link1' => isset($releaseData['beta']['DownloadLink']) ? $releaseData['beta']['DownloadLink'] : "NA"), 'message' => isset($releaseData['beta']['message']) ? $releaseData['beta']['message'] : null), 'patch' => getVersionInfo(2, 'byCurrentVersion')[0]), 'help' => Help::getHelp(), 'view_range' => array('addon_view_range' => 20, 'dashboard_all_view_range' => 20, 'release_all_view_range' => 20));
//var_dump($mb['musicbee_download']);
/**
 * Maybe we don't wan't anyone except admin to see this, show error to anyone else. Or maybe
 * this is only available for logged in users. No guest is allowed kicked them to error page
 */
if (!$mb['user']['is_admin'] && !empty($admin_only)) {
    header('Location: ' . $link['kb'] . '?code=' . $errorCode['ADMIN_ACCESS']);
} elseif (!$mb['user']['can_mod'] && !empty($mod_only)) {
    if (!empty($json_response)) {
        die('{"status": "0", "data": "' . $lang['dashboard_err_1'] . '"}');
    } else {
        header('Location: ' . $link['kb'] . '?code=' . $errorCode['MOD_ACCESS']);
    }
} elseif ($mb['user']['is_guest'] && !empty($no_guests)) {
    if (!empty($json_response)) {
开发者ID:Avik-B,项目名称:musicbee-website,代码行数:31,代码来源:functions.php

示例10: array

 /**
  * Returns a set of topics matching a specified keyword.
  * @param $keyword string
  * @return array matching HelpTopics
  */
 function &getTopicsByKeyword($keyword)
 {
     $keyword = String::strtolower($keyword);
     $matchingTopics = array();
     $help =& Help::getHelp();
     foreach ($help->getSearchPaths() as $searchPath => $mappingFile) {
         $dir = opendir($searchPath);
         while (($file = readdir($dir)) !== false) {
             $currFile = $searchPath . DIRECTORY_SEPARATOR . $file;
             if (is_dir($currFile) && $file != 'toc' && $file != '.' && $file != '..') {
                 HelpTopicDAO::searchDirectory($mappingFile, $matchingTopics, $keyword, $currFile);
             }
         }
         closedir($dir);
     }
     krsort($matchingTopics);
     $topics = array_values($matchingTopics);
     return $topics;
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:24,代码来源:HelpTopicDAO.inc.php

示例11: audit

 /**
  * 返回审核公告栏信息
  * @access public
  */
 function audit()
 {
     $id = get_post_value('help_id');
     $m = new Help();
     $data = $m->getHelp($id);
     $this->assign('data', $data);
 }
开发者ID:koery,项目名称:Vcanbuy,代码行数:11,代码来源:HelpController.class.php


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