summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhuong Nguyen2009-03-13 06:45:28 (GMT)
committer Phuong Nguyen2009-03-13 06:45:28 (GMT)
commit59ffe1e6f0923e8a7e928be6b2eee6cac6fc8116 (patch)
treecc554b9cca75304d557f7f3993c632c22685efb9
parent8b3f3cc81fd4c6908ac7a2ce16fb145e2b00fa12 (diff)
*** empty log message ***6.x-1.6
-rw-r--r--block.tpl.php5
-rw-r--r--comment-form.tpl.php4
-rw-r--r--comment-wrapper.tpl.php8
-rw-r--r--comment.tpl.php4
-rw-r--r--node.tpl.php94
-rw-r--r--page.tpl.php6
-rw-r--r--style.css2
-rw-r--r--template.php46
-rw-r--r--theme-settings.php45
9 files changed, 148 insertions, 66 deletions
diff --git a/block.tpl.php b/block.tpl.php
index a84d5fe..7d89a06 100644
--- a/block.tpl.php
+++ b/block.tpl.php
@@ -2,6 +2,11 @@
// $Id$
/**
+ * @file block.tpl.php
+ * Renders blocks for Magazeen.
+*/
+
+/**
* @file block.tpl.php
*
* Theme implementation to display a block.
diff --git a/comment-form.tpl.php b/comment-form.tpl.php
index 902882e..71c4396 100644
--- a/comment-form.tpl.php
+++ b/comment-form.tpl.php
@@ -1,5 +1,9 @@
<?php
// $Id$
+/**
+ * @file comment-form.tpl.php
+ * Renders comment form for Magazeen.
+*/
?>
<div class="post-meta clearfix">
diff --git a/comment-wrapper.tpl.php b/comment-wrapper.tpl.php
index f701782..11f90ac 100644
--- a/comment-wrapper.tpl.php
+++ b/comment-wrapper.tpl.php
@@ -36,7 +36,13 @@
<div id="comment-head"></div>
<?php if ($node->type != 'forum'): ?>
<div class="comment-count">
- <a href="#comments"><?php print $node->comment_count; if ($node->comment_count > 1) { print ' Comments'; } else { print ' Comment'; } ?></a>
+ <a href="#comments">
+ <?php
+ print $node->comment_count;
+ if ($node->comment_count > 1) {
+ print ' ' .t('Comments'); }
+ else { print ' ' .t('Comment'); } ?>
+ </a>
</div>
<?php endif; ?>
diff --git a/comment.tpl.php b/comment.tpl.php
index e4f8a31..bc978cc 100644
--- a/comment.tpl.php
+++ b/comment.tpl.php
@@ -26,7 +26,7 @@
* @see theme_comment()
*/
?>
-<div class="comment<?php print ' '. $zebra; print ($comment->new) ? ' comment-new' : ''; print ' '. $status ?> clear-block">
+<div class="comment<?php print ' '. $zebra; print($comment->new) ? ' comment-new' : ''; print ' '. $status ?> clear-block">
<div class="comment-author clearfix">
<?php print $picture ?>
@@ -37,7 +37,7 @@
<?php if ($comment->new): ?>
<span class="new"><?php print $new; ?></span>
<?php endif; ?>
- <span class="date">on <?php print $date; ?></span>
+ <span class="date"> <?php print t(on). ' ' .$date; ?></span>
</div>
<?php if ($links): ?>
<div class="comment-links">
diff --git a/node.tpl.php b/node.tpl.php
index 8b62252..943b527 100644
--- a/node.tpl.php
+++ b/node.tpl.php
@@ -1,37 +1,89 @@
<?php
// $Id$
+/**
+ * @file node.tpl.php
+ * Renders node for Magazeen.
+*/
?>
-<div id="post-<?php print $node->nid; ?>" class="post clearfix<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
+<div id="post-<?php print $node->nid; ?>" class="post clearfix
+ <?php if ($sticky) {
+ print " sticky";
+ } ?>
+ <?php if (!$status) {
+ print " node-unpublished"; }
+ ?>
+">
- <div class="post-meta clearfix">
- <h3 class="post-title">
- <a href="<?php print $node_url?>"><?php print $title?></a>
- </h3>
- <p class="post-info">
- <?php if ($type == page) { print phptemplate_display_author($name) ; } else { print '<span>By ' .$name . '</span>';} ?>
- <?php if ($type == page) { print ''; } else { print '<span class="date">'. $date . '</span>';} ?>
+ <div class="post-meta clearfix">
+ <h3 class="post-title">
+ <a href="<?php print $node_url?>"><?php print $title?></a>
+ </h3>
+ <p class="post-info">
+ <?php
+ if ($type == page) {
+ print phptemplate_display_author($name) ;
+ }
+ else {
+ print '<span>'. t('By') .' '. $name .'</span>';
+ }
+ ?>
+ <?php
+ if ($type == page) {
+ print '';
+ }
+ else {
+ print '<span class="date">'. $date .'</span>';
+ }
+ ?>
</p>
</div><!-- /post-meta -->
<div class="post-box">
- <div class="clearfix post-content <?php if ($teaser == 1) { print "teaser"; } else { print "full"; } ?>">
+ <div class="clearfix post-content
+ <?php
+ if ($teaser == 1) {
+ print t('teaser');
+ }
+ else {
+ print t('full');
+ }
+ ?>">
<?php if ($teaser == 1): ?>
<?php if ($comment_count > 1): ?>
<div class="comment-count">
- <a title="<?php print $comment_count; if ($comment_count > 1) { print ' Comments'; } else { print ' Comment'; } ?> " href="<?php print $node_url . '#comments' ?>">
- <?php print $comment_count; if ($comment_count > 1) { print ' Comments'; } else { print ' Comment'; } ?>
- </a>
- </div>
- <?php else : ?>
- <?php print phptemplate_comment_count($comment_count,$node_url) ; ?>
- <?php endif; ?>
+ <a title="
+ <?php
+ print $comment_count;
+ if ($comment_count > 1) {
+ print t('Comments');
+ }
+ else {
+ print t('Comment');
+ }
+ ?> " href="<?php print $node_url .'#comments' ?>">
+ <?php
+ print $comment_count;
+ if ($comment_count > 1) {
+ print ' ' . t('Comments');
+ }
+ else {
+ print ' ' . t('Comment');
+ }
+ ?>
+ </a>
+ </div>
+ <?php else : ?>
+ <?php print phptemplate_comment_count($comment_count, $node_url); ?>
+ <?php endif; ?>
- <div class="post-image">
- <?php print $field_image_rendered; ?>
- </div><!-- /comment-count -->
- <?php endif; ?>
+ <?php if ($field_image_rendered): ?>
+ <div class="post-image">
+ <?php print $field_image_rendered; ?>
+ </div><!-- /comment-count -->
+ <?php endif; ?>
+ <?php endif; ?>
<div class="post-intro clearfix">
<?php if ($teaser == 0): ?>
@@ -48,7 +100,7 @@
<?php if ($teaser == 1): ?>
<div class="post-footer clearfix">
<div class="continue-reading">
- <a title="Continue reading &ldquo;<?php print $title?>&rdquo;" rel="bookmark" href="<?php print $node_url?>"><?php print t('Continue Reading'); ?></a>
+ <a title="<?php print t('Continue reading'); ?> &#8220;<?php print $title?>&#8220;" rel="bookmark" href="<?php print $node_url?>"><?php print t('Continue reading'); ?></a>
</div>
<?php if ($terms): ?>
<div class="category-menu"><span class="indicator"></span><?php print $terms; ?></div>
diff --git a/page.tpl.php b/page.tpl.php
index 177f9ed..95ce73d 100644
--- a/page.tpl.php
+++ b/page.tpl.php
@@ -1,7 +1,11 @@
<?php
// $Id$
-?>
+/**
+ * @file page.tpl.php
+ * Renders the pages for Magazeen.
+*/
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
diff --git a/style.css b/style.css
index 793a78d..b9c01cc 100644
--- a/style.css
+++ b/style.css
@@ -1146,7 +1146,7 @@ h3.post-title-small {
background:transparent url(images/footer-cat-right.gif) no-repeat scroll right top;
display:block;
float:left;
- height:1.75em;
+ height:23px;
line-height:1.75em;
margin:0;
padding:0 .9em 0 0;
diff --git a/template.php b/template.php
index f256338..bca37aa 100644
--- a/template.php
+++ b/template.php
@@ -1,6 +1,11 @@
<?php
// $Id$
+/**
+ * @file template.php
+ * Main template file for Magazeen.
+ */
+
/*
* Initialize theme settings
*/
@@ -254,7 +259,7 @@ function phptemplate_comment_count($comment_count, $node_url) {
break;
case 'addnew':
$output = '<div class="comment-count">';
- $output .= '<a title="' . $comment_count . ' comments" href="' . $node_url .'#comments" >';
+ $output .= '<a title="'. $comment_count .' '. t('comments') .'" href="'. $node_url .'#comments" >';
$output .= t('Add new comment');
$output .= '</a>';
$output .= '</div>';
@@ -262,8 +267,8 @@ function phptemplate_comment_count($comment_count, $node_url) {
default:
$output = '<div class="comment-count">';
- $output .= '<a title="' . $comment_count . ' comments" href="' . $node_url .'#comments" >';
- $output .= $comment_count . ' ' . t('comment');
+ $output .= '<a title="'. $comment_count .' '. t('comments') .'" href="'. $node_url .'#comments" >';
+ $output .= $comment_count .' '. t('comments');
$output .= '</a>';
$output .= '</div>';
}
@@ -280,7 +285,7 @@ function phptemplate_display_author($name) {
$output = '';
}
else {
- $output = '<span>By ' .$name . '</span>';
+ $output = '<span>'. t('By') .' '. $name .'</span>';
}
return $output;
}
@@ -322,9 +327,10 @@ function magazeen_preprocess_block(&$vars, $hook) {
function phptemplate_mainwidth_class($right) {
- $mainwidth = 'width940';
- if ( $right ) {$mainwidth = 'width580';}
- print $mainwidth;
+ $mainwidth = 'width940';
+ if ( $right ) {
+ $mainwidth = 'width580';}
+ print $mainwidth;
}
/**
@@ -365,17 +371,17 @@ function magazeen_theme(&$existing, $type, $theme, $path){
);
}
- function magazeen_preprocess_comment_form(&$vars) {
- $vars['submit'] = drupal_render($vars['form']['submit']);
- $vars['preview'] = drupal_render($vars['form']['preview']);
- $vars['subject'] = drupal_render($vars['form']['subject']);
- $vars['comment'] = drupal_render($vars['form']['comment_filter']['comment']);
- $vars['form']['name']['#title'] = t('Name (required)');
- $vars['name'] = drupal_render($vars['form']['name']);
- $vars['form']['mail']['#title'] = t('Mail (will not be published) (required)');
- $vars['mail'] = drupal_render($vars['form']['mail']);
- $vars['form']['homepage']['#title'] = t('Website');
- $vars['homepage'] = drupal_render($vars['form']['homepage']);
- $vars['comment_preview'] = drupal_render($vars['form']['comment_preview']);
- }
+function magazeen_preprocess_comment_form(&$vars) {
+ $vars['submit'] = drupal_render($vars['form']['submit']);
+ $vars['preview'] = drupal_render($vars['form']['preview']);
+ $vars['subject'] = drupal_render($vars['form']['subject']);
+ $vars['comment'] = drupal_render($vars['form']['comment_filter']['comment']);
+ $vars['form']['name']['#title'] = t('Name (required)');
+ $vars['name'] = drupal_render($vars['form']['name']);
+ $vars['form']['mail']['#title'] = t('Mail (will not be published) (required)');
+ $vars['mail'] = drupal_render($vars['form']['mail']);
+ $vars['form']['homepage']['#title'] = t('Website');
+ $vars['homepage'] = drupal_render($vars['form']['homepage']);
+ $vars['comment_preview'] = drupal_render($vars['form']['comment_preview']);
+}
//dsm($vars['form']); \ No newline at end of file
diff --git a/theme-settings.php b/theme-settings.php
index a559c8f..518815f 100644
--- a/theme-settings.php
+++ b/theme-settings.php
@@ -1,5 +1,9 @@
<?php
// $Id$
+/**
+ * @file theme-settings.php
+ * File with theme settings for Magazeen.
+ */
/**
* Implementation of THEMEHOOK_settings() function.
@@ -168,26 +172,26 @@ function phptemplate_settings($saved_settings) {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
- // Comment Title
- $form['tnt_container']['general_settings']['comment']['comment_title'] = array(
- '#type' => 'textfield',
- '#title' => t('Comment Title'),
- '#description' => t('Customize the title for the comments box'),
- '#size' => 60,
- '#default_value' => $settings['comment_title'],
- );
+ // Comment Title
+ $form['tnt_container']['general_settings']['comment']['comment_title'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Comment Title'),
+ '#description' => t('Customize the title for the comments box'),
+ '#size' => 60,
+ '#default_value' => $settings['comment_title'],
+ );
- // Display Teaser Comment
- $form['tnt_container']['general_settings']['comment']['display_teaser_comment'] = array(
- '#type' => 'select',
- '#title' => t('Option to display comment count in teaser if there no comment'),
- '#default_value' => $settings["display_teaser_comment"],
- '#options' => array(
- 'normal' => t('Display comment count'),
- 'hide' => t('Don\'t display comment count'),
- 'addnew' => t('Display "Add new comment"'),
- ),
- );
+ // Display Teaser Comment
+ $form['tnt_container']['general_settings']['comment']['display_teaser_comment'] = array(
+ '#type' => 'select',
+ '#title' => t('Option to display comment count in teaser if less than 1'),
+ '#default_value' => $settings["display_teaser_comment"],
+ '#options' => array(
+ 'normal' => t('Display comment count'),
+ 'hide' => t('Don\'t display comment count'),
+ 'addnew' => t('Display "Add new comment"'),
+ ),
+ );
// SEO settings
$form['tnt_container']['seo'] = array(
@@ -293,7 +297,8 @@ function phptemplate_settings($saved_settings) {
'#rows' => 6,
'#default_value' => $settings['meta_description'],
);
- } else {
+ }
+ else {
$form['tnt_container']['seo']['meta']['#description'] = 'NOTICE: You currently have the "nodewords" module installed and enabled, so the meta tag theme settings have been disabled to prevent conflicts. If you later wish to re-enable the meta tag theme settings, you must first disable the "nodewords" module.';
$form['tnt_container']['seo']['meta']['meta_keywords']['#disabled'] = 'disabled';
$form['tnt_container']['seo']['meta']['meta_description']['#disabled'] = 'disabled';