月度归档:2011 年八月

Drupal 7: editor wysiwyg, pictures upload, lightbox [FWI]

I love Drupal! It ‘s a very powerful CMS, has the support of a huge community, there are thousands of free modules. Features such as CCK, Taxonomy and Views make it an incredible development platform. You can build real web applications without writing a line of code. But unfortunately many people are frightened by the first approach. One of the first issues that it faces a novice Drupal user is the lack of a WYSIWYG HTML editor (what you see is what you get) on the client side in the core installation of the CMS. I had to struggle hard to figure out which combination, of the dozens of editors and modules available, it was the right one. I was hoping that with the release of Drupal 7 an editor was finally built in but was not the case, so I decided to publish this guide (or tutorial if you prefer) to configure Drupal 7 to use the WYSIWYG editor CKEditor, buttons for entering images within articles and photo viewing with a Lightbox script. This is what I think right now the best configuration for Drupal 7, but of course there are dozens of other possibilities.

1) Create a folder called “libraries in the “sites \ all folder.

2) Download the colorbox script at this url.

3) Unzip the Colorbox script and upload it to “sites\all\libraries” folder.

4) Download the CKEditor 3.5.3 at this url. WARNING: More recent releases will be supported in future release of the WYSIWG module.

5) Unzip CKEditor and upload it to “sites\all\libraries” folder.

6) Download the Drupal 7 version of the Colorbox module.

7) Download the Drupal 7 version of the WYSIWYG module.

8) Download the Drupal 7 version of the Insert module.

9) Unarchive the three modules (Colorbox, WYSIWYG, Insert) and upload them in the “sites\all\modules” folder.

Now your “sites\all” folder must be like this picture.

10) Connect to your site as Administrator and go to the Configuration area.

11) Enable Colorbox, WYSIWYG, Insert modules.

12) Edit the “Wysiwyg profiles”.

13) You need to set CKEditor for the Full HTML profile.

14) Click the Edit button and select all the buttons you want to use on your CKEditor.

15) Edit the Colorbox configuration. Set the Large Image Style.

16) Go to the Structure Area and choose Content Types.

17) Click Manage Fields for the Article content type.

18) Create a new folder eith type Image and Widget Image

19) In the next form leave all the default settings and save.

20) In the Insert section select “Enable insert button”, check the “Colorbox thumbnail” checkbox, set Unlimited for the “Number of values” option.

21) In the Manage Display section select “Hidden” for the label and Format of the new field.

Now when you create an article if you set Full HTML text format you can use the CKEditor.

Under the editor you find a “Insert” section where you can upload pictures and then you can insert them on the body.

When you click on the thumbnail the picture is displayed with a lightbox effect.

Other interesting modules are Wysiwyg ImageField and Media but they are not yet stable.

一个不错的html5在线编辑器

http://www.maqetta.org/

Visual authoring of HTML5 user interfaces – in the browser!

Maqetta is an open source project that provides WYSIWYG visual authoring of HTML5 user interfaces. The Maqetta application itself is authored in HTML, and therefore runs in the browser without requiring additional plugins or downloads.

北大男暴强失恋诗及回复[转]

何故

昨日暮

偶遇见她

把纤纤玉手

交那衰人牵住

盈盈笑语左右顾

神采飞扬凌波微步

美眸中一片深情倾注

似前年与我同在湖畔路

也这般附耳交顾低语倾诉

如今见我头也不点形同陌路

我发现自己旧情难忘六神无主

两眼痴呆双脚生根心内如被汤煮

像我这么优秀的男子她总嫌我老土

那土鳖相貌恶心行止猥琐她爱他粗鲁

女孩子搞不清她想什么我越琢磨越胡涂

明知道她与自己不合适想忘记她另起灶炉

到头来都只能是剪不断理还乱最终于事无补

兄弟我长这么大从来没怕过谁却栽给了这个主

看来是上辈子欠她很多钱早知如此就不该和她堵

碰上她算我倒霉下次说什么也得找个温柔姑娘相处

总算明白这世上漂亮不能当饭吃往往还让你难堪重负

从现在起踏踏实实勤勤恳恳谦虚谨慎待人有礼爱护公物

切记过马路左右看要走人行斑马线要想富少生孩子多种树

化悲痛为力量一边努力学习一边时刻准备着开发祖国大西部

大丈夫何患无妻没有了你虽然孤独但也使我从此不再一叶障目

这也使我好好反思为什么会失败总结经验教训继续探索革命道路

我会遇上好姑娘没命地追她想她爱她决不放过她不管她属虎还属兔

回贴

这个有志青年是个好同志失恋了不失魂落魄自暴自弃颇有男儿气度

他虽然遭遇了现代女陈世美被无情抛弃但没有怪命也不埋怨政府

反而擦亮眼睛激发斗志将其丑恶行径卑鄙嘴脸进行了深刻揭露

再次论证了阶级斗争将会在一定范围内长期存在的精辟论述

展望了初级阶段革命尚未成功同志仍需努力这条基本道路

尤其难能可贵的是该同志认真反省自己并触动灵魂深处

认识到过去在湖畔漫步是小资产阶级情调的严重错误

险些为漂亮的外表所迷惑中了糖衣炮弹的惯用招数

理论联系实际痛定思痛如梦方醒才知道差点迷途

漂亮不能当饭吃漂亮不是本质不是革命的全部

语言虽然通俗但体现了有志青年的朴实感悟

批评与自我批评言辞感人真可谓发自肺腑

并萌发修身齐家治国平天下的远大抱负

体现了由此及彼由表及里的思想反复

像他这么优秀的青年怎么能说他土

自然是徒具外表的女人有眼无珠

天涯何处无芳草佳丽不问出处

好马不吃回头草旧情勿枉顾

兔子不吃窝边草以为三窟

百步之内必有芳草无数

也许有天她变成弃妇

才会想起你的好处

再回来找你倾诉

一切已经太晚

你也有今天

一屑不顾

不理她

扮帅