summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhuong Nguyen2009-03-04 22:32:06 (GMT)
committer Phuong Nguyen2009-03-04 22:32:06 (GMT)
commitbb9f7ce19705f52039f11a267a42d49885e3a142 (patch)
tree667de77ce7e8cbed2fb518d46f458aa15a5680b7
parent1b77a8c0f8778e4198d671cd4c43dd7e4e481ce7 (diff)
*** empty log message ***
-rw-r--r--comment-form.tpl.php6
-rw-r--r--node.tpl.php5
-rw-r--r--page.tpl.php4
-rw-r--r--style.css17
-rw-r--r--template.php59
-rw-r--r--theme-settings.php15
6 files changed, 67 insertions, 39 deletions
diff --git a/comment-form.tpl.php b/comment-form.tpl.php
index 8e81b48..a7a2a20 100644
--- a/comment-form.tpl.php
+++ b/comment-form.tpl.php
@@ -18,8 +18,8 @@
<?php print $homepage; ?>
<?php print $subject; ?>
<?php print $comment; ?>
+ <div class="hide">
+ <?php print drupal_render($form); ?>
+ </div>
<?php print $submit; ?><?php print $preview; ?>
</div>
-<div class="hide">
-<?php print drupal_render($form); ?>
-</div> \ No newline at end of file
diff --git a/node.tpl.php b/node.tpl.php
index ba64851..e5cc448 100644
--- a/node.tpl.php
+++ b/node.tpl.php
@@ -8,7 +8,10 @@
<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 '<span class="date">'. $date . '</span>';} ?></p>
+ <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>';} ?>
+ </p>
</div><!-- /post-meta -->
<div class="post-box">
diff --git a/page.tpl.php b/page.tpl.php
index ce27279..ee76baa 100644
--- a/page.tpl.php
+++ b/page.tpl.php
@@ -74,7 +74,7 @@
<div id="page">
<div class="main clearfix">
- <div class="main-inner <?php print mainwidth_class($dock); print ' '. $body_classes;?>">
+ <div class="main-inner <?php print phptemplate_mainwidth_class($dock); print ' '. $body_classes;?>">
<?php if ($messages or $help): ?>
<?php print $messages; ?>
@@ -113,7 +113,7 @@
</div><!-- /#main -->
</div><!-- /#page -->
- <?php if ($footerright or $footerright): ?>
+ <?php if ($footerleft or $footerright): ?>
<div id="footer">
<div class="footer-inner clearfix">
<div class="footer-left">
diff --git a/style.css b/style.css
index 05c9c89..dbbf90f 100644
--- a/style.css
+++ b/style.css
@@ -564,7 +564,7 @@ h3.post-title {
bottom:0;
right:0;
position:absolute;
- border-bottom:0.4em solid #889398;
+ border-bottom:.4em solid #889398;
}
.post-info span {
@@ -828,6 +828,7 @@ h3.post-title {
margin:.2em 0 0 0;
width:auto;
height:auto;
+ float:left;
}
.author a:link,
@@ -854,7 +855,7 @@ h3.post-title-small {
padding:.5em 0;
width:20em;
height:auto;
- border-bottom:.23em solid #30393d;
+ border-bottom:.2em solid #30393d;
}
.comment-form {
@@ -869,7 +870,7 @@ h3.post-title-small {
.box .comment-form .form-submit {
margin:0 0 1.5em 0;
width:11em;
- height:2.3em;
+ height:27px;
background:url( images/submit-comment.gif) no-repeat top center;
display:inline-block;
outline:0;
@@ -938,7 +939,7 @@ h3.post-title-small {
}
.page-node .post-title {
- border-bottom:0.15em solid #30393D;
+ border-bottom:0.14em solid #30393D;
}
.page-comment .full {
@@ -950,10 +951,6 @@ h3.post-title-small {
border:none;
}
-.page-comment .comment-form .form-submit {
- height:1.9em;
-}
-
/** Side Bar **/
.sidebar {
float:right;
@@ -1434,10 +1431,10 @@ div.view div.views-admin-links a{
html.js input.form-autocomplete {
background-image: url(images/throbber.gif);
background-repeat: no-repeat;
- background-position: 100% .6em; /* LTR */
+ background-position: 100% .7em; /* LTR */
}
html.js input.throbbing {
- background-position: 100% -1.1em; /* LTR */
+ background-position: 100% -1.05em; /* LTR */
}
fieldset,
diff --git a/template.php b/template.php
index 5b0c659..bb37529 100644
--- a/template.php
+++ b/template.php
@@ -15,6 +15,7 @@ if (is_null(theme_get_setting('user_notverified_display'))) {
'breadcrumb_display' => 0,
'user_notverified_display' => 1,
'comment_title' => 'Leave a Response',
+ 'display_author' => 1,
'display_teaser_comment' => 'normal',
'front_page_title_display' => 'title_slogan',
'page_title_display_custom' => '',
@@ -157,40 +158,54 @@ function phptemplate_username($object) {
}
/**
- * Display or hide comment count
+ * Display 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>';
-}
-
+ 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;
}
+/**
+ * Display author name in page
+ */
+
+function phptemplate_display_author($name) {
+
+ if (theme_get_setting('display_author') == 0) {
+ $output = '';
+ }
+ else {
+ $output = '<span>By ' .$name . '</span>';
+ }
+ return $output;
+}
+
/**
* Adds 'width940' or 'width580' classes to the main content as needed.
*/
-function mainwidth_class( $dock ) {
+function phptemplate_mainwidth_class($dock) {
$mainwidth = 'width940';
if ( $dock ) {$mainwidth = 'width580';}
diff --git a/theme-settings.php b/theme-settings.php
index 444665f..80900be 100644
--- a/theme-settings.php
+++ b/theme-settings.php
@@ -19,6 +19,7 @@ function phptemplate_settings($saved_settings) {
'breadcrumb_display' => 0,
'user_notverified_display' => 1,
'comment_title' => 'Leave a Response',
+ 'display_author' => 1,
'display_teaser_comment' => 'normal',
'front_page_title_display' => 'title_slogan',
'page_title_display_custom' => '',
@@ -61,6 +62,19 @@ function phptemplate_settings($saved_settings) {
'#default_value' => $settings['user_notverified_display'],
);
+ // Page setting
+ $form['tnt_container']['general_settings']['page'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Page setting'),
+ '#collapsible' => TRUE,
+ '#collapsed' => FALSE,
+ );
+ $form['tnt_container']['general_settings']['page']['display_author'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Display author name in pages'),
+ '#default_value' => $settings['display_author'],
+ );
+
// Comment
$form['tnt_container']['general_settings']['comment'] = array(
'#type' => 'fieldset',
@@ -89,7 +103,6 @@ function phptemplate_settings($saved_settings) {
),
);
-
// SEO settings
$form['tnt_container']['seo'] = array(
'#type' => 'fieldset',