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.       If  the field type is <Image>,please use field type <File>.We can discuss this…

7.       Please make a rule to named field,like Video width”  orVideoWidth” or Videowidth” or “Video_width”.

Discuss which one is the best.

Safari

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值