1: 包含 init.php
require('includes/init.php')
2 : 必须将默认的参数进行传值
define( 'IN_ECS', true);
define( 'IN_ECS', true);
3:smarty 模板赋值
{$val.title}
<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号
{/foreach}
4: 客服在线链接
5:固定客服的div框
<div style="width:50px;height:250px;background:#e1e1e1;position:fixed;right:0px;top:60px" >//固定右侧
//absolute //fixed //relative
6:163邮箱发送
- 先在后台系统设置smtp服务账号163 smtp.163.com
- qq ssl://smtp.qq.com
- 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 //
调用指定的广告位的广告文件
- $ip = real_ip(); //地址已注释 客户端 ip 地址
- smarty 下拉框模板的赋值
- {html_options options=$city_list selected=$def_city}
//
selected=$def_city 默认的下拉菜单值
11:固定浮动栏 JS 代码
<script>
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");
})