Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.437 diff -u -F^f -r1.437 common.inc --- includes/common.inc 11 Apr 2005 22:48:27 -0000 1.437 +++ includes/common.inc 19 Apr 2005 07:24:20 -0000 @@ -109,6 +109,38 @@ function drupal_get_headers() { return drupal_set_header(); } +/*** EXPIRIMENTAL CODE ***/ +/** + * Get the helptext for the current page, for display on the page. + */ +function drupal_get_help() { + $help = drupal_set_help(); + + if (isset($help) && is_array($help)) { + foreach($help as $text) { + $output .= '

'. $text .'

'; + } + } + else { + $output .= '

'. $help .'

'; + } + + return $output; +} + +/** + * Set the help of the current page, for display on the page. + */ +function drupal_set_help($help = NULL) { + static $stored_help; + + if (isset($help)) { + $stored_help = $help; + } + return $stored_help; +} +/*** EXPIRIMENTAL CODE ***/ + /** * @name HTTP handling * @{ @@ -1717,7 +1749,7 @@ function truncate_utf8($string, $len, $w /** * Encodes MIME/HTTP header values that contain non US-ASCII characters. * - * For example, mime_header_encode('t√©st.txt') returns "=?UTF-8?B?dMOpc3QudHh0?=". + * For example, mime_header_encode('tà©st.txt') returns "=?UTF-8?B?dMOpc3QudHh0?=". * * See http://www.rfc-editor.org/rfc/rfc2047.txt for more information. * cvs diff: Diffing misc cvs diff: Diffing modules Index: modules/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user.module,v retrieving revision 1.462 diff -u -F^f -r1.462 user.module --- modules/user.module 18 Apr 2005 20:43:26 -0000 1.462 +++ modules/user.module 19 Apr 2005 07:24:21 -0000 @@ -1300,7 +1300,6 @@ function user_configure_settings() { } function user_admin_create($edit = array()) { - if ($edit) { // Because the admin form doesn't have roles selection they need to be set to validate properly $edit['roles'] = array(_user_authenticated_id() => 'authenticated user'); @@ -1438,6 +1437,8 @@ function _user_admin_access_form($edit) * Menu callback: list all access rules */ function user_admin_access() { + drupal_set_help(t('Set up username and e-mail address access rules for new accounts. If a username or email address for a new account matches any deny rule, but not an allow rule, then the new account will not be allowed to be created.')); + $header = array(array('data' => t('Access type'), 'field' => 'status'), array('data' => t('Rule type'), 'field' => 'type'), array('data' =>t('Mask'), 'field' => 'mask'), array('data' => t('Operations'), 'colspan' => 2)); $result = db_query("SELECT aid, type, status, mask FROM {access}". tablesort_sql($header)); $access_types = array('user' => t('username'), 'mail' => t('e-mail')); @@ -1475,6 +1476,9 @@ function user_roles($membersonly = 0, $p */ function user_admin_perm() { $edit = $_POST['edit']; + + drupal_set_help(t('In this area you will define the permissions for each user role (role names are defined on the user roles page). Each permission describes a fine-grained logical operation, such as being able to access the administration pages, or adding/modifying a user account. You could say a permission represents access granted to a user to perform a set of operations.', array('%role' => url('admin/access/roles')))); + if ($edit) { // Save permissions: $result = db_query('SELECT * FROM {role}'); @@ -1546,6 +1550,16 @@ function user_admin_role() { $op = $_POST['op']; $id = arg(4); + $help[] = t('Roles allow you to fine tune the security and administration of drupal. A role defines a group of users that have certain privileges as defined in user permissions. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the role names of the various roles. To delete a role choose "edit".', array('%permissions' => url('admin/access/permissions'))); + $help[] = t('By default, Drupal comes with two user roles:'); + $help[] = ''; + + drupal_set_help($help); + if ($op == t('Save role')) { if ($edit['name']) { db_query("UPDATE {role} SET name = '%s' WHERE rid = %d", $edit['name'], $id); @@ -1664,6 +1678,9 @@ function user_configure() { if ($_POST) { system_settings_save(); } + + drupal_set_help(t('In order to use the full power of Drupal a visitor must sign up for an account. This page lets you setup how a user signs up, logs out, the guidelines from the system about user subscriptions, and the e-mails the system will send to the user.')); + $output = system_settings_form(user_configure_settings()); print theme('page', $output); @@ -1680,13 +1697,16 @@ function user_admin() { switch ($op) { case 'search': case t('Search'): + drupal_set_help(t('Enter a simple pattern ("*" may be user as a wildcard match) to search for a username. For example, one may search for "br" and Drupal might return "brian", "brad", and "brenda".')); $output = search_form(url('admin/user/search'), $_POST['edit']['keys'], 'user') . search_data($_POST['edit']['keys'], 'user'); break; case t('Create account'): case 'create': + drupal_set_help(t('This web page allows the administrators to register a new users by hand. Note that you cannot have a user where either the e-mail address or the username match another user in the system.')); $output = user_admin_create($edit); break; default: + drupal_set_help(t('Drupal allows users to register, login, logout, maintain user profiles, etc. No participant can use his own name to post content until he signs up for a user account.')); $output = user_admin_account(); } print theme('page', $output); @@ -1699,28 +1719,8 @@ function user_help($section) { global $user; switch ($section) { - case 'admin/user': - return t('

Drupal allows users to register, login, logout, maintain user profiles, etc. No participant can use his own name to post content until he signs up for a user account.

'); - case 'admin/user/create': - case 'admin/user/account/create': - return t('

This web page allows the administrators to register a new users by hand. Note that you cannot have a user where either the e-mail address or the username match another user in the system.

'); - case 'admin/access/rules': - return t('

Set up username and e-mail address access rules for new accounts. If a username or email address for a new account matches any deny rule, but not an allow rule, then the new account will not be allowed to be created.

'); - case 'admin/access': - return t('

In this area you will define the permissions for each user role (role names are defined on the user roles page). Each permission describes a fine-grained logical operation, such as being able to access the administration pages, or adding/modifying a user account. You could say a permission represents access granted to a user to perform a set of operations.

', array('%role' => url('admin/access/roles'))); - case 'admin/access/roles': - return t('

Roles allow you to fine tune the security and administration of drupal. A role defines a group of users that have certain privileges as defined in user permissions. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the role names of the various roles. To delete a role choose "edit".

By default, Drupal comes with two user roles:

- ', array('%permissions' => url('admin/access/permissions'))); - case 'admin/user/search': - return t('

Enter a simple pattern ("*" may be user as a wildcard match) to search for a username. For example, one may search for "br" and Drupal might return "brian", "brad", and "brenda".

'); case 'admin/modules#description': return t('Manages the user registration and login system.'); - case 'admin/user/configure': - case 'admin/user/configure/settings': - return t('

In order to use the full power of Drupal a visitor must sign up for an account. This page lets you setup how a user signs up, logs out, the guidelines from the system about user subscriptions, and the e-mails the system will send to the user.

'); case 'user/help#user': $site = variable_get('site_name', 'this website'); cvs diff: Diffing scripts cvs diff: Diffing sites cvs diff: Diffing sites/default Index: sites/default/settings.php =================================================================== RCS file: /cvs/drupal/drupal/sites/default/settings.php,v retrieving revision 1.16 diff -u -F^f -r1.16 settings.php --- sites/default/settings.php 14 Apr 2005 18:34:31 -0000 1.16 +++ sites/default/settings.php 19 Apr 2005 07:24:21 -0000 @@ -78,7 +78,7 @@ * $db_url = 'mysql://username:password@localhost/database'; * $db_url = 'pgsql://username:password@localhost/database'; */ -$db_url = 'mysql://username:password@localhost/database'; +$db_url = 'mysql://root:root@localhost:8889/drupalcvs'; $db_prefix = ''; /** @@ -87,7 +87,7 @@ * The URL of your website's main page. It is not allowed to have * a trailing slash; Drupal will add it for you. */ -$base_url = 'http://localhost'; +$base_url = 'http://localhost:8888/drupal'; /** * PHP settings: cvs diff: Diffing themes cvs diff: Diffing themes/bluemarine cvs diff: Diffing themes/chameleon Index: themes/chameleon/chameleon.theme =================================================================== RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v retrieving revision 1.25 diff -u -F^f -r1.25 chameleon.theme --- themes/chameleon/chameleon.theme 31 Mar 2005 09:25:33 -0000 1.25 +++ themes/chameleon/chameleon.theme 19 Apr 2005 07:24:21 -0000 @@ -74,6 +74,9 @@ function chameleon_page($content) { $output .= $tabs; } + if ($help1 = drupal_get_help()) { + $output .= '
'. $help1 .'
'; + } if ($help = menu_get_active_help()) { $output .= "
$help

"; } cvs diff: Diffing themes/chameleon/marvin cvs diff: Diffing themes/engines cvs diff: Diffing themes/engines/xtemplate cvs diff: Diffing themes/pushbutton