ecshop 二次开发

1:  包含 init.php   
require('includes/init.php')

2 :    必须将默认的参数进行传值
define( 'IN_ECS', true);

3:smarty  模板赋值
 
 
{foreach from=$arr item=val}
{$val.title}
{/foreach}

4: 客服在线链接
 
 
<a href="http://wpa.qq.com/msgrd?v=1&uin={$im}&site=qq&menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:{$im}:4" height="16" border="0" alt="QQ" /> QQ客服在线</a>     //{$im}这是qq号
5:固定客服的div框
<div style="width:50px;height:250px;background:#e1e1e1;position:fixed;right:0px;top:60px" >//固定右侧
//absolute    //fixed    //relative

6:163邮箱发送
  1. 先在后台系统设置smtp服务账号163     smtp.163.com
  2. qq  ssl://smtp.qq.com
  3. send_mail('姓名','对方账号','标题,'内容'$type 1$notification=false);      //type:邮件类型 .txt   .html  //notification  是否反回结果
7:客服在线  插件
 
 
  • 先找到插件的style .css关于div的标签
  • 复制代码到本地style .css里面
  • 将jquery 进行更改或复制 //链接下一条

8:jquery 切换 //jquery 兼容网址 http://blog.sina.com.cn/s/blog_5f66526e0100xe5n.html
<script>
先添加  //   jQuery.noConflict();
jQuery(function($){
删除jquery兼容 //   delete(Object.prototype.toJSONString);
填写代码
})
</script>

9:会走的时钟(客户端时间
<div id='name'></div>
<script type="text/javascript">
window.οnlοad=function()
{
re=setInterval("fun1()",1000);
}
function fun1()
{
var str="";
var num=new Date();
str+=num.getFullYear()+"年";
str+=num.getMonth()+1+"月";
str+=num.getDate()+"日";
str+=num.getHours()+"时";
str+=num.getMinutes()+"分";
str+=num.getSeconds()+"秒";
document.getElementById("name2").innerHTML=str
}

</script>

10:广告的定点投放    lib_insert.php    // 调用指定的广告位的广告文件
  1.    $ip real_ip();      //地址已注释   客户端  ip  地址

  2. smarty   下拉框模板的赋值
  3.     {html_options options=$city_list selected=$def_city}   
            //   options=$city_list   遍历的数组
                //    selected=$def_city   默认的下拉菜单值

11:固定浮动栏 JS 代码
 
   
<script>

var b= $("#but4").offset().top;       // offset  ( 函数标签到顶部的高度 ) 

jQuery.noConflict();
jQuery(function($){
$(window).scroll(function(){        // scroll     (  滚动条的函数   )

var a= $(this).scrollTop();               //    scrollTop           (     滚动条到顶部的高度   )
if(a>=b)
{
$("#but4").offset({'top':a});             //   offset     (     设置标签到顶部的高度    )   *注意括号里的参数格式  *
}
else{
$("#but4").offset({'top':b});
}
});
});
</script>
 12:下拉菜单  缩放   
   
jQuery('.dt').click(function(){

jQuery(this).children('.dd').toggle("slow");

})


 
    


 
     
 
       

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值