? .taxonomy.module.marks
Index: book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book.module,v
retrieving revision 1.314
diff -U3 -r1.314 book.module
--- book.module 30 Aug 2005 15:22:29 -0000 1.314
+++ book.module 3 Sep 2005 21:28:16 -0000
@@ -485,45 +485,51 @@
}
$node->breadcrumb[] = array('path' => 'node/'. $node->nid);
- if ($node->nid) {
- $output .= '
';
-
- if ($tree = book_tree($node->nid)) {
- $output .= '
'. $tree .'
';
- }
+ // Construct the links and titles
+ $prev = book_prev($node);
+ $next = book_next($node);
+ if ($prev) {
+ $links .= '
';
+ $links .= l(t('previous'), 'node/'. $prev->nid, array('title' => t('View the previous page.')));
+ $links .= '
';
+ $titles .= '
'. check_plain($prev->title) .'
';
+ }
+ elseif($next) {
+ // Make an empty div to fill the space only if there are $next links
+ $links .= '
';
+ }
+
+ if ($next) {
+ $links .= '
';
+ $links .= l(t('next'), 'node/'. $next->nid, array('title' => t('View the next page.')));
+ $links .= '
';
+ $titles .= '
'. check_plain($next->title) .'
';
+ }
+ elseif($prev) {
+ // Make an empty div to fill the space only if there are $prev links
+ $links .= '
';
+ }
+
+ if ($node->parent) {
+ $links .= '
';
+ $links .= l(t('up'), 'node/'. $node->parent, array('title' => t('View this page\'s parent section.')));
+ $links .= '
';
+ }
- if ($prev = book_prev($node)) {
- $links .= '
';
- $links .= l(t('previous'), 'node/'. $prev->nid, array('title' => t('View the previous page.')));
- $links .= '
';
- $titles .= '
'. check_plain($prev->title) .'
';
- }
- else {
- $links .= '
'; // Make an empty div to fill the space.
- }
- if ($next = book_next($node)) {
- $links .= '
';
- $links .= l(t('next'), 'node/'. $next->nid, array('title' => t('View the next page.')));
- $links .= '
';
- $titles .= '
'. check_plain($next->title) .'
';
- }
- else {
- $links .= '
'; // Make an empty div to fill the space.
- }
- if ($node->parent) {
- $links .= '
';
- $links .= l(t('up'), 'node/'. $node->parent, array('title' => t('View this page\'s parent section.')));
- $links .= '
';
- }
+ if ($tree = book_tree($node->nid)) {
+ $output = '
'. $tree .'
';
+ }
+ if($links) {
$output .= '
';
$output .= '
'. $links .'
';
$output .= '
'. $titles .'
';
$output .= '
';
- $output .= '
';
}
- $node->body = $node->body.$output;
+ if($output) {
+ $node->body = $node->body .''. $output .'
';
+ }
return $node;
}
Index: system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system.module,v
retrieving revision 1.229
diff -U3 -r1.229 system.module
--- system.module 28 Aug 2005 18:17:47 -0000 1.229
+++ system.module 3 Sep 2005 21:28:17 -0000
@@ -160,7 +160,7 @@
if (variable_get('configurable_timezones', 1)) {
$zones = _system_zonelist();
- $data[] = array('title' => t('Locale settings'), 'data' => form_select(t('Time zone'), 'timezone', strlen($edit['timezone']) ? $edit['timezone'] : variable_get('date_default_timezone', 0), $zones, t('Select your current local time. Dates and times throughout this site will be displayed using this time zone.')), 'weight' => 2);
+ $data[] = array('title' => t('Locale settings'), 'data' => form_select(t('Time zone'), 'timezone', strlen($edit['timezone']) ? $edit['timezone'] : variable_get('date_default_timezone', 0), $zones['times'], t('Select your current local time. Dates and times throughout this site will be displayed using this time zone.')), 'weight' => 2);
}
return $data;
}
@@ -168,11 +168,48 @@
function _system_zonelist() {
$timestamp = time();
- $zonelist = array(-11, -10, -9.5, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 5, 5.5, 5.75, 6, 6.5, 7, 8, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 14);
+ $zonelist = array(-12 => t('Rawaki'),
+ -11 => t('Samoa, Midway'),
+ -10 => t('Hawaii, French Polynesia, Cook Island'),
+ -9.5 => t('Iles Marquises - French Polynesia'),
+ -9 => t('Alaska'),
+ -8 => t('US Pacific'),
+ -7 => t('US Mountain'),
+ -6 => t('US Central'),
+ -5 => t('US Eastern'),
+ -4 => t('New Foundland), Venezuela), Chile'),
+ -3.5 => t('St. John\'s, Canada, Newfoundland and Labrador'),
+ -3 => t('Brazil, Argentina, Greenland'),
+ -2 => t('Mid-Atlantic'),
+ -1 => t('Azores, Cape Verda Is.'),
+ 0 => t('England, Ireland, Portugal'),
+ 1 => t('Central Europe'),
+ 2 => t('Eastern Europe'),
+ 3 => t('Moscow, Saudi Arabia'),
+ 3.5 => t('Iran'),
+ 4 => t('Oman'),
+ 5 => t('Pakistan'),
+ 5.5 => t('India, West Bengal'),
+ 5.75 => t('Nepal, Bagmati'),
+ 6 => t('India'),
+ 6.5 => t('South-East Asia, Cocos Islands'),
+ 7 => t('Indonesia, Central Russia'),
+ 8 => t('China, Phillipines, Malaysia, West Australia'),
+ 9 => t('Japan'),
+ 9.5 => t('Central Australia'),
+ 10 => t('East Australia'),
+ 10.5 => t('Lord Howe Island, Australia'),
+ 11 => t('Solomon Islands, Micronesia'),
+ 11.5 => t('Pacific - Norfolk Island'),
+ 12 => t('New Zealand, Marshall Islands, Fiji'),
+ 12.75 => t('Chatham Islands, New Zealand'),
+ 13 => t('Oceania, Tonga'),
+ 14 => t('Pacific - Kiribati'));
$zones = array();
- foreach ($zonelist as $offset) {
+ foreach ($zonelist as $offset => $locale) {
$zone = $offset * 3600;
- $zones[$zone] = format_date($timestamp, 'custom', variable_get('date_format_long', 'l, F j, Y - H:i') . ' O', $zone);
+ $zones['times'][$zone] = format_date($timestamp, 'custom', variable_get('date_format_long', 'l, F j, Y - H:i') . ' O', $zone);
+ $zones['locales'][$zone] = $offset .': '. $locale;
}
return $zones;
}
@@ -263,7 +300,7 @@
$datelongchoices[$f] = format_date(time(), 'custom', $f);
}
- $group = form_select(t('Default time zone'), 'date_default_timezone', variable_get('date_default_timezone', 0), $zones, t('Select the default site time zone.'));
+ $group = form_select(t('Default time zone'), 'date_default_timezone', variable_get('date_default_timezone', 0), $zones['times'], t('Select the default site time zone.'));
$group .= form_radios(t('Configurable time zones'), 'configurable_timezones', variable_get('configurable_timezones', 1), array(t('Disabled'), t('Enabled')), t('Enable or disable user-configurable time zones. When enabled, users can set their own time zone and dates will be updated accordingly.'));
$group .= form_select(t('Short date format'), 'date_format_short', variable_get('date_format_short', $dateshort[0]), $dateshortchoices, t('The short format of date display.'));
$group .= form_select(t('Medium date format'), 'date_format_medium', variable_get('date_format_medium', $datemedium[0]), $datemediumchoices, t('The medium sized date display.'));