本文整理汇总了PHP中getJavaScriptSourceLink函数的典型用法代码示例。如果您正苦于以下问题:PHP getJavaScriptSourceLink函数的具体用法?PHP getJavaScriptSourceLink怎么用?PHP getJavaScriptSourceLink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getJavaScriptSourceLink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initJSLib
/**
* Init Mootools 1.4.x Library without compatibility
*/
function initJSLib()
{
if (empty($GLOBALS['block']['custom_htmlhead']['mootools.js'])) {
// Google Libraries API does not support compat version of MooTools, so always load from local source
$GLOBALS['block']['custom_htmlhead']['mootools.js'] = getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/mootools/mootools-core-1.4.x-full-compat.js');
}
return TRUE;
}
示例2: initJSPlugin
/**
* Simple jQuery Plugin Loader
*/
function initJSPlugin($plugin = '')
{
$plugin = 'jquery.' . $plugin . '.js';
if (empty($GLOBALS['block']['custom_htmlhead'][$plugin])) {
initJSLib();
$GLOBALS['block']['custom_htmlhead'][$plugin] = getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/jquery/plugin/' . $plugin);
}
return TRUE;
}
示例3: initJSLib
/**
* Init jQuery 1.6.x Library
*/
function initJSLib()
{
if (empty($GLOBALS['block']['custom_htmlhead']['jquery.js'])) {
if (PHPWCMS_USE_CDN) {
$GLOBALS['block']['custom_htmlhead']['jquery.js'] = getJavaScriptSourceLink(PHPWCMS_HTTP_SCHEMA . '://code.jquery.com/jquery-1.6.4.min.js');
} else {
$GLOBALS['block']['custom_htmlhead']['jquery.js'] = getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/jquery/jquery-1.6.4.min.js');
}
}
return TRUE;
}
示例4: initJSLib
/**
* Init Mootools 1.4.x Library without compatibility
*/
function initJSLib()
{
if (empty($GLOBALS['block']['custom_htmlhead']['mootools.js'])) {
if (PHPWCMS_USE_CDN) {
$GLOBALS['block']['custom_htmlhead']['mootools.js'] = getJavaScriptSourceLink(PHPWCMS_HTTP_SCHEMA . '://ajax.googleapis.com/ajax/libs/mootools/1.4/mootools-yui-compressed.js');
} else {
$GLOBALS['block']['custom_htmlhead']['mootools.js'] = getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/mootools/mootools-core-1.4.x-full-nocompat.js');
}
}
return TRUE;
}
示例5: initJSLib
/**
* Init jQuery 2.0.x Library
*/
function initJSLib()
{
if (empty($GLOBALS['block']['custom_htmlhead']['jquery.js'])) {
if (PHPWCMS_USE_CDN) {
// use jQuery CDN
$GLOBALS['block']['custom_htmlhead']['jquery-1.11.min.js'] = ' <!--[if lt IE 9]>' . getJavaScriptSourceLink(PHPWCMS_HTTP_SCHEMA . '://code.jquery.com/jquery-1.11.3.min.js', '') . '<![endif]-->';
$GLOBALS['block']['custom_htmlhead']['jquery.js'] = ' <!--[if gte IE 9]><!-->' . getJavaScriptSourceLink(PHPWCMS_HTTP_SCHEMA . '://code.jquery.com/jquery-2.1.4.min.js', '') . '<!--<![endif]-->';
} else {
$GLOBALS['block']['custom_htmlhead']['jquery-1.11.min.js'] = ' <!--[if lt IE 9]>' . getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/jquery/jquery-1.11.3.min.js', '') . '<![endif]-->';
$GLOBALS['block']['custom_htmlhead']['jquery.js'] = ' <!--[if gte IE 9]><!-->' . getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/jquery/jquery-2.1.4.min.js', '') . '<!--<![endif]-->';
}
}
return TRUE;
}
示例6: html
$BE['HEADER']['datepicker'] .= '});});' . LF;
$BE['HEADER']['datepicker'] .= ' </script>';
$plugin['date_select_loaded'] = true;
}
echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>' . LF;
echo '<tr>' . LF;
echo '<td align="right" class="chatlist">' . $BLM[$key] . ': </td>' . LF;
echo '<td><input name="' . $key . '" type="text" id="' . $key . '" class="v12 dateselect" value="' . html($plugin['data'][$key]) . '" size="30" maxlength="10" /></td>' . LF;
echo '</tr>' . LF;
break;
case 'DECIMAL':
// needs MooTools 1.2 and MooTools More
if (empty($plugin['meio.mask_loaded'])) {
initMootools('1.2', array('Element/Element.Forms'));
// need MooTools More and Element.Forms
$BE['HEADER']['Meio.Mask.min.js'] = getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/meio.mask/Meio.Mask.min.js');
$BE['HEADER']['meio.mask'] = ' <script type="text/javascript">' . LF;
$BE['HEADER']['meio.mask'] .= ' window.addEvent("domready", function() {
var meiomasks_eur = $$("input.decimal-eur");
var meiomasks_int = $$("input.decimal-int");
var meiomasks_cent = $$("input.decimal-cent");
if(meiomasks_eur.length > 0) {
meiomasks_eur.each(function(el){
el.meiomask("' . $BLM['meio.mask'] . '", {
autoEmpty: true,
autoTab: true,
alignText: true,
decimal: "' . $BLM['price_dec_point'] . '",
thousands: "' . $BLM['price_thousands_sep'] . '",
precision: ' . $BLM['price_decimals'] . ',
symbol: "€ "
示例7: renderHeadJS
/**
* render <!-- JS: PluginName|my.js //Whatever text -->
*/
function renderHeadJS($js)
{
if (is_array($js) && isset($js[1])) {
$js = $js[1];
}
$js = trim($js);
if (empty($js)) {
return '';
}
$remote = substr($js, 0, 4) == 'http' ? true : false;
if (!$remote && (strpos($js, ';') !== false || strpos($js, '//') !== false || strpos($js, '/*') !== false)) {
$key = md5($js);
// add the same section only once
if (empty($GLOBALS['block']['custom_htmlhead'][$key])) {
$GLOBALS['block']['custom_htmlhead'][$key] = ' <script' . SCRIPT_ATTRIBUTE_TYPE . '>' . LF . SCRIPT_CDATA_START . LF . ' ';
$GLOBALS['block']['custom_htmlhead'][$key] .= $js;
$GLOBALS['block']['custom_htmlhead'][$key] .= LF . SCRIPT_CDATA_END . LF . ' </script>';
}
} elseif ($js == 'initJSLib') {
initJSLib();
} elseif ($remote || which_ext($js) == 'js') {
// decide if plugin or script
// replace {TEMPLATE}
$js = str_replace('{TEMPLATE}', TEMPLATE_PATH, $js);
$GLOBALS['block']['custom_htmlhead'][md5($js)] = getJavaScriptSourceLink(html_specialchars($js));
} else {
initJSLib();
if (strtolower($js) != 'initlib') {
initJSPlugin($js);
}
}
return '';
}
示例8: die
* phpwcms content management system
*
* @author Oliver Georgi <og@phpwcms.org>
* @copyright Copyright (c) 2002-2015, Oliver Georgi
* @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
* @link http://www.phpwcms.de
*
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
//user group
$GLOBALS['BE']['HEADER']['optionselect.js'] = getJavaScriptSourceLink('include/inc_js/optionselect.js');
?>
<table width="538" border="0" cellpadding="0" cellspacing="0" summary="">
<tr><td colspan="3" class="title"><?php
echo $BL['be_subnav_admin_groups'];
?>
</td></tr>
<tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="6"></td></tr>
<tr><td colspan="3" bgcolor="#92A1AF"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr>
<tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="6"></td></tr>
<?php
$bg_color1 = "#FFFFFF";
$bg_color2 = "#F3F5F8";
$zaehler = 0;
示例9: strpos
//open output holder
$mod_sliderjs['br_sliderjs']['output'] = "";
//if no active folder then abort
if (!empty($content['br_sliderjs']['jqs_folders'])) {
//check for jslib
$mod_sliderjs['br_sliderjs']['jslib'] = strpos($GLOBALS["block"]["jslib"], 'jquery') !== false ? "jquery" : "mootools";
if ($mod_sliderjs['br_sliderjs']['jslib'] == "mootools") {
//with mootools just output a comment with the warning
$mod_sliderjs['br_sliderjs']['output'] .= '<!-- slidesJS - sorry no jquery -->';
$mod_sliderjs['head']['br_sliderjs'] = "";
} elseif ($mod_sliderjs['br_sliderjs']['jslib'] == "jquery") {
//jquery
//version check, if lower than 1.8 -> load and overwrite with 1.8
$mod_sliderjs['br_sliderjs']['jslibver'] = explode('-', $GLOBALS["block"]["jslib"]);
if (!empty($mod_sliderjs['br_sliderjs']['jslibver'][1]) && ($mod_sliderjs['br_sliderjs']['jslibver'][1] < 1.8 && $mod_sliderjs['br_sliderjs']['jslibver'][1] != '1.10')) {
$GLOBALS['block']['custom_htmlhead']['jquery.js'] = getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/jquery/jquery-2.2.0min.js');
//$GLOBALS['block']['custom_htmlhead']['jquery.js'] = '<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>';
}
// is width/height set in cp-settings? else use phpwcms standard prev sizes
$mod_sliderjs['br_sliderjs']['jqs_imgwidth'] = $content['br_sliderjs'][$content['br_sliderjs']['jqs_sliderpluginAlias']]['jqs_imgwidth'] == 0 || empty($content['br_sliderjs'][$content['br_sliderjs']['jqs_sliderpluginAlias']]['jqs_imgwidth']) ? "" : intval($content['br_sliderjs'][$content['br_sliderjs']['jqs_sliderpluginAlias']]['jqs_imgwidth']);
$mod_sliderjs['br_sliderjs']['jqs_imgheight'] = $content['br_sliderjs'][$content['br_sliderjs']['jqs_sliderpluginAlias']]['jqs_imgheight'] == 0 || empty($content['br_sliderjs'][$content['br_sliderjs']['jqs_sliderpluginAlias']]['jqs_imgheight']) ? "" : intval($content['br_sliderjs'][$content['br_sliderjs']['jqs_sliderpluginAlias']]['jqs_imgheight']);
if (empty($mod_sliderjs['br_sliderjs']['jqs_imgwidth']) && empty($mod_sliderjs['br_sliderjs']['jqs_imgheight'])) {
$mod_sliderjs['br_sliderjs']['jqs_imgwidth'] = $phpwcms['img_prev_width'];
$mod_sliderjs['br_sliderjs']['jqs_imgheight'] = $phpwcms['img_prev_height'];
}
//get jsondecoded imagesdata
$mod_sliderjs['br_sliderjs']['imagesdata'] = array();
$mod_sliderjs['br_sliderjs']['imagesdata'] = json_decode($content['br_sliderjs']['jqs_imagedata'], true);
//data will get all images, we loop through all folders and add the images for each folder
/*
TODO
示例10: initJSPlugin
/**
* Simple MooTools Plugin Loader
*/
function initJSPlugin($plugin = '', $more = false)
{
// enhance teplate JS parser for MooTools More
// sample: <!-- JS: MORE:Fx/Fx.Elements,Fx/Fx.Accordion -->
if (is_string($plugin) && $more === false && substr(strtoupper($plugin), 0, 5) == 'MORE:') {
$plugin = trim(substr($plugin, 5));
$more = true;
}
if ($more === false) {
$plugin = 'mootools.' . $plugin . '.js';
if (empty($GLOBALS['block']['custom_htmlhead'][$plugin])) {
initJSLib();
$GLOBALS['block']['custom_htmlhead'][$plugin] = getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/mootools/plugin-1.4/' . $plugin);
}
} else {
// Load MooTools More Plugins - simple Wrapper 'Fx/Fx.Slide,Fx/Fx.Scroll...'
// it does not check dependents
if (!is_array($plugin)) {
$plugin = convertStringToArray($plugin);
}
if (count($plugin)) {
initJSLib();
// add mootools more core
array_unshift($plugin, 'More/More');
foreach ($plugin as $more) {
if (empty($GLOBALS['block']['custom_htmlhead'][$more]) && is_file(PHPWCMS_TEMPLATE . 'lib/mootools/more-1.4/' . $more . '.js')) {
$GLOBALS['block']['custom_htmlhead'][$more] = getJavaScriptSourceLink(TEMPLATE_PATH . 'lib/mootools/more-1.4/' . $more . '.js');
}
}
}
}
return TRUE;
}
示例11: html
}
$i .= ' /></td><td><label for="nls' . $row[0] . '">' . html($row[1]) . "</label></td>\n</tr>\n";
}
mysql_free_result($result);
echo $i;
}
?>
</table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
<?php
// newsletter templates
$BE['HEADER']['newsletter.form.js'] = getJavaScriptSourceLink('include/inc_js/newsletter.form.js');
$tmpllist = returnSubdirListAsArray(PHPWCMS_TEMPLATE . 'inc_newsletter');
$tmpldata = array('options' => array(), 'js' => array(), 'files' => array());
$value3 = '';
if (is_array($tmpllist) && count($tmpllist)) {
if (empty($newsletter["newsletter_vars"]['template'])) {
$newsletter["newsletter_vars"]['template'] = '';
}
$i = 0;
foreach ($tmpllist as $value) {
$value1 = html($value);
$tmpldata['options'][$i] = '<option value="' . $value1 . '"';
if ($value == $newsletter["newsletter_vars"]['template']) {
$tmpldata['options'][$i] .= ' selected="selected"';
$value3 = $value;
}
示例12: die
*
* @author Oliver Georgi <og@phpwcms.org>
* @copyright Copyright (c) 2002-2015, Oliver Georgi
* @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
* @link http://www.phpwcms.de
*
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// Module/Plug-in Ads/Banner Management
$BE['HEADER']['date.js'] = getJavaScriptSourceLink('include/inc_js/date.js');
$BE['HEADER']['dynCalendar.js'] = getJavaScriptSourceLink('include/inc_js/dynCalendar.js');
?>
<h1 class="title" style="margin-bottom:10px"><?php
echo $BLM['form_title'];
?>
</h1>
<form action="<?php
echo MODULE_HREF;
?>
&campaign=1&edit=<?php
echo $plugin['data']['adcampaign_id'];
?>
" method="post" style="background:#F3F5F8;border-top:1px solid #92A1AF;border-bottom:1px solid #92A1AF;margin:0 0 5px 0;padding:10px 8px 15px 8px">
<input type="hidden" name="adcampaign_id" value="<?php
echo $plugin['data']['adcampaign_id'];
示例13: die
* phpwcms content management system
*
* @author Oliver Georgi <og@phpwcms.org>
* @copyright Copyright (c) 2002-2015, Oliver Georgi
* @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
* @link http://www.phpwcms.de
*
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// keyword specific functions
$BE['HEADER'][] = getJavaScriptSourceLink('include/inc_js/lib.keyword.js');
function backend_list_keywords()
{
$list = '<form name="keywordListing" action="' . html(BE_CURRENT_URL) . '" method="post">' . LF;
$list .= LF . '<table cellspacing="0" cellpadding="0" border="0" class="listingTable">' . LF;
$list .= ' <tr>' . LF;
$list .= ' <th class="checkbox">All</th>' . LF;
$list .= ' <th class="entry">Keyword Name</th>' . LF;
$list .= ' <th class="actions"> </th>' . LF;
$list .= ' </tr>' . LF;
$sql = "SELECT * FROM " . DB_PREPEND . "phpwcms_keyword WHERE keyword_trash=0 ORDER BY keyword_name";
$keywords = _dbQuery($sql);
$c = 0;
foreach ($keywords as $value) {
// set alternating class name
$aclass = $c % 2 ? ' class="alternating"' : '';
示例14: unset
// Get/set and reset filter
if (isset($_SESSION['teaser_filter_category'])) {
$content['alink']['filter_category'] = $_SESSION['teaser_filter_category'];
$_SESSION['teaser_filter_category'] = '';
unset($_SESSION['teaser_filter_category']);
} else {
$content['alink']['filter_category'] = null;
}
if (isset($_SESSION['teaser_filter_category_by_tags'])) {
$content['alink']['filter_tags'] = $_SESSION['teaser_filter_category_by_tags'] ? $content['alink']['alink_category'] : array();
$_SESSION['teaser_filter_category_by_tags'] = false;
unset($_SESSION['teaser_filter_category_by_tags']);
} else {
$content['alink']['filter_tags'] = null;
}
$BE['HEADER']['contentpart.js'] = getJavaScriptSourceLink('include/inc_js/contentpart.js');
// necessary JavaScript libraries
initMootools();
initMootoolsAutocompleter();
?>
<tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
<tr>
<td align="right" class="chatlist"><?php
echo $BL['be_admin_struct_template'];
?>
: </td>
<td><select name="calink_template" id="calink_template">
<?php
echo '<option value="">' . $BL['be_admin_tmpl_default'] . ' <ul><li></option>' . LF;
示例15: set_chat_focus
//Set Focus for chat insert filed
set_chat_focus($do, $p);
//If new message was sent -> automatic forwarding to message center
forward_to($forward_to_message_center, PHPWCMS_URL . "phpwcms.php?do=messages", 2500);
?>
<!-- phpwcms BODY_CLOSE -->
</body>
</html>
<?php
// retrieve complete processing time
list($usec, $sec) = explode(' ', microtime());
header('X-phpwcms-Page-Processed-In: ' . number_format(1000 * ($usec + $sec - $phpwcms_rendering_start), 3) . ' ms');
$BE['HTML'] = ob_get_clean();
// Load ToolTip JS only when necessary
if (strpos($BE['HTML'], 'Tip(')) {
$BE['BODY_CLOSE']['wz_tooltip.js'] = getJavaScriptSourceLink('include/inc_js/wz_tooltip.js', '');
}
// parse for backend languages
backend_language_parser();
// replace special backend sections -> good for additional code like custom JavaScript, CSS and so on
// <!-- phpwcms BODY_CLOSE -->
// <!-- phpwcms BODY_OPEN -->
// <!-- phpwcms HEADER -->
// special body onload JavaScript
if ($body_onload) {
$BE['HTML'] = str_replace('<body>', '<body ' . $body_onload . '>', $BE['HTML']);
}
$BE['HEADER'][] = ' <!--[if lte IE 7]><style type="text/css">body{behavior:url("' . TEMPLATE_PATH . 'inc_css/specific/csshover3.htc");}</style><![endif]-->';
// html head section
$BE['HTML'] = str_replace('<!-- phpwcms HEADER -->', implode(LF, $BE['HEADER']), $BE['HTML']);
// body open area