`
hunxiejun
  • 浏览: 1144902 次
文章分类
社区版块
存档分类
最新评论

Drupal 使用建议

 
阅读更多

Drupal PHP届的一个开源CMS,被列为2011最值得期待十大网站之一。

不可否认Drupal是个优秀的框架,但我个人并不喜欢此框架构架方式,给出几点关于upal6的议(后续将不断):

关于CCK

1. 当使用“Text”field type时,请将<Maximum length>属性填上,因为drupal将根据这个属性来填充字段的长度,如果是空,那么CCK将创建BLOB字段。

2. 当使用“Date”field type时,请将<*Custom input format>属性填入“Y/n/j” <*Custom display format>属性填入“Y/m/d”。根据前一个属性,我们可以填入“2011/1/1”,如果填入“Y/m/d”,那么你不能输入“2011/1/1”,因为这样是不符合“Y/m/d”规则的,会被CCK认为是错误的。

3.如果没有必要使用<Existing field>,就别使用<Existing field>,因为使用<Existing field>将新建一张表,比如我们使用字段名称为<productXXX>的来做<Existing field>,那么将会创建一张表<content_field_ productXXX>.而你使用这个node时,特别使用view来显示这个node时,view会使用SQL语句“Left join”,这样会大大的降低效率。

4. 当我们使用布尔型的字段时,请使用< Integer> field type, 而如果使用<Text> field type时,效率会低一点 .

5. 为了用户友好性,请填写<Help text>.

6. 当我们要使用<Image>字段时,最好使用field type <File>.然后再后缀名限制里限制只能输入”jpg,png”

关于Safari

1.RichText 一般在drupal6Safari中是不能使用的.尽量避免。

后面的英文是我的写的发给公司外国同事看的。

About CCK

1.If we use field type “Text”, please set the <Maximum length>.Because<Maximum length> is null, drupal will create a blob field type. It’s so big for string.

2.If we use field type “Date”, please input <*Custom input format>= “Y/n/j” and<*Custom display format>= “Y/m/d”, so that we can input “2011/1/1” and display is always “2011/01/01”.

3.Use <Existing field> will create a table to store the value, for example, we use <Existing field> <product_name> in many content type, it will create a table named <content_field_product_name>.<product_name> is appropriate but some fields we not need use <Existing field>, please not use it, Because View will use SQL “Left join”, it will be more slow.

4.If we need field like “Yes,No”,please use Integer field type, Because View’s SQL will more slow .

5.Please let field have <Help text>.

6.Ifthe field type is <Image>,please use field type <File>.We can discuss this…

7.Please make a rule to named field,likeVideo width”orVideoWidth” orVideowidth” or “Video_width”.

Discuss which one is the best.

Safari

1.RichText is usually not work in drupal in Safari.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics