电脑技术学习

帝国cms整合jbgallery实现内容页面插入图片播放

dn001

一、修改ecmseditor中相关文件

i.e\admin\ecmseditor\infoeditor\epage\TranMore.php
; 此文件为在编辑器中点击“上传多图片的样式文件。
ii.e\admin\ecmseditor\editorfun.php
此文件为编辑器功能文件,主要修改function eTranMoreTbGs($r)及function eTranMorePic($file,$file_name,$file_type,$file_size,$add,$userid,$username),功能并没有大的变化,只是把表格格式改成符合jbgallery调用的格式,具体改动可以见附件。

二、上传相关文件及在内容页面中添加引用

i.上传样式相关文件到skin\default\css\jbgallery,文件夹中包括img文件夹及jbgallery-3.0.css。
ii.上传js相关文件到skin\default\js\jbgallery,其中包括jbgallery-3.0.js,jquery-1.4.4.min.js因较为常用故上传在skin\default\js目录。
iii. 内容页面添加以下引用代码
;

<script src="/skin/default/js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="/skin/default/js/jbgallery/jbgallery-3.0.js" type="text/javascript"></script>
<link href="/skin/default/css/jbgallery/jbgallery-3.0.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(".example").jbgallery({fullscreen : false,randomize : 0, menu : 'simple', caption: false,slideshow:true, fade: false,autohide:true,fade : true,clickable: true});
});

</script>
;

;;
;原文链接:http://bitsnote.com/tech/2008-05-08/67.html

标签: