2008年2月17日 | 作者: 牧天 | 分类: Tips , XML/XSLT | 评论: 7
前几天IE被微软强制升级到了IE7,在升级成功后的浏览器配置过程中,注意到了OpenSearch这个功能。
Search了一下,基本的创建方法非常容易。
第一步,创建一个XML文档,格式如下:
<? xml version = " 1.0 " encoding = " UTF-8 " ?> < OpenSearchDescription xmlns = " http://a9.com/-/spec/opensearch/1.1/ " > < ShortName > Uiland </ ShortName > < Description > 从“一方天”中搜索 </ Description > < Tags > Uiland 一方天 </ Tags > < Contact > email@yourdomain.com </ Contact > < InputEncoding > UTF-8 </ InputEncoding > < Image width = " 16 " height = " 16 " type = " image/ico " > http://www.uiland.com/favicon.ico </ Image > < Url type = " text/html " template = " http://www.uiland.com/?s={searchTerms} " /> </ OpenSearchDescription >
也可以通过微软提供的向 Internet Explorer 7 添加搜索提供商 页面引导创建。 感兴趣?继续阅读 »
2006年10月22日 | 作者: 牧天 | 分类: Tips | 评论: 1
才看到这篇文章,发现有些设置还是很有用的,相见恨晚,收藏一下!
? Mozilla Firefox 所有版本下载列表
? Mozilla.org - FTP Server
? Mozilla Update | 中国
= 关于整合搜索 =
打开about:config 清空
browser.search.param.Google.1.custom
browser.search.param.Google.1.default
下的所有设定值,即可正常使用搜索框。
= Tab分页标签浏览 =
1. 打开about:config
2. browser.tabs.showsinglewindowmodeprefs :选择工具-选项-高级-标签页浏览的参数
* True=显示“强制打开新标签页而不是新窗口”的设置
* False=隐藏该设置
3. browser.tabs.loaddivertedinbackground :选择标签页打开方式
* True=在后台打开连接; False=在前台打开连接
4. 重启Firefox后在Firefox菜单工具-选项-高级-标签页浏览设置“强制打开新标签页而不是新窗口” 感兴趣?继续阅读 »
2006年4月8日 | 作者: 牧天 | 分类: Tips , XHTML/HTML | 评论: 5
前天晚上,6G 站员一行去新校区举办了“网页制作与网站建设”技术宣讲会。
由于新校区那边主要都是大一的新生,估计他们在网页设计制作这方面有所了解或了解较多的人很少,所以我们准备的讲座内容都是比较基础而又带有启发性的。
下面是我在讲座时的主要提纲,总结得很粗糙,而且好多需要扩展的地方都是直接讲出来或是给他们演示出来的,并没有写在这里,提纲发在这里,仅供大家做个参考! 感兴趣?继续阅读 »
2006年3月20日 | 作者: 牧天 | 分类: Tips | 尚无评论
随着动网论坛的广泛应用和动网上传漏洞的被发现以及SQL注入式攻击越来越多的被使用,WEBSHELL让防火墙形同虚设,一台即使打了所有微软补丁、只让80端口对外开放的WEB服务器也逃不过被黑的命运。难道我们真的无能为力了吗?其实,只要你弄明白了NTFS系统下的权限设置问题,我们可以对crackers们说:NO!
要打造一台安全的WEB服务器,那么这台服务器就一定要使用NTFS和Windows NT/2000/2003。众所周知,Windows是一个支持多用户、多任务的操作系统,这是权限设置的基础,一切权限设置都是基于用户和进程而言的,不同的用户在访问这台计算机时,将会有不同的权限。DOS是个单任务、单用户的操作系统。但是我们能说DOS没有权限吗?不能!当我们打开一台装有DOS操作系统的计算机的时候,我们就拥有了这个操作系统的管理员权限,而且,这个权限无处不在。所以,我们只能说DOS不支持权限的设置,不能说它没有权限。随着人们安全意识的提高,权限设置随着NTFS的发布诞生了。
Windows NT里,用户被分成许多组,组和组之间都有不同的权限,当然,一个组的用户和用户之间也可以有不同的权限。下面我们来谈谈NT中常见的用户组。 感兴趣?继续阅读 »
2006年3月17日 | 作者: 牧天 | 分类: Tips | 评论: 3
为了解决因部分地区网络无法连接 Google 服务器,而使得页面中的 Google Adsense 代码拖慢网页速度的问题,Google 推出了官方的加速显示代码。
所谓 Google Adsense 官方的加速显示代码,就是下面这段了:
<div id="googlead" width="468" height="15"></div>
<div id="googleadcode" style="display:none">
<script type="text/javascript"><!--
google_ad_client = "pub-1819837695720664";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al_s";
google_ad_channel ="";
google_page_url = document.location;
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "336699";
google_color_url = "225588";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js “>
</script>
</div>
<script language=”javascript”>
if(document.all.item(”googlead”) != null)
{
googlead.innerHTML = googleadcode.innerHTML
}
</script>
因为学校的公寓城用的是教育网,国外的网站连接全部被屏蔽掉了,Google 也不例外。上次就是因为网页中加了 Google Analytics 的代码,在那边一直打不开我的网站,然后就不得不忍痛割爱,摘掉了这项超极强大的统计代码。现在网页中又加入了 Google Adsense,幸好有上面这段代码,使得我的网站既能做广告,又不影响在教育网的浏览。
使用中发现通过上面方法处理的页面到 Firefox 中广告根本出不来,仔细研读代码,发现其中的 JS 用得不是很标准,于是我又对这段代码做了下面的优化:
在代码中需要加广告的地方加入:
<!-- Google AdSense Start -->
<div id="gad" style="width=468px;height=15px;"></div>
<!-- Google AdSense End -->
然后在页面代码的最底下加入:
<!-- Google AdSense Code Start -->
<div id="gadcode" style="display:none">
<script type="text/javascript"><!--
google_ad_client = "pub-1819837695720664";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al_s";
google_ad_channel ="";
google_page_url = document.location;
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "336699";
google_color_url = "225588";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<script type="text/javascript">
if(document.getElementById("gad") != null)
{
document.getElementById("gad").innerHTML = document.getElementById("gadcode").innerHTML;
}
</script>
<!-- Google AdSense Code End -->
经测试,问题得到了有效解决。
2006年3月10日 | 作者: 牧天 | 分类: Tips | 评论: 3
Photoshop 升级到 CS 版本以后,原来的可以直接在 Windows 系统窗口中预览 psd 文件的功能就没有了。
一直都在郁闷这个事,今天在 Bluesky Blog 上 看到了一个解决方法。
不能预览的原因是生成缩略图的 psicon.dll 不再包括在 CS 版的安装程序中,如果是从老版本升级到 CS 的话就可以。把 psicon.dll 拷贝到C:\Program Files\Common Files\Adobe\Shell 文件夹下,就可以预览了。
在这提供 psicon.dll 文件的下载 点击下载
你也可以到有 PS7.0 的朋友的机器上拷一个^^
2006年2月25日 | 作者: 牧天 | 分类: ASP , JavaScript/Dom , Tips | 尚无评论
本站曾经介绍过在IIS 中设置主机头,实现 “在一个IP的一个端口下,不同的来访域名对应到到不同的主机” 的方法。今天再给大家介绍几种通过ASP 或JS 实现多个域名使用一个主机放置不同的站点的方法,如下面所示:
用ASP方法实现:
1、
<%
if Request.ServerVariables("SERVER_NAME")="www.alli.cn" then
response.redirect "index.htm"
elseif Request.ServerVariables("SERVER_NAME")="blog.alli.cn" then
response.redirect "blog"
elseif Request.ServerVariables("SERVER_NAME")="album.alli.cn" then
response.redirect "album"
end if
%>
2、
<%
if Request.ServerVariables("SERVER_NAME")="www.alli.cn" then
Server.Transfer("index.htm")
elseif Request.ServerVariables("SERVER_NAME")="blog.alli.cn" then
Server.Transfer("blog")
elseif Request.ServerVariables("SERVER_NAME")="album.alli.cn" then
Server.Transfer("album")
else
Server.Transfer("index.htm")
end if
%>
3、
<%
if instr(Request.ServerVariables("SERVER_NAME"),"www.alli.cn")>0 then
response.redirect "index.htm"
elseif instr(Request.ServerVariables("SERVER_NAME"),"blog.alli.cn")>0 then
response.redirect "blog"
elseif instr(Request.ServerVariables("SERVER_NAME"),"album.alli.cn")>0 then
response.redirect "album"
end if
%>
4、
<%
select case request.servervariables("http_host")
case "www.alli.cn" '1
Server.Transfer("index.htm")
case "blog.alli.cn" '2
Server.Transfer("blog")
case "album.alli.cn" '3
Server.Transfer("album")
...... 继续添加 ......
end select
%>
具体做法:
将需要做转向的域名指向到你的空间的IP.
建立默认首页的asp 文件, 将代码添加到文件的头部.
上传就 OK 了!
用JS方法实现:
在空间的默认首页面建立文件如:default.htm
<html>
<script language="javascript">
if(this.location=="http://alli.cn/")
{this.location.href="http://alli.cn/index.htm";}
else
if(this.location=="http://www.alli.cn/")
{this.location.href="http://www.alli.cn/index.htm";}
else
if(this.location=="http://blog.alli.cn/")
{this.location.href="http://www.alli.cn/blog/";}
else
if(this.location=="http://album.alli.cn/")
{this.location.href="http://www.alli.cn/album/";}
else
if(this.location=="http://wap.alli.cn/")
{this.location.href="http://www.alli.cn/wap/";}
else
{this.location.href="http://www.alli.cn/index.htm";}
</script>
</html>
--按月存档--
2008年5月
2008年2月
2008年1月
2007年11月
2007年10月
2007年9月
2007年8月
2007年7月
2007年6月
2007年5月
2007年4月
2007年3月
2007年2月
2007年1月
2006年12月
2006年11月
2006年10月
2006年9月
2006年8月
2006年7月
2006年6月
2006年5月
2006年4月
2006年3月
2006年2月
2006年1月
2005年12月
2005年11月
2005年10月
2005年9月
2005年8月