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 = "\n"; $contents .= "\n"; $contents .= "\t\n"; - $contents .= "\t\t".variable_get("site_name", "")."\n"; - $contents .= "\t\t".url('node'. $node->nid, array('absolute' => TRUE))."\n"; - $contents .= "\t\t".variable_get("site_slogan", "")."\n"; + $contents .= "\t\t".t('Posts in "@title"', array('@title' => $node->title))."\n"; + $contents .= "\t\t".url('node/'. $node->nid, array('absolute' => TRUE))."\n"; + $contents .= "\t\t".strip_tags($node->body)."\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\n"; + $contents .= "\t\t\t". $post['post_id'] ."\n"; + $contents .= "\t\t\t".url('node/'. $node->nid, array('absolute' => TRUE))."\n"; $contents .= "\t\t\t". tribune_rss_slip($post['message'], $node) ."\n"; - $contents .= "\t\t\t". date('r', tribune_date_to_timestamp($post['post_time'])) ."\n"; + $contents .= "\t\t\t". date('r', tribune_date_to_timestamp($post['post_time'])+ $timezone) ."\n"; $contents .= "\t\t\t". tribune_rss_slip($post['login'], $node) ." <". tribune_rss_slip($post['login'], $node) ."@null>\n"; $contents .= "\t\t\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)://.*?)((,|\.|\)|\])?(<| | |"|$))#', '[url]\3', $string); - $replacements = array( - '' => '', - '' => '', - '' => '', - '' => '', - '' => '', - '' => '', - '' => '', - '' => '', - ); - $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 .= ''; $description .= '
'; - $description .= t('You can format your message using some HTML tags. ' - .'The allowed tags are <i>, <b>, ' - .'<u>, <s> and <tt>'); + $description .= t('You can format your message using BBCode. ' + .'The allowed tags are [i], [b] + [u], [s] and [code]'); $description .= '
'; $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)>(.*?):', 'tribune_sleep_replace', $message); - $replacement = array( - "&" => "&", - "<" => "<", - ">" => ">", - "'" => "'", - '"' => """, - chr(26) => "<", - chr(27) => ">", - chr(28) => "'", - chr(29) => '"', + '&' => '&', + '<' => '<', + '>' => '>', + "'" => ''', + '"' => '"', + '[b]' => '', + '[/b]' => '', + '[i]' => '', + '[/i]' => '', + '[s]' => '', + '[/s]' => '', + '[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)>(.*?):', '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]; -}