diff -ur /tmp/plugins-orig/code-highlighter/codehighlighter.php /Volumes/SandBox/wordpress/wp-content/plugins/code-highlighter/codehighlighter.php --- /tmp/plugins-orig/code-highlighter/codehighlighter.php 2007-10-03 01:26:16.000000000 -0400 +++ /Volumes/SandBox/wordpress/wp-content/plugins/code-highlighter/codehighlighter.php 2007-10-28 14:54:22.000000000 -0400 @@ -29,17 +29,19 @@ define('CODEHIGHLIGHTER_NAME', 'ideathinking_codehighlighter'); define('CODEHIGHLIGHTER_DESC', __('ideathinking_codehighlighter_configuration_data')); -function ideathinking_codehighlighter_preg_callback($matches) { +function ich_callback($matches, $is_comment) { $lang = $matches[2]; $line = $matches[4]; if ($lang != null) { $tabstop = 2; - $code = trim($matches[5], '\r\n'); + $code = trim($matches[5], "\r\n"); $code = str_replace('< /pre>', '', $code); $geshi =& new GeSHi($code, $lang); + //$geshi->enable_classes(); + $geshi->set_overall_class('sourcecode'); $geshi->set_tab_width($tabstop); if ($line != null) { @@ -53,15 +55,67 @@ return $matches[0]; } -function ideathinking_codehighlighter($content) { - $pattern = '/
((\\n|.)*)<\/pre>/U';
- $content = preg_replace_callback($pattern, 'ideathinking_codehighlighter_preg_callback', $content);
+function ideathinking_codehighlighter_preg_callback($matches) {
+ return ich_callback($matches, false);
+}
+
+function ideathinking_codehighlighter_preg_callback_comment($matches) {
+ return ich_callback($matches, true);
+}
+
+$ich_pattern = '/((\\n|.)*)<\/pre>/U';
+$ich_placeholder = array('!^%LBRACKET!^%', '!^%RBRACKET!^%');
+
+function ich_fix_lt_do($matches) {
+ global $ich_placeholder;
+ return $matches[1] . str_replace(array('<', '>'), $ich_placeholder, $matches[2]) . $matches[3];
+}
+
+function ich_fix_lt_check($matches) {
+ if($matches[2] == null) {
+ return $matches[0];
+ } else {
+ return preg_replace_callback('/()(.*)(<\/pre>.*)/s', 'ich_fix_lt_do', $matches[0]);
+ }
+}
+
+function ich_fix_lt($string) {
+ global $ich_pattern;
+ return preg_replace_callback($ich_pattern, 'ich_fix_lt_check', stripslashes($string));
+}
+
+function ich_unfix_lt($string) {
+ global $ich_placeholder;
+ return str_replace($ich_placeholder, array('<', '>'), $string);
+}
+
+function ich_do($content, $is_comment) {
+ global $ich_pattern;
+ if($is_comment) {
+ $callback = 'ideathinking_codehighlighter_preg_callback_comment';
+ } else {
+ $callback = 'ideathinking_codehighlighter_preg_callback';
+ }
+ $content = preg_replace_callback($ich_pattern, $callback, $content);
return $content;
}
+function ideathinking_codehighlighter($content) {
+ return ich_do($content, false);
+}
+
+function ideathinking_codehighlighter_comment($content) {
+ return ich_do($content, true);
+}
+
remove_filter('the_content', 'wptexturize');
remove_filter('the_content', 'convert_chars');
add_filter('the_content', 'ideathinking_codehighlighter');
+add_filter('pre_comment_content', 'ich_fix_lt', 7);
+add_filter('pre_comment_content', 'ich_unfix_lt', 13);
+add_filter('pre_comment_content', 'ideathinking_codehighlighter_comment');
+add_filter('get_comment_text', 'ideathinking_codehighlighter_comment');
+add_filter('get_comment_excerpt', 'ideathinking_codehighlighter_comment');
?>
diff -ur /tmp/plugins-orig/flexo-archives-widget/flexo.js /Volumes/SandBox/wordpress/wp-content/plugins/flexo-archives-widget/flexo.js
--- /tmp/plugins-orig/flexo-archives-widget/flexo.js 2007-10-22 17:25:08.000000000 -0400
+++ /Volumes/SandBox/wordpress/wp-content/plugins/flexo-archives-widget/flexo.js 2007-10-27 17:50:47.000000000 -0400
@@ -41,6 +41,11 @@
if (!document.getElementById('flexo-archives'))
return;
+ $('#flexo-archives').hide();
+ $('#flexo-archives-header').click(function() {
+ $('#flexo-archives').toggle();
+ });
+
// Get a list of all the expandable links
yearLinks = this.getElementByClassName(document, 'a',
'flexo-link');
diff -ur /tmp/plugins-orig/flexo-archives-widget/flexo_archives_widget.php /Volumes/SandBox/wordpress/wp-content/plugins/flexo-archives-widget/flexo_archives_widget.php
--- /tmp/plugins-orig/flexo-archives-widget/flexo_archives_widget.php 2007-10-22 17:25:08.000000000 -0400
+++ /Volumes/SandBox/wordpress/wp-content/plugins/flexo-archives-widget/flexo_archives_widget.php 2007-10-27 17:53:18.000000000 -0400
@@ -62,7 +62,7 @@
$title = attribute_escape($options['title']);
?>
-
+
';
- $year_list_e = '';
+ $year_list_e = ' • ';
// All together now!
$whole_thing = $year_list_a . get_year_link($year) . $year_list_b;
@@ -124,7 +124,7 @@
// Fetch widget options
$options = get_option('widget_flexo');
- $title = empty($options['title']) ? __('Archives') : $options['title'];
+ $title = $options['title'];
$count = $options['count'] ? '1' : '0';
// Print out the title
@@ -157,6 +157,7 @@
// Append number of posts in month, if they want it
if ($count)
$after = ' (' . $a_result->posts . ')' . $after;
+ $after .= " •";
echo get_archives_link($url, $text, 'html', $before, $after);
}
@@ -175,9 +176,9 @@
register_widget_control('Flexo Archives', 'flexo_widget_archives_control', 300, 100);
// Add CSS and JavaScript to header if we're active
- if (is_active_widget('flexo_widget_archives')) {
+ //if (is_active_widget('flexo_widget_archives')) {
add_action('wp_head', 'flexo_script');
- }
+ //}
}
// Call the registration function on init
diff -ur /tmp/plugins-orig/markdown.php /Volumes/SandBox/wordpress/wp-content/plugins/markdown.php
--- /tmp/plugins-orig/markdown.php 2007-09-26 14:41:22.000000000 -0400
+++ /Volumes/SandBox/wordpress/wp-content/plugins/markdown.php 2007-10-13 20:39:22.000000000 -0400
@@ -21,7 +21,7 @@
#
# Change to ">" for HTML output
-@define( 'MARKDOWN_EMPTY_ELEMENT_SUFFIX', " />");
+@define( 'MARKDOWN_EMPTY_ELEMENT_SUFFIX', ">");
# Define the width of a tab for code blocks.
@define( 'MARKDOWN_TAB_WIDTH', 4 );
@@ -879,12 +879,12 @@
return $text;
}
function _doHeaders_callback_setext($matches) {
- $level = $matches[2]{0} == '=' ? 1 : 2;
+ $level = $matches[2]{0} == '=' ? 2 : 3;
$block = "".$this->runSpanGamut($matches[1])." ";
return "\n" . $this->hashBlock($block) . "\n\n";
}
function _doHeaders_callback_atx($matches) {
- $level = strlen($matches[1]);
+ $level = strlen($matches[1]) + 1;
$block = "".$this->runSpanGamut($matches[2])." ";
return "\n" . $this->hashBlock($block) . "\n\n";
}
@@ -1987,13 +1987,13 @@
return " id=\"$attr\"";
}
function _doHeaders_callback_setext($matches) {
- $level = $matches[3]{0} == '=' ? 1 : 2;
+ $level = $matches[3]{0} == '=' ? 2 : 3;
$attr = $this->_doHeaders_attr($id =& $matches[2]);
$block = "".$this->runSpanGamut($matches[1])." ";
return "\n" . $this->hashBlock($block) . "\n\n";
}
function _doHeaders_callback_atx($matches) {
- $level = strlen($matches[1]);
+ $level = strlen($matches[1]) + 1;
$attr = $this->_doHeaders_attr($id =& $matches[3]);
$block = "".$this->runSpanGamut($matches[2])." ";
return "\n" . $this->hashBlock($block) . "\n\n";
@@ -2633,4 +2633,4 @@
software, even if advised of the possibility of such damage.
*/
-?>
\ No newline at end of file
+?>
diff -ur /tmp/plugins-orig/smartypants.php /Volumes/SandBox/wordpress/wp-content/plugins/smartypants.php
--- /tmp/plugins-orig/smartypants.php 2006-06-27 19:05:04.000000000 -0400
+++ /Volumes/SandBox/wordpress/wp-content/plugins/smartypants.php 2007-10-18 22:05:56.000000000 -0400
@@ -159,6 +158,7 @@
var $do_backticks = 0;
var $do_dashes = 0;
var $do_ellipses = 0;
+ var $do_fractions = 0;
var $do_stupefy = 0;
var $convert_quot = 0; # should we translate " entities into normal quotes?
@@ -179,6 +179,7 @@
# D : old school dashes
# i : inverted old school dashes
# e : ellipses
+ # f : fractions
# w : convert " entities to " for Dreamweaver users
#
if ($attr == "0") {
@@ -190,6 +191,7 @@
$this->do_backticks = 1;
$this->do_dashes = 1;
$this->do_ellipses = 1;
+ $this->do_fractions = 1;
}
else if ($attr == "2") {
# Do everything, turn all options on, use old school dash shorthand.
@@ -197,6 +199,7 @@
$this->do_backticks = 1;
$this->do_dashes = 2;
$this->do_ellipses = 1;
+ $this->do_fractions = 1;
}
else if ($attr == "3") {
# Do everything, turn all options on, use inverted old school dash shorthand.
@@ -204,6 +207,7 @@
$this->do_backticks = 1;
$this->do_dashes = 3;
$this->do_ellipses = 1;
+ $this->do_fractions = 1;
}
else if ($attr == "-1") {
# Special "stupefy" mode.
@@ -219,6 +223,7 @@
else if ($c == "D") { $this->do_dashes = 2; }
else if ($c == "i") { $this->do_dashes = 3; }
else if ($c == "e") { $this->do_ellipses = 1; }
+ else if ($c == "f") { $this->do_fractions = 1; }
else if ($c == "w") { $this->convert_quot = 1; }
else {
# Unknown attribute option, ignore.
@@ -312,6 +317,8 @@
}
}
+ if ($this->do_fractions) $t = $this->educateFractions($t);
+
if ($this->do_stupefy) $t = $this->stupefyEntities($t);
return $t;
@@ -507,6 +514,26 @@
}
+ function educateFractions($_) {
+ #
+ # Parameter: String.
+ # Returns: The string, with each instance of "i/j" translated to
+ # a fraction HTML entity (for values of i,j for which an)
+ # entity exists.)
+ #
+ # Example input: 1/2 cup extra-virgin olive oil
+ # Example output: ½ cup extra-virgin olive oil
+
+ $fraction_entities = array('1/4' => '¼', '1/2' => '½', '3/4' => '¾');
+ $_ = preg_replace("{
+ \\b # a word boundary
+ (1/4|1/2|3/4) # a fraction that'll be receptive to some book learnin'
+ \\b
+ }xe", '$fraction_entities["\\1"]', $_);
+ return $_;
+ }
+
+
function stupefyEntities($_) {
#
# Parameter: String.
@@ -529,6 +556,9 @@
$_ = str_replace('…', '...', $_); # ellipsis
+ # fractions
+ $_ = str_replace(array('¼', '½', '¾'), array('1/4', '1/2', '3/4'));
+
return $_;
}
diff -ur /tmp/plugins-orig/subscribe-to-comments/subscribe-to-comments.php /Volumes/SandBox/wordpress/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php
--- /tmp/plugins-orig/subscribe-to-comments/subscribe-to-comments.php 2007-10-03 01:03:34.000000000 -0400
+++ /Volumes/SandBox/wordpress/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php 2007-10-13 23:22:15.000000000 -0400
@@ -593,12 +593,20 @@
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$cid' LIMIT 1");
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
+ $content = $comment->content;
+ if(function_exists('save_unfiltered_comments_get_text')) {
+ $comment_unfiltered = save_unfiltered_comments_get_text($cid);
+ if(isset($comment_unfiltered)) {
+ $content = $comment_unfiltered;
+ }
+ }
+
if ( $comment->comment_approved == '1' && $comment->comment_type == '' ) {
// Comment has been approved and isn't a trackback or a pingback, so we should send out notifications
$message = sprintf(__("There is a new comment on the post \"%s\"", 'subscribe-to-comments') . ". \n%s\n\n", stripslashes($post->post_title), get_permalink($comment->comment_post_ID));
$message .= sprintf(__("Author: %s\n", 'subscribe-to-comments'), $comment->comment_author);
- $message .= __("Comment:\n", 'subscribe-to-comments') . stripslashes($comment->comment_content) . "\n\n";
+ $message .= __("Comment:\n", 'subscribe-to-comments') . stripslashes($content) . "\n\n";
$message .= __("See all comments on this post here:\n", 'subscribe-to-comments');
$message .= get_permalink($comment->comment_post_ID) . "#comments\n\n";
//add link to manage comment notifications