Index: tribune.backend.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/tribune/tribune.backend.inc,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 tribune.backend.inc
--- tribune.backend.inc	17 Dec 2008 13:49:26 -0000	1.6.2.3
+++ tribune.backend.inc	30 May 2009 07:46:30 -0000
@@ -57,9 +57,9 @@
   $contents  = "<?xml version=\"1.0\"?>\n";
   $contents .= "<rss version=\"2.0\">\n";
   $contents .= "\t<channel>\n";
-  $contents .= "\t\t<title>".variable_get("site_name", "")."</title>\n";
-  $contents .= "\t\t<link>".url('node'. $node->nid, array('absolute' => TRUE))."</link>\n";
-  $contents .= "\t\t<description>".variable_get("site_slogan", "")."</description>\n";
+  $contents .= "\t\t<title>".t('Posts in "@title"', array('@title' => $node->title))."</title>\n";
+  $contents .= "\t\t<link>".url('node/'. $node->nid, array('absolute' => TRUE))."</link>\n";
+  $contents .= "\t\t<description>".strip_tags($node->body)."</description>\n";
 
   $posts = array_reverse($posts, TRUE);
 
@@ -94,9 +94,12 @@
   * @param post Array with the following keys : id, clock, login, info, message
   */
 function theme_tribune_post_rss($post, $node) {
+  $timezone = variable_get('date_default_timezone', 0);
   $contents  = "\t\t<item>\n";
+  $contents .= "\t\t\t<title>". $post['post_id'] ."</title>\n";
+  $contents .= "\t\t\t<link>".url('node/'. $node->nid, array('absolute' => TRUE))."</link>\n";
   $contents .= "\t\t\t<description>". tribune_rss_slip($post['message'], $node) ."</description>\n";
-  $contents .= "\t\t\t<pubDate>". date('r', tribune_date_to_timestamp($post['post_time'])) ."</pubDate>\n";
+  $contents .= "\t\t\t<pubDate>". date('r', tribune_date_to_timestamp($post['post_time'])+ $timezone) ."</pubDate>\n";
   $contents .= "\t\t\t<author>". tribune_rss_slip($post['login'], $node) ." &lt;". tribune_rss_slip($post['login'], $node) ."@null&gt;</author>\n";
   $contents .= "\t\t</item>\n";
 
@@ -108,17 +111,6 @@
 
   $string = tribune_sleep($string, $node->tribune_settings['max_message_size']);
   $string = preg_replace('#((https?|ftp|gopher|file|mms|rtsp|rtmp)://.*?)((,|\.|\)|\])?(<| | |"|$))#', '<a href="\1">[url]</a>\3', $string);
-  $replacements = array(
-    '<b>' => '<strong>',
-    '</b>' => '</strong>',
-    '<i>' => '<em>',
-    '</i>' => '</em>',
-    '<s>' => '<span style="text-decoration: underline">',
-    '</s>' => '</span>',
-    '<tt>' => '<code>',
-    '</tt>' => '</code>',
-  );
-  $string = str_replace(array_keys($replacements), array_values($replacements), $string);
   $string = htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
 
   return $string;
Index: tribune.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/tribune/tribune.module,v
retrieving revision 1.159.2.19
diff -u -r1.159.2.19 tribune.module
--- tribune.module	20 May 2009 15:50:15 -0000	1.159.2.19
+++ tribune.module	30 May 2009 07:45:20 -0000
@@ -319,6 +319,11 @@
 
   drupal_add_css(drupal_get_path('module', 'tribune') .'/css/tribune.page.css');
 
+      drupal_add_feed(
+        url('node/'. $node->nid.'/tribune.rss'),
+        'tribune feed'
+      );
+
   $history_size   = $node->tribune_settings['history_size'];
   $reload_delay   = $node->tribune_settings['reload_delay'] * 1000; // in milliseconds
   $idle_delay     = $node->tribune_settings['idle_delay'] * 1000; // in milliseconds
@@ -1896,9 +1901,9 @@
     $description .= '</div>';
 
     $description .= '<div class="description">';
-    $description .= t('You can format your message using some HTML tags. '
-      .'The allowed tags are &lt;i&gt;, &lt;b&gt;, '
-      .'&lt;u&gt;, &lt;s&gt; and &lt;tt&gt;');
+    $description .= t('You can format your message using BBCode. '
+      .'The allowed tags are [i], [b]
+      [u], [s] and [code]');
     $description .= '</div>';
 
     $description .= '<div class="description">';
Index: tribune.sleep.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/tribune/tribune.sleep.inc,v
retrieving revision 1.3
diff -u -r1.3 tribune.sleep.inc
--- tribune.sleep.inc	3 Nov 2008 20:50:39 -0000	1.3
+++ tribune.sleep.inc	30 May 2009 08:27:34 -0000
@@ -39,47 +39,23 @@
 function tribune_sleep($message, $length = -1) {
   $message = str_clean($message, $length);
 
-  $message = preg_replace_callback(':<(m|s|u|b|i|tt)>(.*?)</\1>:', 'tribune_sleep_replace', $message);
-
   $replacement = array(
-        "&" =>   "&amp;",
-        "<" =>    "&lt;",
-        ">" =>    "&gt;",
-        "'" =>  "&#039;",
-        '"' =>  "&quot;",
-    chr(26) =>       "<",
-    chr(27) =>       ">",
-    chr(28) =>       "'",
-    chr(29) =>       '"',
+        '&' =>   '&amp;',
+        '<' =>    '&lt;',
+        '>' =>    '&gt;',
+        "'" =>  '&#039;',
+        '"' =>  '&quot;',
+       '[b]' => '<strong>',
+       '[/b]' => '</strong>',
+       '[i]' => '<em>',
+       '[/i]' => '</em>',
+       '[s]' => '<span style="text-decoration: underline">',
+       '[/s]' => '</span>',
+       '[code]' => '<code>',
+       '[/code]' => '</code>',
   );
 
   $message = str_replace(array_keys($replacement), array_values($replacement), $message);
 
   return $message;
 }
-
-function tribune_sleep_replace($matches) {
-  $text = preg_replace_callback(':<(m|s|u|b|i|tt)>(.*?)</\1>:', 'tribune_sleep_replace', $matches[2]);
-  if ($matches[1] == 'm') {
-    $start = "====> ". chr(26) ."b". chr(27) ."Moment ";
-    $stop  = chr(26) ."/b". chr(27) ." <====";
-  }
-  else {
-    $start = chr(26) . $matches[1] . chr(27);
-    $stop  = chr(26) ."/". $matches[1] . chr(27);
-  }
-  return $start . $text . $stop;
-}
-
-function tribune_sleep_mother($matches) {
-  $text = preg_replace_callback(':<(m|s|u|b|i|tt)>([^'. chr(26) .']*)(.*)$:', 'tribune_sleep_mother', $matches[2]);
-  if ($matches[1] == 'm') {
-    $start = "====> ". chr(26) ."b". chr(27) ."Moment ";
-    $stop  = chr(26) ."/b". chr(27) ." <====";
-  }
-  else {
-    $start = chr(26) . $matches[1] . chr(27);
-    $stop  = chr(26) ."/". $matches[1] . chr(27);
-  }
-  return $start . $text . $stop . $matches[3];
-}

