summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhuong Nguyen2009-03-04 11:08:55 (GMT)
committer Phuong Nguyen2009-03-04 11:08:55 (GMT)
commita45e5f251f0974a5eb805a5ff72672748dab058e (patch)
tree832e7ba589d15c985bb2cd185cd11afa861187cb
parent42b4c3dbf24875a6c105797a33dd9819bb5af13d (diff)
*** empty log message ***6.x-1.0-beta1
-rw-r--r--box.tpl.php3
-rw-r--r--comment-form.tpl.php9
-rw-r--r--comment-wrapper.tpl.php1
-rw-r--r--comment.tpl.php2
-rw-r--r--magazeen.info3
-rw-r--r--node.tpl.php20
-rw-r--r--page.tpl.php2
-rw-r--r--style.css128
-rw-r--r--template.php36
-rw-r--r--theme-settings.php31
10 files changed, 171 insertions, 64 deletions
diff --git a/box.tpl.php b/box.tpl.php
index 12ce71e..9ebd468 100644
--- a/box.tpl.php
+++ b/box.tpl.php
@@ -16,6 +16,7 @@
<div class="box">
<div class="content">
- <?php print $content ?>
+ <?php print $content ?>
</div>
+
</div>
diff --git a/comment-form.tpl.php b/comment-form.tpl.php
index 6da29ec..8e81b48 100644
--- a/comment-form.tpl.php
+++ b/comment-form.tpl.php
@@ -4,12 +4,13 @@
<div class="post-meta clearfix">
- <h3 class="post-title-small left">Leave a Response</h3>
+ <h3 class="post-title-small left"><?php print theme_get_setting('comment_title'); ?></h3>
- <p class="post-info">
- </p>
+ <p class="post-info">
+ </p>
- </div>
+</div>
+
<div class="comment-form clearfix">
<?php print $comment_preview; ?>
<?php print $name; ?>
diff --git a/comment-wrapper.tpl.php b/comment-wrapper.tpl.php
index a9c421b..cfed4c1 100644
--- a/comment-wrapper.tpl.php
+++ b/comment-wrapper.tpl.php
@@ -32,7 +32,6 @@
*/
?>
-
<div id="comments" class="clearfix">
<div id="comment-head"></div>
<?php if ($node->type != 'forum'): ?>
diff --git a/comment.tpl.php b/comment.tpl.php
index 2dec104..438e794 100644
--- a/comment.tpl.php
+++ b/comment.tpl.php
@@ -32,10 +32,10 @@
<?php print $picture ?>
<div class="author">
<strong class="name"><?php print $author; ?></strong>
- <span class="date">on <?php print $date; ?></span>
<?php if ($comment->new): ?>
<span class="new"><?php print $new; ?></span>
<?php endif; ?>
+ <span class="date">on <?php print $date; ?></span>
</div>
<?php if ($links): ?>
<div class="comment-links">
diff --git a/magazeen.info b/magazeen.info
index 220c074..7dbec58 100644
--- a/magazeen.info
+++ b/magazeen.info
@@ -1,7 +1,7 @@
; $Id$
name = Magazeen
-description = A bold magazine theme from Function and Smashing Magazine.
+description = A bold magazine theme from <a href="http://wefunction.com/">Function</a> and <a href="http://smashingmagazine.com/">Smashing Magazine</a>.
version = VERSION
core = 6.x
engine = phptemplate
@@ -41,3 +41,4 @@ datestamp = 1229018427
+
diff --git a/node.tpl.php b/node.tpl.php
index f3969a6..ba64851 100644
--- a/node.tpl.php
+++ b/node.tpl.php
@@ -8,23 +8,29 @@
<h3 class="post-title">
<a href="<?php print $node_url?>"><?php print $title?></a>
</h3>
- <p class="post-info"><span>By <?php print $name?></span><?php if ($type == page) { print ''; } else { print $date; } ?></p>
+ <p class="post-info"><span>By <?php print $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"; } ?>">
+
<?php if ($teaser == 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 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; ?>
+
<div class="post-image">
<?php print $field_image_rendered; ?>
</div><!-- /comment-count -->
<?php endif; ?>
- <div class="post-intro">
+ <div class="post-intro clearfix">
<?php if ($teaser == 0): ?>
<?php if ($field_image): ?>
<div class="post-image-inner">
diff --git a/page.tpl.php b/page.tpl.php
index b3f1fd1..ce27279 100644
--- a/page.tpl.php
+++ b/page.tpl.php
@@ -89,7 +89,7 @@
<?php print $breadcrumb; ?>
<?php endif; ?>
- <?php if (($node->type !== 'story') && ($node->type !== 'page')): ?>
+ <?php if ( $template_files[0] !== 'page-node' ): ?>
<?php if ($title): ?>
<div class="post-meta clearfix">
<h3 class="post-title">
diff --git a/style.css b/style.css
index ff80d0e..05c9c89 100644
--- a/style.css
+++ b/style.css
@@ -30,11 +30,6 @@ body{
width:94em;
}
-/** Left **/
-.left, .alignleft {
- float:left;
-}
-
/** block-level elements **/
code {
width:80%;
@@ -98,7 +93,7 @@ h4, h5, h6 {
/** Links **/
-a:link, a:active {
+a {
color:#f23183;
text-decoration:none;
}
@@ -107,10 +102,6 @@ a:hover {
color:#000;
}
-a:visited {
- color:#f05898;
- text-decoration:none;
-}
/** lists **/
/* Drupal overrides */
@@ -175,7 +166,7 @@ input,textarea,select {
padding:.5em;
background:#fdfefe url( images/post-box-top.gif) repeat-x top center;
border:.1em solid #dce7ed;
- font:1em Arial, Helvetica, sans-serif;
+ font:1.2em Arial, Helvetica, sans-serif;
color:#76716c;
}
@@ -274,15 +265,15 @@ input:focus,textarea:focus,select:hover {
padding:0;
}
-#contact-mail-page,
-#search-form {
- font-size:1.2em;
-}
-
.search-results p {
margin:0;
}
+#contact-mail-page,
+#search-form {
+ font-size:1em;
+}
+
/** Main Navigation **/
#mainnav {
background:#FFF url( images/navigation.gif) repeat-x bottom center;
@@ -370,7 +361,7 @@ input:focus,textarea:focus,select:hover {
.dock-back .item-list li {
margin:0;
- padding:0 0 1.8em 0;
+ padding:0 .7em 1.8em 0;
display:inline;
}
@@ -381,7 +372,7 @@ input:focus,textarea:focus,select:hover {
.dock-back .item-list li a:link,
.dock-back .item-list li a:active,
.dock-back .item-list li a:visited {
- margin:3em .7em 0;
+ margin:3em 0 0;
padding:.16em 0 0 0;
width:7.5em;
height:5.8em;
@@ -540,7 +531,7 @@ ul.secondary li{
}
.post-meta h3 {
- font:bold 3.4em Arial, Helvetica, sans-serif;
+ font:bold 3.2em Arial, Helvetica, sans-serif;
color:#30393d;
}
@@ -556,7 +547,7 @@ h3 a:hover {
h3.post-title {
margin:0;
- width:12em;
+ width:11.9em;
height:auto;
border-bottom:.12em solid #30393d;
padding:.13em 0;
@@ -564,7 +555,7 @@ h3.post-title {
.post-info {
text-align:right;
- font:1.1em Georgia, "Times New Roman", Times, serif;
+ font:1em Georgia, "Times New Roman", Times, serif;
color:#81888d;
margin:0;
padding:1em .5em;
@@ -581,6 +572,11 @@ h3.post-title {
display:block;
}
+.post-info .date {
+ font-size:1.1em;
+ margin:.2em 0 0;
+}
+
.post-info span a:link,
.post-info span a:active,
.post-info span a:visited {
@@ -619,7 +615,7 @@ h3.post-title {
.comment-count a:active,
.comment-count a:visited {
padding:.5em 1em;
- font:bold 2.1em Arial, Helvetica, sans-serif;
+ font:bold 1.9em Arial, Helvetica, sans-serif;
color:#FFF;
display:block;
}
@@ -649,7 +645,7 @@ h3.post-title {
border-right:.1em solid #e8e8e8;
border-bottom:.1em solid #e7e8e8;
text-align:center;
- display:block;
+ display: inline-block;
}
.post-intro {
@@ -832,31 +828,28 @@ h3.post-title {
margin:.2em 0 0 0;
width:auto;
height:auto;
- float:left;
}
.author a:link,
.author a:active,
.author a:visited {
- color:#3c4d54;
+ color:#a3aeb2;
}
-.author strong span,
-.author strong span a:link,
-.author strong span a:active,
-.author strong span a:visited {
+.author .name,
+.author .name a:link,
+.author .name a:active,
+.author .name a:visited {
color:#6b8894;
display:inline;
}
.author span {
font:.6em Georgia, "Times New Roman", Times, serif;
- color:#a3aeb2;
- display:block;
}
h3.post-title-small {
- font-size:1.8em;
+ font-size:2.1em;
margin:0;
padding:.5em 0;
width:20em;
@@ -875,7 +868,8 @@ h3.post-title-small {
.box .comment-form .form-submit {
margin:0 0 1.5em 0;
- width:9.7em;
+ width:11em;
+ height:2.3em;
background:url( images/submit-comment.gif) no-repeat top center;
display:inline-block;
outline:0;
@@ -892,10 +886,10 @@ h3.post-title-small {
.comment-form label{
position:absolute;
- color:#5E6568;
- font-size:0.8em;
+ color:#5E6568 !important;
+ font-size:0.9em;
font-weight:normal !important;
- left:28.1em;
+ left:29.5em;
margin:0.4em 0;
}
@@ -909,6 +903,20 @@ h3.post-title-small {
padding:0;
}
+.comment .date {
+ display:block;
+}
+
+.comment .new {
+ margin:0 0 1em 0.2em;
+ position:absolute;
+
+}
+
+.new {
+ color:#EA2F7E;
+}
+
.box .post {
font-size:.9em;
}
@@ -916,6 +924,35 @@ h3.post-title-small {
.box .post-intro {
font-size:1.1em;
}
+/** Preview page **/
+.page-comment .post-info {
+ font-size:1em;
+}
+
+.page-comment #comment-form .post-meta {
+ display:none;
+}
+
+.page-comment .post-title {
+ font-size:3em;
+}
+
+.page-node .post-title {
+ border-bottom:0.15em solid #30393D;
+}
+
+.page-comment .full {
+ padding:1.5em 0 0;
+ border:none;
+}
+
+.page-comment .post {
+ border:none;
+}
+
+.page-comment .comment-form .form-submit {
+ height:1.9em;
+}
/** Side Bar **/
.sidebar {
@@ -1175,22 +1212,22 @@ html[xmlns] .clearfix {
/** Admin **/
.node-form,
.node-type-list,
-#forum,
-#contact-mail-page,
#node-delete-confirm,
-#search-form,
-#user-profile-form,
-.profile,
-#contact-mail-user,
-.box,
-.page-admin {
+.main-inner {
padding:1.5em 2.2em 1.1em;
background:#FDFEFE url(images/post-box-top.gif) repeat-x scroll center top;
border-top:0 none;
- font-size:1.2em;
width:44em;
+ font-size:1.2em;
}
+.page-taxonomy,
+.page-node {
+ background:none;
+ padding:0;
+ width:58em;
+ font-size:1em;
+}
.page-admin .post-info {
font-size:1em;
}
@@ -1278,6 +1315,7 @@ select {
color:#000;
}
+.form-item .container-inline:hover .form-submit,
.node-form .form-item:hover .form-submit
{
color:#fff;
diff --git a/template.php b/template.php
index 8c84b9e..5b0c659 100644
--- a/template.php
+++ b/template.php
@@ -14,6 +14,8 @@ if (is_null(theme_get_setting('user_notverified_display'))) {
$defaults = array(
'breadcrumb_display' => 0,
'user_notverified_display' => 1,
+ 'comment_title' => 'Leave a Response',
+ 'display_teaser_comment' => 'normal',
'front_page_title_display' => 'title_slogan',
'page_title_display_custom' => '',
'other_page_title_display' => 'ptitle_slogan',
@@ -25,8 +27,7 @@ if (is_null(theme_get_setting('user_notverified_display'))) {
// Get default theme settings.
$settings = theme_get_settings($theme_key);
-
-
+
// Don't save the toggle_node_info_ variables
if (module_exists('node')) {
foreach (node_get_types() as $type => $name) {
@@ -156,6 +157,36 @@ function phptemplate_username($object) {
}
/**
+ * Display or hide comment count
+ */
+
+function phptemplate_comment_count($comment_count, $node_url) {
+
+switch (theme_get_setting('display_teaser_comment')) {
+ case 'hide':
+ $output = '';
+ break;
+ case 'addnew':
+ $output = '<div class="comment-count">';
+ $output .= '<a title="' . $comment_count . ' comments" href="' . $node_url .'#comments" >';
+ $output .= 'Add new comment';
+ $output .= '</a>';
+ $output .= '</div>';
+ break;
+
+ default:
+ $output = '<div class="comment-count">';
+ $output .= '<a title="' . $comment_count . ' comments" href="' . $node_url .'#comments" >';
+ $output .= $comment_count . ' comments';
+ $output .= '</a>';
+ $output .= '</div>';
+}
+
+ return $output;
+}
+
+
+/**
* Adds 'width940' or 'width580' classes to the main content as needed.
*/
@@ -194,7 +225,6 @@ function magazeen_theme(){
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)');
diff --git a/theme-settings.php b/theme-settings.php
index 632e799..444665f 100644
--- a/theme-settings.php
+++ b/theme-settings.php
@@ -18,6 +18,8 @@ function phptemplate_settings($saved_settings) {
$defaults = array(
'breadcrumb_display' => 0,
'user_notverified_display' => 1,
+ 'comment_title' => 'Leave a Response',
+ 'display_teaser_comment' => 'normal',
'front_page_title_display' => 'title_slogan',
'page_title_display_custom' => '',
'other_page_title_display' => 'ptitle_slogan',
@@ -59,6 +61,35 @@ function phptemplate_settings($saved_settings) {
'#default_value' => $settings['user_notverified_display'],
);
+ // Comment
+ $form['tnt_container']['general_settings']['comment'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Comment setting'),
+ '#collapsible' => TRUE,
+ '#collapsed' => FALSE,
+ );
+ // 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 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(
'#type' => 'fieldset',