1. hide core bulid form elements in drupal like author revision
use hook_form_alter
$form['revision_information']['#attributes'] = array(‘class’ => ‘hideme’); // Revision information
$form['author']['#attributes'] = array(‘class’ => ‘hideme’); // Author information
$form['options']['#attributes'] = array(‘class’ => ‘hideme’); // Publishing options
$form['xmlsitemap']['#attributes'] = array(‘class’ => ‘hideme’); // XML sitemap
$form['print']['#attributes'] = array(‘class’ => ‘hideme’); // Printer, e-mail and PDF versions
$form['path']['#attributes'] = array(‘class’ => ‘hideme’); // URL path settings
$form['menu']['#attributes'] = array(‘class’ => ‘hideme’); // Menu settings
then add the .hideme css in your theme style.css
also
in you can do this in the way $form['log']['#access'] = FALSE;
2. hide CCK build field
define $form['#after_build'][] = ‘_***_build’; in hook_form_alter function
and
in function _***_build()
{
unset($form['field_***_view']);//hide cck field
…
}
use #after_build
3. hide title and tags in drupal form
use hook_form_alter
//hide title
$form['title']['#type'] = ‘value’;
$form['title']['#required'] = FALSE;
//hide tags
$form['taxonomy']['tags'][4]['#type'] = ‘value’;
$form['taxonomy']['tags'][4]['#required'] = FALSE;
drupal how to hide form elements unnessary
October 10th, 2009drupal疑难小问题总结
October 8th, 20091.针对node部署权限 http://drupal.org/project/content_access /acl
2CCK input form or other form elements
HowTo: Theme a CCK input form
http://drupal.org/node/101092
form 也可以使用template (*.tpl.php)
http://www.joetsuihk.com/form_templates
contemplate 模块
3.drupal和dz整合 http://drupalchina.org/node/1169
4. http://blog.sina.com.cn/shengsongx
5. widget to edit User Lists in Forms API
http://www.angrydonuts.com/a_widget_to_edit_user_lists_in_f 大牛的博客
Windows平台Android开发环境搭建
October 3rd, 2009一、必备软件
1、jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.exe。 http://www.java.net/download/jdk6/6u10/promoted/b32/binaries/jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.exe
假如运行安装程序无反应 msiexec /regserver 加载安装服务
2、eclipse。
http://d2u376ub0heus3.cloudfront.net/technology/epp/downloads/release/galileo/SR1/eclipse-java-galileo-SR1-win32.zip
3、ADT-0.9.0.zip。
4、android-sdk-windows-1.5_r3.zip。
http://dl.google.com/android/android-sdk-windows-1.5_r2.zip
1、jdk 1.6安装(双击jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.exe)。选择安装路径为“E:\android\jdk-6u10\”,安装完成后设置环境变量:右击点我的电脑->属性->高级->环境变量,双击PATH,变量值中末尾加上“;E:\android\jdk-6u10\bin”。同时新建两个环境变量,JAVA_HOME,变量值为:“E:\android\jdk-6u10”以及CLASSPATH,变量值为:“.”。
2、解压eclipse-SDK-3.4.2-win32.zip到目录“E:\android\eclipse-3.4.2”。不用安装,绿色软件。
3、打开eclipse.exe。随意设置工作目录。
选择Help->Software Updates->Available Software->Add Site ->Archive… 选择ADT。
(ADT必须0.9以上,如:ADT-0.9.0.zip)
在列表中勾选 jar:file:…\ ADT-0.9.0.zip开始安装,即点击Install…按钮。
(这时会出现警告 大概意思是dl-ssl.google.com/android/eclipse 没有找到。不用理采,这个网站早就消失了,找不到正常。因为使用的是离线安装,所以不需要千万不要勾选,否则可能会浪费很多时间。)然后一步步执行,一直到安装完毕。
4、解压android-sdk-windows-1.5_r1.zip到目录“E:\android\android-sdk-1.5”。
5、选择window – Preferences 设置Android的SDK Location:为“E:\android\android-sdk-1.5”。
6、运行里输入cmd命令,进入dos环境,输入以下命令新建avd:
android create avd -n sdk_1.5_avd -t 2
出现的配置界面中依次键入配置选项即可。
(注:如果想删除已经创建的avd,dos下输入以下命令:android delete avd –n sdk_1.5_avd)
7、安装完毕。






