Drupal 测试邮件发送
Reroute Email模块可以帮助你进行邮件发送的测试。
This module intercepts all outgoing emails from a Drupal site and reroutes them to a predefined configurable email address.
This is useful in case where you do not want email sent from a Drupal site to reach the users. For example, if you copy a live site to a test site for the purpose of development, and you do not want any email sent to real users of the original site. Or you want to check the emails sent for uniform formatting, footers, …etc.
This is also a good demonstration of what hook_mail_alter(), available in Drupal 5.x and later, can do.
Drupal 7常用theme hooks
file_link
Returns HTML for a link to a file.
html_tag
Returns HTML for a generic HTML tag with attributes. This can often be too generic a theme hook to use, but is really useful for adding a tag to the of a document or for theming a tag inside a render element.
image
Returns HTML for an image. image_style Returns HTML for an image using a specific image style.
item_list
Returns HTML for a list of items which can optionally be nested.
links
Returns HTML for a list of links (cannot be nested).
more_link
Returns HTML for a more link, often used on blocks.
pager
Returns HTML for a pager query element, a list of pages for result sets too long for one page.
progress_bar
Returns HTML for an indicator showing a task’s progress.
table
Returns HTML for a table.
username
Returns HTML for a username.
user_list
Returns HTML for a list of users.
user_picture
Returns HTML for a picture configured for the user’s account.
Drupal t函数
Drupal supports translation is largely through the t() function.
The function takes an optional second argument。
1 2 | $values = array('@user' => $username); print t('Welcome, @user', $values); |
If the placeholder begins with at sign @, then before it inserts the value, Drupal sanitizes the value using its internal check_plain() function.
1 2 | $values = array('!url' => 'http://example.com'); print t('The website can be found at !url', $values); |
If the placeholder begins with exclamation mark !, then it will be entered with no escaping. We can do this safely only because we already know the value of URL.
1 2 | $values = array('%color' => 'blue'); print t('My favorite color is %color.', $values); |
If the placeholder begins with the percent sign %, it tells Drupal to escape the code and to mark it as emphasized. (The content will be embedded in the em tag)
Drupal 常用模块
1. 内容编辑
1.1 BUEditor (http://drupal.org/project/bueditor)

1.2 Textile (http://drupal.org/project/textile)
使用自定义的标签来转换成Html文本
1.3 Wysiwyg API (http://drupal.org/project/wysiwyg)
一款所见即所得(WYSIWYG)编辑器。
1.4 FCKeditor (http://drupal.org/project/fckeditor)
另一款所见即所得的编辑器,同时也是较早被Drupal支持,所以维护和支持都不错。