$output.='<dd>'.t('The <a href="@contact">Contact page</a> provides a simple form for users with the <em>Use the site-wide contact form</em> permission to send comments, feedback, or other requests. You can create categories for directing the contact form messages to a set of defined recipients. Common categories for a business site, for example, might include "Website feedback" (messages are forwarded to website administrators) and "Product information" (messages are forwarded to members of the sales department). E-mail addresses defined within a category are not displayed publicly.',array('@contact'=>url('contact'))).'</p>';
$output.='<dt>'.t('Navigation').'</dt>';
$output.='<dd>'.t("When the site-wide contact form is enabled, a link in the main <em>Navigation</em> menu is created, but the link is disabled by default. This menu link can be enabled on the <a href='@menu'>Menus administration page</a>.",array('@contact'=>url('contact'),'@menu'=>url('admin/structure/menu'))).'</dd>';
$output.='<dd>'.t('When the site-wide contact form is enabled, a link in the <em>Main navigation</em> menu is created, but the link is disabled by default. This menu link can be enabled on the <a href="@menu">Menus administration page</a>.',array('@menu'=>url('admin/structure/menu'))).'</dd>';
$output.='<dt>'.t('Customization').'</dt>';
$output.='<dd>'.t('If you would like additional text to appear on the site-wide or personal contact page, use a block. You can create and edit blocks on the <a href="@blocks">Blocks administration page</a>.',array('@blocks'=>url('admin/structure/block'))).'</dd>';
$output.='</dl>';
return$output;
case'admin/structure/contact':
$output='<p>'.t('Add one or more categories on this page to set up your site-wide <a href="@form">contact form</a>.',array('@form'=>url('contact'))).'</p>';
$output.='<p>'.t('A <em>Contact</em> menu item (disabled by default) is added to the Navigation menu, which you can modify on the <a href="@menu-settings">Menus administration page</a>.',array('@menu-settings'=>url('admin/structure/menu'))).'</p>';
$output.='<p>'.t('A <em>Contact</em> menu item (disabled by default) is added to the Tools menu, which you can modify on the <a href="@menu-settings">Menus administration page</a>.',array('@menu-settings'=>url('admin/structure/menu'))).'</p>';
$output.='<p>'.t('If you would like additional text to appear on the site-wide contact page, use a block. You can create and edit blocks on the <a href="@blocks">Blocks administration page</a>.',array('@blocks'=>url('admin/structure/block'))).'</p>';
@@ -33,8 +33,8 @@ function forum_help($path, $arg) {
$output.='<dd>'.t('Visit the <a href="@forums">Forums page</a> to set up containers and forums to hold your discussion topics.',array('@forums'=>url('admin/structure/forum'))).'</dd>';
$output.='<dt>'.t('Starting a discussion').'</dt>';
$output.='<dd>'.t('The <a href="@create-topic">Forum topic</a> link on the <a href="@content-add">Add new content</a> page creates the first post of a new threaded discussion, or thread.',array('@create-topic'=>url('node/add/forum'),'@content-add'=>url('node/add'))).'</dd>';
$output.='<dt>'.t('Navigation').'</dt>';
$output.='<dd>'.t('Enabling the Forum module provides a default <em>Forums</em> menu item in the navigation menu that links to the <a href="@forums">Forums page</a>.',array('@forums'=>url('forum'))).'</dd>';
$output.='<dt>'.t('Forum navigation').'</dt>';
$output.='<dd>'.t('Enabling the Forum module provides a default <em>Forums</em> menu item in the Tools menu that links to the <a href="@forums">Forums page</a>.',array('@forums'=>url('forum'))).'</dd>';
$output.='<dt>'.t('Moving forum topics').'</dt>';
$output.='<dd>'.t('A forum topic (and all of its comments) may be moved between forums by selecting a different forum while editing a forum topic. When moving a forum topic between forums, the <em>Leave shadow copy</em> option creates a link in the original forum pointing to the new location.').'</dd>';
$output.='<dt>'.t('Locking and disabling comments').'</dt>';
@@ -250,11 +250,11 @@ private function doAdminTests($user) {
$this->drupalLogin($user);
// Retrieve forum menu id.
$mlid=db_query_range("SELECT mlid FROM {menu_links} WHERE link_path = 'forum' AND menu_name = 'navigation' AND module = 'system' ORDER BY mlid ASC",0,1)->fetchField();
$mlid=db_query_range("SELECT mlid FROM {menu_links} WHERE link_path = 'forum' AND menu_name = 'tools' AND module = 'system' ORDER BY mlid ASC",0,1)->fetchField();
@@ -28,7 +28,7 @@ class MenuTest extends WebTestBase {
publicstaticfunctiongetInfo(){
returnarray(
'name'=>'Menu link creation/deletion',
'description'=>'Add a custom menu, add menu links to the custom menu and Navigation menu, check their data, and delete them using the menu module UI.',
'description'=>'Add a custom menu, add menu links to the custom menu and Tools menu, check their data, and delete them using the menu module UI.',
'group'=>'Menu'
);
}
...
...
@@ -90,8 +90,7 @@ function testMenu() {
}
/**
* Test standard menu functionality using navigation menu.
*
* Tests standard menu functionality using the Tools menu.
*/
functiondoStandardMenuTests(){
$this->doMenuTests();
...
...
@@ -99,8 +98,7 @@ function doStandardMenuTests() {
}
/**
* Test custom menu functionality using navigation menu.
*
* Tests custom menu functionality using the Tools menu.
*/
functiondoCustomMenuTests(){
$this->menu=$this->addCustomMenu();
...
...
@@ -207,10 +205,9 @@ function deleteCustomMenu($menu) {
'description'=>'Holds definitions for top-level custom menus (for example, Main menu).',
'description'=>'Holds definitions for top-level custom menus (for example, Main navigation menu).',
'fields'=>array(
'menu_name'=>array(
'type'=>'varchar',
...
...
@@ -47,10 +47,10 @@ function menu_install() {
$system_menus=menu_list_system_menus();
$t=get_t();
$descriptions=array(
'navigation'=>$t('The <em>Navigation</em> menu contains links intended for site visitors. Links are added to the <em>Navigation</em> menu automatically by some modules.'),
'user-menu'=>$t("The <em>User</em> menu contains links related to the user's account, as well as the 'Log out' link."),
'management'=>$t('The <em>Management</em> menu contains links for administrative tasks.'),
'main-menu'=>$t('The <em>Main</em> menu is used on many sites to show the major sections of the site, often in a top navigation bar.'),
'tools'=>$t('Contains links for site visitors. Some modules add their links here.'),
'account'=>$t('Links related to the user account.'),
'admin'=>$t('Contains links to administrative tasks.'),
'main'=>$t('Use this for linking to the main site sections.'),
);
foreach($system_menusas$menu_name=>$title){
$menu=array(
...
...
@@ -80,3 +80,24 @@ function menu_update_8000() {
'menu_secondary_links_source'=>'secondary_links',
));
}
/**
* Rename default menu names.
*/
functionmenu_update_8001(){
// Only the internal identifiers are updated; the labels and descriptions
// might have been customized and do not have to be renamed.
$mlid=db_query_range("SELECT mlid FROM {menu_links} WHERE link_path = :path AND menu_name = :menu_name AND module = 'menu' ORDER BY mlid ASC",0,1,array(
':path'=>'node/'.$node->nid,
...
...
@@ -690,7 +690,7 @@ function menu_form_node_form_alter(&$form, $form_state) {
'#description'=>t('Shown when hovering over the menu link.'),