summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-02-17 22:33:31 +0000
committerDries Buytaert <dries@buytaert.net>2003-02-17 22:33:31 +0000
commit52314ddc321a3895b4ea70afc43968c87aebf01e (patch)
tree4339567d47801790a322532c5537bdd03d1d685f
parent465a5987702668321d2a1bde11ac6fa59e62f7d6 (diff)
downloadbrdo-52314ddc321a3895b4ea70afc43968c87aebf01e.tar.gz
brdo-52314ddc321a3895b4ea70afc43968c87aebf01e.tar.bz2
- Theme options patch. See mailing list.
-rw-r--r--modules/blog.module2
-rw-r--r--modules/blog/blog.module2
-rw-r--r--modules/forum.module2
-rw-r--r--modules/forum/forum.module2
-rw-r--r--modules/story.module2
-rw-r--r--modules/story/story.module2
-rw-r--r--modules/system.module16
-rw-r--r--modules/system/system.module16
-rw-r--r--modules/user.module4
-rw-r--r--modules/user/user.module4
-rw-r--r--themes/xtemplate/xtemplate.css13
-rw-r--r--themes/xtemplate/xtemplate.theme20
-rw-r--r--themes/xtemplate/xtemplate.xtmpl22
13 files changed, 71 insertions, 36 deletions
diff --git a/modules/blog.module b/modules/blog.module
index 6917baa5b..4d92d2d65 100644
--- a/modules/blog.module
+++ b/modules/blog.module
@@ -7,7 +7,7 @@ function blog_system($field){
}
function blog_settings() {
- $output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 55, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users."));
+ $output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 70, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users."));
$words = t("words");
$output .= form_select(t("Minimum number of words in a blog entry"), "minimum_blog_size", variable_get("minimum_blog_size", 0), array(0 => "0 $words", 10 => "10 $words", 25 => "25 $words", 50 => "50 $words", 75 => "75 $words", 100 => "100 $words", 125 => "125 $words", 150 => "150 $words", 175 => "175 $words", 200 => "200 $words"), t("The minimum number of words a personal blog entry should contain. This is useful to rule out submissions that do not meet the site's standards, such as short test posts."));
return $output;
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 6917baa5b..4d92d2d65 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -7,7 +7,7 @@ function blog_system($field){
}
function blog_settings() {
- $output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 55, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users."));
+ $output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 70, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users."));
$words = t("words");
$output .= form_select(t("Minimum number of words in a blog entry"), "minimum_blog_size", variable_get("minimum_blog_size", 0), array(0 => "0 $words", 10 => "10 $words", 25 => "25 $words", 50 => "50 $words", 75 => "75 $words", 100 => "100 $words", 125 => "125 $words", 150 => "150 $words", 175 => "175 $words", 200 => "200 $words"), t("The minimum number of words a personal blog entry should contain. This is useful to rule out submissions that do not meet the site's standards, such as short test posts."));
return $output;
diff --git a/modules/forum.module b/modules/forum.module
index 55d0b7cd0..753170dc7 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -35,7 +35,7 @@ function forum_settings() {
}
if ($voc) {
- $output .= form_textarea("Explanation or submission guidelines", "forum_help", variable_get("forum_help", ""), 55, 4, t("This text will be displayed at the top of the forum submission form. Useful for helping or instructing your users."));
+ $output .= form_textarea("Explanation or submission guidelines", "forum_help", variable_get("forum_help", ""), 70, 5, t("This text will be displayed at the top of the forum submission form. Useful for helping or instructing your users."));
$output .= form_select("Forum vocabulary", "forum_nav_vocabulary", variable_get("forum_nav_vocabulary", ""), $vocs, t("The taxonomy vocabulary that will be used as the navigation tree."));
$output .= _taxonomy_term_select("Containers", "forum_containers", variable_get("forum_containers", array()), variable_get("forum_nav_vocabulary", ""), t("You can choose forums which will not have topics, but will be just containers for other forums."), 1, t("<none>"));
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 55d0b7cd0..753170dc7 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -35,7 +35,7 @@ function forum_settings() {
}
if ($voc) {
- $output .= form_textarea("Explanation or submission guidelines", "forum_help", variable_get("forum_help", ""), 55, 4, t("This text will be displayed at the top of the forum submission form. Useful for helping or instructing your users."));
+ $output .= form_textarea("Explanation or submission guidelines", "forum_help", variable_get("forum_help", ""), 70, 5, t("This text will be displayed at the top of the forum submission form. Useful for helping or instructing your users."));
$output .= form_select("Forum vocabulary", "forum_nav_vocabulary", variable_get("forum_nav_vocabulary", ""), $vocs, t("The taxonomy vocabulary that will be used as the navigation tree."));
$output .= _taxonomy_term_select("Containers", "forum_containers", variable_get("forum_containers", array()), variable_get("forum_nav_vocabulary", ""), t("You can choose forums which will not have topics, but will be just containers for other forums."), 1, t("<none>"));
diff --git a/modules/story.module b/modules/story.module
index 7c57fa115..047b8b0d5 100644
--- a/modules/story.module
+++ b/modules/story.module
@@ -13,7 +13,7 @@ function story_system($field){
}
function story_settings() {
- $output .= form_textarea("Explanation or submission guidelines", "story_help", variable_get("story_help", ""), 55, 4, "This text will be displayed at the top of the story submission form. Useful for helping or instructing your users.");
+ $output .= form_textarea("Explanation or submission guidelines", "story_help", variable_get("story_help", ""), 70, 5, "This text will be displayed at the top of the story submission form. Useful for helping or instructing your users.");
$output .= form_select(t("Minimum number of words"), "minimum_story_size", variable_get("minimum_story_size", 0), array(0 => "0 words", 10 => "10 words", 25 => "25 words", 50 => "50 words", 75 => "75 words", 100 => "100 words", 125 => "125 words", 150 => "150 words", 175 => "175 words", 200 => "200 words"), t("The minimum number of words a personal story entry should consist of. This can be useful to rule out submissions that do not meet the site's standards, such as short test posts."));
return $output;
diff --git a/modules/story/story.module b/modules/story/story.module
index 7c57fa115..047b8b0d5 100644
--- a/modules/story/story.module
+++ b/modules/story/story.module
@@ -13,7 +13,7 @@ function story_system($field){
}
function story_settings() {
- $output .= form_textarea("Explanation or submission guidelines", "story_help", variable_get("story_help", ""), 55, 4, "This text will be displayed at the top of the story submission form. Useful for helping or instructing your users.");
+ $output .= form_textarea("Explanation or submission guidelines", "story_help", variable_get("story_help", ""), 70, 5, "This text will be displayed at the top of the story submission form. Useful for helping or instructing your users.");
$output .= form_select(t("Minimum number of words"), "minimum_story_size", variable_get("minimum_story_size", 0), array(0 => "0 words", 10 => "10 words", 25 => "25 words", 50 => "50 words", 75 => "75 words", 100 => "100 words", 125 => "125 words", 150 => "150 words", 175 => "175 words", 200 => "200 words"), t("The minimum number of words a personal story entry should consist of. This can be useful to rule out submissions that do not meet the site's standards, such as short test posts."));
return $output;
diff --git a/modules/system.module b/modules/system.module
index eac2ef928..5dc00dbfc 100644
--- a/modules/system.module
+++ b/modules/system.module
@@ -38,7 +38,7 @@ function system_link($type) {
menu_add("module selector", url("admin/system/modules/selector"), "Module selector.", NULL, "site configuration", 1);
menu_add("module settings", url("admin/system/modules/settings"), "Site settings.", NULL, "site configuration", 2);
menu_add("theme selector", url("admin/system/themes/selector"), "Theme selector.", NULL, "site configuration", 3);
- // menu_add("theme settings", url("admin/system/themes/settings"), "Theme selector.", NULL, "site configuration", 4);
+ menu_add("theme settings", url("admin/system/themes/settings"), "Theme selector.", NULL, "site configuration", 4);
menu_add("content filters", url("admin/system/filters"), "Content filters.", NULL, "site configuration", 5);
menu_add("help", url("admin/system/help"), "Help.", NULL, "site configuration", 9);
}
@@ -49,12 +49,12 @@ function system_view_modules() {
// general settings:
$output .= "<h3>" . t("General settings") . "</h3>\n";
- $output .= form_textfield(t("Name"), "site_name", variable_get("site_name", "drupal"), 55, 55, t("The name of this website."));
- $output .= form_textfield(t("E-mail address"), "site_mail", variable_get("site_mail", ini_get("sendmail_from")), 55, 128, t("A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc."));
- $output .= form_textfield(t("Slogan"), "site_slogan", variable_get("site_slogan", ""), 55, 128, t("The slogan of this website. Some themes display a slogan when available."));
- $output .= form_textarea(t("Mission"), "site_mission", variable_get("site_mission", ""), 55, 5, t("Your site's mission statement or focus."));
- $output .= form_textarea(t("Footer message"), "site_footer", variable_get("site_footer", ""), 55, 5, t("This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages."));
- $output .= form_textfield(t("Anonymous user"), "anonymous", variable_get("anonymous", "Anonymous"), 55, 55, t("The name used to indicate anonymous users."));
+ $output .= form_textfield(t("Name"), "site_name", variable_get("site_name", "drupal"), 70, 70, t("The name of this website."));
+ $output .= form_textfield(t("E-mail address"), "site_mail", variable_get("site_mail", ini_get("sendmail_from")), 70, 128, t("A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc."));
+ $output .= form_textfield(t("Slogan"), "site_slogan", variable_get("site_slogan", ""), 70, 128, t("The slogan of this website. Some themes display a slogan when available."));
+ $output .= form_textarea(t("Mission"), "site_mission", variable_get("site_mission", ""), 70, 5, t("Your site's mission statement or focus."));
+ $output .= form_textarea(t("Footer message"), "site_footer", variable_get("site_footer", ""), 70, 5, t("This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages."));
+ $output .= form_textfield(t("Anonymous user"), "anonymous", variable_get("anonymous", "Anonymous"), 70, 70, t("The name used to indicate anonymous users."));
foreach (module_list() as $name) { if (module_hook($name, "page")) $pages[$name] = $name; }
$output .= form_select(t("Default front page"), "site_frontpage", variable_get("site_frontpage", "node"), $pages, t("The home page displays content from this module (usually node)."));
$output .= form_select(t("Clean URLs"), "clean_url", variable_get("clean_url", 0), array(t("Disabled"), t("Enabled")), t("Enable or disable clean URLs. If enabled, you'll need <code>ModRewrite</code> support. See also the <code>.htaccess</code> file in Drupal's top-level directory."));
@@ -124,7 +124,7 @@ function system_view_modules() {
function system_view_themes() {
foreach (theme_list() as $theme) {
include_once "$theme->filename";
- $function = $theme->name ."_options";
+ $function = $theme->name ."_settings";
if (function_exists($function)) {
$output .= "<h3><a name=\"$theme->name\">". ucfirst(t("$theme->name")) ." " . t("settings") . "</a></h3>". $function() ."<hr />\n";
}
diff --git a/modules/system/system.module b/modules/system/system.module
index eac2ef928..5dc00dbfc 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -38,7 +38,7 @@ function system_link($type) {
menu_add("module selector", url("admin/system/modules/selector"), "Module selector.", NULL, "site configuration", 1);
menu_add("module settings", url("admin/system/modules/settings"), "Site settings.", NULL, "site configuration", 2);
menu_add("theme selector", url("admin/system/themes/selector"), "Theme selector.", NULL, "site configuration", 3);
- // menu_add("theme settings", url("admin/system/themes/settings"), "Theme selector.", NULL, "site configuration", 4);
+ menu_add("theme settings", url("admin/system/themes/settings"), "Theme selector.", NULL, "site configuration", 4);
menu_add("content filters", url("admin/system/filters"), "Content filters.", NULL, "site configuration", 5);
menu_add("help", url("admin/system/help"), "Help.", NULL, "site configuration", 9);
}
@@ -49,12 +49,12 @@ function system_view_modules() {
// general settings:
$output .= "<h3>" . t("General settings") . "</h3>\n";
- $output .= form_textfield(t("Name"), "site_name", variable_get("site_name", "drupal"), 55, 55, t("The name of this website."));
- $output .= form_textfield(t("E-mail address"), "site_mail", variable_get("site_mail", ini_get("sendmail_from")), 55, 128, t("A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc."));
- $output .= form_textfield(t("Slogan"), "site_slogan", variable_get("site_slogan", ""), 55, 128, t("The slogan of this website. Some themes display a slogan when available."));
- $output .= form_textarea(t("Mission"), "site_mission", variable_get("site_mission", ""), 55, 5, t("Your site's mission statement or focus."));
- $output .= form_textarea(t("Footer message"), "site_footer", variable_get("site_footer", ""), 55, 5, t("This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages."));
- $output .= form_textfield(t("Anonymous user"), "anonymous", variable_get("anonymous", "Anonymous"), 55, 55, t("The name used to indicate anonymous users."));
+ $output .= form_textfield(t("Name"), "site_name", variable_get("site_name", "drupal"), 70, 70, t("The name of this website."));
+ $output .= form_textfield(t("E-mail address"), "site_mail", variable_get("site_mail", ini_get("sendmail_from")), 70, 128, t("A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc."));
+ $output .= form_textfield(t("Slogan"), "site_slogan", variable_get("site_slogan", ""), 70, 128, t("The slogan of this website. Some themes display a slogan when available."));
+ $output .= form_textarea(t("Mission"), "site_mission", variable_get("site_mission", ""), 70, 5, t("Your site's mission statement or focus."));
+ $output .= form_textarea(t("Footer message"), "site_footer", variable_get("site_footer", ""), 70, 5, t("This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages."));
+ $output .= form_textfield(t("Anonymous user"), "anonymous", variable_get("anonymous", "Anonymous"), 70, 70, t("The name used to indicate anonymous users."));
foreach (module_list() as $name) { if (module_hook($name, "page")) $pages[$name] = $name; }
$output .= form_select(t("Default front page"), "site_frontpage", variable_get("site_frontpage", "node"), $pages, t("The home page displays content from this module (usually node)."));
$output .= form_select(t("Clean URLs"), "clean_url", variable_get("clean_url", 0), array(t("Disabled"), t("Enabled")), t("Enable or disable clean URLs. If enabled, you'll need <code>ModRewrite</code> support. See also the <code>.htaccess</code> file in Drupal's top-level directory."));
@@ -124,7 +124,7 @@ function system_view_modules() {
function system_view_themes() {
foreach (theme_list() as $theme) {
include_once "$theme->filename";
- $function = $theme->name ."_options";
+ $function = $theme->name ."_settings";
if (function_exists($function)) {
$output .= "<h3><a name=\"$theme->name\">". ucfirst(t("$theme->name")) ." " . t("settings") . "</a></h3>". $function() ."<hr />\n";
}
diff --git a/modules/user.module b/modules/user.module
index 6cb02d04e..a51523b94 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -1123,9 +1123,9 @@ 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_textfield(t("Subject of welcome e-mail"), "user_mail_welcome_subject", variable_get("user_mail_welcome_subject", "User account details for %username at %site"), 80, 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_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 %uri". 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 %uri". 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")), 80, 180, t("Customize the Subject of your forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");
+ $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");
$output .= form_textarea(t("Body of password recovery e-mail"), "user_mail_pass_body", variable_get("user_mail_pass_body", t("%username,\n\nHere is your new password for %site. You may now login to %uri". 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 %uri". 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 forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto");
return $output;
diff --git a/modules/user/user.module b/modules/user/user.module
index 6cb02d04e..a51523b94 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1123,9 +1123,9 @@ 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_textfield(t("Subject of welcome e-mail"), "user_mail_welcome_subject", variable_get("user_mail_welcome_subject", "User account details for %username at %site"), 80, 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_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 %uri". 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 %uri". 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")), 80, 180, t("Customize the Subject of your forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");
+ $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");
$output .= form_textarea(t("Body of password recovery e-mail"), "user_mail_pass_body", variable_get("user_mail_pass_body", t("%username,\n\nHere is your new password for %site. You may now login to %uri". 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 %uri". 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 forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto");
return $output;
diff --git a/themes/xtemplate/xtemplate.css b/themes/xtemplate/xtemplate.css
index f4014fac0..612e82c18 100644
--- a/themes/xtemplate/xtemplate.css
+++ b/themes/xtemplate/xtemplate.css
@@ -49,12 +49,23 @@ img {
font-weight: bold;
}
.menu #links #secondary {
- font-size: 0.7em;
+ font-size: 0.9em;
+ margin-bottom: 12px;
}
.menu #links #secondary a {
color: #9cf;
font-weight: bold;
}
+#secondary form {
+ display: inline;
+}
+#secondary form .keys {
+ width: 12em;
+ margin-left: 1em;
+}
+#secondary input {
+ font-size: 1.1em;
+}
#message {
background-color: #369;
padding: 10px 10px 10px 10px;
diff --git a/themes/xtemplate/xtemplate.theme b/themes/xtemplate/xtemplate.theme
index 246acdc83..689fd2bf0 100644
--- a/themes/xtemplate/xtemplate.theme
+++ b/themes/xtemplate/xtemplate.theme
@@ -1,5 +1,13 @@
<?php
+function xtemplate_settings() {
+ $output = form_textarea("Message on front page", "xtemplate_message", variable_get("xtemplate_message", "edit message"), 70, 6, "This text will be displayed on the front page. It can be used to display a mission statement, announcement or site description..");
+ $output .= form_textarea("Primary links", "xtemplate_primary_links", variable_get("xtemplate_primary_links", l("edit primary links", "admin/system/themes/settings")), 70, 6, "The primary links.");
+ $output .= form_textarea("Secondary links", "xtemplate_secondary_links", variable_get("xtemplate_secondary_links", l("edit secondary links", "admin/system/themes/settings")), 70, 6, "The secondary links.");
+ $output .= form_select("Search box", "xtemplate_search_box", variable_get("xtemplate_search_box", 0), array(t("Disabled"), t("Enabled")), "Show a search box in the upper right corner.");
+ return $output;
+}
+
class Theme_xtemplate extends BaseTheme {
function system($field) {
@@ -66,10 +74,20 @@ class Theme_xtemplate extends BaseTheme {
"title" => ($title ? $title." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")),
"head" => theme_head(),
"base" => "$base_url/",
- "links" => $this->links(link_page())
+ "primary_links" => variable_get("xtemplate_primary_links", l("edit primary links", "admin/system/themes/settings")),
+ "secondary_links" => variable_get("xtemplate_secondary_links", l("edit secondary links", "admin/system/themes/settings"))
));
+ if (variable_get("xtemplate_search_box", 1)) {
+ $this->template->assign(array(
+ //"search" => search_form(),
+ "search_url" => url("search"),
+ "search_button_text" => t("Search")
+ ));
+ $this->template->parse("header.search_box");
+ }
if (!arg(0)) {
+ $this->template->assign("message", variable_get("xtemplate_message", l("edit message", "admin/system/themes/settings")));
$this->template->parse("header.message");
}
diff --git a/themes/xtemplate/xtemplate.xtmpl b/themes/xtemplate/xtemplate.xtmpl
index 194a67c90..f87f59e6e 100644
--- a/themes/xtemplate/xtemplate.xtmpl
+++ b/themes/xtemplate/xtemplate.xtmpl
@@ -19,22 +19,31 @@
<tr>
<td colspan="2" class="menu">
<span id="links">
- <div id="secondary">secondary links</div>
- <div id="primary">primary links<br />{links}</div>
+ <div id="secondary">
+ {secondary_links}
+ <!-- BEGIN: search_box -->
+ <form action="{search_url}" method="post">
+ <input class="keys" type="text" size="50" value="" name="keys" />
+ <input type="submit" value="{search_button_text}" />
+ </form>
+ <!-- END: search_box -->
+ </div>
+ <div id="primary">{primary_links}</div>
+ </span>
+ <span id="logo">
+ <a href="./"><img src="themes/xtemplate/images/druplicon.gif" alt="" /></a>
</span>
- <span id="logo"><a href="index.php"><img src="themes/xtemplate/images/druplicon.gif" alt="" /></a></span>
</td>
</tr>
<tr>
<td valign="top" width="100%">
<!-- BEGIN: message -->
- <div id="message">Site description or mission statement - edit this text along with the primary and secondary links in the file 'themes/xtemplate/xtemplate.xtmpl'.</div>
+ <div id="message">{message}</div>
<!-- END: message -->
<div id="main">
<!-- END: header -->
-
<!-- BEGIN: node -->
<div class="node">
<div class="title">{title}</div>
@@ -64,7 +73,6 @@
</div>
<!-- END: comment_old -->
-
<!-- BEGIN: box -->
<div class="box">
<div class="title">{subject}</div>
@@ -72,7 +80,6 @@
</div>
<!-- END: box -->
-
<!-- BEGIN: block -->
<div class="block">
<div class="title">{subject}</div>
@@ -80,7 +87,6 @@
</div>
<!-- END: block -->
-
<!-- BEGIN: footer -->
</div><!-- main -->
</td>