PHP indexhibit的backstretch

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP indexhibit的backstretch相关的知识,希望对你有一定的参考价值。

<?php if (!defined('SITE')) exit('No direct script access allowed');
/**
 * jquery backgrounder plugin
 *
 * @version 0.1
 * @author orionrush
 *
 * @use <plug:jsBackstreach img='<%bgimg%>', speed='150' />
 * 1. in the <head> of your template: ndxz-studio/site/your-template/index.php
 * 2. to prevent the image from being loaded twice in both the default backgrounder plugin and in this plugin
 * - remove <%bgimg%> from the <plug:backgrounder />
 */

function jsBackstreach($img='', $speed='')
{
	//nothing there!
	if ($img == '') return;
	//default speed is overwriten in plugin tag
	if ($speed == '') $speed = 150;

	$script = "<script type='text/javascript' src='". BASEURL . BASENAME . "/site/js/jquery.backstretch.min.js'></script>"."\n";
	$bg = "<script type='text/javascript'>"."\n"."$.backstretch('". BASEURL ."/files/$img', {speed: $speed});"."\n"."</script>"."\n";

	return $script.$bg;
}
?>

以上是关于PHP indexhibit的backstretch的主要内容,如果未能解决你的问题,请参考以下文章

Indexhibit手风琴菜单

Indexhibit手风琴菜单v2

将Indexhibit菜单加载到wordpress站点

索引下一链接

请问php中如何调用php文件中的内容?

php 文件引用路径的问题