• 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.

  • 相关阅读:
    XML之四种解析dom,sax,jdom,dom4j原理及性能比较
    uni-app 下小程序bindgetuserinfo不回调原因
    微信小程序 -- 真机不打开调试无法正常使用小程序的坑
    如何申请腾讯位置服务的密钥
    使用Promise封装小程序wx.request的实现方法
    关于vue-router当中addRoutes的使用
    前端Promise总结笔记
    css怎么设置超出几行显示省略号?
    大数据Spark和Hadoop以及区别(干货)
    Spark和Hadoop的区别和比较
  • 原文地址:https://www.cnblogs.com/hainange/p/6153250.html
Copyright © 2020-2023  润新知