本文整理汇总了PHP中tpl_function_js函数的典型用法代码示例。如果您正苦于以下问题:PHP tpl_function_js函数的具体用法?PHP tpl_function_js怎么用?PHP tpl_function_js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tpl_function_js函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tpl_function_json_encode
<?php
require_once 'C:\\xampp\\htdocs\\iot.calit2.uci.edu\\system\\libraries\\template_lite\\plugins\\function.js.php';
$this->register_function("js", "tpl_function_js");
require_once 'C:\\xampp\\htdocs\\iot.calit2.uci.edu\\system\\libraries\\template_lite\\plugins\\function.json_encode.php';
$this->register_function("json_encode", "tpl_function_json_encode");
/* V2.10 Template Lite 4 January 2007 (c) 2005-2007 Mark Dickenson. All rights reserved. Released LGPL. 2015-08-25 02:00:53 Pacific Daylight Time */
?>
<script><?php
echo '
$(function(){
var data = ';
echo tpl_function_json_encode(array('data' => $this->_vars['likes_helper_data']), $this);
echo ';
loadScripts(
\'';
echo tpl_function_js(array('module' => "likes", 'file' => 'likes.js', 'return' => 'path'), $this);
echo '\',
function(){
likes = new Likes({
siteUrl: site_url,
likeTitle: data.like_title,
canLike: data.can_like
});
},
\'\',
{async: true}
);
});
</script>';
示例2: tpl_function_js
thumbJpeg: false,
thumbBg: \'transparent\',
fileListInZone: true,
filebarHeight: 200,
jqueryFormPluginUrl: "';
echo tpl_function_js(array('file' => 'jquery.form.min.js', 'return' => 'path'), $this);
echo '"
});
},
[\'mu\'],
{async: false}
);
loadScripts(
"';
echo tpl_function_js(array('file' => 'albums.js', 'module' => 'media', 'return' => 'path'), $this);
echo '",
function(){
albums_obj = new albums({
siteUrl: site_url,
contentDiv: \'#album_content\',
createAlbumButton: \'#create_album_button_aform\',
createAlbumContainer: \'#create_album_container_aform\',
saveAlbumButton: \'#save_album_aform\',
albumNameInput: \'#album_name_aform\',
create_album_success_request: function(resp){
if (resp.status){
$(\'#album_content #albums_select\').html(resp.data.albums_select);
$(\'#album_content #albums_select select\').val(resp.data.album_id).prop(\'selected\',\'selected\')
$(\'#album_content #albums_select select\').addClass(\'wp100\').addClass(\'box-sizing\');
$(\'#item_form #albums_select_block\').removeClass(\'hide\');
示例3: tpl_function_js
?>
</div>
</div>
</div>
<?php
if ($this->_vars['data']['approved'] && $this->_vars['data']['confirm'] && !$this->_vars['data']['activity'] && $this->_vars['data']['available_activation']['status']) {
?>
<div class="bg-highlight_bg mtb10 p10">
<script type='text/javascript'><?php
echo '
$(function(){
loadScripts(
"';
echo tpl_function_js(array('file' => 'available_view.js', 'return' => 'path'), $this);
echo '",
function(){
activate_available_view = new available_view({
siteUrl: \'';
echo $this->_vars['site_url'];
echo '\',
checkAvailableAjaxUrl: \'users/ajax_available_user_activate_in_search/\',
buyAbilityAjaxUrl: \'users/ajax_activate_user_activate_in_search/\',
buyAbilityFormId: \'ability_form\',
buyAbilitySubmitId: \'ability_form_submit\',
success_request: function(message) {error_object.show_error_block(message, \'success\'); locationHref(\'';
echo tpl_function_seolink(array('module' => 'users', 'method' => 'profile'), $this);
echo '\')},
fail_request: function(message) {error_object.show_error_block(message, \'error\');}
});
示例4: tpl_function_js
?>
<?php
if (!$this->_vars['geomap_js_loaded'] && !$this->_vars['only_load_content']) {
?>
<link href="<?php
echo $this->_vars['site_root'];
?>
application/modules/geomap/views/default/css/bingmapsv7.css" rel="stylesheet" type="text/css" />
<script><?php
echo '
$(function() {
loadScripts(
[
"';
echo tpl_function_js(array('file' => 'bingmapsv7.js', 'module' => 'geomap', 'return' => 'path'), $this);
echo '",
"http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&onScriptLoad=map_loader"
],
function(){},
\'';
echo $this->_vars['map_id'];
echo '\',
{crossDomain: true, cache: false}
);
});
</script>';
?>
<?php
} else {
示例5: tpl_function_js
<script type="text/javascript"><?php
echo '
$(function(){
loadScripts(
[
"';
echo tpl_function_js(array('module' => 'start', 'file' => 'search.js', 'return' => 'path'), $this);
echo '",
"';
echo tpl_function_js(array('module' => 'start', 'file' => 'selectbox.js', 'return' => 'path'), $this);
echo '",
"';
echo tpl_function_js(array('module' => 'start', 'file' => 'checkbox.js', 'return' => 'path'), $this);
echo '",
"';
echo tpl_function_js(array('module' => 'start', 'file' => 'hlbox.js', 'return' => 'path'), $this);
echo '"
],
function(){
';
echo $this->_vars['form_settings']['object'];
echo $this->_vars['form_settings']['type'];
echo ' = new search({
siteUrl: \'';
echo $this->_vars['site_url'];
echo '\',
currentForm: \'';
echo $this->_vars['form_settings']['object'];
echo '\',
currentFormType: \'';
echo $this->_vars['form_settings']['type'];
示例6: tpl_function_js
}
?>
;
<?php
} else {
?>
var all_loaded = 0;
<?php
}
echo '
$(function(){
loadScripts(
["';
echo tpl_function_js(array('module' => 'like_me', 'file' => 'like_me.js', 'return' => 'path'), $this);
echo '", "';
echo tpl_function_js(array('module' => 'like_me', 'file' => 'match_me.js', 'return' => 'path'), $this);
echo '"],
function(){
var action_id = \'';
echo $this->_vars['action'];
echo '\';
like_me = new LikeMe({
siteUrl: site_url,
action_id: action_id,
});
match_me = new MatchMe({
siteUrl: site_url,
all_loaded: all_loaded,
show_more_lang: "';
echo l('button_show_more', 'like_me', '', 'text', array());
echo '",
示例7: array
require_once 'C:\\xampp\\htdocs\\iot.calit2.uci.edu\\system\\libraries\\template_lite\\plugins\\compiler.l.php';
$this->register_compiler("l", "tpl_compiler_l");
require_once 'C:\\xampp\\htdocs\\iot.calit2.uci.edu\\system\\libraries\\template_lite\\plugins\\function.js.php';
$this->register_function("js", "tpl_function_js");
/* V2.10 Template Lite 4 January 2007 (c) 2005-2007 Mark Dickenson. All rights reserved. Released LGPL. 2015-08-25 02:13:32 Pacific Daylight Time */
?>
<?php
$_templatelite_tpl_vars = $this->_vars;
echo $this->_fetch_compile_include($this->general_path . $this->get_current_theme_gid('', '') . "header.tpl", array('load_type' => 'ui'));
$this->_vars = $_templatelite_tpl_vars;
unset($_templatelite_tpl_vars);
?>
<?php
echo tpl_function_js(array('module' => 'dynamic_blocks', 'file' => 'dynamic_blocks_layout'), $this);
?>
<div class="actions">
<ul>
<li><div class="l"><a href="#" id="update_layout"><?php
echo l('link_save_block_sorting', 'dynamic_blocks', '', 'text', array());
?>
</a></div></li>
</ul>
</div>
<div class="menu-level3">
<ul>
<li><a href="<?php
示例8: l
<td colspan="4" class="center">
<?php
echo l('no_items', 'memberships', '', 'text', array());
?>
</td>
</tr>
<?php
}
?>
</table>
<?php
$_templatelite_tpl_vars = $this->_vars;
echo $this->_fetch_compile_include($this->general_path . $this->get_current_theme_gid('', '') . "pagination.tpl", array('load_type' => false));
$this->_vars = $_templatelite_tpl_vars;
unset($_templatelite_tpl_vars);
echo tpl_function_js(array('file' => 'memberships-admin.js', 'module' => 'memberships'), $this);
?>
<script><?php
echo '
$(function(){
new membershipsAdmin({
siteUrl: \'';
echo $this->_vars['site_url'];
echo '\',
msgConfirmDeletion: \'';
echo l('confirm_delete_membership', 'memberships', '', 'text', array());
echo '\'
});
});
';
?>
示例9: array
require_once 'C:\\xampp\\htdocs\\iot.calit2.uci.edu\\system\\libraries\\template_lite\\plugins\\compiler.l.php';
$this->register_compiler("l", "tpl_compiler_l");
require_once 'C:\\xampp\\htdocs\\iot.calit2.uci.edu\\system\\libraries\\template_lite\\plugins\\function.counter.php';
$this->register_function("counter", "tpl_function_counter");
require_once 'C:\\xampp\\htdocs\\iot.calit2.uci.edu\\system\\libraries\\template_lite\\plugins\\function.js.php';
$this->register_function("js", "tpl_function_js");
/* V2.10 Template Lite 4 January 2007 (c) 2005-2007 Mark Dickenson. All rights reserved. Released LGPL. 2015-09-26 11:13:24 Pacific Daylight Time */
?>
<?php
$_templatelite_tpl_vars = $this->_vars;
echo $this->_fetch_compile_include($this->general_path . $this->get_current_theme_gid('', '') . "header.tpl", array('load_type' => 'ui'));
$this->_vars = $_templatelite_tpl_vars;
unset($_templatelite_tpl_vars);
echo tpl_function_js(array('file' => 'date.js'), $this);
echo tpl_function_js(array('module' => 'start', 'file' => 'date_formats.js'), $this);
$_templatelite_tpl_vars = $this->_vars;
echo $this->_fetch_compile_include($this->module_path . "start" . $this->module_templates . $this->get_current_theme_gid('', '"start"') . "numerics_menu.tpl", array('load_type' => false));
$this->_vars = $_templatelite_tpl_vars;
unset($_templatelite_tpl_vars);
?>
<form id="date_format" method="post" action="" name="save_form" enctype="multipart/form-data">
<input type="hidden" id="format_id" name="format_id" value="<?php
echo $this->_vars['format']['gid'];
?>
" />
<div class="edit-form n150">
<div class="row header"><?php
echo $this->_vars['settings_name'];
?>
示例10: ob_get_contents
</div>
<div class="clr"></div>
<?php
$this->_block_content = ob_get_contents();
ob_end_clean();
$this->_block_content = tpl_block_strip($this->_tag_stack[count($this->_tag_stack) - 1][1], $this->_block_content, $this);
echo $this->_block_content;
array_pop($this->_tag_stack);
if ($this->_vars['data']['user_logo']) {
?>
<script type='text/javascript'><?php
echo '
$(function(){
loadScripts(
["';
echo tpl_function_js(array('file' => 'users-avatar.js', 'module' => 'users', 'return' => 'path'), $this);
echo '"],
function(){
user_avatar = new avatar({
site_url: site_url,
id_user: ';
echo $this->_vars['user_id'];
echo '
});
},
[\'user_avatar\'],
{async: true}
);
});
</script>';
?>
示例11: tpl_function_pagination
<?php
}
?>
</table>
<?php
echo tpl_function_pagination(array('data' => $this->_vars['page_data'], 'type' => 'full'), $this);
?>
<script type='text/javascript'><?php
echo '
$(function(){
loadScripts(
"';
echo tpl_function_js(array('file' => 'easyTooltip.min.js', 'return' => 'path'), $this);
echo '",
function(){
$("td.view-banner > a").each(function(){
var id = $(this).attr(\'id\')+\'_content\';
$(this).easyTooltip({useElement: id});
});
}
);
});
</script>';
?>
<div class="clr"></div>
示例12: l
echo l('multiselect_select_all', 'start', '', 'text', array());
?>
</a>
<div class="btn">
<div class="l">
<input class="btn_apply" type="button" name="btn_save" value="<?php
echo l('btn_apply', 'start', '', 'text', array());
?>
">
</div>
</div>
</div>
</footer>
</div>
<?php
echo tpl_function_js(array('module' => 'start', 'file' => 'multiselect.js'), $this);
?>
<script type='text/javascript'>
<?php
echo '
$(function () {
';
if (isset($this->_vars['multiselect_helper_data']['var_js_name'])) {
?>
var <?php
echo $this->_vars['multiselect_helper_data']['var_js_name'];
?>
= <?php
}
echo 'new options({
fields: ';
示例13: l
<div id="menu_items">
<ul name="form_root" id="form_root" class="sortable"></ul>
</div>
<a class="cancel" href="<?php
echo $this->_vars['site_url'];
?>
admin/field_editor/forms/<?php
echo $this->_vars['data']['editor_type_gid'];
?>
"><?php
echo l('btn_cancel', 'start', '', 'text', array());
?>
</a>
<?php
echo tpl_function_js(array('module' => 'field_editor', 'file' => 'admin-form-fields.js'), $this);
?>
<script type='text/javascript'>
var field_data = <?php
if ($this->_vars['data']['field_data_json']) {
echo $this->_vars['data']['field_data_json'];
} else {
?>
[]<?php
}
?>
;
var field_names = <?php
if ($this->_vars['data']['field_names_json']) {
echo $this->_vars['data']['field_names_json'];
} else {
示例14: l
</div>
<div class="v">
<input type="file" name="attach" class="attach" id="attach" multiple="true" size="40">
<button id="btn_attach"><?php
echo l('btn_upload', 'start', '', 'text', array());
?>
</button>
<script><?php
echo '
$(function(){
var allowed_mimes = ';
echo tpl_function_json_encode(array('data' => $this->_vars['attach_settings']['allowed_mimes']), $this);
echo ';
loadScripts(
"';
echo tpl_function_js(array('file' => 'uploader.js', 'return' => 'path'), $this);
echo '",
function(){
au = new uploader({
siteUrl: site_url,
zoneId: \'attachbox\',
fileId: \'attach\',
formId: \'write_form\',
sendType: \'file\',
sendId: \'btn_attach\',
messageId: \'attach-input-error\',
maxFileSize: \'';
echo $this->_vars['attach_settings']['max_size'];
echo '\',
mimeType: allowed_mimes,
cbOnSend: function(noFile){
示例15: tpl_function_js
</table>
<?php
if ($this->_vars['data']['available']) {
?>
<div class="btn"><div class="l"><input type="submit" name="save_install_langs" value="Next"></div></div>
<?php
} else {
?>
<div class="btn gray"><div class="l"><input type="button" name="save_install_langs" value="Next" disabled="disabled"></div></div>
<?php
}
?>
</form>
<div class="clr"></div>
<?php
echo tpl_function_js(array('module' => 'install', 'file' => 'product_install.js'), $this);
?>
<script type="text/javascript">
var productInstall = new productInstall();
<?php
echo '
$(function(){
productInstall.langs_init();
});
';
?>
</script>
<?php
$_templatelite_tpl_vars = $this->_vars;
echo $this->_fetch_compile_include($this->general_path . $this->get_current_theme_gid('', '') . "footer.tpl", array('load_type' => false));