前尘旧事,几孤风月,似水长眠; 世无定事,问尽风流,只为一笑
有用户提交页面时,会出现比如 filter html,full html的内容,并不非常友好,如果你再安装几个text editor,会显得更加的乱,其实您可以通过如下方法取消这些提示, 只让用户选择对某一页面默认的输入方式
filter_module中的filter_form方法 更改为如下
function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = NULL, $parents = array('format')) {
$value = filter_resolve_format($value);
$formats = filter_formats();
$extra = theme('filter_tips_more_info');
// Only one format available: use a hidden form item and only show tips.
$format = $formats[$value];
$form[$format->format] = array('#type' => 'value', '#value' => $format->format, '#parents' => $parents);
$tips = _filter_tips(variable_get('filter_default_format', 1), FALSE);
$form['format']['guidelines'] = array(
'#title' => t('格式说明'),
'#value' => theme('filter_tips', $tips, FALSE, $extra),
);
return $form;
}