diff options
author | Dries Buytaert <dries@buytaert.net> | 2000-12-29 11:00:56 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2000-12-29 11:00:56 +0000 |
commit | fd64164419060f4420ece6c7766c5693577f67ef (patch) | |
tree | 620f34c7b35cf1c468d121d34e7763d9422a7b63 /includes | |
parent | 10381949f8bf63608749754f9f348504179346d8 (diff) | |
download | brdo-fd64164419060f4420ece6c7766c5693577f67ef.tar.gz brdo-fd64164419060f4420ece6c7766c5693577f67ef.tar.bz2 |
Surprise, surprise. After nothing but code, a large batch of changes:
- removed droplets
- added (optional) admin_blocks module
- added (optional) affiliate module
- added (optional) about module (only placeholder, under construction)
- fixed some tiny bugs (e.g. quote bug in search.php)
- partionally rewrote some modules to be big, bad and better
- partionally rewrote some modules to be more uniform
- added GNU GPL license to CVS
Also:
- installed PHP 4.0.4 on my localhost and now working
towards PHP 4.0.4 compatibility.
- I think I'll baptize the engine "drupal". If you have a
better idea, try convincing me ASAP.
Todo:
- more testing (also with PHP 4.0.4)
- make "project"-module: download, info, blah blah
- complete documentation
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 1 | ||||
-rw-r--r-- | includes/droplet.inc | 22 | ||||
-rw-r--r-- | includes/theme.inc | 14 |
3 files changed, 11 insertions, 26 deletions
diff --git a/includes/common.inc b/includes/common.inc index 7886b9b65..f077658ee 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -4,7 +4,6 @@ include_once "includes/". getenv("HTTP_HOST") .".conf"; include_once "includes/database.inc"; include_once "includes/watchdog.inc"; include_once "includes/function.inc"; -include_once "includes/droplet.inc"; include_once "includes/module.inc"; include_once "includes/theme.inc"; include_once "includes/user.inc"; diff --git a/includes/droplet.inc b/includes/droplet.inc deleted file mode 100644 index 3f1f3b209..000000000 --- a/includes/droplet.inc +++ /dev/null @@ -1,22 +0,0 @@ -<? - -function droplet_get($name) { - $result = db_query("SELECT * FROM droplets WHERE name = '$name'"); - - if ($droplet = db_fetch_object($result)) { - return eval($droplet->code); - } - else { - watchdog("error", "droplet '$name' does not exist"); - } -} - -function droplet_add($name, $help, $code, $message = "") { - $result = db_query("INSERT INTO droplets (name, help, code) VALUES ('". check_input($name) ."', '". check_input($help) ."', '". check_code($code) ."')"); -} - -function droplet_delete($id) { - $result = db_query("DELETE FROM droplets WHERE id = $id"); -} - -?> diff --git a/includes/theme.inc b/includes/theme.inc index fd842e68a..7c93ec775 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -45,7 +45,7 @@ function theme_account($theme) { function theme_main_blocks($theme) { - global $PHP_SELF, $user, $id; + global $id, $PHP_SELF, $user; switch (strtok($PHP_SELF, ".")) { case "/discussion": @@ -53,6 +53,14 @@ function theme_main_blocks($theme) { if ($story->status == 1) theme_moderation_results($theme, $story); else theme_new_headlines($theme); break; + case "/index": + theme_account($theme); + $result = db_query("SELECT * FROM blocks WHERE status = 2"); + while ($block = db_fetch_object($result)) { + $blocks = module_execute($block->module, "block"); + $theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]); + } + break; default: theme_account($theme); } @@ -63,8 +71,8 @@ function theme_user_blocks($theme) { if ($user->id && strstr($PHP_SELF, "index.php")) { $result = db_query("SELECT * FROM layout l LEFT JOIN blocks b ON l.block = b.name WHERE l.user = '$user->id' AND l.weight > 0 AND b.status = '1' ORDER BY weight"); while ($block = db_fetch_object($result)) { - $blocks = module_execute($block->module, "block"); - $theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]); + $blocks = module_execute($block->module, "block"); + $theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]); } } } |