本文整理汇总了PHP中XenForo_Template_Helper_Core::jsEscape方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Template_Helper_Core::jsEscape方法的具体用法?PHP XenForo_Template_Helper_Core::jsEscape怎么用?PHP XenForo_Template_Helper_Core::jsEscape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XenForo_Template_Helper_Core
的用法示例。
在下文中一共展示了XenForo_Template_Helper_Core::jsEscape方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialchars
$__compilerVar2 .= ' <script src="' . htmlspecialchars($jQuerySource, ENT_QUOTES, 'UTF-8') . '"></script>
';
if ($jQuerySource != $jQuerySourceLocal) {
$__compilerVar2 .= '
<script>if (!window.jQuery) { document.write(\'<scr\'+\'ipt type="text/javascript" src="' . htmlspecialchars($jQuerySourceLocal, ENT_QUOTES, 'UTF-8') . '"><\\/scr\'+\'ipt>\'); }</script>
';
}
if ($xenOptions['uncompressedJs'] == 1 or $xenOptions['uncompressedJs'] == 3) {
$__compilerVar2 .= '
<script src="' . htmlspecialchars($javaScriptSource, ENT_QUOTES, 'UTF-8') . '/jquery/jquery.xenforo.rollup.js?_v=' . htmlspecialchars($xenOptions['jsVersion'], ENT_QUOTES, 'UTF-8') . '"></script>';
}
$__compilerVar2 .= '
<script src="' . XenForo_Template_Helper_Core::callHelper('javaScriptUrl', array('0' => $javaScriptSource . '/xenforo/xenforo.js?_v=' . $xenOptions['jsVersion'])) . '"></script>
';
if ($forum['node_id'] > 0) {
$__compilerVar2 .= '<script>XenForo.node_name=\'' . XenForo_Template_Helper_Core::jsEscape($forum['title'], 'double') . ' (' . htmlspecialchars($forum['node_id'], ENT_QUOTES, 'UTF-8') . ')\';</script>';
}
$__compilerVar2 .= '
<!--XenForo_Require:JS-->';
$__output .= $__compilerVar2;
unset($__compilerVar2);
$__output .= '
<script> jQuery.extend(true, XenForo, { _csrfToken: "' . htmlspecialchars($visitor['csrf_token_page'], ENT_QUOTES, 'UTF-8') . '" }); </script>
';
$this->addRequiredExternal('js', 'js/tinymce/tiny_mce_popup.js');
$__output .= '
';
$this->addRequiredExternal('js', 'js/tinymce/plugins/advtoolbar/templates/advlatex_manager.js');
$__output .= '
';
示例2: unset
smilies: "' . XenForo_Template_Helper_Core::jsEscape('Smilies', 'double') . '",
media: "' . XenForo_Template_Helper_Core::jsEscape('Media', 'double') . '",
drafts: "' . XenForo_Template_Helper_Core::jsEscape('Drafts', 'double') . '",
save_draft: "' . XenForo_Template_Helper_Core::jsEscape('Save Draft', 'double') . '",
delete_draft: "' . XenForo_Template_Helper_Core::jsEscape('Delete Draft', 'double') . '",
draft_saved: "' . XenForo_Template_Helper_Core::jsEscape('Draft saved', 'double') . '",
draft_deleted: "' . XenForo_Template_Helper_Core::jsEscape('Draft deleted', 'double') . '",
switch_mode_bb: "' . XenForo_Template_Helper_Core::jsEscape('Use BB Code Editor', 'double') . '",
switch_mode_rich: "' . XenForo_Template_Helper_Core::jsEscape('Use Rich Text Editor', 'double') . '",
reply_placeholder: "' . XenForo_Template_Helper_Core::jsEscape('Write your reply...', 'double') . '",
drop_files_here_to_upload: "' . XenForo_Template_Helper_Core::jsEscape('Drop files here to upload', 'double') . '",
uploads_are_not_available: "' . XenForo_Template_Helper_Core::jsEscape('Uploads are not available.', 'double') . '"
};
</script>';
$__compilerVar1 .= $__compilerVar2;
unset($__compilerVar2);
$__compilerVar1 .= '
';
}
$__compilerVar1 .= '
</div>
';
$__output .= $this->callTemplateHook('editor', $__compilerVar1, array('editorId' => $editorId));
unset($__compilerVar1);
$__output .= '
' . '
示例3: unset
';
$__compilerVar79 .= $__compilerVar148;
unset($__compilerVar148);
$__compilerVar79 .= '
';
if ($isIndexPage and $canSearch) {
$__compilerVar79 .= '
<script async type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "' . XenForo_Template_Helper_Core::jsEscape(XenForo_Template_Helper_Core::link('canonical:index', false, array()), 'double') . '",
"potentialAction": {
"@type": "SearchAction",
"target": "' . XenForo_Template_Helper_Core::jsEscape(XenForo_Template_Helper_Core::link('canonical:search/search', false, array()), 'double') . ($xenOptions['useFriendlyUrls'] ? '?' : '&') . 'keywords={search_keywords}",
"query-input": "required name=search_keywords"
}
}
</script>
';
}
$__compilerVar79 .= '
';
$__output .= $this->callTemplateHook('body', $__compilerVar79, array());
unset($__compilerVar79);
$__output .= '
<div class="slide_likebox">
示例4: array
day4: "' . XenForo_Template_Helper_Core::jsEscape('Thứ năm', 'double') . '",
day5: "' . XenForo_Template_Helper_Core::jsEscape('Thứ sáu', 'double') . '",
day6: "' . XenForo_Template_Helper_Core::jsEscape('Thứ bảy', 'double') . '",
_months: "' . XenForo_Template_Helper_Core::jsEscape('Tháng một' . ',' . 'Tháng hai' . ',' . 'Tháng ba' . ',' . 'Tháng tư' . ',' . 'Tháng năm' . ',' . 'Tháng sáu' . ',' . 'Tháng bảy' . ',' . 'Tháng tám' . ',' . 'Tháng chín' . ',' . 'Tháng mười' . ',' . 'Tháng mười một' . ',' . 'Tháng mười hai', 'double') . '",
_daysShort: "' . XenForo_Template_Helper_Core::jsEscape('CN' . ',' . 'T2' . ',' . 'T3' . ',' . 'T4' . ',' . 'T5' . ',' . 'T6' . ',' . 'T7', 'double') . '",
following_error_occurred: "' . XenForo_Template_Helper_Core::jsEscape('Có lỗi sau sảy xa với yêu cầu của bạn', 'double') . '",
server_did_not_respond_in_time_try_again: "' . XenForo_Template_Helper_Core::jsEscape('The server did not respond in time. Please try again.', 'double') . '",
logging_in: "' . XenForo_Template_Helper_Core::jsEscape('Đang đăng nhập', 'double') . '",
click_image_show_full_size_version: "' . XenForo_Template_Helper_Core::jsEscape('Xem ảnh lớn.', 'double') . '",
show_hidden_content_by_x: "' . XenForo_Template_Helper_Core::jsEscape('Show hidden content by {names}', 'double') . '"
});
// Facebook Javascript SDK
XenForo.Facebook.appId = "' . XenForo_Template_Helper_Core::jsEscape(htmlspecialchars($xenOptions['facebookAppId'], ENT_QUOTES, 'UTF-8'), 'double') . '";
XenForo.Facebook.forceInit = ' . ($facebookSdk ? 'true' : 'false') . ';
';
$__output .= $this->callTemplateHook('page_container_js_body', $__compilerVar2, array());
unset($__compilerVar2);
$__output .= '
</script>
';
if ($contentTemplate == 'thread_view') {
$__output .= '
<script type="text/javascript" src="./js/rrssb/rrssb.min.js"></script>
';
}
$__output .= '
示例5: htmlspecialchars
<a class="addthis_button_preferred_6"></a>
<a class="addthis_button_preferred_7"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript">
var addthis_share = {
url: "' . XenForo_Template_Helper_Core::jsEscape(htmlspecialchars($url, ENT_QUOTES, 'UTF-8'), 'double') . '",
templates: {
twitter: "{{title}} {{url}}' . ($xenOptions['tweet']['via'] ? ' via @' . htmlspecialchars($xenOptions['tweet']['via'], ENT_QUOTES, 'UTF-8') : '') . '"
}
};
var addthis_config = {
services_exclude: \'print\'
};
// handle AddThis on AJAX-loaded page
if (window.addthis)
{
window.addthis = null;
}
XenForo.loadJs("http://s7.addthis.com/js/250/addthis_widget.js#domready=1' . ($xenOptions['addThisPubId'] ? '&pubid=' . XenForo_Template_Helper_Core::jsEscape(htmlspecialchars($xenOptions['addThis']['pubId'], ENT_QUOTES, 'UTF-8'), 'double') : '') . '");
</script>
<!-- AddThis Button END -->
</div>
';
}
示例6: unset
<div class="secondaryContent">
<h3>' . 'Chia sẻ trang này' . '</h3>
' . $__compilerVar76 . '
</div>
</div>
';
}
unset($__compilerVar76);
$__extraData['sidebar'] .= $__compilerVar75;
unset($__compilerVar74, $__compilerVar75);
$__extraData['sidebar'] .= '
';
$__compilerVar78 = '';
$__extraData['sidebar'] .= $this->callTemplateHook('resource_view_sidebar_end', $__compilerVar78, array('resource' => $resource));
unset($__compilerVar78);
$__extraData['sidebar'] .= '
';
$__output .= '
';
if ($autoClickTrigger) {
$__output .= '
<script>
$(function() {
$(\'' . XenForo_Template_Helper_Core::jsEscape(htmlspecialchars($autoClickTrigger, ENT_QUOTES, 'UTF-8'), 'double') . '\').click();
});
</script>
';
}
示例7: htmlspecialchars
$__output .= ' (<span class="delay">' . htmlspecialchars($delay, ENT_QUOTES, 'UTF-8') . '</span>)';
}
$__output .= '</a>
<a href="' . htmlspecialchars($referer, ENT_QUOTES, 'UTF-8') . '" class="cancel">' . 'Hủy bỏ' . '</a>
</section>
</div>
';
if ($autoRedirect) {
$__output .= '
<script>
<!--
var delayCount = parseInt("' . XenForo_Template_Helper_Core::jsEscape(htmlspecialchars($delay, ENT_QUOTES, 'UTF-8'), 'double') . '") + 1,
countdown = function()
{
if (--delayCount > -1)
{
$(\'.delay\').text(delayCount);
setTimeout(countdown, 1000);
}
else
{
XenForo.redirect("' . XenForo_Template_Helper_Core::jsEscape(htmlspecialchars($url, ENT_QUOTES, 'UTF-8'), 'double') . '");
}
}
$(document).ready(countdown);
//-->
</script>
';
}
示例8: addRedactorButtons
public static function addRedactorButtons(XenForo_View $view, $formCtrlName, &$message, array &$editorOptions, &$showWysiwyg)
{
if (!$showWysiwyg) {
return false;
}
$xenOptions = XenForo_Application::get('options');
if ($xenOptions->bbm_debug_tinymcehookdisable) {
return false;
}
$template = $view->createOwnTemplateObject();
$controllerName = $template->getParam('controllerName');
$controllerAction = $template->getParam('controllerAction');
$viewName = $template->getParam('viewName');
$bbmParams = BBM_Helper_Buttons::getConfig($controllerName, $controllerAction, $viewName);
if (empty($bbmParams['bbmButtonsJsGridArray'])) {
//We must be here with Quattro
return false;
}
$bbmButtonsJsGrid = $bbmParams['bbmButtonsJsGridArray'];
$bbmCustomButtons = $bbmParams['bbmCustomButtons'];
if (!isset($editorOptions['json']['buttons'])) {
//Make this as an array to avoid any errors below
$editorOptions['json']['buttons'] = array();
}
$jsonButtons =& $editorOptions['json']['buttons'];
$extendedButtonsBackup = array();
/**
* Filter buttons grid
*/
$allGridButtons = array();
if (!empty($bbmButtonsJsGrid)) {
foreach ($bbmButtonsJsGrid as &$buttonGroup) {
foreach ($buttonGroup as $key => $button) {
if (!self::filterButton($button, $editorOptions, $editorOptions, $showWysiwyg)) {
unset($buttonGroup[$key]);
continue;
}
array_push($allGridButtons, $button);
}
}
}
/**
* XenForo Custom BbCodes Manager Buttons
*/
if (!empty($editorOptions['json']['bbCodes'])) {
$customBbCodesButtons = array();
foreach ($editorOptions['json']['bbCodes'] as $k => $v) {
$customTag = "custom_{$k}";
if (!in_array($customTag, $allGridButtons) && self::filterButton($customTag, $editorOptions, $editorOptions, $showWysiwyg)) {
$customBbCodesButtons[] = $customTag;
}
}
if (!empty($customBbCodesButtons)) {
$bbmButtonsJsGrid[] = $customBbCodesButtons;
}
}
/**
* Other addons Buttons Backup
*/
if (!empty($jsonButtons)) {
$extendedButtonsBackup = $jsonButtons;
}
/**
* Get BBM Custom Buttons
*/
if (is_array($bbmCustomButtons)) {
foreach ($bbmCustomButtons as $button) {
$tag = preg_replace('#^at_#', '', $button['tag']);
$code = $button['code'];
$desc = XenForo_Template_Helper_Core::jsEscape($button['description']);
$opts = XenForo_Template_Helper_Core::jsEscape($button['tagOptions']);
$content = XenForo_Template_Helper_Core::jsEscape($button['tagContent']);
$separator = XenForo_Template_Helper_Core::jsEscape($button['separator']);
$textButton = XenForo_Template_Helper_Core::jsEscape($button['textButton']);
$faButton = XenForo_Template_Helper_Core::jsEscape($button['faButton']);
$jsonButtons[$code] = array('title' => $desc, 'tag' => $tag, 'bbCodeOptions' => $opts, 'bbCodeOptionsSeparator' => $separator, 'bbCodeContent' => $content, 'textButton' => $textButton, 'faButton' => $faButton);
}
}
/**
* Let's put back the buttons from other addons at the end of the editor with the backup
* Also check if some of these buttons have a bbm configuration to delete them from the backup
*/
if (!empty($extendedButtonsBackup) && is_array($extendedButtonsBackup)) {
foreach ($jsonButtons as $buttonCode => $jsonButton) {
if (isset($extendedButtonsBackup[$buttonCode])) {
$jsonButtons[$buttonCode] = array_merge($jsonButtons[$buttonCode], $extendedButtonsBackup[$buttonCode]);
unset($extendedButtonsBackup[$buttonCode]);
}
}
if (!empty($extendedButtonsBackup)) {
//Extend custom buttons
$jsonButtons += $extendedButtonsBackup;
//Extend buttons grid
$extendedgrid = array();
foreach ($extendedButtonsBackup as $buttonCode => $extendedButton) {
$extendedgrid[] = $buttonCode;
}
array_push($bbmButtonsJsGrid, $extendedgrid);
}
}
//.........这里部分代码省略.........
示例9:
<?php
if (!class_exists('XenForo_Application', false)) {
die;
}
$__output = '';
$__output .= ' adv_bimg_id: "' . XenForo_Template_Helper_Core::jsEscape('Id:', 'double') . '",
adv_auto: "' . XenForo_Template_Helper_Core::jsEscape('Auto', 'double') . '",';
示例10: _detectPhrases
protected static function _detectPhrases($string, $jsEscape = false)
{
if (preg_match_all('#{phrase:(.+?)}#i', $string, $captures, PREG_SET_ORDER)) {
foreach ($captures as $capture) {
$phrase = new XenForo_Phrase($capture[1]);
$string = str_replace($capture[0], $phrase, $string);
}
}
if ($jsEscape == true) {
return XenForo_Template_Helper_Core::jsEscape($string);
}
return $string;
}