diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-08-23 18:27:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-08-23 18:27:05 +0000 |
commit | cefb123e24e29636a4bb845ff7be687782b960a0 (patch) | |
tree | 96d63c8cadfc01dd27bd185eefb7cfd31af47fd7 | |
parent | e98fe741a90344307c498637b7904a405f0ee3cc (diff) | |
download | brdo-cefb123e24e29636a4bb845ff7be687782b960a0.tar.gz brdo-cefb123e24e29636a4bb845ff7be687782b960a0.tar.bz2 |
- Updated the profile module to use the new help system. Patch by Michael.
-rw-r--r-- | modules/profile.module | 23 | ||||
-rw-r--r-- | modules/profile/profile.module | 23 |
2 files changed, 40 insertions, 6 deletions
diff --git a/modules/profile.module b/modules/profile.module index cb6dfb145..fbea78419 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -36,10 +36,27 @@ function _profile_init() { $GLOBALS["profile_months"] = array(0 => t("month"), 1 => t("January"), 2 => t("February"), 3 => t("March"), 4 => t("April"), 5 => t("May"), 6 => t("June"), 7 => t("July"), 8 => t("August"), 9 => t("September"), 10 => t("October"), 11 => t("November"), 12 => t("December")); } +function profile_help($section) { + $output = ""; + + switch ($section) { + case 'admin/system/modules': + $output = "Support for configurable user profiles."; + break; + case 'admin/system/modules/profile': + $output = strtr("When a user creates an account you can ask them to give you some extra information about themselves, as well as letting them use a small picture, called an avatar.<br />Notes:<ul><li>In order for a user to enter information you <b>must</b> check \"enable\".</li><li>In order for other people too see the entered information you must make it \"public\".</li><li>If an item is \"public\", but not enabled, the user can never give it a value and it will never be seen. Public does <b>not</b> imply \"enable\".</li><li>If an item is enabled, but not shown in the registration form the user will have to %edit to place information in the field.</ul>", array("%edit" => l(t("edit their account"), "user/edit") )); + break; + } + return t($output); +} + function profile_system($field) { - $system["description"] = t("Support for configurable user profiles."); - $system["admin_help"] = t("When a user creates an account you can ask them to give you some extra information about themselves, as well as letting them use a small picture, called an avatar.<br />Notes:<ul><li>In order for a user to enter information you <b>must</b> check \"enable\".</li><li>In order for other people too see the entered information you must make it \"public\".</li><li>If an item is \"public\", but not enabled, the user can never give it a value and it will never be seen. Public does <b>not</b> imply \"enable\".</li><li>If an item is enabled, but not shown in the registration form the user will have to ". l("edit their account", "user/edit") ." to place information in the field.</ul>"); - return $system[$field]; + $output = ""; + + if ($field == "description") {$output = profile_help("admin/system/modules"); } + else if ($field == "admin_help") {$output = profile_help("admin/system/modules/profile"); }; + + return $output; } function profile_settings() { diff --git a/modules/profile/profile.module b/modules/profile/profile.module index cb6dfb145..fbea78419 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -36,10 +36,27 @@ function _profile_init() { $GLOBALS["profile_months"] = array(0 => t("month"), 1 => t("January"), 2 => t("February"), 3 => t("March"), 4 => t("April"), 5 => t("May"), 6 => t("June"), 7 => t("July"), 8 => t("August"), 9 => t("September"), 10 => t("October"), 11 => t("November"), 12 => t("December")); } +function profile_help($section) { + $output = ""; + + switch ($section) { + case 'admin/system/modules': + $output = "Support for configurable user profiles."; + break; + case 'admin/system/modules/profile': + $output = strtr("When a user creates an account you can ask them to give you some extra information about themselves, as well as letting them use a small picture, called an avatar.<br />Notes:<ul><li>In order for a user to enter information you <b>must</b> check \"enable\".</li><li>In order for other people too see the entered information you must make it \"public\".</li><li>If an item is \"public\", but not enabled, the user can never give it a value and it will never be seen. Public does <b>not</b> imply \"enable\".</li><li>If an item is enabled, but not shown in the registration form the user will have to %edit to place information in the field.</ul>", array("%edit" => l(t("edit their account"), "user/edit") )); + break; + } + return t($output); +} + function profile_system($field) { - $system["description"] = t("Support for configurable user profiles."); - $system["admin_help"] = t("When a user creates an account you can ask them to give you some extra information about themselves, as well as letting them use a small picture, called an avatar.<br />Notes:<ul><li>In order for a user to enter information you <b>must</b> check \"enable\".</li><li>In order for other people too see the entered information you must make it \"public\".</li><li>If an item is \"public\", but not enabled, the user can never give it a value and it will never be seen. Public does <b>not</b> imply \"enable\".</li><li>If an item is enabled, but not shown in the registration form the user will have to ". l("edit their account", "user/edit") ." to place information in the field.</ul>"); - return $system[$field]; + $output = ""; + + if ($field == "description") {$output = profile_help("admin/system/modules"); } + else if ($field == "admin_help") {$output = profile_help("admin/system/modules/profile"); }; + + return $output; } function profile_settings() { |