玩意生活 oioi 的美国VPN代理 有空位 上沪江学外语 杂良集 有空位 数码3C一折秒杀 有空位 有空位 有空位 极度性感装备 有空位 有空位 大家点 有空位 有空位 Hello,Host! 虚拟主机服务 有空位 可雅艺术网 煎蛋 TEE 优惠促销 猪龙城寨 有空位 有空位 神兽尼玛 购买格子广告 有空位 有空位 有空位 有空位 乐铺: 最具创意的礼品店
X 先 生 的 夏 日 茶 屋

这个也是在自己设计的风格中实现的功能之一,给标题导航添加chromemenu功能,现实更强的扩展,喜欢的同学可以自行添加。

效果图:

插入圖像

插入圖像

添加方法:
首先用记事本打开风格的skin.html文件在<head></head>之间添加如下功能代码
<!-- Chromemenu -->
<SCRIPT type=text/javascript>
<!--
//Chrome Drop Down Menu: Dynamic Drive (dynamicdrive.com)

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout

//No need to edit beyond here////////////////////////
dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all,

getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
},

showhide:function(obj, e, visible, hidden){
if (this.ie || this.firefox)
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-400px"
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
},

iecompattest:function(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
},

clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},

dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden"
this.clearhidemenu()
if (this.ie||this.firefox){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e, "visible", "hidden")
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
}
},

contains_firefox:function(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
},

dynamichide:function(e){
var evtobj=window.event? window.event : e
if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
this.delayhidemenu()
else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
this.delayhidemenu()
},

delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'",this.disappeardelay)
},

clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
}
}
//-->
</SCRIPT>
<!-- /Chromemenu -->

打开风格文件夹中的style.css文件,在文件中添加Chromemenu的式样代码,代码如下
/* ***** chromemenu ***** */

#chrome{
border-top:5px solid #eee;
border-bottom:5px solid #eee;
padding: 0px 0px 0px 0px;
margin: 0px 0px 5px 0px;
}

#chromemenu{
width: 800px;
}

#chromemenu:after{ /*Add margin between menu and rest of content in Firefox*/
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

#chromemenu ul{
border: 1px solid #DCDCDC;
width: 100%;
background: url(./images/chromebg.gif) center center repeat-x; /*Theme Change here*/
margin-left: 0;
padding-left: 0;
margin: 0;
float: left;
font: 11px tahoma;
}

#chromemenu ul li{
display: inline;
}

#chromemenu ul li a{
float: left;
color: #a9a9a9;
padding: 7px 20px 6px 15px;
text-decoration: none;
background: url(./images/divider.gif) center right no-repeat; /*Theme Change here*/
}

#chromemenu ul li a:hover{
color: #000000;
}

#chromemenu ul li a[onMouseover]:after{ /*HTML to indicate drop down link*/
content: " v";
/*content: " " url(downimage.gif); /*uncomment this line to use an image instead*/
}

.dropmenudiv{
position:absolute;
top: 0;
border: 1px solid #DCDCDC; /*Theme Change here*/
border-bottom-width: 0;
font:normal 11px tahoma;
line-height:18px;
z-index:100;
background-color: white;
width: 200px;
visibility: hidden;
filter: progid:DXImageTransform.Microsoft.Shadow(color=#CACACA,direction=135,strength=4); /*Add Shadow in IE. Remove if desired*/
}

.dropmenudiv a{
width: 100%;
display: block;
text-indent: 3px;
border-bottom: 1px solid #DCDCDC; /*Theme Change here*/
padding: 3px 20px 3px 15px;
text-decoration: none;
color: black;
}

.dropmenudiv a:hover{ /*Theme Change here*/
background-color: #F5F5F5;
}

继续编辑skin.html文件,在导航的代码之前添加如下的CSS式样id代码
<div id="chrome">
<div id="chromemenu">
将原来的TC导航代码修改成如下式样
<a href="[##_blog_link_##]category/" onMouseover="cssdropdown.dropit(this,event,'dropmenu1')">新鮮</a> :
最后我们对dropmenu1这个函数进行定义,这里可以对自己风格需要来进行发挥
案例代码:
<!--1nd dropmenu1 -->
<div id="dropmenu1" class="dropmenudiv" style="width: 200px;">
<s_rctps_rep>
<a href="[##_rctps_rep_link_##]"> [##_rctps_rep_title_##]</a>
</s_rctps_rep>
</div>

最后保存文件上传,刷新后即可看到效果。


No Trackback : No Comment

近段时间都在折腾自己的新风格,发现自己的电脑水平实在是有限,另一个原因就是自己出奇的懒,不多说什么!把自己将要在新风格应用到的功能公布出来,不加密了,也算是做个存档,方便自己以后查阅,感兴趣的同学可自行添加效果测试~

请献花,勿砸蛋。。Thanks~

插入圖像


添加方法,用记事本打开风格的skin.html文件,在<head></head>之间添加如下代码

第一行代码的是在进入网页后显示的效果,第二行是离开网页的效果代码,都是呈现马赛克效果,这个是X先生最喜欢的一个效果,如需其他效果的同学可以自行修改代码中的数值来测试。

No Trackback : Comment (2)

这个插件也是L.ken同学开发的,这个插件的作用是它可以延迟加载长页面中的图片. 在浏览器可视区域外的图片不会被载入, 直到用户将页面滚动到它们所在的位置. 这与图片预加载的处理方式正好是相反的.

在包含很多大图片长页面中延迟加载图片可以加快页面加载速度. 浏览器将会在加载可见图片之后即进入就绪状态. 在某些情况下还可以帮助降低服务器负担.

插入圖像


支持的浏览器有:IE、Firefox、Chrome

适用的TC版本是: 1.76+

Demo:http://www.appelsiini.net/projects/lazyload/enabled.html

全网页有效

根据L.Ken同学的说法,这个插件会和BBCode起冲突,因为本插件与BBCode插件都是使用jquery,重覆引入导致。未解决..待续)



安装方法,解压文件上传到plugins目录,在后台启用即可。


No Trackback : a comment

L.Ken同学最新开发的邮件通知插件在茶屋提供下载了!这个插件的功能就是当有A访客留言时,B访客回复了会用E-mail通知A访客,类似与WP的插件。

这个插件测试能使用的版本是TC1.7.6和1.7.8

这个插件在X先生这里不能够使用,不知道是X先生使用了企业邮局作为登录名还是因为自己的TC版本是1.7.9RC1的缘故

备注:

1.以上则例子说明,如果同样是A访客回覆了该留言。则不会发送MAIL。 (自己不发给自己)。

2.此插件对于访客留言时,只抓取第一组(如果有多组)有效信箱位置。其他则略过。 (插件设定中能修改条件)

3.此插件对于留言/回覆有效。对于秘密回覆也有效。

插件截图:

插入圖像


注意:使用此插件请确定您的空间能发送MAIL或是SMTP。

安装方法,解压文件上传至plugins目录在后台启用即可。

No Trackback : No Comment


做任何修改前都要做好备份,这个方法也是很简单。只要修改博客目录下的.htaccess文件就可以了,用记事本打开.htaccess文件添加如下代码。

如果.htaccess中有RewriteEngine on这句语法的话就不用再次添加,直接加下面的两行代码就可以。
语法说明
RewriteCond 设定那些网站可以读取文件
你可以把其中的连接修改成自己的网站就可以了,这样你的网站就可以读取档案。如果想在自己的其他网站上也先生档案的内容,可以再添加这句语法一次,只是把连接修改成你要显示的网站就可以了。

RewriteRule  制定那些档案不可以盗链,盗链后的错误信息显示设定。一般设置为jpg|jpeg|gif|png|bmp|rar|zip|exe,在后面添加上|html|htm这两个文件类型就可以达到防止风格skin.html或者skin.htm文件被下载的危险。

[F] 显示错误的信息为文字,403 Forbidden是禁止读取。

范例


[R,NC] 显示错误信息为图片

范例


任何档案和图片都防盗链
请把

改成

这样所有档案都会自动被限制住,只有上面RewriteCond有设定的网址才可以读取,而若遇到盗连者,他那边图片或档案将不会显示出来。

最后保存.htaccess文件并上传覆盖你原来的博客里面的.htaccess文件就可以了。

No Trackback : No Comment

可以防止自己的网站被另存为,使用的方法很简单,只要在风格文件的</body>和</html>之间添加上下面的代码就可以了!

据说加有了谷歌广告代码的网页无效。


No Trackback : No Comment

Date : 2010/03/16 13:04

这是个秘密通道。(ˇ?ˇ) 想~.?

   

""   

TC插件彩虹连接,使用后可以是网站的超链接呈现出7色的彩虹效果,直接将文件夹上传至plugins文件夹后在TC后台启用插件即可。

No Trackback : No Comment

插入圖像
添加这个图片的展示花了几天的时间,刚开始插件是能个正常在风格文件里面进行调用的。但是图片都不能显示,折腾了几天突然记起还要修改一个参数。


把安装方法记录一下,留作以后的使用备份。

这个图片展示是使用jquery+xml进行调用展示,原来是在WP中使用的,不过貌似自己在TC也能调用成功。
首先下载下面的程序文件:
首先修改js/jqslideshow文件,将URI处修改为自己的网站地址,var slideConfigURL处修改为自己网站的slide.xml文件地址(这里使用相对路径)
1. 如何安装
首先解压缩并且上传所有文件到你的网站空间上。
然后在你的页面的HTML代码的<head>段里导入以下文件:

style/style.css
js/jquery.js
js/jqslideshow.js

例如, 如果你在使用WordPress博客程序,并且你把刚才解压的文件上传到了‘wp-content/jqslideshow'目录下。
那么你可以在你的页面中加入如下的代码:

<link href="/wp-content/jqslideshow/style/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="/wp-content/jqslideshow/js/jquery.js"></script>
<script type="text/javascript" src="/wp-content/jqslideshow/js/jqslideshow.js"></script>

最后在你的页面里添加标签'<div id="jqSlideShow"></div>'到任何你想要的地方,添加过标签的地方就会出现这个幻灯浏览器

2. 如何配置
有两个部分需要你进行配置
首先是配置文件的路径。在文件'js/jqslideshow.js'里面,你可以在前面几行找到如下代码:
var slideConfigURL = '/wp-content/jqslideshow/slide.xml';

你需要将他设置为slide.xml文件所在的路径。
然后, 所有的选项都保存在'slide.xml'文件ilmian。你可以通过这个文件配置如下选项:
在 'configuration' 段:
* Fading time 图像淡入淡出的时间
* Sliding time 图像切换的时间
* Number of thumbs 导航条上缩略图的数量
* Thumb change time 导航条上缩略图移动速度
在 'slideItems' 段
* Link 每个图像的链接
* Image path 每个图像的路径
* Thumb path 每个缩略图路径
* Description 每个图像的描述
1. How to install
First, unzip and upload the files to you web site space.
Second, import the files below into the <head> segement of your page's code

style/style.css
js/jquery.js
js/jqslideshow.js

For example, if you using a WordPress weblog application and you put all the files you just unzipped at
'wp-content/jqslideshow'. Then you should add these code into your page:

<link href="/wp-content/jqslideshow/style/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="/wp-content/jqslideshow/js/jquery.js"></script>
<script type="text/javascript" src="/wp-content/jqslideshow/js/jqslideshow.js"></script>

Third, put the tag '<div id="jqSlideShow"></div>' at any place you want in your page. After that this tag
will become the amazing slide show!

2. How to config
There are two parts you need to focus on.
Fisrt, the path configuration file. Look in the file 'js/jqslideshow.js', you will found the code below at
the first servral lines:
var slideConfigURL = '/wp-content/jqslideshow/slide.xml';

What you need to do is just to make sure the path is validate for the 'slide.xml' file.
Second, the options of this slide show are all saved in file 'slide.xml'. You can use this file to config
these options below:
In 'configuration' segement:
* Fading time The time of fading in and out
* Sliding time The time of the auto sliding
* Number of thumbs The number of thumbs on the navigator
* Thumb change time The thumb moving speed
In 'slideItems' segement
* Link The link of each picture
* Image path The path of each image
* Thumb path The path of each thumb image
* Description The description of each image

No Trackback : No Comment

插入圖像
最近都在想怎么能增加茶屋和用户的互动性,要是能给自己的博客加上一个给自己的手机发短信的功能就好了~!在以前用WP的时候,记得就有人开发过一个利用飞信访客在自己的博客留言或者评论后就能给自己的手机发短信的插件。

可惜现在自己不用WP了,就自己寻思着弄一个这样的功能,结果上网上一搜索“飞信接口”、“飞信API”出来的内容全部都是要填写手机帐号和飞信密码的,想着这样直接调用的话自己的飞信会很不安全,密码泄漏以后很容易被人发短信来骗自己的朋友、家人。好不容易找到一个密码填在后台的飞信,很兴奋的配置完文件上传到自己的空间,测试发信息的时候总是卡在“数据处理中”。



忽然间想起自己的空间是纯PHP的的空间,不支持ASP,当场石化~切腹

虽然自己的空间不能用,但是分享出来给大家吧,这个适合使用ASP程序的博友们,像PJ、Z-blog这样的程序。竊笑

注意使用此程序必须问移动的手机号码,必须开通有飞信,飞信的具体开通方法请询问当地的移动营业厅或者致电10086咨询。

发信过程中可能会使当前在线的飞信掉线,发信完后即恢复,这个是飞信的登陆协议造成的。请放心!

使用的方法很简单,首先下载下面的文件

然后使用记事本打开ajax.asp文件进行设置,里面都有说明,直接进行设置就可以了~!设置完成后将整个fetion文件夹上传到你的网站服务器,最后使用如下的代码调用到你的博客的页面就可以了

宽和高在width、height调试。最后你试发一条信息吧!你的手机就能收到了哟。最后还是找到了PHP版的程序,(请看侧边栏的SMS模块,╰( ̄▽ ̄)╮)这个X先生到下一篇文章分享给大家幸福
插入圖像


No Trackback : Comment (8)
Textcube 1.7.9 : Release Candidate 1-Mr.X T:96.Y:103.T:119103 side-bar:rss