Think in Drupal 上册 问世了
Think in Drupal 上册 问世了,
最新的Drupal7开发资料,起了个名字,叫做think in Drupal,模仿think in Java,后来查了一下,人家叫做thinking in Java.
想了想,还是叫做think in drupal 吧。
think in drupal 不是pro drupal development 3的翻译,虽然看完以后,感觉有点像,但是里面的模块代码完全不同。
下册正在写作中。
论坛:
Think in Drupal 7, 区块更多链接
info文件:
name = Block More Link
description = Provide a more link for all blocks.
package = Other
version = VERSION
core = 7.x
configure = admin/config/block/morelink
install文件:
<?php
/**
* @file
* Install, update and uninstall functions for the block_morelink module.
*/
Drupal 7 中文教程 字段验证 ISBN验证
<?php
/**
* @file
* isbn validation
*/
Drupal info文件:
name = ISBN Validation
description = "Add ISBN validation to text field"
core = 7.x
dependencies[] = field
dependencies[] = field_ui
module文件:
Drupal 7 中文教程 联系我们 两步表单 “确认”页面回调
/**
* “确认”页面的回调函数
*/
function contactus_confirm_page(){
//我们为这个页面设置标题
drupal_set_title('联系我们');
//这里首先作了判断,如果会话中没有设置contactus_form,返回contactus
if(empty($_SESSION['contactus_form'])){
drupal_goto('contactus');
}else{
}
Drupal版本:
Drupal 7 中文教程 联系我们 两步表单 “联系我们”页面回调
<?php
/**
* @file
* 各种页面的回调函数.
*/
/**
* “联系我们”页面的回调函数
*/
function contactus_page(){
//我们为这个页面设置标题
drupal_set_title('联系我们');
$render_array = array(
'#markup' => '',
);
//该页面的正文为一个表单,注意对于表单,这里需要使用drupal_render呈现一下。
$render_array['#markup'] .= drupal_render(drupal_get_form('contactus_form'));
//Drupal7的页面回调,返回的应该是一个数组
return $render_array;
}
Drupal版本:
Drupal 7 中文教程 联系我们 两步表单 module 文件 代码部分
<?php
/**
* @file
* 方便用户联系我们.
*/
Drupal版本:
袁萌 政府网站被黑与自由软件Drupal (转贴)
在我们国内,政府的“官网”屡屡被黑,司空见惯,见怪不怪。何故也?
论坛:
页面
