diff --git a/include/template.class.php b/include/template.class.php index b51624929..9fd5bd4f5 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -79,9 +79,10 @@ class Template { $this->smarty->register_modifier( 'translate', array('Template', 'mod_translate') ); $this->smarty->register_modifier( 'explode', array('Template', 'mod_explode') ); $this->smarty->register_block('html_head', array(&$this, 'block_html_head') ); + $this->smarty->register_prefilter( array('Template', 'prefilter_white_space') ); if ( $conf['compiled_template_cache_language'] ) { - $this->smarty->register_prefilter( array(&$this, 'prefilter_language') ); + $this->smarty->register_prefilter( array('Template', 'prefilter_language') ); } if ( !empty($theme) ) @@ -355,15 +356,38 @@ class Template { } } + /*static */ function prefilter_white_space($source, &$smarty) + { + $ld = $smarty->left_delimiter; + $rd = $smarty->right_delimiter; + $ldq = preg_quote($ld, '#'); + $rdq = preg_quote($rd, '#'); + + $regex = array(); + $tags = array('if', 'foreach', 'section'); + foreach($tags as $tag) + { + array_push($regex, "#^\s+($ldq$tag"."[^$ld$rd]*$rdq)\s*$#m"); + array_push($regex, "#^\s+($ldq/$tag$rdq)\s*$#m"); + } + $tags = array('include', 'else', 'html_head'); + foreach($tags as $tag) + { + array_push($regex, "#^\s+($ldq$tag"."[^$ld$rd]*$rdq)\s*$#m"); + } + $source = preg_replace( $regex, "$1", $source); + return $source; + } + /** * Smarty prefilter to allow caching (whenever possible) language strings * from templates. */ - function prefilter_language($source, &$smarty) + /*static */ function prefilter_language($source, &$smarty) { global $lang; - $ldq = preg_quote($this->smarty->left_delimiter, '~'); - $rdq = preg_quote($this->smarty->right_delimiter, '~'); + $ldq = preg_quote($smarty->left_delimiter, '~'); + $rdq = preg_quote($smarty->right_delimiter, '~'); $regex = "~$ldq *\'([^'$]+)\'\|@translate *$rdq~"; $source = preg_replace( $regex.'e', 'isset($lang[\'$1\']) ? $lang[\'$1\'] : \'$0\'', $source); diff --git a/template-common/default-layout.css b/template-common/default-layout.css index 2355d39f3..fb030f5a1 100644 --- a/template-common/default-layout.css +++ b/template-common/default-layout.css @@ -27,9 +27,6 @@ BODY#thePopuphelpPage { .content DIV.thumbnailCategory DIV.description { height: 140px; /* max thumbnail height + 2px */ } -DIV#comments DIV.comment A.illustration { - width: 140px; /*maximum thumbnail width + ~5px */ -} /* Category thumbnails on main page */ diff --git a/template/yoga/comment_list.tpl b/template/yoga/comment_list.tpl index 334b07a1a..320f79717 100644 --- a/template/yoga/comment_list.tpl +++ b/template/yoga/comment_list.tpl @@ -1,32 +1,37 @@ {* $Id$ *} {foreach from=$comments item=comment} -
{$comment.CONTENT}
{$comment.CONTENT}
[{$COMMENT_COUNT}] {'comments_title'|@translate}
+[{$COMMENT_COUNT}] {'comments_title'|@translate}
-