当前位置: 首页>>代码示例>>PHP>>正文


PHP elgg_get_loaded_js函数代码示例

本文整理汇总了PHP中elgg_get_loaded_js函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_get_loaded_js函数的具体用法?PHP elgg_get_loaded_js怎么用?PHP elgg_get_loaded_js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了elgg_get_loaded_js函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elgg_view_deprecated

<?php

echo elgg_view_deprecated('footer/analytics', array(), "Extend page/elements/foot instead", 1.8);
$js = elgg_get_loaded_js('footer');
foreach ($js as $script) {
    ?>
	<script src="<?php 
    echo htmlspecialchars($script, ENT_QUOTES, 'UTF-8');
    ?>
"></script>
<?php 
}
$deps = _elgg_services()->amdConfig->getDependencies();
?>

<script>
require(<?php 
echo json_encode($deps, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
?>
);
</script>
开发者ID:smellems,项目名称:wet4,代码行数:21,代码来源:foot.php

示例2: full_url

    $url = full_url();
    if (substr_count($url, '?')) {
        $url .= "&view=rss";
    } else {
        $url .= "?view=rss";
    }
    $url = elgg_format_url($url);
    $feedref = <<<END

\t<link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />

END;
} else {
    $feedref = "";
}
$js = elgg_get_loaded_js('head');
$css = elgg_get_loaded_css();
$version = get_version();
$release = get_version(true);
?>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="ElggRelease" content="<?php 
echo $release;
?>
" />
	<meta name="ElggVersion" content="<?php 
echo $version;
?>
" />
	<title><?php 
echo $title;
开发者ID:duanhv,项目名称:mdg-social,代码行数:31,代码来源:head.php

示例3: elgg_load_js

<?php

/**
 * Group and zhaohu tag-based search form and result divs in mobile view
 */
elgg_load_js("zhaohu_manager.search");
$loaded_js = elgg_get_loaded_js();
echo '<div id="zhaohu_search_and_result_mobile_div">';
# the mobile search bar
$site_url = elgg_get_site_url();
$search_img = '<img id="zhaohu_mobile_search_img" src="' . $site_url . 'mod/zhaohu_theme/images/search.png">';
$location_selector = '<select id="search_location_state" name="State">
                            <option value="WA">WA</option>
							<option value="CA">CA</option>
                      </select>';
$search_input = '<input type="search" id="zhaohu_mobile_search_input" placeholder="' . elgg_echo("zhaohu:find_zhaohu") . '">';
$search_button = '<a href="#" id="zhaohu_mobile_search_button">' . $search_img . '</a>';
echo '<div id="zhaohu_mobile_zhaohu_search">' . $location_selector . $search_input . $search_button . '</div>';
echo elgg_view("zhaohu_manager/recommended_zhaohus");
# the search result div
echo '<div id="zhaohu_search_result_mobile_div">';
echo "<div id='find_result_groups_mobile'></div>";
echo "<div id='find_result_zhaohus_mobile'></div>";
echo '</div>';
echo '</div>';
开发者ID:pingwangcs,项目名称:51zhaohu,代码行数:25,代码来源:findForm.php

示例4: testElggGetJS

 /**
  * Test elgg_get_loaded_js()
  */
 public function testElggGetJS()
 {
     global $CONFIG;
     $base = trim(elgg_get_site_url(), "/");
     $urls = array('id1' => "{$base}/urla", 'id2' => "{$base}/urlb", 'id3' => "{$base}/urlc");
     foreach ($urls as $id => $url) {
         elgg_register_js($id, $url);
         elgg_load_js($id);
     }
     $js_urls = elgg_get_loaded_js('head');
     $this->assertIdentical($js_urls[500], $urls['id1']);
     $this->assertIdentical($js_urls[501], $urls['id2']);
     $this->assertIdentical($js_urls[502], $urls['id3']);
     $js_urls = elgg_get_loaded_js('footer');
     $this->assertIdentical(array(), $js_urls);
 }
开发者ID:thehereward,项目名称:Elgg,代码行数:19,代码来源:ElggCoreHelpersTest.php

示例5: foreach

	</style>
	<!--[if gt IE 6]>
		<link rel="stylesheet" type="text/css" href="<?php 
echo $ie_url;
?>
" />
	<![endif]-->
	<!--[if IE 6]>
		<link rel="stylesheet" type="text/css" href="<?php 
echo $ie6_url;
?>
" />
	<![endif]-->

<?php 
foreach (elgg_get_loaded_js() as $script) {
    ?>
	<script type="text/javascript" src="<?php 
    echo $script;
    ?>
"></script>
<?php 
}
?>

</head>
<body>
<div class="elgg-page">
	<div class="elgg-page-header">
		<div class="elgg-inner">
			<?php 
开发者ID:rasul,项目名称:Elgg,代码行数:31,代码来源:theme_preview.php


注:本文中的elgg_get_loaded_js函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。