Index: database/database.mysql =================================================================== RCS file: /cvs/drupal/drupal/database/database.mysql,v retrieving revision 1.189 diff -u -r1.189 database.mysql --- database/database.mysql 6 Jun 2005 18:59:36 -0000 1.189 +++ database/database.mysql 25 Jun 2005 16:07:55 -0000 @@ -123,7 +123,8 @@ delta varchar(32) NOT NULL default '0', status tinyint(2) DEFAULT '0' NOT NULL, weight tinyint(1) DEFAULT '0' NOT NULL, - region tinyint(1) DEFAULT '0' NOT NULL, + region varchar(64) DEFAULT 'left' NOT NULL, + themed tinyint(1) DEFAULT '0' NOT NULL, custom tinyint(2) DEFAULT '0' NOT NULL, throttle tinyint(1) DEFAULT '0' NOT NULL, visibility tinyint(1) DEFAULT '0' NOT NULL, Index: database/database.pgsql =================================================================== RCS file: /cvs/drupal/drupal/database/database.pgsql,v retrieving revision 1.128 diff -u -r1.128 database.pgsql --- database/database.pgsql 27 Jun 2005 04:45:36 -0000 1.128 +++ database/database.pgsql 27 Jun 2005 06:12:03 -0000 @@ -118,7 +118,8 @@ delta varchar(32) NOT NULL default '0', status smallint NOT NULL default '0', weight smallint NOT NULL default '0', - region smallint NOT NULL default '0', + region varchar(64) DEFAULT 'left' NOT NULL, + themed smallint NOT NULL default '0', custom smallint NOT NULL default '0', throttle smallint NOT NULL default '0', visibility smallint NOT NULL default '0', Index: database/updates.inc =================================================================== RCS file: /cvs/drupal/drupal/database/updates.inc,v retrieving revision 1.119 diff -u -r1.119 updates.inc --- database/updates.inc 14 May 2005 09:23:47 -0000 1.119 +++ database/updates.inc 27 Jun 2005 00:35:27 -0000 @@ -116,7 +116,8 @@ "2005-05-09" => "update_137", "2005-05-10" => "update_138", "2005-05-11" => "update_139", - "2005-05-12" => "update_140" + "2005-05-12" => "update_140", + "2005-06-26" => "update_141" ); function update_32() { @@ -2502,6 +2503,17 @@ return $ret; } +function update_141() { + $ret = array(); + + $ret[] = update_sql("ALTER TABLE {blocks} CHANGE region region varchar(64) default 'left' NOT NULL"); + $ret[] = update_sql("ALTER TABLE {blocks} ADD themed tinyint(1) DEFAULT '0' NOT NULL,"); + $ret[] = update_sql("UPDATE {blocks} SET region = 'left' WHERE region = '0'"); + $ret[] = update_sql("UPDATE {blocks} SET region = 'right' WHERE region = '1'"); + + return $ret; +} + function update_sql($sql) { $edit = $_POST["edit"]; $result = db_query($sql); Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.456 diff -u -r1.456 common.inc --- includes/common.inc 22 Jun 2005 20:19:57 -0000 1.456 +++ includes/common.inc 26 Jun 2005 21:30:08 -0000 @@ -25,6 +25,46 @@ define('SAVED_DELETED', 3); /** + * Set content for a specified region. + * + * @param $region + * Page region the content is assigned to. + * + * @param $data + * Content to be set. + */ +function drupal_set_content($region = null, $data = null) { + static $content = array(); + + if (!is_null($region) && !is_null($data)) { + $content[$region][] = $data; + } + return $content; +} + +/** + * Get assigned content. + * + * @param $region + * A specified region to fetch content for. If null, all regions will be returned. + * + * @param $joiner + * Content to be inserted between exploded array elements. + */ +function drupal_get_content($region = null, $joiner = "\n") { + $content = drupal_set_content(); + if (isset($region)) { + return explode ($joiner, $content[$region]); + } + else { + foreach ($content as $region) { + $content[$region] = explode ($joiner, $region); + } + return $content; + } +} + +/** * Set the breadcrumb trail for the current page. * * @param $breadcrumb Index: modules/block.module =================================================================== RCS file: /cvs/drupal/drupal/modules/block.module,v retrieving revision 1.170 diff -u -r1.170 block.module --- modules/block.module 22 May 2005 12:48:47 -0000 1.170 +++ modules/block.module 27 Jun 2005 03:16:40 -0000 @@ -14,7 +14,7 @@ case 'admin/help#block': return t('

Blocks are the boxes visible in the sidebar(s) of your web site. These are usually generated automatically by modules (e.g. recent forum topics), but you can also create your own blocks.

-

The sidebar each block appears in depends on both which theme you are using (some are left-only, some right, some both), and on the settings in block management.

+

The region each block appears in depends on both which theme you are using (some are left-only, some right, some both, and some may offer other regions), and on the settings in block management.

The block management screen lets you specify the vertical sort-order of the blocks within a sidebar. You do this by assigning a weight to each block. Lighter blocks (smaller weight) "float up" towards the top of the sidebar. Heavier ones "sink down" towards the bottom of it.

A block\'s visibility depends on: