2010年2月19日星期五
使用zen创建新主题风格
我把这款主题放在 code.google.com ,需要的朋友可以到这里下载: http://playts.googlecode.com/files/green.tar.gz
或是:svn checkout http://playts.googlecode.com/svn/trunk/
适用于drupal 6,还需要下载主题: http://drupal.org/project/zen
启用green后,点击”配置“ 将 ” LOGO“项不选
另外我的站点安装了GeSHi Filter 和 Tagadelic 模块,在CSS中定义了相关的样式,如果你不需要,请编辑style.css去掉:行925 - 行1000
怎样使用zen创建子主题,请先阅读zen目录下README.txt,不明白的话可以留言讨论。
2010年2月9日星期二
Mozilla Thunderbird:备份或移动Profiles
我的系统是win xp,其他系统请看How To Manage Profiles
前几天无意发现在
%AppData%\Thunderbird\Profiles\xxxxxxxx.default\ 目录下的文件有1G多,怪不得C盘可用的磁盘空间越来越小。(我的硬盘年纪大了,40G的,C盘分了10G)看了官网的How To Manage Profiles,步骤很简单,我大致说一下
Thunderbird的配置文件默认会存放在
%AppData%\Thunderbird\Profiles\xxxxxxxx.default\提示:
- %AppData%在那里?你点“开始菜单"--"运行“ 输入%AppData% 确定后就会打开这个目录
- xxxxxxxx是随机8位的数字或字母的组合
备份或移动Profiles请退出Thunderbird后再操作
如果你要备份Profiles,可以直接把
%AppData%\Thunderbird\Profiles\xxxxxxxx.default\复制到其他地方如果要移动Profiles,可以直接把
%AppData%\Thunderbird\Profiles\xxxxxxxx.default\移动到你想要的磁盘目录,例如我将Profiles移动到E:\tool\Mozilla Thunderbird\Profiles目录下。然后编辑%AppData%\Thunderbird\profiles.ini
修改:
Path=Profiles/xxxxxxxx.default例如我将Profiles移动到E:\tool\Mozilla Thunderbird\Profiles目录下,我修改
Path=E:\tool\Mozilla Thunderbird\Profiles\xxxxxxxx.default修改
IsRelative=1为IsRelative=0保存关闭后profiles.ini
启动Thunderbird就可以了,这样一劳永逸,以后重装系统后编辑profiles.ini就可以了。
2010年2月8日星期一
Google Chrome 翻墙之: Switch HTTP Proxy
Version 1.4.1 - 2010年1月12日
下载安装Switch HTTP Proxy后,在浏览器地址栏右边会多了像字母“P”的图标
禁用代理:
启用代理:
该扩展其实是一个代理开关,非常简单,不像firefox的FoxyProxy扩展提供很多规则匹配替换。不能为某一网址启用或禁用代理
我推荐搭配tor(下载tor看Tor 的镜像网站列表)
配置Google Chrome代理设置:
1.点击工具菜单

2.选择选项。
3.点击高级选项标签。
4.在"网络"部分,点击更改代理服务器设置。此操作会打开"Internet 属性"对话框,您可在其中调整网络设置。
依照示图进行设置:
Proxy Switchy 扩展似乎很强,不过试过多次都不能运行
Google Chrome 轻便版本安装详解
离线版本安装
如果你想下载离线安装,请访问: http://www.google.com/chrome/eula.html?standalone=1 (参考: http://www.google.com/support/installer/bin/answer.py?answer=126299 )
你会下载到类似chromesetup_195_38.exe,这个离线安装包和在线安装包一样,你没有可选项的地方。
轻便版本安装
如果你想安装一个轻便版本的Google Chrome,请输入网址:http://dl.google.com/chrome/install/版本号/chrome_installer.exe
例如目前最新的稳定版本是4.0.249.78,你可以输入:
http://dl.google.com/chrome/install/249.78/chrome_installer.exe
chrome_installer.exe不同于前2个安装包,你可以解压缩软件(如:7.zip)打开,会得到一个chrome.7z的压缩包文件
然后再解压缩
是放到 E:\tool\Google
重命名Chrome-bin为Chrome
接下来创建一个桌面快捷方式
然后右键 Chrome快捷方式,选择属性,编辑“目标”项:
将:E:\tool\Google\Chrome\chrome.exe
替换为:E:\tool\Google\Chrome\chrome.exe --user-data-dir=e:\tool\Google\Chrome
(参考: http://dev.chromium.org/user-experience/user-data-directory 备注:需要翻墙)
运行chrome快捷方式后,会让你设置(如导入书签、创建桌面快捷方式等),全部不选中。
如果chrome界面是英文,请关闭chrome,然后编辑E:\tool\Google\Chrome目录下Local State文件
找到:
"intl": {
"app_locale": "en"
},
替换为:
"intl": {
"app_locale": "zh-CN"
},
重新运行桌面的快捷方式,Chrome 就变成简体中文了
利用轻便版本安装方式,可以轻松搞定多个版本共存。
有不完善的地方,欢迎大家留言讨论本文:Google Chrome 轻便版本安装详解
2010年1月28日星期四
Goo.gl短网址扩展安装和使用
对于喜爱Google的朋友定然不会无动于衷,下面介绍一下Google Chrome浏览器的扩展goo.gl url shortener
如果你还没有安装Google Chrome浏览器,请看Google官网的指导文章:安装 Google Chrome: 下载和安装谷歌浏览器
安装完Google Chrome浏览器接着我们就可以安装扩展goo.gl url shortener
Google Chrome浏览器网址: https://chrome.google.com/extensions
你可以到这里安装扩展goo.gl url shortener:点击访问
页面打开后,点击“安装”
在点击弹出的对话框“安装”
安装成功的提示
现在就可以使用该扩展了,现在我们将goo.gl url shortener扩展发布页面的URL转换,直接
相比Firefox扩展安装,Google Chrome不必重新就可以直接使用扩展,真的不错!
按下图操作,就会自动生成 http://goo.gl/PiyX 短网址,而且已经添加到剪贴板中,在需要的地方贴上就可以了。
goo.gl url shortener扩展还提供了一些选项供设置。
用鼠标右键单击goo.gl url shortener扩展图标,然后选“选项”
例如我将Preferences中的Show service icon in the extension popup: yes
Share with中的Blogger选中,点击goo.gl url shortener扩展图标,就会如下图:
点击Blogger的图标,就会调出Blogthis,如下图:
怎么样?! 赶快去试试吧!
2010年1月26日星期二
Thunderbird 3 安装使用体验
安装时我截了图和大家分享一下。
我安装时的版本:Thunderbird 3.0.1 for Windows Chinese (Simplified)
官方网站:http://www.mozillamessaging.com/en-US/
鼠标双击 Thunderbird Setup 3.0.1.exe 开始安装
我选择自定义安装,个人习惯而已。
默认安装路径
根据个人习惯,我将安装路径改变
第一次运行Thunderbird 3时会提示让你建立账户,相比Thunderbird 2的建立账户过程要简便很多。
输入名字、电子邮件地址、密码等信息,点击“继续”
我是用的是gmai的邮箱,支持IMAP接收邮件,Thunderbird 3会自动寻找并设置对应的端口,非常不错!
点击“创建账户”Thunderbird 3会去验证你的邮件帐户的密码,如果密码错误,会让你重新设置密码,然后再点击“重新测试配置”
账户信息正确Thunderbird 3会帮你创建账户来收发邮件了
在使用Thunderbird 2时,每次创建新账户后都要设置IMAP的端口、安装链接,以及创建SMTP账户、端口、安装链接等等,比较麻烦。现在Thunderbird 3很轻松就能完成。
另外还有一个扩展推荐大家安装: MinimizeToTray Plus
安装了MinimizeToTray Plus,可以将Thunderbird在闲时最小化到托盘,而不必关闭
MinimizeToTray Plus下载页:https://addons.mozilla.org/zh-CN/thunderbird/addon/2831
2010年1月25日星期一
Blogger in Draft 现在允许创建静态页面了
2009年9月23日星期三
谷歌Picasa图片管理软件增加人脸识别技术
谷歌称,用户安装并启动Picasa 3.5版后,该软件可扫描用户机器上存储的照片,并把具有同一脸部特征的照片集中到一起,为其创建单一的照片册,但不会为这些照片册命名,而需要用户自已手工输入相应名称。在完成此类工作后,用户也可把这些单独创建的照片册上传到Picasa图片共享网站当中。
此外,Picasa 3.5版还集成了谷歌地图(Google Maps)功能,即用户可把在相同地点拍摄的照片集中到一起,然后再为其命名。其操作方式同人脸识别照片归类大致相同,但用户需首先安装谷歌地球(Google Earth)方可使用该功能。
谷歌表示,Picasa 3.5版还大幅增强了图片输出功能。从Picasa 3.5版开始,用户可直接从数码相机、iPhone或存储卡当中向Picasa图片网站上传照片,并可选择仅上传哪些已选定照片。举例来说,用户可选择把数码相机的所有照片传输到计算机硬盘当中,而仅把加上星号的照片上传到Picasa网站当中。
据悉,Picasa 3.5版可分别在Windows和Mac OS操作系统环境下使用。
2009年9月17日星期四
2009年9月5日星期六
Tor 的镜像网站列表
Tor 的官方网站的语言是英文,位于 https://www.torproject.org/
PS:MS Windows 推荐使用FireFox +Torbutton 插件,安装指导请看:在 MS Windows 上运行 Tor 客户端
| 国家 | 组织 | 状态 | ftp | http dist/ | http website | https dist/ | https website | rsync dist/ | rsync website |
|---|---|---|---|---|---|---|---|---|---|
| US | Xpdm | Up to date | - | http | http | https | https | - | - |
| CA | Hermetix | Up to date | - | - | http | - | - | - | - |
| US | I'm on the roof | Up to date | - | http | http | - | - | - | - |
| CH | Sixx | Up to date | - | http | http | - | - | - | - |
| CH | Unfix | Up to date | - | http | http | - | - | - | - |
| DK | Zentrum der Gesundheit | Up to date | - | http | http | - | - | - | - |
| US | AskApache | Up to date | - | http | http | - | - | - | - |
| DE | chaos darmstadt | Up to date | - | http | http | - | - | - | - |
| HU | Unknown | Up to date | - | http | http | - | - | - | - |
| NL | Amorphis | Up to date | - | http | http | - | - | - | - |
| US | NVS | Up to date | - | http | http | https | https | - | - |
| CH | Boinc | Up to date | - | http | http | - | - | - | - |
| CA | goodeid.com | Up to date | - | http | http | https | https | - | - |
| US | TheOnionRouter | Up to date | - | http | http | - | - | - | - |
| CN | zuola | Out of date | - | http | http | - | - | - | - |
| CN | shizhao | Out of date | - | http | http | - | - | - | - |
| CN | bullog | Out of date | - | http | http | - | - | - | - |
| CN | digitip | Out of date | - | http | http | - | - | - | - |
| CN | ranyunfei | Out of date | - | http | http | - | - | - | - |
| CN | wuerkaixi | Out of date | - | http | http | - | - | - | - |
| NL | CCC | Out of date | - | http | http | - | - | - | - |
| DE | Bbs | Out of date | - | - | http | - | - | - | - |
| NL | OS Mirror | Unknown | ftp | http | - | - | - | - | rsync |
| DE | Spline | Unknown | - | http | - | - | - | - | - |
| DE | Cybermirror | Unknown | - | http | http | - | - | - | - |
| AU | Wiretapped | Unknown | ftp | http | - | - | - | - | - |
| US | BarkerJr | Unknown | - | http | http | https | https | - | - |
| DE | Berapla | Unknown | - | http | http | - | - | - | - |
| CN | Anonymity | Unknown | - | http | http | - | - | - | - |
| CN | Unknown | Unknown | - | http | http | - | - | - | - |
| Unknown | - | - | http | - | - | - | - | ||
| CN | izaobao | Unknown | - | http | http | - | - | - | - |
| FR | CRAN | Unknown | ftp | http | - | - | - | - | rsync |
| FR | BarkerJr | Unknown | - | http | http | https | https | - | - |
| NO | Meulie | Unknown | - | http | - | - | - | - | - |
| NL | Kamagurka | Unknown | - | http | http | - | - | - | - |
| DE | ax | Unknown | - | http | - | - | - | - | - |
| NL | BIT BV | Unknown | ftp | http | - | - | - | - | - |
| UK | Ghirai | Unknown | - | http | - | - | - | - | - |
| UA | Technica-03 | Unknown | - | http | http | - | - | - | - |
2009年9月3日星期四
使用windows live的相册感受
以前一直使用Picasa Web Albums来存储照片,然而Picasa Web Albums被封禁不得寻找其他的,Windows Live SkyDriv的容量是25G看上去非常诱人,使用效果令人难过到极点。
在上传速度上和Picasa Web Albums相比慢了一些,具体数据我也没有测试。
Windows Live 照片库感觉就是一个摆设,既然是协助网络相册,却没有标注那些照片已经上传,那些没有上传的功能。
前天我上传了一部分照片,因为上传速度慢,照片数量多而大(160张,295MB)昨天又上传了一部分照片,好不容易传完却发现有一些照片不能显示,我认为可能是上传过程中出现的问题,于是又将这些不能显示的照片重新上传,上传之前我并没有删除那些有错误而不能显示的照片,又经过漫长的等待上传完毕,刷新了几次相册,之前的问题依然能存在。只好换个方法了,那就是删除那些有错误而不能显示的照片。找来找去没有发现什么好办法只好一张一张打开再点删除。
还好是17张照片出了问题,如果是67张或87张的话,我该怎么办?是一张一张打开在点删除,还是把整个相册删除,重新上传所有照片?无论是那个方法都会令人抓狂吧!
测试windows live writer发布
前段时间安装windows live系列,一直没有尝试windows live writer发表drupal站点,不知设置是否正确。
已经成发布了,还不错。
现在测试是否可以修改本文。
修改本文成功。
不过由于windows live writer发布过去的内容的段落会是一样,虽然有<p>元素,但输入格式默认是Filtered HTML,解决的办法增加<p>元素
2009年7月28日星期二
为节点增加交互 CSS Classes
适用于:Drupal5.x 和 Drupal6.x
原文:Alternating Teaser Classes
原代码:
<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?>">
增加:
<?php global $node_count; print ($node_count++ % 2) ? 'odd' : 'even'; ?>
最终代码:
<div id="node-<?php print $node->nid; ?>"
class="node<?php global $node_count; print ($node_count++ % 2) ? 'odd' : 'even'; ?><?php if ($sticky) { print ' sticky'; } ?><?php if
(!$status) { print ' node-unpublished'; } ?>">2009年7月3日星期五
试用Gmail新增的邮件拖动标签功能
2009年6月30日星期二
Image Resize Filter试用笔记
Image Resize Filter 模块 需要 PHP 5 以上 的版本,安装之前请确认自己的服务器php的版本哦
安装:
解压后复制到sites/all/modules,然后到模块中启用
Image Resize Filter 模块属于过滤器,我们需要到“输入格式”(URL:admin/settings/filters),以“Filtered HTML”为例,点击“配置”(URL:admin/settings/filters/1)
在“过滤器”中找到 Image resize filter 并选中它,然后保存
保存后会退到“输入格式”(URL:admin/settings/filters)比较烦人,呵呵。继续重复点击“配置”(URL:admin/settings/filters/1),然后点击“设置"
在允许使用的HTML标签: 增加 "<img>" 标签,如上图
在 Image resize settings 选项中
Resize images stored:*下有2个选择
Locally
On remote servers
Locally是默认启用的,是指本地的意思
On remote servers是远程的图片
Link to the original:
如果启用,可以给生成指定大小的图片链接到最初大小的图片,如果你安装了lightbox2 或shadowbox还可以附加class和rel attribute
我没有安装 lightbox2 或shadowbox ,所以没有设置class和rel attribute
现在我们把在 Image resize settings 选项中的3个选框都选中保存。
Image Resize Filter 模块怎么使用?往下看吧
点击导航菜单的"创建内容"--"Page"(URL:node/add/page)
标题:随便填
然后我们为了测试,需要上传一张图片,我用的示例图片:img_1080.jpg 尺寸:1600x1067
图片上传后,得到的URL是/sites/default/files/img_1080.jpg
在文章内容中输入<img src="/sites/default/files/img_1080.jpg" width="360" />

确认你的输入格式是“Filtered HTML”,如果你用别的输入格式也可以,但是要做和到我前面讲的设置
保存,效果如下图:
到sites\default\files\resize目录下看,会生成img_1080-360x240.jpg文件
试一下远程图片,我拿http://www.google.cn/intl/zh-CN/images/logo_cn.gif 举例,尺寸:276x100
编辑刚才的文章,在内容中加入<img src="http://www.google.cn/intl/zh-CN/images/logo_cn.gif” width="180" />
保存后,效果如下图。
Image Resize Filter 模块 会在 sites\default\files\resize目录下建立 remote 目录,调整大小后的图片的文件名为:md5后-宽度x高度.后缀名
由于之前我们在“输入格式”中启用了Link to the original: Image Resize Filter 模块会自动生成链接到原图URL,但你发现没有,在你编辑内容时我们输入的内容并没有改变。
那么当我们要删除这篇文章,这些生成的图片怎么处理它?
经过我测试:
sites\default\files\resize\img_1080-360x240.jpg 会被删除
而从远程获得生成图片不会被删除,也就是指sites\default\files\resize\remote目录下的文件不会被删除。
由于写这篇文章分了2次才写完,中间隔了好几天(大家可以从文中所用到的图片日期就可以看出),在今天写的时候思路没有之前清晰。如果有疑问欢迎大家共同交流。

