Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

modifying theme for acceptance to wp.org

  • Loading branch information...
commit dd4161e8b468d133c85e6a661d5dae54b6ed452d 1 parent 5d1b474
@pnts authored
Showing with 146 additions and 108 deletions.
  1. +17 −66 comments.php
  2. +2 −1  functions.php
  3. +4 −18 header.php
  4. +0 −4 page.php
  5. +123 −19 style.css
View
83 comments.php
@@ -1,91 +1,42 @@
+<?php if ( post_password_required() ) : ?>
+ <p class="nocomments"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'oulipo' ); ?></p>
<?php
-// Do not delete these lines
- if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
- die ('Please do not load this page directly. Thanks!');
-
- if ( post_password_required() ) { ?>
- <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
- <?php
+ /* Stop the rest of comments.php from being processed,
+ * but don't kill the script entirely -- we still have
+ * to fully load the template.
+ */
return;
- }
+ endif;
?>
<!-- You can start editing here. -->
<?php if ( have_comments() ) : ?>
-
- <h3 id="comments">&sect; <?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
-
+ <h3 id="comments"><?php
+ printf( _n( '&sect; One Response to %2$s', '&sect; %1$s Responses to %2$s"', get_comments_number(), 'oulipo' ),
+ number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
+ ?></h3>
<ul class="commentlist">
<?php wp_list_comments(); ?>
- </ol>
+ </ul>
<div class="navigation">
- <div class="alignleft"><?php previous_comments_link() ?></div>
- <div class="alignright"><?php next_comments_link() ?></div>
+ <div class="alignleft"><?php previous_comments_link(); ?></div>
+ <div class="alignright"><?php next_comments_link(); ?></div>
</div>
-
<?php else : // this is displayed if there are no comments so far ?>
- <?php if ('open' == $post->comment_status) : ?>
+ <?php if ( 'open' == $post->comment_status ) : ?>
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
- <p class="nocomments">Comments are closed.</p>
+ <p class="nocomments"><?php _e( 'Comments are closed.', 'oulipo' ); ?></p>
<?php endif; ?>
<?php endif; ?>
-
-<?php if ('open' == $post->comment_status) : ?>
-
-<div id="respond">
-
-<h3>&sect; <?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
-
-<div class="cancel-comment-reply">
- <small><?php cancel_comment_reply_link(); ?></small>
-</div>
-
-<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
-<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
-<?php else : ?>
-
-<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
-
-<?php if ( $user_ID ) : ?>
-
-<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
-
-<?php else : ?>
-
-<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
-<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
-
-<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
-<label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
-
-<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
-<label for="url"><small>Website</small></label></p>
-
-<?php endif; ?>
-
-<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
-
-<p><textarea name="comment" id="comment" cols="60%" rows="10" tabindex="4"></textarea></p>
-
-<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
-<?php comment_id_fields(); ?>
-</p>
-<?php do_action('comment_form', $post->ID); ?>
-
-</form>
-
-<?php endif; // If registration required and not logged in ?>
-</div>
-
-<?php endif; // if you delete this the sky will fall on your head ?>
+ <?php comment_form(); ?>
View
3  functions.php
@@ -4,6 +4,7 @@
set_post_thumbnail_size( 59, 59, true );
add_custom_background();
add_theme_support( 'automatic-feed-links' );
+ add_editor_style();
define('HEADER_TEXTCOLOR', '000000');
@@ -44,7 +45,7 @@ function register_oulipo_menus() {
if ( function_exists('register_sidebar') )
register_sidebar();
-$GLOBALS['content_width'] = 470;
+$content_width = 470;
add_filter( 'comments_template', 'legacy_comments' );
function legacy_comments( $file ) {
View
22 header.php
@@ -3,22 +3,8 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title><?php
- if (is_home()) {
- bloginfo('name');
- } elseif (is_404()) { ?>
- 404 Not Found
- <?php } elseif (is_category()) { ?>
- <?php bloginfo('name'); ?> - Category: <?php wp_title(''); ?>
- <?php } elseif (is_search()) { ?>
- <?php bloginfo('name'); ?> - Search Results
- <?php } elseif ( is_day() || is_month() || is_year() ) { ?>
- <?php bloginfo('name'); ?> - Archives: <?php wp_title(''); ?>
- <?php } else { ?>
- <?php bloginfo('name'); ?> - <?php wp_title(''); ?>
- <?php } ?>
- </title>
+ <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>" />
+ <title><?php wp_title(); ?> <?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom" href="<?php bloginfo('atom_url'); ?>" />
@@ -34,7 +20,7 @@
<link href="<?php bloginfo('template_directory'); ?>/ie6.css" type="text/css" rel="stylesheet" media="screen" />
<![endif]-->
- <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' );?>
+ <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
</head>
@@ -42,7 +28,7 @@
<div id="wrapper">
<div id="search">
<span class="twitter"><!-- If you want to integrate Twitter, use http://rick.jinlabs.com/code/twitter/ and put the code snippet here. --></span>
- <?php include (TEMPLATEPATH . '/searchform.php'); ?>
+ <?php get_search_form(); ?>
</div>
<div id="main_nav">
View
4 page.php
@@ -19,10 +19,6 @@
<?php else : ?>
<div class="entry">
- <p></p>
- <p class="error">???????????????????</p>
- <p class="error">???????????????????</p>
- <p class="error">???????????????????</p>
<p>Looks like what you were looking for isn't here. You might want to give it another try, perhaps the server hiccuped, or perhaps you spelled something wrong (or maybe I did).</p>
</div>
<?php endif; ?>
View
142 style.css
@@ -81,6 +81,7 @@ input::-moz-focus-inner /*Remove button padding in FF*/
.post {
margin-bottom: 1.5em;
+ clear: both;
}
#supplementary {
@@ -170,9 +171,15 @@ ul#categories li, ul#archives li {
dd.gallery-caption {
font-size: 11px;
- color: #CCC;
+ color: #999;
line-height: 12px;
- margin-top: .5em;
+ margin-top: 0;
+}
+
+.entry dt.gallery-icon img {
+ margin-bottom: .3em;
+ margin-top: .7em;
+ border: 0 !important;
}
.entry .gallery {
@@ -279,7 +286,7 @@ h5 {
}
#entry_content p {
- margin: .7em 0 2em 0;
+ margin: 1.3em 0 1.3em 0;
}
#entry_content p.tags {
@@ -366,6 +373,9 @@ h3#comments {
height: 20px;
}
+.search-no-results .entry img {
+ margin: 0;
+}
.entry.search-results {
margin-bottom: 3em;
@@ -378,7 +388,7 @@ input {
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
- color: #999;
+ color: #666;
}
input#submit {
@@ -399,11 +409,15 @@ blockquote {
}
.entry img {
- margin: 1.5em auto 0 auto;
+ margin: 1.5em auto;
display: block;
border: 0;
}
+.entry .wp-caption img {
+ margin-bottom: 0;
+}
+
.entry img.wp-smiley {
display: inline;
border: 0;
@@ -513,7 +527,7 @@ code {
}
.navigation {
- font-size: .9em;
+ font-size: .7em;
}
.spacer {
@@ -595,6 +609,11 @@ h2 {
border-bottom: 1px solid #EEE;
}
+.entry h2 {
+ border-bottom: 0;
+ font-size: 1.7em;
+}
+
h2 a, #main_nav a {
color: #000;
}
@@ -603,6 +622,11 @@ h3 {
margin: 2em 0 0 0;
}
+.entry h3 {
+ margin-top: .5em;
+ font-size: 1.4em;
+}
+
img a, img a:hover {
text-decoration: none;
}
@@ -790,6 +814,7 @@ ul.archive_block {
ul.commentlist cite {
font-style: normal;
+ font-size: 1.1em;
}
ul.commentlist span.says {
@@ -798,7 +823,7 @@ ul.commentlist span.says {
ul.commentlist .comment-author, ul.commentlist .comment-meta {
font-style: italic;
- color: #aaa;
+ color: #333;
}
.comment-author a, .comment-meta a {
@@ -831,50 +856,127 @@ ul.commentlist .comment.bypostauthor .vcard img {
}
ul.commentlist .comment .comment-author.vcard img{
- border: 1px solid #000;
+ border: 1px solid #CCC;
+ padding: 2px;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkig-border-radius: 2px;
+}
+
+.page p.nocomments {
+ display: none;
}
/* =Comment Styles
------------------------------------------------------------------*/
-ul.commentlist, ul.commentmeta {
+ul.commentlist,
+ul.commentmeta {
margin: 0;
padding: 0;
list-style-type: none;
}
-
ul.commentmeta {
margin-top: 2em;
}
-
img.avatar {
- margin: 0 1em 0 0;
+ margin: .3em 1em 0 0;
float: left;
display: inline;
}
-
.commenttext {
margin-left: 4.4em;
border-bottom: 1px dotted #000;
padding-bottom: 1.5em;
}
-
-#comments, #respond {
+#comments,
+#respond {
margin: 3em 0 0 0;
border: 0;
+ clear: both;
}
-
.moderation {
margin-left: 4.4em;
}
-
.ctitle {
font-variant: small-caps;
}
+li.comment {
+ margin: 1.5em 0;
+}
+#entry-content .comment-body p {
+ margin-bottom: 1em;
+}
+div.reply {
+ margin: -8px 0 34px;
+}
+#respond .comment-notes {
+ margin-bottom: 1em;
+}
+#respond p {
+ margin: 0;
+}
+.form-allowed-tags {
+ line-height: 1em;
+}
+.children #respond {
+ margin: 0 48px 0 0;
+}
+h3#reply-title {
+ margin: 0;
+}
+#comments-list #respond {
+ margin: 0 0 18px 0;
+}
+#comments-list ul #respond {
+ margin: 0;
+}
+#respond .required {
+ color: #ff4b33;
+ font-weight: bold;
+}
+#respond input {
+ margin: 0 0 9px;
+ width: 98%;
+ padding: 4px;
+}
+#respond textarea {
+ width: 98%;
+}
+#respond .form-allowed-tags {
+ color: #888;
+ font-size: 11px;
+ line-height: 18px;
+}
+#respond .form-allowed-tags code {
+ font-size: 11px;
+}
+#respond .form-submit {
+ margin: 12px 0;
+}
+#respond .form-submit input {
+ font-size: 11px;
+ width: auto;
+}
+
+.commentlist .comment-body p {
+ margin: .7em 0 !important;
+}
+
+.commentlist #respond {
+ margin-top: -2em;
+}
-.reply {
- margin-top: -1em;
+.commentlist #respond h3 {
+ margin-bottom: 0;
+ margin-top: 0;
}
+#respond {
+ padding-top: 1em;
+ border-top: 1px solid #EEE;
+}
+
+
/* =Better image scaling in IE
------------------------------------------------------------------*/
@@ -905,6 +1007,8 @@ img { -ms-interpolation-mode:bicubic; }
margin-top: 0;
}
+
+
/* =Widget
------------------------------------------------------------------*/
.textwidget {
Please sign in to comment.
Something went wrong with that request. Please try again.