ecshop 更新首页flash样式
未测试
ECSHOP默认的只有几种很普通的FLASH图片切换样式,想不想自己也换一种呢?
今天摸索了下,算是弄懂了,和大家分享下
首先在网上找到你想要的FLASH切换样式【google一下】,把那个SWF文件拷过来
1.首页FLASH样式放在data\flashdata\下,文件夹DEFAULT的即为默认样式,打开它你会发现里面有bcastr.swf【用于FLASH展示时的FLASH背景】 cycle_image.js【这个JS文件在页面中写入FLASH】 data.js【这个是调用图片数据文件】 preview.jpg【这个是在后台中的FLASH样式预览图】几个文件
2.现在你可以新建一个文件夹,名字随便,我们取为Demo
然后把DEFAULT里的除了bcastr.swf 和preview.jpg其他文件都拷进来,把你在网上找的那个SWF样式文件拷进来,重命名为bcastr.swf 预览图preview.jpg自己可以随便放一张
现在到后台看下首页广告管理,是否多出了你自己添加的样式呢?我添加的样式是北京2008的样式 3.然后在后台添加自己想要的图片即可,前台刷新,OK。
======================================================================
我们来分析下文件吧。
/*
Flash Name: 2008beijing //在后台预览中会看到的
Description: 北京2008主题
*/
document.write('<div id="flash_cycle_image"></div>'); //写入ID为flash_cycle_image的层
$importjs = (function()
{
var uid = 0;
var curr = 0;
var remove = function(id)
{
var head = document.getElementsByTagName('head')[0];
head.removeChild( document.getElementById('jsInclude_'+id) );
};
return function(file,callback)
{
var callback;
var id = ++uid;
var head = document.getElementsByTagName('head')[0];
var js = document.createElement('script');
js.setAttribute('type','text/javascript');
js.setAttribute('src',file);
js.setAttribute('id','jsInclude_'+id);
if( document.all )
{
js.onreadystatechange = function()
{
if(/(complete|loaded)/.test(this.readyState))
{
try
{
callback(id);remove(id);
}
catch(e)
{
setTimeout(function(){remove(id);include_js(file,callback)},2000);
}
}
};
}
else
{
js.onload = function(){callback(id); remove(id); };
}
head.appendChild(js);
return uid;
};
}
)();
function show_flash() //写出FLASH函数
{
var text_height = 0;
var focus_width = swf_width; //宽
var focus_height = swf_height - text_height; //高
var total_height = focus_height + text_height;
document.getElementById('flash_cycle_image').innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ total_height +'">'+'<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="data/flashdata/demo/demo.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">'+'<param name="menu" value="false"><param name=wmode value="opaque">'+'<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">'+'<embed src="data/flashdata/demo/demo.swf"FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" quality="high" width="'+ focus_width +'" height="'+ total_height +'"allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"/>'+'</object>';
}
$importjs('data/flashdata/demo/data.js', show_flash); //调用data.js文件调出动态图片
ecshop 更新首页flash样式的更多相关文章
- Linux下安装Firefox以及更新Adobe flash
一直无法舍弃Firefox浏览器,老是提示更新,但包管理器中的版本又不是最新版,只能自己手动安装了(一下是在Ubuntu14.04环境中进行的). 1.去官网下载最新版本 2.进入下载目录,解压文件 ...
- 织梦dedecms后台发布文章不自动更新首页与栏目列表页
dedecms发文章不自动更新首页也列表页解决办法如下: 登陆dedecms后台,找到“系统”“系统基本参数”“性能选项”,把“arclist标签调用缓存”设置成0,然后把“发布文章后马上更新网站主页 ...
- 让旧版本的 Flash IDE 支持更新的 Flash Player/AIR 功能
转载:https://blog.zengrong.net/post/1568.html 让旧版本的 Flash IDE 支持更新的 Flash Player/AIR 功能 今天在论坛上看到一篇文章:H ...
- Ecshop商品浏览历史样式修改方法
想要修改ECSHOP的浏览历史样式,发现 history.lbi 中不能修改. 需要修改的文件:includes\lib_insert.php,找到函数:function insert_history ...
- flash cs6 更新到Flash player15.0 及Air 更新方法
1.自行下载Air 15.0 sdk (Flash player 包含在内) 2. 到15.0Air 包 里找player :AIR15.0\frameworks\libs\player 里面有pl ...
- ecshop 在首页每个商品下显示已销售数量
1.在includes/lib_goods.php文件末尾加入以下代码 function get_buy_sum($goods_id) { $sql = "select sum(goods_ ...
- ECSHOP:首页实现显示子分类商品,并实现点击Tab页切换分类商品
例子:首页实现显示子分类商品,并实现点击Tab页切换分类商品(非AJAX) 开始: 1. 打开调试开关 文件地址:include/cls_template.php 找到 : functi ...
- 不定期更新的CSS样式设置
头像图片的样式 假设这是一个头像图片,假设展示头像的框为100*100的div,而图片尺寸为510*765,如何让图片显示成这样呢? html结构很简单: <div class="im ...
- 【前端】Vue2全家桶案例《看漫画》之二、完成首页基本样式
转载请注明出处:http://www.cnblogs.com/shamoyuu/p/vue_vux_app_2.html 项目github地址:https://github.com/shamoyuu/ ...
随机推荐
- C#中的可空类型
public class Person { public DateTime birth; public DateTime? death; string name; public TimeSpan Ag ...
- root 授权
错误:The user specified as a definer ('root'@'%') does not exist 解决: grant all privileges on *.* to ro ...
- WCF分布式开发步步为赢(5)服务契约与操作重载
继上一节WCF分布式开发步步为赢系列的(4):WCF服务可靠性传输配置与编程开发,本节我们继续学习WCF分布式开发步步为赢的第(5)节:服务契约与操作重载.这里我们首先讲解OOP面向对象的编程中方法重 ...
- 01 - 开发成功的Oracle应用
笔记 1. 开发数据库应用,不能把数据库当黑盒.需要了解数据库的一下内容 数据库的体系结构 并发控制 开发的时候就要调优你的代码 数据库有哪些特性,不要在你的代码里重复实现 深入的学习SQL 2. 我 ...
- SSDP 简单服务发现协议
http://blog.csdn.net/lilypp/article/details/6631951
- asyn4j -- java 异步方法调用框架
asyn4j 是一个java异步方法调用框架,基于消费者与生产者模式.包括了异步方法执行,异步回调执行,异步工作缓存模块.支持Spring. 让我们写异步方法不再写很多的相关多线程代码.用asyn4j ...
- JavaWeb项目开发案例精粹-第6章报价管理系统-05Action层
0. <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC &quo ...
- Fragment 的用法小技巧
public static class ArrayListFragment extends ListFragment { int mNum; /** * Create a new instance o ...
- VS2010/MFC编程入门之四(MFC应用程序框架分析)
VS2010/MFC编程入门之四(MFC应用程序框架分析)-软件开发-鸡啄米 http://www.jizhuomi.com/software/145.html 上一讲鸡啄米讲的是VS2010应用 ...
- 289. Game of Life
题目: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a ce ...