本文整理匯總了PHP中smarty_block_inline_script函數的典型用法代碼示例。如果您正苦於以下問題:PHP smarty_block_inline_script函數的具體用法?PHP smarty_block_inline_script怎麽用?PHP smarty_block_inline_script使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了smarty_block_inline_script函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: smarty_function_script
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
function smarty_function_script($params, &$smarty)
{
static $scripts = array();
if (!isset($scripts[$params['src']])) {
if (strpos($params['src'], '//') === false) {
$src = Registry::get('config.current_location') . '/' . fn_link_attach($params['src'], 'ver=' . PRODUCT_VERSION);
} else {
$src = $params['src'];
}
$scripts[$params['src']] = '<script type="text/javascript"' . (!empty($params['class']) ? ' class="' . $params['class'] . '" ' : '') . ' src="' . $src . '" ' . (isset($params['charset']) ? 'charset="' . $params['charset'] . '"' : '') . (isset($params['escape']) ? '><\\/script>' : '></script>');
if (defined('AJAX_REQUEST') || Registry::get('runtime.inside_scripts')) {
return $scripts[$params['src']];
} else {
if (isset($params['no-defer']) && $params['no-defer']) {
return $scripts[$params['src']];
} else {
$cache_name = $smarty->getTemplateVars('block_cache_name');
if (!empty($cache_name)) {
$cached_content = Registry::get($cache_name);
if (!isset($cached_content['javascript'])) {
$cached_content['javascript'] = '';
}
$cached_content['javascript'] .= $scripts[$params['src']];
Registry::set($cache_name, $cached_content, true);
}
$repeat = false;
$smarty->loadPlugin('smarty_block_inline_script');
smarty_block_inline_script(array(), $scripts[$params['src']], $smarty, $repeat);
return '<!-- Inline script moved to the bottom of the page -->';
}
}
}
}
示例2: content_55db8bdb7d5a56_01074186
function content_55db8bdb7d5a56_01074186($_smarty_tpl)
{
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
fn_preload_lang_vars(array('addons.tags.add_a_tag'));
$_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
$_block_repeat = true;
echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo '<script';
?>
type="text/javascript">
(function(_, $) {
_.tr({
addons_tags_add_a_tag: '<?php
echo strtr($_smarty_tpl->__("addons.tags.add_a_tag"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
?>
'
});
}(Tygh, Tygh.$));
<?php
echo '</script';
?>
><?php
$_block_content = ob_get_clean();
$_block_repeat = false;
echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
}
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:32,代碼來源:e172a9969bb5f4d0423f67eb972cbec79013987c.tygh.scripts.post.tpl.php
示例3: smarty_helper_inline_scripts
function smarty_helper_inline_scripts($params, $content, &$smarty, &$repeat)
{
Registry::del('runtime.inside_scripts');
// Get inline scripts
$repeat = false;
$smarty->loadPlugin('smarty_block_inline_script');
$inline_scripts = "\n\n<!-- Inline scripts -->\n" . smarty_block_inline_script(array('output' => true), '', $smarty, $repeat);
// FIXME: Backward compatibility. If {scripts} included at the TOP of the page, do not grab inline scripts.
Registry::set('runtime.inside_scripts', 1);
return $inline_scripts;
}
示例4: content_55db8bdb4fee46_86617825
function content_55db8bdb4fee46_86617825($_smarty_tpl)
{
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
fn_preload_lang_vars(array('twgadmin_mobile_app'));
if ($_smarty_tpl->tpl_vars['runtime']->value['twigmo']['admin_connection']['access_id']) {
?>
<div class="twg-mobile-app-link">
<a href="<?php
echo htmlspecialchars(fn_url("twigmo_admin_app.view"), ENT_QUOTES, 'UTF-8');
?>
"><?php
echo $_smarty_tpl->__("twgadmin_mobile_app");
?>
</a>
</div>
<?php
$_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
$_block_repeat = true;
echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo '<script';
?>
type="text/javascript">
(function(_, $) {
$(document).ready(function() {
$('div.twg-mobile-app-link').detach().insertBefore('ul.nav.hover-show.nav-pills').show();
});
}(Tygh, Tygh.$));
<?php
echo '</script';
?>
><?php
$_block_content = ob_get_clean();
$_block_repeat = false;
echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
?>
<?php
}
}
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:48,代碼來源:26d408fb9b87a49e523ff19bec3658f4b3a0215d.tygh.global_search.post.tpl.php
示例5: content_55db8bdb228734_82792347
function content_55db8bdb228734_82792347($_smarty_tpl)
{
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
?>
<div class="help-tutorial-wrapper"><div class="help-tutorial-content clearfix <?php
if ($_smarty_tpl->tpl_vars['count']->value == 2) {
?>
help-tutorial-content_width_big<?php
}
?>
" id="help_tutorial_content"><?php
if ($_smarty_tpl->tpl_vars['count']->value == 2) {
?>
<iframe width="460" height="360" src="//www.youtube.com/embed/<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value, ENT_QUOTES, 'UTF-8');
?>
?wmode=transparent&rel=0&html5=1" frameborder="0" allowfullscreen align="left"></iframe><iframe width="460" height="360" src="//www.youtube.com/embed/<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['item2']->value, ENT_QUOTES, 'UTF-8');
?>
?wmode=transparent&rel=0&html5=1" frameborder="0" allowfullscreen align="right"></iframe><?php
} else {
?>
<iframe width="640" height="360" src="//www.youtube.com/embed/<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value, ENT_QUOTES, 'UTF-8');
?>
?wmode=transparent&rel=0&html5=1" frameborder="0" allowfullscreen></iframe><?php
}
?>
</div></div><?php
$_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
$_block_repeat = true;
echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo '<script';
?>
type="text/javascript">(function(_, $) {$(function() {$('#help_tutorial_link').on('click', function() {var self = $(this);self.toggleClass('open');$('#help_tutorial_content').toggleClass('open');});if($('#elm_sidebar').length == 0) {$('#help_tutorial_link').css('margin-left', 0);}});}(Tygh, Tygh.$));<?php
echo '</script';
?>
><?php
$_block_content = ob_get_clean();
$_block_repeat = false;
echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
}
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:48,代碼來源:164fe2d4dcf6349336e1d5382e2b633e07978b7b.tygh.video.tpl.php
示例6: content_55db8bdb7ae672_49551146
function content_55db8bdb7ae672_49551146($_smarty_tpl)
{
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
?>
<!-- GA code -->
<?php
$_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
$_block_repeat = true;
echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo '<script';
?>
type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-40339423-1']);
_gaq.push(['_setDomainName', '<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['current_host'], ENT_QUOTES, 'UTF-8');
?>
']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
<?php
echo '</script';
?>
><?php
$_block_content = ob_get_clean();
$_block_repeat = false;
echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
?>
<!-- GA code end -->
<?php
}
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:44,代碼來源:0bd824e208aa619f30018c4562670fb3e328add1.tygh.analytics.tpl.php
示例7: outputScript
public static function outputScript($content, \Smarty_Internal_Template $template)
{
if (defined('AJAX_REQUEST')) {
return $content;
}
if ($template->smarty->getTemplateVars('block_rendering')) {
if (!$template->smarty->getTemplateVars('block_parse_js')) {
return $content;
}
}
$pattern = '/\\<script([^>]*)\\>.*?\\<\\/script\\>/s';
if (preg_match_all($pattern, $content, $matches)) {
if (Registry::get('runtime.inside_scripts')) {
return $content;
}
$cache_name = $template->smarty->getTemplateVars('block_cache_name');
$m = $matches[0];
$m_attrs = $matches[1];
$javascript = '';
foreach ($m as $index => $match) {
if (strpos($m_attrs[$index], 'data-no-defer') === false) {
$repeat = false;
$template->smarty->loadPlugin('smarty_block_inline_script');
smarty_block_inline_script(array(), $match, $template->smarty, $repeat);
$content = str_replace($match, '<!-- Inline script moved to the bottom of the page -->', $content);
$javascript .= $match;
}
}
if (!empty($cache_name)) {
$cached_content = Registry::get($cache_name);
if (!isset($cached_content['javascript'])) {
$cached_content['javascript'] = '';
}
$cached_content['javascript'] .= $javascript;
Registry::set($cache_name, $cached_content, true);
}
}
return $content;
}
示例8: content_55dc7cba1ff3d0_79057342
function content_55dc7cba1ff3d0_79057342($_smarty_tpl)
{
if (!is_callable('smarty_function_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/function.script.php';
}
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
fn_preload_lang_vars(array('period', 'all', 'this_day', 'this_week', 'this_month', 'this_year', 'yesterday', 'previous_week', 'previous_month', 'previous_year', 'last_24hours', 'last_n_days', 'last_n_days', 'custom', 'select_dates'));
if ($_smarty_tpl->tpl_vars['display']->value != "form") {
?>
<div class="nowrap">
<div class="form-inline">
<?php
} else {
?>
<div class="sidebar-field">
<?php
}
?>
<label for="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
?>
period_selects"><?php
echo $_smarty_tpl->__("period");
?>
:</label>
<select name="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
?>
period" id="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
?>
period_selects">
<option value="A" <?php
if ($_smarty_tpl->tpl_vars['period']->value == "A" || !$_smarty_tpl->tpl_vars['period']->value) {
?>
selected="selected"<?php
}
?>
><?php
echo $_smarty_tpl->__("all");
?>
</option>
<optgroup label="=============">
<option value="D" <?php
if ($_smarty_tpl->tpl_vars['period']->value == "D") {
?>
selected="selected"<?php
}
?>
><?php
echo $_smarty_tpl->__("this_day");
?>
</option>
<option value="W" <?php
if ($_smarty_tpl->tpl_vars['period']->value == "W") {
?>
selected="selected"<?php
}
?>
><?php
echo $_smarty_tpl->__("this_week");
?>
</option>
<option value="M" <?php
if ($_smarty_tpl->tpl_vars['period']->value == "M") {
?>
selected="selected"<?php
}
?>
><?php
echo $_smarty_tpl->__("this_month");
?>
</option>
<option value="Y" <?php
if ($_smarty_tpl->tpl_vars['period']->value == "Y") {
?>
selected="selected"<?php
}
?>
><?php
echo $_smarty_tpl->__("this_year");
?>
</option>
</optgroup>
<optgroup label="=============">
<option value="LD" <?php
if ($_smarty_tpl->tpl_vars['period']->value == "LD") {
?>
selected="selected"<?php
}
?>
><?php
echo $_smarty_tpl->__("yesterday");
?>
</option>
<option value="LW" <?php
if ($_smarty_tpl->tpl_vars['period']->value == "LW") {
?>
//.........這裏部分代碼省略.........
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:101,代碼來源:57474c6e4564ece9d7213eeff0f44d06d38c7991.tygh.period_selector.tpl.php
示例9: content_55db8bf449f911_97854368
function content_55db8bf449f911_97854368($_smarty_tpl)
{
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
fn_preload_lang_vars(array('share.congratulations_first_order', 'share.first_order_tweet', 'share.installation_tweet', 'share.installation_tweet'));
if ($_smarty_tpl->tpl_vars['mode']->value == "notification") {
?>
<?php
echo $_smarty_tpl->__("share.congratulations_first_order");
?>
<?php
}
?>
<?php
$_smarty_tpl->tpl_vars['url'] = new Smarty_variable(fn_url('', "C"), null, 0);
$_smarty_tpl->tpl_vars['tweet_text'] = new Smarty_variable($_smarty_tpl->__("share.first_order_tweet", array("[product]" => @constant('PRODUCT_NAME'))), null, 0);
?>
<ul class="inline social-share">
<li><a href="#" class="uibutton large confirm" onclick=" window.open('https://www.facebook.com/sharer/sharer.php?s=100&p[url]=<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['url']->value, ENT_QUOTES, 'UTF-8');
?>
&p[images][0]=<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['logos']->value['theme']['image']['http_image_path'], ENT_QUOTES, 'UTF-8');
?>
&p[title]=<?php
if ($_smarty_tpl->tpl_vars['mode']->value == "notification") {
echo htmlspecialchars($_smarty_tpl->tpl_vars['tweet_text']->value, ENT_QUOTES, 'UTF-8');
} else {
echo $_smarty_tpl->__("share.installation_tweet", array('[product_name]' => $_smarty_tpl->tpl_vars['product_name']->value));
}
?>
', 'facebook-share-dialog', 'width=626,height=436'); return false;"> Share on Facebook</a></li>
<li><a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-text="<?php
if ($_smarty_tpl->tpl_vars['mode']->value == "notification") {
echo htmlspecialchars($_smarty_tpl->tpl_vars['tweet_text']->value, ENT_QUOTES, 'UTF-8');
} else {
echo $_smarty_tpl->__("share.installation_tweet", array('[product_name]' => $_smarty_tpl->tpl_vars['product_name']->value));
}
?>
" data-url="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['url']->value, ENT_QUOTES, 'UTF-8');
?>
" data-via="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['resources']['twitter'], ENT_QUOTES, 'UTF-8');
?>
" data-size="large">Tweet</a>
<?php
$_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
$_block_repeat = true;
echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo '<script';
?>
type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");<?php
echo '</script';
?>
><?php
$_block_content = ob_get_clean();
$_block_repeat = false;
echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
?>
</li>
</ul>
<?php
}
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:74,代碼來源:1aa1cc613c05207dbe671e37c79a6cb2a8b06477.tygh.share.tpl.php
示例10: content_55db8bf91f2713_98625850
function content_55db8bf91f2713_98625850($_smarty_tpl)
{
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
fn_preload_lang_vars(array('new_administrator_password', 'show', 'generate', 'hide', 'show', 'hide'));
?>
<div class="control-group setting-wide">
<label for="password_field" class="control-label"><?php
echo $_smarty_tpl->__("new_administrator_password");
?>
:</label>
<div class="controls">
<input type="password" value="" id="password_field" name="new_password"><br>
<a class="cm-show-password a-pseudo cm-off-password" data-ca-result-id="password_field"><?php
echo $_smarty_tpl->__("show");
?>
</a> <a class="cm-generate-password a-pseudo" data-ca-result-id="password_field"><?php
echo $_smarty_tpl->__("generate");
?>
</a>
</div>
</div>
<?php
$_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
$_block_repeat = true;
echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo '<script';
?>
type="text/javascript">
(function($, _) {
$('.cm-show-password').on('click', function(e) {
_this = $(this);
if (_this.hasClass('cm-off-password')) {
$('#' + _this.data('caResultId')).prop('type', 'text');
_this.removeClass('cm-off-password').html('<?php
echo $_smarty_tpl->__("hide");
?>
');
} else {
$('#' + _this.data('caResultId')).prop('type', 'password');
_this.addClass('cm-off-password').html('<?php
echo $_smarty_tpl->__("show");
?>
');
}
});
$('.cm-generate-password').on('click', function(e) {
$('#' + $(this).data('caResultId')).val(Math.random().toString(36).slice(-10)).prop('type', 'text');
if ($('.cm-show-password').hasClass('cm-off-password')) {
$('.cm-show-password').removeClass('cm-off-password').html('<?php
echo $_smarty_tpl->__("hide");
?>
');
}
});
})(Tygh.$, Tygh);
<?php
echo '</script';
?>
><?php
$_block_content = ob_get_clean();
$_block_repeat = false;
echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
}
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:71,代碼來源:a230969a0212e2015e3dd0c37c266a8725ea7d89.tygh.password.tpl.php
示例11: content_55e62050aa1083_90850588
function content_55e62050aa1083_90850588($_smarty_tpl)
{
if (!is_callable('smarty_function_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/function.script.php';
}
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
if (!is_callable('smarty_block_hook')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
}
fn_preload_lang_vars(array('text_restore_question', 'open_file_or_create_new', 'new_file', 'create_file', 'could_not_open_file', 'upload_file', 'upload', 'new_folder', 'name', 'new_file', 'name', 'on_site_template_editing', 'restore_from_repository', 'download', 'rename', 'delete', 'create_file', 'create_folder', 'upload_file', 'create', 'templates'));
echo smarty_function_script(array('src' => "js/lib/ace/ace.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/templates.js"), $_smarty_tpl);
?>
<?php
$_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
$_block_repeat = true;
echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo '<script';
?>
type="text/javascript">
(function (_, $) {
_.tr({
text_restore_question : '<?php
echo strtr($_smarty_tpl->__("text_restore_question"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/"));
?>
',
text_enter_filename : '<?php
echo $_smarty_tpl->__(strtr("text_enter_filename", array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/")));
?>
',
text_are_you_sure_to_delete_file : '<?php
echo $_smarty_tpl->__(strtr("text_are_you_sure_to_delete_file", array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/")));
?>
'
});
<?php
if ($_smarty_tpl->tpl_vars['selected_path']->value) {
?>
_.templates.selected_path = '<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['selected_path']->value, ENT_QUOTES, 'UTF-8');
?>
';
<?php
}
?>
_.templates.rel_path = '<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['rel_path']->value, ENT_QUOTES, 'UTF-8');
?>
';
}(Tygh, Tygh.$));
<?php
echo '</script';
?>
><?php
$_block_content = ob_get_clean();
$_block_repeat = false;
echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
ob_start();
?>
<div id="error_box" class="hidden">
<div align="center" class="notification-e">
<div id="error_status"></div>
</div>
</div>
<div id="status_box" class="hidden">
<div class="notification-n" align="center">
<div id="status"></div>
</div>
</div>
<!--Editor-->
<div class="te-content cm-te-content">
<div id="template_text"></div>
<div id="template_image" class="te-template-image"></div>
</div>
<div class="cm-te-messages">
<div class="te-empty-folder empty-text">
<h2><?php
echo $_smarty_tpl->__("open_file_or_create_new");
?>
//.........這裏部分代碼省略.........
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:101,代碼來源:b65b8b6cac0b59cd33c2cfab30358c54c640ee9a.tygh.manage.tpl.php
示例12: content_55db8bdb79d546_98717403
function content_55db8bdb79d546_98717403($_smarty_tpl)
{
if (!is_callable('smarty_block_scripts')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.scripts.php';
}
if (!is_callable('smarty_function_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/function.script.php';
}
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
if (!is_callable('smarty_block_hook')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
}
fn_preload_lang_vars(array('cannot_buy', 'no_products_selected', 'error_no_items_selected', 'delete_confirmation', 'text_out_of_stock', 'items', 'text_required_group_product', 'save', 'close', 'loading', 'notice', 'warning', 'error', 'text_are_you_sure_to_proceed', 'text_invalid_url', 'error_validator_email', 'error_validator_phone', 'error_validator_integer', 'error_validator_multiple', 'error_validator_password', 'error_validator_required', 'error_validator_zipcode', 'error_validator_message', 'error_validator_color', 'text_page_loading', 'error_ajax', 'text_changes_not_saved', 'text_data_changed', 'text_block_trial_notice', 'text_expired_license', 'file_browser', 'editing_block', 'editing_grid', 'editing_container', 'adding_grid', 'adding_block_to_grid', 'manage_blocks', 'editing_block', 'add_block', 'text_position_updating', 'more', 'browse', 'enter_new_lang_code', 'no_image'));
$_smarty_tpl->smarty->_tag_stack[] = array('scripts', array());
$_block_repeat = true;
echo smarty_block_scripts(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
?>
<?php
echo smarty_function_script(array('src' => "js/lib/jquery/jquery.min.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/core.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/history.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/lib/twitterbootstrap/bootstrap.min.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/lib/jqueryui/jquery-ui.custom.min.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/lib/autonumeric/autoNumeric.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/lib/appear/jquery.appear-1.1.1.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/lib/tools/tooltip.min.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/editors/" . (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['default_wysiwyg_editor'] . ".editor.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/ajax.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/quick_menu.js"), $_smarty_tpl);
?>
<?php
if ($_smarty_tpl->tpl_vars['settings']->value['General']['feedback_type'] == "auto") {
?>
<?php
echo $_smarty_tpl->getSubTemplate("common/analytics.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
?>
<?php
}
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("promo_data", null, null);
ob_start();
?>
<div class="commercial-promotion-text">
<p><?php
echo $_smarty_tpl->tpl_vars['addon_permissions_text']->value['text'];
?>
</p>
<div>
<?php
list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
if (isset($_capture_assign)) {
$_smarty_tpl->assign($_capture_assign, ob_get_contents());
}
if (isset($_capture_append)) {
//.........這裏部分代碼省略.........
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:101,代碼來源:a5e194af6a66f800e58dc2238c249cbddc38fb07.tygh.scripts.tpl.php
示例13: content_55dc7cc5c1a670_13636549
function content_55dc7cc5c1a670_13636549($_smarty_tpl)
{
if (!is_callable('smarty_block_hook')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
}
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
fn_preload_lang_vars(array('information', 'name', 'description', 'edit_content_on_site', 'seo_meta_data', 'page_title', 'ttc_page_title', 'meta_description', 'meta_keywords', 'availability', 'usergroups', 'creation_date', 'use_avail_period', 'avail_from', 'avail_till', 'preview', 'clone_this_page', 'delete_this_page', 'pages'));
if ($_smarty_tpl->tpl_vars['page_data']->value['page_id']) {
?>
<?php
$_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['page_data']->value['page_id'], null, 0);
} else {
?>
<?php
$_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0);
}
?>
<?php
if ($_smarty_tpl->tpl_vars['id']->value && $_smarty_tpl->tpl_vars['page_type']->value != @constant('PAGE_TYPE_LINK') && (!fn_allowed_for("ULTIMATE") || $_smarty_tpl->tpl_vars['runtime']->value['company_id'])) {
?>
<?php
$_smarty_tpl->tpl_vars['view_uri'] = new Smarty_variable(fn_get_preview_url("pages.view?page_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, $_smarty_tpl->tpl_vars['page_data']->value, $_smarty_tpl->tpl_vars['auth']->value['user_id']), null, 0);
}
?>
<?php
$_smarty_tpl->tpl_vars["allow_save"] = new Smarty_variable(true, null, 0);
if (fn_allowed_for("ULTIMATE")) {
?>
<?php
$_smarty_tpl->tpl_vars["allow_save"] = new Smarty_variable(fn_allow_save_object($_smarty_tpl->tpl_vars['page_data']->value, "pages"), null, 0);
}
$_smarty_tpl->tpl_vars['show_save_btn'] = new Smarty_variable($_smarty_tpl->tpl_vars['allow_save']->value, null, 2);
$_ptr = $_smarty_tpl->parent;
while ($_ptr != null) {
$_ptr->tpl_vars['show_save_btn'] = clone $_smarty_tpl->tpl_vars['show_save_btn'];
$_ptr = $_ptr->parent;
}
$_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
ob_start();
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("tabsbox", null, null);
ob_start();
?>
<form action="<?php
echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
?>
" method="post" name="page_update_form" class="form-horizontal form-edit <?php
if (!$_smarty_tpl->tpl_vars['allow_save']->value) {
?>
cm-hide-inputs<?php
}
?>
" enctype="multipart/form-data">
<div id="update_page_form_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['page_data']->value['page_id'], ENT_QUOTES, 'UTF-8');
?>
">
<input type="hidden" class="cm-no-hide-input" id="selected_section" name="selected_section" value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['selected_section']->value, ENT_QUOTES, 'UTF-8');
?>
"/>
<input type="hidden" class="cm-no-hide-input" id="page_id" name="page_id" value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
?>
" />
<input type="hidden" class="cm-no-hide-input" name="page_data[page_type]" id="page_type" size="55" value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['page_type']->value, ENT_QUOTES, 'UTF-8');
?>
"/>
<input type="hidden" class="cm-no-hide-input" name="come_from" value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['come_from']->value, ENT_QUOTES, 'UTF-8');
?>
" />
<input type="hidden" class="cm-no-hide-input" name="result_ids" value="update_page_form_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['page_data']->value['page_id'], ENT_QUOTES, 'UTF-8');
?>
"/>
<div id="content_basic">
<?php
echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("information"), 'target' => "#pages_information_setting"), 0);
?>
<div id="pages_information_setting" class="in collapse">
<fieldset>
<?php
echo $_smarty_tpl->getSubTemplate("views/pages/components/parent_page_selector.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
?>
<div class="control-group">
//.........這裏部分代碼省略.........
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:101,代碼來源:dab77b80ab83f7167b86ad16ef0a9d7b0aa2c900.tygh.update.tpl.php
示例14: renderBlockContent
/**
* Renders block content
*
* @static
*
* @param array $block Block data for rendering content
* @param array $params Parameters of rendering:
* * use_cache - Whether to use cache
* * parse_js - Whether to move inline JS of the block to the bottom of the page
*
* @return string HTML code of rendered block content
*/
public static function renderBlockContent($block, $params = array())
{
$default_params = array('use_cache' => true, 'parse_js' => true);
$params = array_merge($default_params, $params);
// Do not render block if it disabled in the frontend
if (isset($block['is_disabled']) && $block['is_disabled']) {
return '';
}
$smarty = \Tygh::$app['view'];
$smarty_original_vars = $smarty->getTemplateVars();
$display_this_block = true;
self::_assignBlockSettingsToTemplate($block);
// Assign block data from DB
$smarty->assign('block', $block);
$theme_path = self::getCustomerThemePath();
$block_schema = SchemesManager::getBlockScheme($block['type'], array());
$grid_id = empty($block['grid_id']) ? 0 : $block['grid_id'];
$cache_key = "block_content_{$block['block_id']}_{$block['snapping_id']}_{$block['type']}_{$grid_id}";
if (!empty($block['object_id']) && !empty($block['object_type'])) {
$cache_key .= "_{$block['object_id']}_{$block['object_type']}";
}
$cache_this_block = $params['use_cache'] && self::allowCache();
if ($cache_this_block && isset($block['content']['items']['filling']) && isset($block_schema['content']['items']['fillings'][$block['content']['items']['filling']]['disable_cache'])) {
$cache_this_block = !$block_schema['content']['items']['fillings'][$block['content']['items']['filling']]['disable_cache'];
}
/**
* Determines flags for Cache
*
* @param array $block Block data
* @param string $cache_key Generated name of cache
* @param array $block_schema Block schema
* @param bool $cache_this_block Flag to register cache
* @param bool $display_this_block Flag to display block
*/
fn_set_hook('render_block_register_cache', $block, $cache_key, $block_schema, $cache_this_block, $display_this_block);
if ($cache_this_block) {
// We need an extra data to cache Inline JavaScript
$smarty->assign('block_cache_name', $cache_key);
// Check whether cache was registered successfully
$cache_this_block = self::registerBlockCacheIfNeeded($cache_key, $block_schema, $block);
} else {
$smarty->clearAssign('block_cache_name');
}
$smarty->assign('block_rendering', true);
$smarty->assign('block_parse_js', $params['parse_js']);
// We should load only when cache record exists
$load_block_from_cache = $cache_this_block && Registry::isExist($cache_key);
$block_content = '';
// Block content is found at cache and should be loaded out of there
if ($load_block_from_cache) {
$cached_content = Registry::get($cache_key);
$block_content = $cached_content['content'];
if (!empty($cached_content['javascript'])) {
$repeat = false;
$smarty->loadPlugin('smarty_block_inline_script');
smarty_block_inline_script(array(), $cached_content['javascript'], $smarty, $repeat);
}
Debugger::blockFoundAtCache($block['block_id']);
} else {
if ($block['type'] == Block::TYPE_MAIN) {
$block_content = self::_renderMainContent();
} else {
$title = $block['name'];
if (Registry::get('runtime.customization_mode.live_editor')) {
$le_block_types = fn_get_schema('customization', 'live_editor_block_types');
if (!empty($le_block_types[$block['type']]) && !empty($le_block_types[$block['type']]['name'])) {
$title = sprintf('<span data-ca-live-editor-obj="block:name:%s">%s</span>', $block['block_id'], $title);
}
}
$smarty->assign('title', $title);
if (!empty($block_schema['content'])) {
$all_values_are_empty = true;
foreach ($block_schema['content'] as $template_variable => $field) {
/**
* Actions before render any variable of block content
*
* @param string $template_variable name of current block content variable
* @param array $field Scheme of this content variable from block scheme content section
* @param array $block_schema block scheme
* @param array $block Block data
*/
fn_set_hook('render_block_content_pre', $template_variable, $field, $block_schema, $block);
$value = self::getValue($template_variable, $field, $block_schema, $block);
if ($all_values_are_empty && !empty($value)) {
$all_values_are_empty = false;
}
$smarty->assign($template_variable, $value);
}
//.........這裏部分代碼省略.........
示例15: content_55db8bdb1a42e1_76335672
function content_55db8bdb1a42e1_76335672($_smarty_tpl)
{
if (!is_callable('smarty_block_inline_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
}
if (!is_callable('smarty_block_hook')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
}
if (!is_callable('smarty_block_notes')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.notes.php';
}
fn_preload_lang_vars(array('choose_action', 'notes', 'language'));
if (defined("THEMES_PANEL")) {
?>
<?php
$_smarty_tpl->tpl_vars['sticky_scroll'] = new Smarty_variable(5, null, 0);
?>
<?php
$_smarty_tpl->tpl_vars['sticky_padding'] = new Smarty_variable(73, null, 0);
} else {
?>
<?php
$_smarty_tpl->tpl_vars['sticky_scroll'] = new Smarty_variable(41, null, 0);
?>
<?php
$_smarty_tpl->tpl_vars['sticky_padding'] = new Smarty_variable(37, null, 0);
}
?>
<?php
if (!$_smarty_tpl->tpl_vars['sidebar_position']->value) {
?>
<?php
$_smarty_tpl->tpl_vars['sidebar_position'] = new Smarty_variable("right", null, 0);
}
?>
<?php
if ($_smarty_tpl->tpl_vars['anchor']->value) {
?>
<a name="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['anchor']->value, ENT_QUOTES, 'UTF-8');
?>
"></a>
<?php
}
?>
<?php
$_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
$_block_repeat = true;
echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo '<script';
?>
type="text/javascript">
// Init ajax callback (rebuild)
var menu_content = <?php
echo ($tmp = @htmlspecialchars_decode($_smarty_tpl->tpl_vars['data']->value, ENT_QUOTES)) === null || $tmp === '' ? "''" : $tmp;
?>
;
<?php
echo '</script';
?>
><?php
$_block_content = ob_get_clean();
$_block_repeat = false;
echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
?>
<!-- Actions -->
<div class="actions cm-sticky-scroll" data-ce-top="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['sticky_scroll']->value, ENT_QUOTES, 'UTF-8');
?>
" data-ce-padding="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['sticky_padding']->value, ENT_QUOTES, 'UTF-8');
?>
" id="actions_panel">
<?php
$_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:actions"));
$_block_repeat = true;
echo smarty_block_hook(array('name' => "index:actions"), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
?>
<?php
if (!$_smarty_tpl->tpl_vars['no_sidebar']->value) {
?>
<div class="btn-bar-left pull-left">
<div class="pull-left"><?php
echo $_smarty_tpl->getSubTemplate("common/last_viewed_items.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
?>
</div>
</div>
<?php
//.........這裏部分代碼省略.........
開發者ID:AlanIsrael0,項目名稱:market,代碼行數:101,代碼來源:c243eb3bb41228f955741e7b3b4d5fc04d12b5fd.tygh.mainbox.tpl.php