Author Archives: ykyuen

About ykyuen

Life is for fun~ =)

Drupal 7 – In-place editing using Edit module

The Edit module allows you to edit the node content directly on the node view page. It works with CKEditor and also it will be included in the Drupal 8 core. So see how it works in Drupal 7 first.

1. Drupal 7 >= 7.22 is required.

2. Download and install the CKEditor and Edit modules.

3. Grant the Access in-place editing to the relevant roles.
Continue reading

About these ads

jQuery NiceScroll Plugin doesn’t work for dynamic content

jQuery NiceScroll Plugin is a very convenient tool for customizing your website scrollbar.
Create a better scrollbar using jQuery NiceScroll Plugin

By default, the scrollbar is hidden if the content doesn’t exceed the content wrapper height. So if you have dynamic content, you have to tell the NiceScroll plugin to resize otherwise the scrollbar doesn’t show.

Let’s start with the following index.html.
Continue reading

陶傑 – 家法制裁

香港保釣份子因探望劉霞女士,在北京被抓捕,TVB記者亦遭數名中國男子圍毆,香港人很氣憤。

這個姓楊的先生,身份是「保釣人士」。日中關係緊張,幾乎開戰,就是因為香港的「保釣」人士違反《基本法》,干預中國的外交國防事務,擅自闖入尖閣列島(亦即中國宣稱的釣魚島、台灣說的釣魚台)而起。

香港是一個國際金融經濟城市,不要搞太多政治,日中領土爭議,更是關你屁事。香港人理應對全世界都友善。「保釣份子」啟釁戰端,危害世界和平,這次回到大陸,受到中國公安制裁,令人想到,世上終有報應這回事。

至於電視台記者被毆,可不可以這樣看(Why not put it this way):香港的免費電視新聞台,愛國親中,早已調整了凡事不可以「西方觀點報道」的偏頗立場。他們認為,許多新聞,應該多從中國人的觀點來報道評論,這樣才會免於被英美的CNN和路透社洗腦。
Continue reading

陶傑 – 天各一方

網上有一篇據稱是日本人的網評,譯成中文,題為「跟中國人辯論是浪費時間」,回應中國民間的反日情緒:

「中國人看事情,喜歡看表面,一些中國人總要找一些事情來諷刺挖苦、譬如日本首相一年換一個這種事。我會用笑話來解釋:內褲一年換一條固然不好,卻總比數十年穿一條內褲衛生得多。」

「又譬如日本的AV。在日本,這是合法的,開放的,但日本法律又是嚴格的,不會把強姦變成嫖宿幼女。這些事情見得多,也就沒興趣回應了。不與中國人辯論,是跟中國人相處需要遵守的原則,因為是浪費時間。

此一文牘,寫得很cool,最近在網上熱傳,難怪不論中國如何囂罵反日,日本民間沉默不發一言──你在東莞砸中國人買的日本汽車,我在日本絕不會燒你中國人開的中華料理,也不會追打僑居日本的中國人報復,日本是一個成熟的民族。

香港的「藝評醜聞」,證實了日本這篇網論的觀點。不要跟中國人,尤其是洗了腦的中國人辯論,因為是浪費時間。
Continue reading

CSS3 – Simple transistion effect

With CSS3, we could make simple animation without any use of Javascript. The following is an example which created a mouse hover effect on a div.

<!DOCTYPE html>
<html>
<head>
  <title>CSS3 - Simple transistion effect</title>
  <style type="text/css">
    #eureka {
      background-color: red;
      width: 200px;
      height: 200px;
      -webkit-transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out;
      -moz-transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out;
      -o-transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out;
      -ms-transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out;
      transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out;
    }

    #eureka:hover {
      background-color: blue;
      width: 400px;
    }
  </style>
</head>
<body>
  <div id="eureka"></div>
</body>
</html>

Continue reading

陶傑 – 這裏是香港

「低俗喜劇」遭到京女在香港的政治獎金批判,明眼人一看,當事人之背景、批判的「平台」,什麼人給的錢,哪類人「評審」,其中糾結的近親雜交、體液交染,就知道不止「愚昧」兩字之簡單,香港人天真,悟不出其中還有許多深層的名堂。

電影不止是娛樂,你以為是,有人認為是政治,政治講控制,偏偏創作是最講個性的營生,寇比力克、塔倫天奴、高恩兄弟,西方文化之所以成為全球理所當然的「霸權」,是因為西方文明國家,容許個性發揮,擁有自由。

即使以「藝評醜聞」這件事最表層而論:一個大陸的年輕人,來香港,見識「兩制」,理應明白香港的電影,既有王家衛的「一代宗師」,有許鞍華的「桃姐」,當然也有周星馳的「審死官」,以及彭浩翔的「低俗喜劇」。
Continue reading