summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-04-28 21:36:43 +0000
committerDries Buytaert <dries@buytaert.net>2003-04-28 21:36:43 +0000
commitdb046504117867ebc2454d856f562bbe30bbe48b (patch)
tree4e612474c9bc530a35380004dc7ab02b9d31ea52
parent4a9e233d7569c56d67fa5cbe597e5b0d03dcaa04 (diff)
downloadbrdo-db046504117867ebc2454d856f562bbe30bbe48b.tar.gz
brdo-db046504117867ebc2454d856f562bbe30bbe48b.tar.bz2
- Added support for user registration guidelines. Patch by Al. Feature request #1109.
-rw-r--r--modules/title.module16
-rw-r--r--modules/user.module2
-rw-r--r--modules/user/user.module2
3 files changed, 12 insertions, 8 deletions
diff --git a/modules/title.module b/modules/title.module
index 686bfd66b..693a9361f 100644
--- a/modules/title.module
+++ b/modules/title.module
@@ -14,18 +14,18 @@ function title_page() {
if (db_num_rows($result) == 0) {
// No node with exact title found, try substring.
$result = db_query("SELECT n.* FROM node n WHERE n.title LIKE '%". check_query($title). "%' AND n.status = 1 ORDER BY created DESC");
- }
- if (db_num_rows($result) == 0 && module_exist("search")) {
+ }
+ if (db_num_rows($result) == 0 && module_exist("search")) {
// still no matches ... return a full text search
search_view($title);
}
- else if (db_num_rows($result) == 1) {
+ else if (db_num_rows($result) == 1) {
$node = db_fetch_object($result);
-
+
theme("header");
print node_show($node->nid, NULL);
theme("footer");
- }
+ }
else {
$header = array(t("Type"), t("Title"), t("Author"));
while ($node = db_fetch_object($result)) {
@@ -34,8 +34,8 @@ function title_page() {
$author = format_name($node);
$rows[] = array(array("data" => $type, "class" => "type"), array("data" => $title, "class" => "content"), array("data" => $author, "class" => "author"));
}
-
- $output = "<div id=\"title\">";
+
+ $output = "<div id=\"title\">";
$output .= table($header, $rows);
$output .= "</div>";
@@ -73,6 +73,6 @@ function title_compose_tips() {
if (variable_get("title_filter_link", 0)) {
return array(t("You may quickly link to another node using this syntax: <i>[node title|text]</i>. This will generate a link labeled 'text' to the node with the title 'node title'. If you omit '|text', the label becomes 'node title'."));
}
-}
+}
?>
diff --git a/modules/user.module b/modules/user.module
index edfae5e83..66bcd51a3 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -841,6 +841,7 @@ function user_register($edit = array()) {
}
// display the registration form
+ $output .= variable_get("user_registration_help", "");
$affiliates = user_auth_help_links();
if (count($affiliates) > 0) {
$affiliates = implode(", ", $affiliates);
@@ -1124,6 +1125,7 @@ function user_settings() {
$output .= form_select(t("Public registrations"), "user_register", variable_get("user_register", 1), array(t("Only site administrators can create new user accounts."), t("Visitors can create accounts and no administrator approval is required."), t("Visitors can create accounts but administrator approval is required.")));
$output .= form_textfield(t("Password words"), "user_password", variable_get("user_password", "foo,bar,guy,neo,tux,moo,sun,asm,dot,god,axe,geek,nerd,fish,hack,star,mice,warp,moon,hero,cola,girl,fish,java,perl,boss,dark,sith,jedi,drop,mojo"), 55, 256, t("A comma separated list of short words that can be concatenated to generate human-readable passwords."));
$output .= form_select(t("Remember authenticated users"), "user_remember", variable_get("user_remember", 0), array(t("Let the user decide whether he should be logged out when leaving the site."), t("Authenticated users are not logged out upon leaving the site."), t("Authenticated users are logged out upon leaving the site.")));
+ $output .= form_textarea(t("User registration guidelines"), "user_registration_help", variable_get("user_registration_help", ""), 70, 4, t("This text is displayed at the top of the user registration form. It's useful for helping or instructing your users."));
$output .= form_textfield(t("Subject of welcome e-mail"), "user_mail_welcome_subject", variable_get("user_mail_welcome_subject", "User account details for %username at %site"), 70, 180, t("Customize the subject of your welcome e-mail, which is sent to new members upon registering.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea(t("Body of welcome e-mail"), "user_mail_welcome_body", variable_get("user_mail_welcome_body", t("%username,\n\nThank you for registering at %site. You may now login to ". url("user/login") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at ". url("user/edit") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, t("Customize the body of the welcome e-mail, which is sent to new members upon registering.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto");
$output .= form_textfield(t("Subject of password recovery e-mail"), "user_mail_pass_subject", variable_get("user_mail_pass_subject", t("Replacement login information for %username at %site")), 70, 180, t("Customize the Subject of your forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");
diff --git a/modules/user/user.module b/modules/user/user.module
index edfae5e83..66bcd51a3 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -841,6 +841,7 @@ function user_register($edit = array()) {
}
// display the registration form
+ $output .= variable_get("user_registration_help", "");
$affiliates = user_auth_help_links();
if (count($affiliates) > 0) {
$affiliates = implode(", ", $affiliates);
@@ -1124,6 +1125,7 @@ function user_settings() {
$output .= form_select(t("Public registrations"), "user_register", variable_get("user_register", 1), array(t("Only site administrators can create new user accounts."), t("Visitors can create accounts and no administrator approval is required."), t("Visitors can create accounts but administrator approval is required.")));
$output .= form_textfield(t("Password words"), "user_password", variable_get("user_password", "foo,bar,guy,neo,tux,moo,sun,asm,dot,god,axe,geek,nerd,fish,hack,star,mice,warp,moon,hero,cola,girl,fish,java,perl,boss,dark,sith,jedi,drop,mojo"), 55, 256, t("A comma separated list of short words that can be concatenated to generate human-readable passwords."));
$output .= form_select(t("Remember authenticated users"), "user_remember", variable_get("user_remember", 0), array(t("Let the user decide whether he should be logged out when leaving the site."), t("Authenticated users are not logged out upon leaving the site."), t("Authenticated users are logged out upon leaving the site.")));
+ $output .= form_textarea(t("User registration guidelines"), "user_registration_help", variable_get("user_registration_help", ""), 70, 4, t("This text is displayed at the top of the user registration form. It's useful for helping or instructing your users."));
$output .= form_textfield(t("Subject of welcome e-mail"), "user_mail_welcome_subject", variable_get("user_mail_welcome_subject", "User account details for %username at %site"), 70, 180, t("Customize the subject of your welcome e-mail, which is sent to new members upon registering.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea(t("Body of welcome e-mail"), "user_mail_welcome_body", variable_get("user_mail_welcome_body", t("%username,\n\nThank you for registering at %site. You may now login to ". url("user/login") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at ". url("user/edit") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, t("Customize the body of the welcome e-mail, which is sent to new members upon registering.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto");
$output .= form_textfield(t("Subject of password recovery e-mail"), "user_mail_pass_subject", variable_get("user_mail_pass_subject", t("Replacement login information for %username at %site")), 70, 180, t("Customize the Subject of your forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");