Archives for :

星期五 小雨(今天比昨天的最高温度一下降了6度) 20~26℃

友吧首页“最新分享”和“文章搜索”框修改

为了使“最新分享”和“文章搜索”在页面中更加突出,下午花一个多小时做了 7 套方案。问了几个人,最终选择了下面这个(方案6),自己也比较偏向。

现:

原:


A Flock of Birds
from http://www.storyarts.org/library/nutshell/stories/flock.html

A Folktale from India

There was once a flock of birds peacefully pecking seeds under a tree. A hunter came along and threw a heavy net over them. He said, "Aha! Now I have my dinner!"

All at once the birds began to flap their wings. Up, up they rose into the air, taking the net with them. They came down on the tree and, as the net snagged in the tree’s branches, the birds flew out from under it to freedom.

The hunter looked on in amazement, scratched his head and muttered, "As long as those birds cooperate with one another like that, I’ll never be able to capture them! Each one of those birds is so frail and yet, together they can lift the net."

星期四 晴转多云转雷阵雨(早晨起来看到蓝蓝的天空上只依稀飘了三四朵如烟的薄云) 23~32℃

友吧 LOGO 大小民意调查

参考八酒杯的建议,将 LOGO 缩小(此前我自己也一直有这打算)。图标缩为原来的 80%,“友吧”文字缩为原来的 72%

大:

小:

把两个 LOGO 放上网页做了两个效果图,问了几个人,都说大的好,没一个说小的好,就连八酒杯本人看过后也这么认为,我自己也越看越觉得还是大的好。

看来网页终究是网页,是要看整体的,改小后的 LOGO 和右边的导航很不相称。

保持原样吧,民意不可违,就当是花一个多小时做实验。


写日志对写总结的好处

这几天写友吧总结,体会到了写日志在这方面的好处。要知道以前一些事情发生的时间,可以精确到“日”。


The Golden Touch
from http://www.storyarts.org/library/nutshell/stories/golden.html

A Tale from Ancient Greece

There was once a king named Midas who did a good deed for a Satyr and was granted a wish by the God of wine, Dionysus. For his wish, Midas asked that whatever he touched would turn to gold. Although Dionysus tried to dissuade him, Midas insisted that the wish was an excellent one, and it was granted!

Excitedly, Midas went about touching all sorts of things, turning them into gold.

Soon Midas became hungry. He picked up a piece of food, but he couldn’t eat it, for it had turned to gold in his hand! "I’ll starve," moaned Midas, "Perhaps this was not such a good wish after all!"

Midas’ beloved daughter, seeing his dismay, threw her arms about him to comfort him, and, she too turned to gold! "The golden touch is no blessing," cried Midas. He went to the river and wept. The sand of that river turned as yellow as "fool’s gold" for it is there, they say, that King Midas washed away the curse of the golden touch with his own tears.

星期三 阵雨转多云 23~33℃

团队中的耐心与默契 ( & Ryan )

昨天和 Ryan 交流一个功能扩展问题,到今天早上才发觉,走了很大的一个弯路。其实只需要一个判断就行了,结果弄出了三个判断。这里面,有一个突出问题在于我对 Ryan 的思维误导,因为“逻辑思维”本不是我的强项,而功能扩展体现的就是逻辑思维。其中还有一个细节,双方都误解了彼此的语意,最后才知道,原来双方所表达的观点是相同的。

此番交流曝出一个问题,团队配合尚需加强默契。有耐心还不够,还需要默契,这是提升团队效率的关键。

团队的默契问题,尤其体现在远程配合上。因为不是直接的话语交流,文字本身就是一种效率较低的交流介质,再加之表达上的不畅,间或还出现错别字之类的因素,使得默契问题更加突出。

在团队中,“耐心”是基本要素,“默契”则是品质要素。之所以说耐心是基本要素,是因为任何一支团队都要经历一个不默契的阶段,在这个阶段,需要足够的耐心,否则,还没走到默契的阶段,团队就因彼此缺乏耐心而解体了。


友吧加入“最新分享”滚动列表

位置在首页 banner 下方,原放在这里的“文章搜索”下移至“吧友互动”下方。

去掉了“吧友互动”下方的 AdSense 广告。

附滚动代码,网上找来后整理的。

CSS:

.foundTxt { position:absolute; margin-top:11px; margin-left:42px; line-height:20px; color:#666666 }
.foundTxt UL { margin:0; padding:0; overflow:hidden; height:20px; line-height:20px; }

JS:

function scrollUlByControl(ul) {
try {
slideLine(ul, 2000, 20, 20); //三个数分别对应:滚动间隔时间,滚动速度,单行滚动的高度
}catch (e) {}
}

function slideLine(ul, delay, speed, lh) {
var slideBox = (typeof ul == "string") ? document.getElementById(ul):ul;
var delay = delay, speed=speed, lh = lh;
var tid = null, pause = false;
var start = function () {
tid = setInterval(slide, speed);
}
var slide = function () {
if (pause) return;
var i;
slideBox.scrollTop += 1;
if (slideBox.scrollTop % lh == 0) {
clearInterval(tid);
for (i = 0; i<1; i ++) {
slideBox.appendChild(slideBox.getElementsByTagName("li")[0]);
}
setTimeout(start, delay);
slideBox.scrollTop = 0;
}
}
slideBox.onmouseover = function () {pause = true;}
slideBox.onmouseout = function () {pause = false;}
setTimeout(start, delay);}

html:

<div class="foundTxt">
<ul id="newFoundOut">
<li>。。。</li>
<li>。。。</li>
<li>。。。</li>
</ul>
<script language="javascript">scrollUlByControl(document.getElementById("newFoundOut"));</script>
</div>


解决点击空链接时的“页面抖动”(页面串动)

今天从 Ryan 那里学到一个新知识。

  1. <a href="#">test1</a>
  2. <a href="#@">test2</a>
  3. <a href="javascript:;"></a>

第一种链接点击时会出现页面抖动,第二种和第三种不会。

什么是“页面抖动”(页面串动)?

当页面出现滚动条时,点击第一种链接,滚动条会自动向上,页面会自动“置顶”。而第二种和第三种不会。

以前我习惯用“#”来代替空链接,从现在开始要改成“#@”或者“javascript:;”了。

第三种相对于第二种的优势在于不会在地址栏出现“#@”。

2011-12-13 更新:

新增两个不会使页面发生串动的方法。注意,上面的第三种和下面的第二种(javascript),有时会导致 ie 的地址转向失效,请改为其他几种。

  1. <a href="###">test2</a>
  2. <a href="javascript:void(0)"></a>

The Talkative Turtle
from http://www.storyarts.org/library/nutshell/stories/talkative.html

A Tale from India

A talkative turtle overheard two hunters say that they were planning to catch turtles the very next day. When the hunters left, the turtle asked two cranes to help him escape. "Beautiful white birds," he said, "if you hold a long stick between your beaks, I’ll close my mouth tightly in the middle of it, and then you can fly up and carry me to safety."

"Good idea," said the cranes. "But, for the plan to succeed, you will have to keep your mouth closed tightly on the stick and you must not say a word!" The turtle agreed and biting on the middle of a stick held in the beaks of two birds, off he was carried.

When the birds were high in the air with the turtle dangling down from the stick, some people on the ground looked up at the strange sight in the sky and said, "What clever birds! They figured out how to carry a turtle!"

The proud, talkative turtle cried out, "It was my idea!" and fell tumbling down to earth.

星期二 晴转多云 24~34℃

突然发觉一味说坚持显得片面 ( 思考 )

一般来说,我们把完成一件需要花较长时间去完成的事情称为“坚持”。

褒扬“坚持”的文章有很多,可是并不是所有人都能“坚持”,也不是一定要“坚持”才能达到所谓的“成功”,因为“成功”的定义并不绝对。

不顾性格只论行为,是“从行为到性格”;从性格出发觅事而为,是“从性格到行为”。

抛开性格,一味说“坚持”,显得片面。先分析性格,从性格出发,才不致误人。

但无论是何样的“成功”,应该都有一个共同点,那就是做事的方法。思想决定方法,提升思想,才能提升方法,提升方法,才能提升“成功”的质量。


php时区设置差8个小时解决办法

昨天服务器故障排除后,今天发现出了另一个问题,时区差了8小时。网上查到了方法:

从php5.1.0开始,php.ini里加入了date.timezone这个选项,默认情况下是关闭的。打开php.ini查找date.timezone 去掉前面的分号,并改成 date.timezone = "Asia/Shanghai" 重启http服务(如apache2或iis等)即可。

详细参考:
http://bbs.jcwcn.com/thread-175588-1-1.html

发现一个问题 date("Y-m-d G:i T",time()) 取出来的时间和本地时间老差8个小时,可我的系统明明是中国标准时(GMT+8),最后终于找到了问题所在:

原来从php5.1.0开始,php.ini里加入了date.timezone这个选项,默认情况下是关闭的。

也就是显示的时间(无论用什么php命令)都是格林威治标准时间,和我们的时间(北京时间)差了正好8个小时,有以下3中方法可以恢复正常的时间。

1、最简单的方法就是不要用php5.1以上的版本。

2、如果一定要用,而且不能修改php.ini,则需要在关于时间的初始化的语句的上面加上 date_default_timezone_set (XXX);

3、一劳永逸,仅限能修改php.ini。打开php.ini查找date.timezone 去掉前面的分号,= 后面加XXX,重启http服务(如apache2或iis等)即可。

关于XXX,大陆内地可用的值是:Asia/Chongqing ,Asia/Shanghai ,Asia/Urumqi (依次为重庆,上海,乌鲁木齐)

港台地区可用:Asia/Macao ,Asia/Hong_Kong ,Asia/Taipei (依次为澳门,香港,台北)

还有新加坡:Asia/Singapore

老外好像把北京漏调了。

其他可用的值是:Etc/GMT-8 ,Singapore ,Hongkong ,PRC

PRC是什么?PRC是中华人民共和国啊-_-

以上都是我从php官方说明档里整理出来的GMT-8下面的地区,可能会有遗漏,你可以http://www.php.net/docs.php上查到更多的地区。

由于程序最后还是会把地名转为时区来计算,所以当你使用的不是内置的区域的时候,程序将自动使用格林威治标准时间。


Cooking by Candle
from http://www.storyarts.org/library/nutshell/stories/cooking.html

A Sufi Tale from the Middle East

Mula bet some friends he could survive a night on an icy mountain with nothing to warm him. Taking only a book and a candle for some light, he sat through the frigid night. When he came down to claim his winnings, his friends asked, "Did you take anything up there with you to keep warm?"

"No," said Mula, "just a small candle to read by."

"Aha!" they exclaimed, "Then you lose!"

A week later he invited these same friends to a feast. They waited and waited for food. "Dinner’s not ready," said Mula, "Come and see why!"

In the kitchen they saw a huge pot of water under which a small candle was burning. Mula said, "Does this remind you of our bet? I’ve been trying to heat this pot of water over this candle since yesterday and it’s not warm yet!"

星期一 晴转多云 24~32℃

自今日起写友吧一周年总结

计划花一周时间,在9月30日周年当天或之前发布。


早上友吧新服务器第一次出现故障

早上 8:30 左右发现网站无法访问,FTP 无法登录。昨晚八点左右仍正常,可能是夜里发生的。告知了 Ryan,但他远程也无法连接服务器,他判断可能服务器死机。

联系了海哲,也说远程连不了。他联系托管商万网,不料万网那边已忙成一团。

10:10 分时看还不能访问,到 10:14 发现可以访问了。

这是第一次出现故障,迁到万网后的第56天。


从 word 文件中取出原始图片

打开 word,在“文件”菜单中选择“另存为”,保存类型选“网页(*.htm; *.html)”。完成后,会看到原始图片已输出到和网页文件同目录下的“***.files”文件夹中。


喝了三鹿,腰不酸了,腿不疼了,就连心脏也不跳了!

喝了三鹿,腰不酸了,腿不疼了,就连心脏也不跳了!


DEDE 后台编辑器超链接默认改为 _blank 弹出

修改文件:

/include/FCKeditor/editor/dialog/fck_link.html

源代码搜索 id="txtTargetFrame",在 input 内加入 value="_blank",如下:

<input id="txtTargetFrame" style="WIDTH: 100%" type="text" onKeyUp="OnTargetNameChange();" onchange="OnTargetNameChange();" value="_blank" />

附:DEDE 后台编辑器寻找对话框目标文件的技巧

/include/FCKeditor/editor/dialog/ 目录下放的是编辑器对话框文件,寻找目标文件有个技巧。例如上述,假设不知道要修改“/include/FCKeditor/editor/dialog/fck_link.html”,可在 /include/FCKeditor/ 目录下搜索对话框中看到的某文字,例如搜索“目标框架名称”,可以在“/include/FCKeditor/editor/lang/zh-cn.js”中找到,能看到其对应的标签名为“DlgLnkTargetFrameName”,再在 /include/FCKeditor/ 目录下搜索“DlgLnkTargetFrameName”,则找到了“/include/FCKeditor/editor/dialog/fck_link.html”


Wild Goose
from http://www.storyarts.org/library/nutshell/stories/wild.html

A Tale from China

Two hunters saw a wild goose fly overhead. As one of the hunters placed an arrow in his bow and aimed it at the goose, he said, "That goose will make a fine stew."

"Stew!" said the other. "It would be far better to roast it."

"Stewed!" said the first, putting down his arrow.

"Roasted!" replied the other.

The argument went on. "Let’s ask our clan leader to decide the best way to cook that goose." The leader settled the argument by suggesting that when they caught the goose, half should be stewed and half should be roasted. In that way, everyone’s needs would be met.

Pleased, the two hunters went out to shoot the wild goose, but by that time, the goose was safely long gone . . .

星期日 多云(天气很闷,开风扇觉凉,不开觉热,身上盗汗) 23~30℃

骄盛怒盛之祸 ( 思考 )

关羽麦城突围前夕,与残余部将商议,欲走北门小道入西川。一将进言:“小道恐有埋伏,可走大道。”关羽曰:“纵有埋伏,我何惧哉!”

关羽此时,真不知是骄是信还是无耐。性骄一生,失此一足,却要了性命。事后孔明于关羽灵前慰刘备曰:“云长平日刚而自矜,故有今日之祸”。骄与信本时或难分,有道是,信过之,则成骄。

纵观三国诸将,皆常见骄见怒。勿论诸将,即便曹操孙策等领袖之辈,亦时犯之。刘备一向对孔明言听计从,难得怒一次,却招致火烧连营之杀身之祸。

足可见,盛之祸。


曹操之疑 ( 思考 )

华佗被召入宫为曹操治头风病。佗言欲用利斧砍开曹操头颅,取出风涎,招操疑心,被囚于牢中。

曹操临死前遗嘱:“孤死之后,于彰德府讲武城外,建疑冢七十二座,勿令后人知我葬于何处。”

曹操之疑,至死不休。


细化友吧首页的搜索框

细化搜索框是为下一步放“最新分享”作准备。待 Ryan 完成对“最新分享”的列表功能扩展后,将代替当前的“搜索框”位置,“搜索框”则下移到“吧友互动”下方或上方。

星期六 多云 23~31℃

在 photoshop 里画 1px 的曲线和艺术曲线

使用钢笔工具,画好曲线路径点右键(或进入路径面板在路径层上点右键),使用“描边路径”。

如果画 1px 的曲线,则在“描边路径”的弹出选项框中选“铅笔”。

如果需要画艺术曲线,则在“描边路径”的弹出选项框中选“画笔”,并勾选“模拟压力”。可预先选好需要的笔刷。

实验版本:photoshop cs3


一年前的一个预料在昨天应验

昨天第一次看到友吧有来自 bbs.dedecms.com 的链接。

早在友吧开始建设时就预料到会有这一天,一年后果然应验。类似这样的事情,自己去做,不如让他人代劳。自己只要做好分内之事,自然也就会有代劳之人了。

不过因来路显示为跳转链接:

http://bbs.dedecms.com/goto.php?url=http%3A%2F%2Fwww.friends8.com%2F

所以不知道发帖人是因何提到友吧。

星期五 多云转阴 24~32℃

“报料”banner

意在表达“发现”好文后“平静”的“分享”。

三者对应为“眼睛”“清新”“花放”。


Dreamweaver的应用源格式之“格式化CSS”

昨晚在来路中看到来自 68design 的链接排在靠前的位置,点击最后一条记录进去,是去年写的一篇被 68 转载的文章:Dreamweaver的应用源格式

原文中有一句:

但是CSS文件使用此功能就感觉不适应了(个人感受),页面拉得很长。

随手进到评论里查看,有一条评论:

用户:bestyuan3  时间:2008-04-02   IP:125.77.179.64

在CSS下页面拉得很长的原因是因为你没有在代码格式里设置好,,,

具体操作是:编辑—首选参数—找到代码格式选项—然后点里面的CSS—-最后把<<每个属性位于单独的行上>>最后按确定,,,再执行应用源格式就可以了.

他的意思是取消“每个属性位于单独的行上”前的勾勾。试了下,很好,下面还有预览(我当前用的 DW 是 CS3 版本)。感谢 bestyuan3 的留言。


IE8 的兼容性视图设置

此前的日志有提到“兼容性视图按钮”在有的网站有显示,有的网站没显示。今天发现,不管有没有显示,都可以在“工具 -> 兼容性视图设置”里进行添加删除设置,还可以勾选底部的“在兼容性视图中显示所有网站”,则访问所有网站时都使用“兼容性视图”,并且访问所有网站时都不再显示“兼容性视图按钮”。


于丹《论语》心得(三)_ 处世之道 ( 思考 )

多闻多见,慎言慎行。
多做实事,切勿夸夸其谈。


收到九天老上司对友吧的建议,很有价值

下午收到九天老上司对友吧的建议,很有价值,感激!

我觉得你的网页没有把你的概念表达清楚
打开网站,都是一堆堆的信息,没有给陌生用户一个引发兴趣的点,没有一个引导
“分享我的发现”,这种概念太大了,你们的特色在哪里
你的目标用户是谁,他们凭什么要留下来,你要给个理由他们
现在的网站没特色没发展的
同质化的东西太多了
要让网友在3秒内产生兴趣


English Log

  1. Found out a new short story website, http://www.theshortstory.org.uk
  2. Subscribed to http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml

The Strawberry
from http://www.storyarts.org/library/nutshell/stories/strawberry.html

A Zen Tale from Japan

There was once a man who was being chased by a ferocious tiger across a field. At the edge of the field there was a cliff. In order to escape the jaws of the tiger, the man caught hold of a vine and swung himself over the edge of the cliff. Dangling down, he saw, to his dismay, there were more tigers on the ground below him! And, furthermore, two little mice were gnawing on the vine to which he clung. He knew that at any moment he would fall to certain death. That’s when he noticed a wild strawberry growing on the cliff wall. Clutching the vine with one hand, he plucked the strawberry with the other and put it in his mouth.

He never before realized how sweet a strawberry could taste.

留言簿   11 楼   冰淇淋
2008-9-18 16:31:34

当音乐响起,感觉自己置身于丛林中,坐靠在大树下,阳光透过树叶的缝隙间照射在身上。静静的,用力呼吸能感觉到丛林中独有清香~~不远处有一个湖泊,水透彻见底。偶尔会有树叶飘落其中,泛起的水波慢慢散开,直至消失恢复平静,留下那片叶子静静躺在水面,似乎也正在享受着世外桃源带来的宁静。

一直都没发现这三首歌曲,直到今天才有幸聆听。感谢~~这总是让人这么舒心,似乎一切都是那么的明朗、透彻、宁静。

一首好歌要在适合它的环境下听,才能感觉出其中的味道。再次感谢,感谢作者,也感谢朱高所营造的环境。

平静之地,带给人无尽的遐想。


回复:04 到 05 年间,有段时间装了自动关机软件,一边听这几首曲,还有别的一些曲,听着就睡着了。不料这个习惯养成后,不听曲居然难以入睡。从泉州到了福州,又到杭州,好像是因为有几次自动关机软件出了问题,没有关掉电脑,一直开到早上,又一时没有找到别的更好的自动关机软件,具体不知是在什么时候就改掉这习惯了。那从以后,也很少听曲了,只偶尔听听,每次听都会想起在泉州的一些往事。

星期四 晴转多云 23~32℃

友吧“报料”功能上线

中午开 QQ 收到 Ryan 昨晚的留言,“报料”功能已经处理完成。今天下午我们把这一功能发布到了首页,您可以在我们首页顶部的导航栏下方体验,投递很方便,从此在一定意义上告别烦琐的投稿流程。之所以说是“在一定意义上”,是因为如果您是在友吧发表原创文章,仍然还需要使用我们的会员投稿系统。

无论是投稿还是报料,我们的编辑都将认真保证文章质量。

正在设计一张关于“报料”的 banner,作为宣传之用。

另,Ryan 还处理好了用户行为的部分记录(诸如谁访问了谁的空间,谁浏览了哪篇文章,在哪篇文章发表了留言,等等。。。)这些元素以后可以逐步的放到“用户空间”里,以增强用户交互体验。

自警:

网站不能有过多虚的东西,只有体现价值,才是符合长期发展理念的。
自愿加入的用户 —— 才是最有价值的用户。


最重要的人,最重要的事,最重要的时间 ( 思考 )

听《论语》心得时听到的一则故事:

有一个国王每天都在思考三个最最终极的哲学问题:在这个世界上,什么人最重要?什么事最重要?什么时间最重要?就这三个问题,举朝大臣,没人能够回答得出来。他很苦闷。

有一天,国王出去微服私访,走到一个很偏远的地方,投宿到一个陌生的老汉家。半夜里,他被一阵喧闹声惊醒,发现一个浑身是血的人闯进老汉家。那个人说,后面有人追我。老汉说,那你就在我这儿避一避吧。就把他藏起来了。国王吓得不敢睡,一会儿看见追兵来了。追兵问老汉,有没有看到一个人跑过来?老头说,不知道,我家里没有别人。后来追兵走了,那个被追捕的人说了一些感激的话也走了。老汉关上门继续睡觉。

第二天国王问老汉说,你为什么敢收留那个人?你就不怕惹上杀身之祸?而且你就那么放他走了,你怎么不问他是谁呢?

老汉淡淡地跟他说,在这个世界上,最重要的人就是眼下需要你帮助的人,最重要的事就是眼前必须要解决并做好的事,最重要的时间就是眼前的时间,一点不能拖延。那个国王恍然大悟,他那三个久思不解的哲学问题,一下都解决了。


古中医提倡的睡眠养身

春秋季早睡早起
夏季晚睡早起
冬季早睡晚起

按农历划分,正月起为春。


IE8 兼容性视图与域名的关系

例,有两个页:

  1. http://www.***.com/test1.html(没有显示兼容性视图按钮)
  2. http://www.***.com/test2.html(有显示兼容性视图按钮)

那么,在第二个页点击了兼容性视图按钮后,在第一个页同样可以享受到兼容性视图。

我的案例:友吧所用的 DEDE 后台没有显示兼容性视图按钮,在后台编辑时不太方便,但在前台点击了使用兼容性视图后,刷新后台,就同样是兼容性视图模式了。也就是说,兼容性视图模式针对的是整个域名,从点击兼容性视图按钮后的提示也可以看出来:

***.com 现在正在兼容性视图中运行

它所指的,是该域名下的所有页,而非当前的独立页。

另,用兼容性视图模式访问某网站后,下次访问该网站时,默认还是兼容性视图模式,有记忆功能。


The Skull
from: http://www.storyarts.org/library/nutshell/stories/skull.html

A Tale from West Africa

A hunter came upon a huge tree with a whitened skull at its base. The skull spoke and said, "Beyond a certain hill is a field of calabashes. Take them to your hungry village, but do not tell anyone how you obtained them."

"How did you come to be here?" asked the hunter.

"My mouth killed me." said the skull.

The hunter returned to the village with the calabashes and immediately told everyone, "A talking skull showed me a field of food!" The Chief called him a liar.

"Then come with me! I’ll prove what I say is true. When they arrived at the tree, the hunter spoke to the skull but it remained silent. The hunter was put to death on the spot for lying.

In time, two whitened skulls sat beneath the tree. The first turned to the second and said, "See, in death we meet again, my kin. It’s true a mouth can do you in!"