尝试n遍,比如幻灯片模式调用日志图片,模板文件代码如下
- <?exit?>
- <!--{if !empty( $_SBLOCK['picblog'])}-->
- <script type="text/javascript" language="javascript">
- <!--
- var xsTextBar = 1; //是否显示文字链接,1为显示,0为不显示
- var xsPlayBtn = 0; //是否显示播放按钮,1显示,0为不显示
- var xsImgSize = new Array(260,217); //幻灯图片的尺寸,格式为“宽度,高度”
-
- var xsImgs = new Array();
- var xsImgLinks = new Array();
- var xsImgTexts = new Array();
-
- <!--{eval $i=0;}-->
- <!--{loop $_SBLOCK['picblog'] $key $value}-->
- xsImgs[$i] = "$value[a_thumbpath]";
- xsImgLinks[$i] = "<!--{eval echo url_remake($value['url']);}-->";
- xsImgTexts[$i] = "$value[subject]";
- <!--{eval $i++;}-->
- <!--{/loop}-->
- //-->
- </script>
- <script language="javascript" type="text/javascript" src="{S_URL}/include/js/slide.js"></script>
- <!--{/if}-->
复制代码
在index.htm.php模板内用
- <!--{block name="spaceblog" parameter="dateline/31536000/haveattach/1/showattach/1/order/i.dateline DESC/limit/0,5/cachetime/43200/cachename/picblog/tpl/blog_image"}--><!--日志幻灯片-->
复制代码
没什么问题
但不管在什么地方使用js调用- <script language="JavaScript" src="http://我的域名/batch.javascript.php?param=VzoINlc4WjdVZAV7X3lRcAUyAi9Wdwh3ADAHMlVnUWUBYlBtBmFcfQA%2BA2hXfF1pBDoAa1drDmQBfwVgUjQGZVdrCGxXZ1pkVT8FIF9oUWEFIQJlVmUIcwAlBzBVYVFvASFQMwYpXCEAMgNmV39dbQQiAHZXZA5iATgFfFI0Bn9XNwgoVzNaMVV9BSBfaVEuBTMCYVZwCGIAPQc4VWxRYgEuUEYGQ1wBABkDJldkXWUEOwBrV3EOLgFgBX9SMAZ%2FVzsIO1c0WjxVagV7X2lRbQUyAi9WMAg0AGMHYVUyUSgBbVBjBmVcOgA%2FA2dXaV1hBDMALVd1DmgBMwUxUmkGP1c%2FCHVXI1okVWMFIF9iUWwFOAJnVlsIbgA8BzBVZVFi"></script>
复制代码
就会报错,比如 'xsImgSize'未定义 ,比如 缺少; 等
难道大家没出现过这种情况?
[ 本帖最后由 whitegerry 于 2007-7-5 01:29 编辑 ] |