- Updated the profile module to use the new help system. Patch by Michael.

4.3.x
Dries Buytaert 2003-08-23 18:27:05 +00:00
parent e98fe741a9
commit cefb123e24
2 changed files with 40 additions and 6 deletions

View File

@ -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() {

View File

@ -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() {