
1. Adding and manipulating template variables and the Drupal call order:
template_preprocess()
template_preprocess_breadcrumb()
MODULENAME_preprocess() // Defined in module
MODULENAME_preprocess_breadcrumb() // Defined in module
phptemplate_preprocess()
phptemplate_preprocess_breadcrumb()
THEMENAME_preprocess()
THEMENAME_preprocess_breadcrumb()
2. Overriding with Theme Functions and the Drupal call order:
THEMENAME_breadcrumb()
phptemplate_breadcrumb()
sites/all/themes/THEMENAME/breadcrumb.tpl.php
theme_breadcrumb()
3. Devel module and Theme development module is helpful to show you message about theme override.
4. When you theme a CCK filed by adding a file content-filed-field_xxx.tpl.php, do not forget to place an original content-field.tpl.php in the same folder.
5. Do not forget to clear cache if no changes show.
960 Grid system 可以帮助网页设计人员对区块进行定位。
Drupal 也有相关的theme模块 http://drupal.org/project/ninesixty 你可以在此基础上进行theme的开发。
960 Grid 的优点在于规范了网页布局的开发流程,把最需要的像素定位分离出来。
当然 960 Grid 不能解决你的所有CSS问题。960 Grid 只是你设计网页CSS的基础。
Example:
$batch = array(‘operations’ => array(),
‘finished’ => ‘my_finished_callback’,
‘title’ => t(‘Processing’),
‘init_message’ => t(‘Starting…’),
‘progress_message’ => t(‘Finished @current out of @total’),
‘error_message’ => t(‘An error occurred and some or all of the exports have failed.’),
);
//batch process and an array of callback arguments
$batch['operations'][] = array(‘batch_1′, array($node));
$batch['operations'][] = array(‘batch_2′, array($node));
$batch['operations'][] = array(‘batch_3′, array($node));
batch_set($batch);
batch_process(‘my_home/’);
function batch_1(&$node, &$context) {
while(1)
{
$result = db_result(db_query(…));
if($result) break;
sleep(1);
}
$context['message'] = “Pre translating…”;
$context['finished'] = 1;
}