diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-10-20 20:58:59 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-10-20 20:58:59 +0000 |
commit | 3b7425aefb77641468a2183e83481e644b4eb9d6 (patch) | |
tree | 8a3bdc78c17d30db8c959ca022310f0e056504b5 | |
parent | 83c5209c151a7c4ad062355d8b59114eed41a4b7 (diff) | |
download | brdo-3b7425aefb77641468a2183e83481e644b4eb9d6.tar.gz brdo-3b7425aefb77641468a2183e83481e644b4eb9d6.tar.bz2 |
- added a new configuration option that lets you set various index.php
variables.
Example: set site_frontpage to "node" and site_frontpage_extra to
"$meta = 'news'" and only nodes with that meta tag will be displayed on
your main page.
This requires some internal knowledge of how the various modules work
and what settings can be passed to <module>_page() functions.
-rw-r--r-- | index.php | 1 | ||||
-rw-r--r-- | modules/system.module | 1 | ||||
-rw-r--r-- | modules/system/system.module | 1 |
3 files changed, 3 insertions, 0 deletions
@@ -5,6 +5,7 @@ include_once "includes/common.inc"; page_header(); +eval(variable_get("site_frontpage_extra", "") .";"); $function = variable_get("site_frontpage", "node") ."_page"; $function(); diff --git a/modules/system.module b/modules/system.module index 09d7615ed..e6c92496a 100644 --- a/modules/system.module +++ b/modules/system.module @@ -38,6 +38,7 @@ function system_view_options() { $output .= form_textfield("Password words", "account_words", variable_get("account_words", "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, "Words used in the creation of passwords. Comma seperated list."); foreach (module_list() as $name) { if (module_hook($name, "page")) $pages[$name] = $name; } $output .= form_select("Default front page", "site_frontpage", variable_get("site_frontpage", "node"), $pages, "The default front page."); + $output .= form_textfield("Extra front page settings", "site_frontpage_extra", variable_get("site_frontpage_extra", ""), 55, 128, "Lets you define additonal variables for the main page in PHP."); $output .= "<hr />\n"; // caching: diff --git a/modules/system/system.module b/modules/system/system.module index 09d7615ed..e6c92496a 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -38,6 +38,7 @@ function system_view_options() { $output .= form_textfield("Password words", "account_words", variable_get("account_words", "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, "Words used in the creation of passwords. Comma seperated list."); foreach (module_list() as $name) { if (module_hook($name, "page")) $pages[$name] = $name; } $output .= form_select("Default front page", "site_frontpage", variable_get("site_frontpage", "node"), $pages, "The default front page."); + $output .= form_textfield("Extra front page settings", "site_frontpage_extra", variable_get("site_frontpage_extra", ""), 55, 128, "Lets you define additonal variables for the main page in PHP."); $output .= "<hr />\n"; // caching: |