本文整理汇总了PHP中Indexer::queueAsyncJSCode方法的典型用法代码示例。如果您正苦于以下问题:PHP Indexer::queueAsyncJSCode方法的具体用法?PHP Indexer::queueAsyncJSCode怎么用?PHP Indexer::queueAsyncJSCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Indexer
的用法示例。
在下文中一共展示了Indexer::queueAsyncJSCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: draw
//.........这里部分代码省略.........
$styles_str .= "#leftnav .panel a {color: {$theme_options_styles['leftSubMenuFontColor']};}";
}
if (!empty($theme_options_styles['leftSubMenuHoverBgColor'])) {
$styles_str .= "#leftnav .panel a.list-group-item:hover{background: {$theme_options_styles['leftSubMenuHoverBgColor']};}";
}
if (!empty($theme_options_styles['leftSubMenuHoverFontColor'])) {
$styles_str .= "#leftnav .panel a.list-group-item:hover{color: {$theme_options_styles['leftSubMenuHoverFontColor']};}";
}
if (!empty($theme_options_styles['leftMenuFontColor'])) {
$styles_str .= "#leftnav .panel a.parent-menu{color: {$theme_options_styles['leftMenuFontColor']};}";
}
if (!empty($theme_options_styles['leftMenuBgColor'])) {
$styles_str .= "#leftnav .panel a.parent-menu{background: {$theme_options_styles['leftMenuBgColor']};}";
}
if (!empty($theme_options_styles['leftMenuHoverFontColor'])) {
$styles_str .= "#leftnav .panel .panel-heading:hover {color: {$theme_options_styles['leftMenuHoverFontColor']};}";
}
if (!empty($theme_options_styles['leftMenuSelectedFontColor'])) {
$styles_str .= "#leftnav .panel a.parent-menu:not(.collapsed){color: {$theme_options_styles['leftMenuSelectedFontColor']};}";
}
if (isset($theme_options_styles['imageUpload'])) {
$t->set_var('logo_img', "{$urlThemeData}/{$theme_options_styles['imageUpload']}");
}
if (isset($theme_options_styles['imageUploadSmall'])) {
$t->set_var('logo_img_small', "{$urlThemeData}/{$theme_options_styles['imageUploadSmall']}");
}
$t->set_var('EXTRA_CSS', "<style>{$styles_str}</style>");
}
$t->set_var('TOOL_PATH', $urlAppend);
if (isset($body_action)) {
$t->set_var('BODY_ACTION', $body_action);
}
$t->set_var('LANG_SEARCH', $langSearch);
// display role switch button if needed
if (isset($require_current_course) and ($is_editor or isset($saved_is_editor) and $saved_is_editor) and !(isset($require_course_admin) and $require_course_admin) and !(isset($require_editor) and $require_editor)) {
if ($is_editor) {
$t->set_var('STUDENT_VIEW_TITLE', $langStudentViewEnable);
} else {
$t->set_var('STUDENT_VIEW_TITLE', $langStudentViewDisable);
$t->set_var('STUDENT_VIEW_CLASS', 'btn-toggle-on');
}
$t->set_var('STUDENT_VIEW_URL', $urlAppend . 'main/student_view.php?course=' . $course_code);
} else {
if (!$is_embedonce) {
$t->set_block('mainBlock', 'statusSwitchBlock', 'delete');
}
}
// if $require_help is true (set by each tool) display the help link
if ($require_help == true) {
if (isset($require_current_course) and !$is_editor) {
$helpTopic .= '_student';
}
$head_content .= "\n <script>\n \$(function() {\n \$('#help-btn').click(function(e) {\n e.preventDefault();\n \$.get(\$(this).attr(\"href\"), function(data) {bootbox.alert(data);});\n });\n });\n </script>\n ";
$help_link_icon = "\n\n <a id='help-btn' href=\"" . $urlAppend . "modules/help/help.php?topic={$helpTopic}&language={$language}\">\n <i class='fa fa-question-circle tiny-icon' data-toggle='tooltip' data-placement='top' title='{$langHelp}'></i>\n </a>";
$t->set_var('HELP_LINK_ICON', $help_link_icon);
$t->set_var('LANG_HELP', $langHelp);
} else {
$t->set_var('HELP_LINK_ICON', '');
$t->set_var('LANG_HELP', '');
}
if (isset($head_content)) {
global $webDir;
// required by indexer
require_once 'modules/search/indexer.class.php';
if (isset($_SESSION[Indexer::SESSION_PROCESS_AT_NEXT_DRAW]) && $_SESSION[Indexer::SESSION_PROCESS_AT_NEXT_DRAW] === true) {
$head_content .= Indexer::queueAsyncJSCode();
$_SESSION[Indexer::SESSION_PROCESS_AT_NEXT_DRAW] = false;
}
$t->set_var('HEAD_EXTRAS', $head_content);
}
if (defined('RSS')) {
$t->set_var('RSS_LINK_ICON', "\n\n <a href='{$urlAppend}" . RSS . "'>\n <i class='fa fa-rss-square tiny-icon tiny-icon-rss' data-toggle='tooltip' data-placement='top' title='RSS Feed'></i>\n </a>\n\n\n ");
}
if ($perso_tool_content) {
$t->set_var('LANG_MY_PERSO_LESSONS', $langMyCourses);
$t->set_var('LANG_MY_PERSO_ANNOUNCEMENTS', $langMyPersoAnnouncements);
$t->set_var('LANG_MY_PERSONAL_CALENDAR', $langMyAgenda);
$t->set_var('LESSON_CONTENT', $lesson_content);
$t->set_var('URL_PATH', $urlAppend);
$t->set_var('TOOL_PATH', $urlAppend);
$t->set_var('PERSONAL_CALENDAR_CONTENT', $personal_calendar_content);
}
$t->set_var('COPYRIGHT', 'Open eClass © 2003-' . date('Y'));
$t->set_var('TERMS_URL', $urlAppend . 'info/terms.php');
$t->set_var('LANG_TERMS', $langUsageTerms);
// Remove tool title block from selected pages
if (defined('HIDE_TOOL_TITLE')) {
$t->set_block('mainBlock', 'toolTitleBlock', 'toolTitleBlockVar');
$t->set_var('toolTitleBlockVar', '');
}
$t->set_var('EXTRA_FOOTER_CONTENT', get_config('extra_footer_content'));
// Hack to leave HTML body unclosed
if (defined('TEMPLATE_REMOVE_CLOSING_TAGS')) {
$t->set_block('mainBlock', 'closingTagsBlock', 'delete');
}
// At this point all variables are set and we are ready to send the final output
// back to the browser
$t->parse('main', 'mainBlock', false);
$t->pparse('Output', 'fh');
}
示例2: draw
//.........这里部分代码省略.........
}
if (!empty($theme_options_styles['leftSubMenuHoverBgColor'])) {
$styles_str .= "#leftnav .panel a.list-group-item:hover{background: {$theme_options_styles['leftSubMenuHoverBgColor']};}";
}
if (!empty($theme_options_styles['leftSubMenuHoverFontColor'])) {
$styles_str .= "#leftnav .panel a.list-group-item:hover{color: {$theme_options_styles['leftSubMenuHoverFontColor']};}";
}
if (!empty($theme_options_styles['leftMenuFontColor'])) {
$styles_str .= "#leftnav .panel a.parent-menu{color: {$theme_options_styles['leftMenuFontColor']};}";
}
if (!empty($theme_options_styles['leftMenuBgColor'])) {
$styles_str .= "#leftnav .panel a.parent-menu{background: {$theme_options_styles['leftMenuBgColor']};}";
}
if (!empty($theme_options_styles['leftMenuHoverFontColor'])) {
$styles_str .= "#leftnav .panel .panel-heading:hover {color: {$theme_options_styles['leftMenuHoverFontColor']};}";
}
if (!empty($theme_options_styles['leftMenuSelectedFontColor'])) {
$styles_str .= "#leftnav .panel a.parent-menu:not(.collapsed){color: {$theme_options_styles['leftMenuSelectedFontColor']};}";
}
if (isset($theme_options_styles['custom_logo'])) {
$t->set_var('logo_img', $theme_options_styles['custom_logo']);
}
if (isset($theme_options_styles['custom_logo_small'])) {
$t->set_var('logo_img_small', $theme_options_styles['custom_logo_small']);
}
$t->set_var('EXTRA_CSS', "<style>{$styles_str}</style>");
}
$t->set_var('TOOL_PATH', $urlAppend);
if (isset($body_action)) {
$t->set_var('BODY_ACTION', $body_action);
}
$t->set_var('LANG_SEARCH', $langSearch);
// display role switch button if needed
if (isset($require_current_course) and ($is_editor or isset($saved_is_editor) and $saved_is_editor)) {
if ($is_editor) {
$t->set_var('STUDENT_VIEW_TITLE', $langStudentViewEnable);
} else {
$t->set_var('STUDENT_VIEW_TITLE', $langStudentViewDisable);
$t->set_var('STUDENT_VIEW_CLASS', 'btn-toggle-on');
}
$t->set_var('STUDENT_VIEW_URL', $urlAppend . 'main/student_view.php?course=' . $course_code);
} else {
if (!$is_embedonce) {
$t->set_block('mainBlock', 'statusSwitchBlock', 'delete');
}
}
// if $require_help is true (set by each tool) display the help link
if ($require_help == true) {
if (isset($require_current_course) and !$is_editor) {
$helpTopic .= '_student';
}
$head_content .= "\n <script>\n \$(function() {\n \$('#help-btn').click(function(e) {\n e.preventDefault();\n \$.get(\$(this).attr(\"href\"), function(data) {bootbox.alert(data);});\n });\n });\n </script>\n ";
$help_link_icon = "\n\n <a id='help-btn' href=\"" . $urlAppend . "modules/help/help.php?topic={$helpTopic}&language={$language}\">\n <i class='fa fa-question-circle tiny-icon' rel='tooltip' data-toggle='tooltip' data-placement='top' title='{$langHelp}'></i>\n </a>";
$t->set_var('HELP_LINK_ICON', $help_link_icon);
$t->set_var('LANG_HELP', $langHelp);
} else {
$t->set_var('HELP_LINK_ICON', '');
$t->set_var('LANG_HELP', '');
}
if (isset($head_content)) {
global $webDir;
// required by indexer
require_once 'modules/search/indexer.class.php';
if (isset($_SESSION[Indexer::SESSION_PROCESS_AT_NEXT_DRAW]) && $_SESSION[Indexer::SESSION_PROCESS_AT_NEXT_DRAW] === true) {
$head_content .= Indexer::queueAsyncJSCode();
$_SESSION[Indexer::SESSION_PROCESS_AT_NEXT_DRAW] = false;
}
$t->set_var('HEAD_EXTRAS', $head_content);
}
if (defined('RSS')) {
$t->set_var('RSS_LINK_ICON', "\n\n <a href='{$urlAppend}" . RSS . "'>\n <i class='fa fa-rss-square tiny-icon tiny-icon-rss' rel='tooltip' data-toggle='tooltip' data-placement='top' title='RSS Feed'></i>\n </a>\n\n\n ");
}
if ($perso_tool_content) {
$t->set_var('LANG_MY_PERSO_LESSONS', $langMyPersoLessons);
$t->set_var('LANG_MY_PERSO_DEADLINES', $langMyPersoDeadlines);
$t->set_var('LANG_MY_PERSO_ANNOUNCEMENTS', $langMyPersoAnnouncements);
$t->set_var('LANG_MY_PERSO_DOCS', $langMyPersoDocs);
$t->set_var('LANG_MY_PERSO_AGENDA', $langMyPersoAgenda);
$t->set_var('LANG_PERSO_FORUM', $langMyPersoForum);
$t->set_var('LANG_MY_PERSONAL_CALENDAR', $langMyAgenda);
$t->set_var('LESSON_CONTENT', $lesson_content);
$t->set_var('ASSIGN_CONTENT', $assigns_content);
$t->set_var('DOCS_CONTENT', $docs_content);
$t->set_var('AGENDA_CONTENT', $agenda_content);
$t->set_var('FORUM_CONTENT', $forum_content);
$t->set_var('URL_PATH', $urlAppend);
$t->set_var('TOOL_PATH', $urlAppend);
$t->set_var('PERSONAL_CALENDAR_CONTENT', $personal_calendar_content);
}
$t->set_var('LANG_COPYRIGHT_NOTICE', $langCopyrightFooter);
// Remove tool title block from selected pages
if (defined('HIDE_TOOL_TITLE')) {
$t->set_block('mainBlock', 'toolTitleBlock', 'toolTitleBlockVar');
$t->set_var('toolTitleBlockVar', '');
}
// At this point all variables are set and we are ready to send the final output
// back to the browser
$t->parse('main', 'mainBlock', false);
$t->pparse('Output', 'fh');
}