diff --git a/wp-content/themes/elegant-grunge/404.php b/wp-content/themes/elegant-grunge/404.php new file mode 100644 index 0000000000000000000000000000000000000000..6e3d1b899e0f35be652a5e04cb667fb13216f4ee --- /dev/null +++ b/wp-content/themes/elegant-grunge/404.php @@ -0,0 +1,31 @@ +<?php +header("HTTP/1.1 404 Not Found"); +header("Status: 404 Not Found"); +?> +<?php get_header(); ?> +<div id="content-container"> + + <div id="content"> + <div id="body"> + <h3><?php _e('Not found', 'elegant-grunge') ?></h3> + <p><?php _e('Sorry, no posts could be found here. Try searching below:', 'elegant-grunge'); ?></p> + <?php include (TEMPLATEPATH . "/searchform.php"); ?> + + <?php if (function_exists('smart404_loop') && smart404_loop()) : ?> + <p><?php _e('Or, try one of these posts:', 'elegant-grunge') ?></p> + <?php while (have_posts()) : the_post(); ?> + <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'elegant-grunge'), get_the_title()); ?>"><?php the_title(); ?></a></h4> + <small><?php the_excerpt(); ?></small> + <?php endwhile; ?> + <?php endif; ?> + + <div class="clear"></div> + </div> + + <?php get_sidebar(); ?> + + <div class="clear"></div> +</div><!-- end content --> +</div> + +<?php get_footer(); ?> diff --git a/wp-content/themes/elegant-grunge/Image.class.php b/wp-content/themes/elegant-grunge/Image.class.php new file mode 100644 index 0000000000000000000000000000000000000000..d05f034b1c83743116e54ebedda71a0d3ac633fa --- /dev/null +++ b/wp-content/themes/elegant-grunge/Image.class.php @@ -0,0 +1,253 @@ +<?php + +/** + * Image manipulation class + * + * Copyright (C) 2005, Mike Tyson <mike@tzidesign.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + */ + +class Image +{ + var $resource; + var $orig_path; + var $metadata; + + function &Load($path) + { + if ( !function_exists("imagecreatefromjpeg") ) + { + //DEBUG("GD not installed."); + $ret = null; + return $ret; + } + + $image = new Image; + $image->orig_path = $path; + + // Open image + if( preg_match("/.jpe?g$/i", $path)) + { + $image->resource = @imagecreatefromjpeg($path); + if ( !$image->resource ) + { + // Try to use imagemagick to convert to PNG, then open the PNG + exec("convert '".mysql_escape_string($path)."' /tmp/'".mysql_escape_string(basename($path))."'.png"); + if ( file_exists("/tmp/".basename($path).".png") ) + { + $image->resource = @imagecreatefrompng("/tmp/".basename($path).".png"); + @unlink("/tmp/".basename($path).".png"); + if ( !$image->resource) return null; + } + else + { + return null; + } + } + } + else if ( preg_match("/.gif$/i", $path)) + { + $image->resource = imagecreatefromgif($path); + } + else if( preg_match("/.png$/i", $path)) + { + $image->resource = imagecreatefrompng($path); + } + else + { + //DEBUG("Cannot open image $imagepath: File type not supported"); + return false; + } + + if ( !$image->resource ) + { + //DEBUG("Cannot open image $imagepath: Invalid file"); + return false; + } + + return $image; + } + + + function Release() + { + if ( $this->resource ) imagedestroy($this->resource); + } + + function Width() + { + return imagesx($this->resource); + } + + function Height() + { + return imagesy($this->resource); + } + + function Scale($width, $height, $crop=false, $crop_width=-1, $crop_height=-1, $crop_x=-1, $crop_y=-1) + { + // Read original image dimensions + $orig_w=imagesx($this->resource); + $orig_h=imagesy($this->resource); + + if ( !$crop ) + { + // If not cropping, then scale proportionately to within height/width + if ($orig_w>$width || $orig_h>$height) + { + $img_w=$width; + $img_h=$height; + if ($img_w/$orig_w*$orig_h>$img_h) + $img_w=round($img_h*$orig_w/$orig_h); + else + $img_h=round($img_w*$orig_h/$orig_w); + } + else + { + $img_w=$orig_w; + $img_h=$orig_h; + } + + // Create scaled image + $img=imagecreatetruecolor($img_w,$img_h); + + if ( !$img ) + return false; + + imagecopyresampled($img,$this->resource, + 0,0,0,0,$img_w,$img_h,$orig_w,$orig_h); + } + else + { + $img = imagecreatetruecolor($width, $height); + + $crop_height = ( $crop_height != -1 ? $crop_height : $orig_h ); + $crop_width = ( $crop_width != -1 ? $crop_width : $orig_w ); + + if ($crop_width/$width*$height>$crop_height) + $crop_width=round($crop_height*$width/$height); + else + $crop_height=round($crop_width*$height/$width); + + $x = ( $crop_x != -1 ? $crop_x : round((($orig_w/2) - ($crop_width/2)))); + $y = ( $crop_y != -1 ? $crop_y : round((($orig_h/2) - ($crop_height/2)))); + + imagecopyresampled($img, $this->resource, 0,0, $x, $y, + $width, $height, $crop_width, $crop_height); + } + + $this->resource = $img; + } + + function RoundCorners($bgcolor="FFFFFF", $radius=10) + { + imagealphablending($this->resource, false); + $red = hexdec(substr($bgcolor, 0, 2)); + $green = hexdec(substr($bgcolor, 2, 2)); + $blue = hexdec(substr($bgcolor, 4, 2)); + $alpha = (strlen($bgcolor)>6 ? ((255/hexdec(substr($bgcolor, 4, 2)))*127) : false); + + $loops = array( + array("startx" => 0, "endx" => $radius, + "starty" => 0, "endy" => $radius, + "centerx" => $radius, "centery" => $radius), // Top left + + array("startx" => imagesx($this->resource)-$radius, "endx" => imagesx($this->resource), + "starty" => 0, "endy" => $radius, + "centerx" => imagesx($this->resource)-1-$radius, "centery" => $radius), // Top right + + array("startx" => 0, "endx" => $radius, + "starty" => imagesy($this->resource)-1-$radius, "endy" => imagesy($this->resource), + "centerx" => $radius, "centery" => imagesy($this->resource)-1-$radius), // Bottom left + + array("startx" => imagesx($this->resource)-1-$radius, "endx" => imagesx($this->resource), + "starty" => imagesy($this->resource)-1-$radius, "endy" => imagesy($this->resource), + "centerx" => imagesx($this->resource)-1-$radius, "centery" => imagesy($this->resource)-1-$radius), // Bottom right + + ); + + foreach ( $loops as $loop ) + for ( $i=$loop["startx"]; $i<$loop["endx"] && $i<imagesx($this->resource); $i++ ) + for ( $j=$loop["starty"]; $j<$loop["endy"] && $j<imagesy($this->resource); $j++ ) + { + $distFromRadius = sqrt((($loop["centerx"]-$i)*($loop["centerx"]-$i)) + (($loop["centery"]-$j)*($loop["centery"]-$j))); + $intensity = $distFromRadius - $radius; + if ( $intensity < 0.0 ) continue; + if ( $intensity > 1.0 ) $intensity = 1.0; + + $color = imagecolorat($this->resource, $i, $j); + $r = ($color >> 16) & 0xFF; + $g = ($color >> 8) & 0xFF; + $b = ($color ) & 0xFF; + $a = ($color >> 24) & 0xFF; + + if ( $alpha === false || $alpha == 0 ) + { + $color = imagecolorallocate($this->resource, + ($intensity*$red)+((1.0-$intensity)*$r), + ($intensity*$green)+((1.0-$intensity)*$g), + ($intensity*$blue)+((1.0-$intensity)*$b)); + } + else if ( $alpha == 127 ) + { + $color = imagecolorallocatealpha($this->resource, + $r, $g, $b, + ($intensity*$alpha)+((1.0-$intensity)*$a)); + } + else + { + $color = imagecolorallocatealpha($this->resource, + ($intensity*$red)+((1.0-$intensity)*$r), + ($intensity*$green)+((1.0-$intensity)*$g), + ($intensity*$blue)+((1.0-$intensity)*$b), + ($intensity*$alpha)+((1.0-$intensity)*$a)); + } + + imagesetpixel($this->resource, $i, $j, $color); + } + } + + function Save($path="") + { + if ( !$path ) $path = $orig_path; + + if( preg_match("/.jpe?g$/i", $path)) + { + return imagejpeg($this->resource,$path,90); + } + else if ( preg_match("/.gif$/i", $path)) + { + return imagegif($this->resource,$path); + } + else if( preg_match("/.png$/i", $path)) + { + return imagesavealpha($this->resource, true); + return imagepng($this->resource,$path); + } + else + { + //DEBUG("Cannot save image: File type not supported"); + return false; + } + + return true; + } +}; + + +?> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/comments.php b/wp-content/themes/elegant-grunge/comments.php new file mode 100644 index 0000000000000000000000000000000000000000..578ffe2aed77a826ac26129165c672562ff2db54 --- /dev/null +++ b/wp-content/themes/elegant-grunge/comments.php @@ -0,0 +1,151 @@ +<?php + +// Do not delete these lines +if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) + die ('Please do not load this page directly. Thanks!'); + +if ( ( function_exists('post_password_required') && post_password_required()) || + (!function_exists('post_password_required') && !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) ) { + ?> + <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'elegant-grunge') ?></p> + <?php + return; +} + +?> + +<!-- You can start editing here. --> +<?php +function elegant_grunge_comments_template($comment, $args, $depth) { + $GLOBALS['comment'] = $comment; + ?> + <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>" <?php echo ($depth>1?'style="margin-left: '.(30+(($depth-1)*30)).'px"':'')?>> + <div class="comment-content"> + <div class="before-comment"></div> + <div class="comment"> + <?php echo get_avatar( $comment, 32 ); ?> + <cite><?php comment_author_link() ?></cite> <?php _e('Says:', 'elegant-grunge') ?> + <?php if ($comment->comment_approved == '0') : ?> + <em><?php _e('Your comment is awaiting moderation.', 'elegant-grunge') ?></em> + <?php endif; ?> + <br /> + + <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php printf(_c('%1$s at %2$s|date at time', 'elegant-grunge'), get_comment_date(__('F jS, Y', 'elegant-grunge')), get_comment_time()) ?></a> <?php edit_comment_link(__('edit', 'elegant-grunge'),' ',''); ?></small> + + <div class="comment-text"><?php comment_text() ?></div> + + + <?php if ( function_exists('comment_reply_link') ) : ?> + <div class="reply"> + <?php comment_reply_link(array_merge( $args, array('add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?> + </div> + <?php endif; ?> + + </div> + <div class="after-comment"><div></div></div> + </div> + </li> + + <?php + /* Changes every other comment to a different class */ + $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : ''; +} + + +?> + + +<?php if ($comments) : ?> + <h4 id="comments"><?php comments_number(__('No Responses', 'elegant-grunge'), __('One Response', 'elegant-grunge'), __('% Responses', 'elegant-grunge')) ?> <?php printf(__('to “%s”', 'elegant-grunge'), get_the_title()) ?></h4> + + <?php if ( function_exists('previous_comments_link') ) : ?> + <div class="navigation"> + <div class="alignleft"><?php previous_comments_link() ?></div> + <div class="alignright"><?php next_comments_link() ?></div> + </div> + <?php endif; ?> + + <div class="clear"></div> + + <ul class="commentlist"> + <?php + if ( function_exists('wp_list_comments') ) { + wp_list_comments('callback=elegant_grunge_comments_template'); + } else { + foreach ($comments as $comment) { + elegant_grunge_comments_template($comment, null, 0); + } + } + ?> + </ul> + + <?php if ( function_exists('previous_comments_link') ) : ?> + <div class="navigation"> + <div class="alignleft"><?php previous_comments_link() ?></div> + <div class="alignright"><?php next_comments_link() ?></div> + </div> + <?php endif; ?> + + <div class="clear"></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. --> + + <?php else : // comments are closed ?> + <!-- If comments are closed. --> + <p class="nocomments"><?php _e('Comments are closed.', 'elegant-grunge') ?></p> + + <?php endif; ?> +<?php endif; ?> + + +<?php if ('open' == $post->comment_status) : ?> + +<h4 id="respond"><?php _e('Leave a Reply', 'elegant-grunge') ?></h4> + +<?php if ( function_exists('cancel_comment_reply_link') ) : ?> +<div class="cancel-comment-reply"> + <small><?php cancel_comment_reply_link(); ?></small> +</div> +<?php endif; ?> + +<?php if ( get_option('comment_registration') && !$user_ID ) : ?> +<p><?php printf(__('You must be %1$slogged in%2$s to post a comment.', 'elegant-grunge'), '<a href="'.get_option('siteurl').'/wp-login.php?redirect_to='.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 printf(__('Logged in as %1$s. %2$sLog out »%3$s', 'elegant-grunge'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>', '<a href="'.(function_exists('wp_logout_url') ? wp_logout_url(get_permalink()) : get_option('siteurl').'/wp-login.php?action=logout" title="').'" title="'.__('Log out of this account', 'elegant-grunge').'">', '</a>') ?></p> + +<?php else : ?> + +<p><input type="text" class="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /> +<label for="author"><small><?php _e('Name', 'elegant-grunge') ?> <?php if ($req) _e("(required)", 'elegant-grunge'); ?></small></label></p> + +<p><input type="text" class="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /> +<label for="email"><small><?php _e('Mail (will not be published)', 'elegant-grunge') ?> <?php if ($req) _e("(required)", 'elegant-grunge'); ?></small></label></p> + +<p><input type="text" class="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /> +<label for="url"><small><?php _e('Website', 'elegant-grunge') ?></small></label></p> + +<?php endif; ?> + +<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>--> + +<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p> + +<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'elegant-grunge') ?>" /> +<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> +<?php if ( function_exists('comment_id_fields') ) comment_id_fields(); ?> +</p> +<?php do_action('comment_form', $post->ID); ?> + +</form> + +<?php endif; // If registration required and not logged in ?> + +<?php endif; // if you delete this the sky will fall on your head ?> diff --git a/wp-content/themes/elegant-grunge/default.mo b/wp-content/themes/elegant-grunge/default.mo new file mode 100644 index 0000000000000000000000000000000000000000..da4d826675db41a3b2a447f654d06e2cb06aa96d Binary files /dev/null and b/wp-content/themes/elegant-grunge/default.mo differ diff --git a/wp-content/themes/elegant-grunge/default.po b/wp-content/themes/elegant-grunge/default.po new file mode 100644 index 0000000000000000000000000000000000000000..9ce514c8bc2ae054113324bf90dd382069b1f947 --- /dev/null +++ b/wp-content/themes/elegant-grunge/default.po @@ -0,0 +1,549 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Grunge 1.0.3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-01-16 14:26+1000\n" +"PO-Revision-Date: \n" +"Last-Translator: Michael Tyson <mike@tyson.id.au>\n" +"Language-Team: Michael Tyson <mike@tyson.id.au>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: English\n" +"X-Poedit-Country: AUSTRALIA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__;_c\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:10 +msgid "Not found" +msgstr "" + +#: 404.php:11 +msgid "Sorry, no posts could be found here. Try searching below:" +msgstr "" + +#: 404.php:15 +msgid "Or, try one of these posts:" +msgstr "" + +#: 404.php:17 +#: index.php:20 +#: search.php:16 +#, php-format +msgid "Permanent Link to %s" +msgstr "" + +#: comments.php:10 +msgid "This post is password protected. Enter the password to view comments." +msgstr "" + +#: comments.php:27 +msgid "Says:" +msgstr "" + +#: comments.php:29 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: comments.php:33 +#, php-format +msgid "%1$s at %2$s|date at time" +msgstr "" + +#: comments.php:33 +msgid "F jS, Y" +msgstr "" + +#: comments.php:33 +msgid "edit" +msgstr "" + +#: comments.php:59 +msgid "No Responses" +msgstr "" + +#: comments.php:59 +msgid "One Response" +msgstr "" + +#: comments.php:59 +msgid "% Responses" +msgstr "" + +#: comments.php:59 +#, php-format +msgid "to “%s”" +msgstr "" + +#: comments.php:98 +msgid "Comments are closed." +msgstr "" + +#: comments.php:106 +msgid "Leave a Reply" +msgstr "" + +#: comments.php:115 +#, php-format +msgid "You must be %1$slogged in%2$s to post a comment." +msgstr "" + +#: comments.php:122 +#, php-format +msgid "Logged in as %1$s. %2$sLog out »%3$s" +msgstr "" + +#: comments.php:122 +msgid "Log out of this account" +msgstr "" + +#: comments.php:127 +msgid "Name" +msgstr "" + +#: comments.php:127 +#: comments.php:130 +msgid "(required)" +msgstr "" + +#: comments.php:130 +msgid "Mail (will not be published)" +msgstr "" + +#: comments.php:133 +msgid "Website" +msgstr "" + +#: comments.php:141 +msgid "Submit Comment" +msgstr "" + +#: footer.php:9 +msgid "Subscribe RSS" +msgstr "" + +#: footer.php:17 +#, php-format +msgid "%1$s Theme by %2$s." +msgstr "" + +#: functions.php:451 +msgid "Header image:" +msgstr "" + +#: functions.php:454 +msgid "If specified, the image (typically a transparent PNG) at the above URL will be used for the header." +msgstr "" + +#: functions.php:459 +msgid "RSS subscription:" +msgstr "" + +#: functions.php:462 +msgid "Display RSS subscription link" +msgstr "" + +#: functions.php:467 +msgid "Post info:" +msgstr "" + +#: functions.php:470 +msgid "Display post author" +msgstr "" + +#: functions.php:475 +msgid "Page setup:" +msgstr "" + +#: functions.php:486 +msgid "Copyright message:" +msgstr "" + +#: functions.php:493 +#: functions.php:598 +#: functions.php:643 +msgid "Image frames:" +msgstr "" + +#: functions.php:496 +#: functions.php:603 +#: functions.php:648 +msgid "Apply frame to all images" +msgstr "" + +#: functions.php:497 +#, php-format +msgid "" +"If enabled, all images larger than %1$d x %2$d\n" +"\t\t\t\twill have a frame with drop shadow applied. Otherwise, only images and other elements with a class\n" +"\t\t\t\tof 'frame' will have this style applied.<br/>\n" +"\t\t\t\tThis setting can be configured per-post and per-page, also." +msgstr "" + +#: functions.php:505 +msgid "Don't frame images with class:" +msgstr "" + +#: functions.php:508 +msgid "Separate multiple classes with commas ','" +msgstr "" + +#: functions.php:513 +msgid "Extra header content:" +msgstr "" + +#: functions.php:516 +msgid "This can be used to add extra RSS feed links from your page, for example, such as a Twitter feed." +msgstr "" + +#: functions.php:521 +msgid "Photoblog thumbnails:" +msgstr "" + +#: functions.php:525 +msgid "Create scaled thumbnails" +msgstr "" + +#: functions.php:526 +msgid "" +"If enabled, will generate thumbnail files. Otherwise, will use the original images, resulting in slower loading times.\n" +"\t\t\tNote that the first photoblog page load after this is enabled will be slow, while images are being created, so you should\n" +"\t\t\t<a href=\"/tag/photoblog\" target=\"_blank\">load this</a> yourself." +msgstr "" + +#: functions.php:531 +msgid "Thumbnail size:" +msgstr "" + +#: functions.php:534 +msgid "Leave blank for flexible size" +msgstr "" + +#: functions.php:539 +msgid "Photoblog display:" +msgstr "" + +#: functions.php:542 +msgid "Number of thumbnails per page:" +msgstr "" + +#: functions.php:547 +msgid "Use lightbox mode" +msgstr "" + +#: functions.php:548 +msgid "Requires a lightbox plugin to be installed, such as <a href=\"http://www.stimuli.ca/lightbox/\">Lightbox 2</a>." +msgstr "" + +#: functions.php:552 +msgid "Draw frames around photoblog items" +msgstr "" + +#: functions.php:564 +msgid "Save Changes" +msgstr "" + +#: functions.php:593 +#: functions.php:638 +msgid "Elegant Grunge Theme Options" +msgstr "" + +#: functions.php:604 +#, php-format +msgid "" +"If enabled, all images larger than %1$d x %2$d \n" +"\t\t\t\twill have a frame with drop shadow applied. Otherwise, only images and other elements with a class\n" +"\t\t\t\tof 'frame' will have this style applied." +msgstr "" + +#: functions.php:649 +#, php-format +msgid "" +"If enabled, all images larger than %1$d x %2$d \n" +"\t\t\t\t\twill have a frame with drop shadow applied. Otherwise, only images and other elements with a class\n" +"\t\t\t\t\tof 'frame' will have this style applied." +msgstr "" + +#: functions.php:656 +msgid "Related tag(s):" +msgstr "" + +#: functions.php:660 +msgid "" +"If specified and 'Page with custom sidebar' page template is selected, will display posts from these tags\n" +"\t\t\t\t\tin the sidebar. Specify multiple tags by separating with a comma ','." +msgstr "" + +#: functions.php:667 +msgid "Related posts title:" +msgstr "" + +#: functions.php:671 +msgid "" +"If 'Page with custom sidebar' page template is selected, and one or more related tags are provided above, this will be the title\n" +"\t\t\t\t\tabove a list of related posts." +msgstr "" + +#: functions.php:678 +msgid "Extra sidebar content:" +msgstr "" + +#: functions.php:682 +msgid "If 'Page with custom sidebar' page template is selected, this text/HTML will be displayed in the sidebar." +msgstr "" + +#: functions.php:779 +msgid "Heading:" +msgstr "" + +#: functions.php:784 +msgid "Display:" +msgstr "" + +#: functions.php:785 +msgid "entries" +msgstr "" + +#: functions.php:790 +msgid "Display random entries" +msgstr "" + +#: functions.php:792 +msgid "Display recent entries" +msgstr "" + +#: functions.php:796 +msgid "Tags to display:" +msgstr "" + +#: functions.php:798 +msgid "Separate multiple tags with commas" +msgstr "" + +#: functions.php:802 +msgid "Image width:" +msgstr "" + +#: functions.php:807 +msgid "Image height:" +msgstr "" + +#: header.php:12 +#: header.php:13 +msgid "Archive" +msgstr "" + +#: header.php:70 +msgid "Home" +msgstr "" + +#: index.php:29 +msgid "Continue reading" +msgstr "" + +#: index.php:35 +#: search.php:19 +msgid "no comments" +msgstr "" + +#: index.php:35 +#: search.php:19 +msgid "1 comment" +msgstr "" + +#: index.php:35 +#: search.php:19 +#, php-format +msgid "% comments" +msgstr "" + +#: index.php:36 +#: search.php:20 +msgid "tags:" +msgstr "" + +#: index.php:38 +#: search.php:22 +msgid "posted in" +msgstr "" + +#: index.php:40 +#: search.php:24 +msgid "Edit" +msgstr "" + +#: index.php:50 +#: search.php:30 +msgid "« Older Entries" +msgstr "" + +#: index.php:51 +#: search.php:31 +msgid "Newer Entries »" +msgstr "" + +#: index.php:56 +msgid "Not Found" +msgstr "" + +#: index.php:57 +msgid "Sorry, but you are looking for something that isn't here." +msgstr "" + +#: links.php:12 +msgid "Links" +msgstr "" + +#: page-custom-sidebar.php:19 +#: page-no-sidebar.php:19 +#: page.php:11 +msgid "<p class=\"serif\">Read the rest of this page »</p>" +msgstr "" + +#: page-custom-sidebar.php:21 +#: page-no-sidebar.php:21 +#: page.php:13 +msgid "Pages:" +msgstr "" + +#: page-custom-sidebar.php:26 +#: page-no-sidebar.php:26 +#: page.php:18 +msgid "Edit this entry." +msgstr "" + +#: page-custom-sidebar.php:43 +msgid "Related posts" +msgstr "" + +#: page-custom-sidebar.php:54 +msgid "More updates" +msgstr "" + +#: search.php:11 +msgid "Search Results" +msgstr "" + +#: search.php:36 +msgid "No posts found. Try a different search?" +msgstr "" + +#: searchform.php:1 +msgid "search" +msgstr "" + +#: searchform.php:5 +msgid "Go" +msgstr "" + +#: sidebar.php:21 +#, php-format +msgid "You are currently browsing the archives for the %s category." +msgstr "" + +#: sidebar.php:24 +#, php-format +msgid "You are currently browsing the %1$s blog archives for the day %2$s" +msgstr "" + +#: sidebar.php:26 +#: single.php:30 +msgid "l, F jS, Y" +msgstr "" + +#: sidebar.php:29 +#, php-format +msgid "You are currently browsing the %1$s blog archives for %2$s" +msgstr "" + +#: sidebar.php:31 +msgid "F, Y" +msgstr "" + +#: sidebar.php:34 +#, php-format +msgid "You are currently browsing the %1$s blog archives for the year %2$s" +msgstr "" + +#: sidebar.php:36 +msgid "Y" +msgstr "" + +#: sidebar.php:39 +#, php-format +msgid "You have searched the %1$s blog archives for <strong>%2$s</strong>. If you are unable to find anything in these search results, you can try one of these links." +msgstr "" + +#: sidebar.php:43 +#, php-format +msgid "You are currently browsing the %s blog archives" +msgstr "" + +#: sidebar.php:50 +#: single.php:24 +msgid "Pages" +msgstr "" + +#: sidebar.php:52 +msgid "Archives" +msgstr "" + +#: sidebar.php:58 +msgid "Categories" +msgstr "" + +#: sidebar.php:63 +msgid "Meta" +msgstr "" + +#: single.php:27 +msgid "Tags:" +msgstr "" + +#: single.php:30 +#, php-format +msgid "This entry was posted on %1$s at %2$s" +msgstr "" + +#: single.php:32 +#, php-format +msgid "and is filed under %s" +msgstr "" + +#: single.php:34 +msgid ". " +msgstr "" + +#: single.php:35 +#, php-format +msgid "You can follow any responses to this entry through the <a href=\"%s\">RSS 2.0</a> feed." +msgstr "" + +#: single.php:40 +#, php-format +msgid "You can %1$sleave a response%2$s, or %3$strackback%4$s from your own site." +msgstr "" + +#: single.php:45 +#, php-format +msgid "Responses are currently closed, but you can %1$strackback%2$s from your own site." +msgstr "" + +#: single.php:50 +msgid "You can skip to the end and leave a response. Pinging is currently not allowed." +msgstr "" + +#: single.php:54 +msgid "Both comments and pings are currently closed." +msgstr "" + +#: single.php:56 +msgid "Edit this entry" +msgstr "" + +#: single.php:66 +msgid "Sorry, no posts matched your criteria." +msgstr "" + diff --git a/wp-content/themes/elegant-grunge/footer.php b/wp-content/themes/elegant-grunge/footer.php new file mode 100644 index 0000000000000000000000000000000000000000..31ab7a04d7ba0518ca58b24c8859dae19f730a93 --- /dev/null +++ b/wp-content/themes/elegant-grunge/footer.php @@ -0,0 +1,24 @@ +</div> <!-- End page /--> + +<div id="footer-wrap-outer"> +<div id="footer-wrap"> + <div id="footer"> + + <?php if ( get_option("show_rss") ) : ?> + <div id="subscribe"> + <a href="<?php bloginfo('rss2_url'); ?>"><?php _e('Subscribe RSS', 'elegant-grunge') ?></a> + </div> + <?php endif; ?> + + <?php get_sidebar('footer'); ?> + + <div class="clear"></div> + <div class="legal"><?php echo get_option("copyright"); ?></div> + <div class="credit"><?php printf(__('%1$s Theme by %2$s.', 'elegant-grunge'), '<a href="http://wordpress.org" target="_blank">WordPress</a>', '<a href="http://michael.tyson.id.au/wordpress" target="_blank">Michael Tyson</a>') ?></div> + <?php wp_footer(); ?> + </div> +</div> +</div> + +</body> +</html> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/functions.php b/wp-content/themes/elegant-grunge/functions.php new file mode 100644 index 0000000000000000000000000000000000000000..c6e6ac8fc8edfd83b63a348f1dde2720b15e1fe4 --- /dev/null +++ b/wp-content/themes/elegant-grunge/functions.php @@ -0,0 +1,860 @@ +<?php + +define("ELEGANT_GRUNGE_FRAME_MAX_WIDTH", 415); +define("ELEGANT_GRUNGE_FRAME_SMALL_WIDTH", 140); +define("ELEGANT_GRUNGE_FRAME_SMALL_HEIGHT", 140); +define("ELEGANT_GRUNGE_FRAME_MIN_WIDTH", 25); +define("ELEGANT_GRUNGE_FRAME_MIN_HEIGHT", 25); + + +if ( function_exists('register_sidebar') ) { + if ( get_option('page_setup') != 'no-sidebar' ) { + register_sidebar(array( + 'name' => 'Sidebar', + 'before_widget' => '<li id="%1$s" class="widget %2$s">', + 'after_widget' => '</li>', + 'before_title' => '<h2 class="widgettitle">', + 'after_title' => '</h2>', + )); + } + if ( get_option('page_setup') == 'double-right-sidebar' ) { + register_sidebar(array( + 'name' => 'Sidebar 2', + 'before_widget' => '<li id="%1$s" class="widget %2$s">', + 'after_widget' => '</li>', + 'before_title' => '<h2 class="widgettitle">', + 'after_title' => '</h2>', + )); + } + register_sidebar(array( + 'name' => 'Footer', + 'before_widget' => '<div class="widget-wrap"><div class="widget %2$s">', + 'after_widget' => '</div></div>', + 'before_title' => '<h2>', + 'after_title' => '</h2>', + )); +} + +if( !function_exists('array_combine') ) { + function array_combine($a, $b) { + $c = array(); + $at = array_values($a); + $bt = array_values($b); + foreach($at as $key=>$aval) $c[$aval] = $bt[$key]; + return $c; + } +} + +/** + * Add frames + * + * Filters content, adding frames to all objects with class 'frame', and all images if + * corresponding option is set. + */ +function elegant_grunge_filter( $content , $arg2=null, $arg3=null ) { + global $post; + + // Not for feeds + if ( is_feed() ) return $content; + + // Look-ahead for class 'frame' + $frameClass = '(?=[^>]+class=["\'][^"\']*frame)'; + + // Skipped classes + $classes = "(?:".join("|", array_map("trim", explode(",",get_option('frame_class_skip')))).")"; + $skippedClasses = '(?![^>]+class=["\'][^"\']*'.$classes.')'; + + // Content which we want to include inside the frame + $aStart = '(?:<\s*a[^>]+>\s*)?'; + $aEnd = '(?:\s*</a\s*>)?'; + $caption = '(?:\s*<p class="wp-caption-text">.*?</p>)?'; + + // Beginning tag, including class check + $startTagWithFrameClass = "<\s*((?:(img)|[a-zA-Z]+))${skippedClasses}${frameClass}[^>]*"; + + // End of tag: Short form + $endSingleTag = '(?(2)\s*/?>|\s*/>)'; + + // End of tag: Long form + $endOriginalTag = '</\s*\\g{1}\s*>'; + + // Any tag + $anyStartTag = '<\s*([a-z]+)[^>]*'; + $endLastTag = '</\s*\\g{-1}\s*>'; + + // Nested content - tags within tags + $nestedContent = "([^<]+|(?:$anyStartTag(?:$endSingleTag|>(?-2)*$endLastTag)))*"; + + // Composite expression - look for a block with class of 'frame', and include all content + $regex = "$aStart$startTagWithFrameClass(?:$endSingleTag|>$nestedContent$endOriginalTag)$aEnd$caption"; + $regexes = array("@".$regex."@is"); + + // Also replace all images + $frame_all_images = get_option("frame_all_images"); + $frame_all_images_post = get_post_meta($post->ID, 'frame_all_images', true); + if ( $frame_all_images_post == "true" ) + $frame_all_images = true; + else if ( $frame_all_images_post == "false" ) + $frame_all_images = false; + + if ( $frame_all_images ) { + + // Look-ahead for not class of frame (becuase we caught these above) + $notFrameClass = '(?![^>]+class=["\'][^"\']*frame)'; + + // Composite expression - any images not with class of 'frame' + $regex = "$aStart\s*<\s*(img)${notFrameClass}${skippedClasses}[^>]+>\s*$aEnd$caption"; + $regexes[] = "@".$regex."@is"; + } + + // Perform replacement with helper function below + $newContent = @preg_replace_callback($regexes, 'elegant_grunge_replace', $content); + if ( !$newContent ) { + return $content; + } + + return $newContent; +} + + +/** + * Filter helper function + * + * Perform replacements for blocks discovered in the filter function above. + * Adds surrounding divs for frame, styled according to original block, + * resizes too-large images, and ignores entire block if it is a too-small + * image (because it will look weird, otherwise) + */ +function elegant_grunge_replace($matches) { + + $inner = $matches[0]; + + // Look for align and style attributes + $align = '(^(?:<\s*a[^>]+>)?\s*<[^>]*?)align=["\'](left|right)["\']'; + $style = '(^(?:<\s*a[^>]+>)?\s*<[^>]*?)style=["\']([^"\']+)["\']'; + $class = '(^(?:<\s*a[^>]+>)?\s*<[^>]*?)class=["\']([^"\']+)["\']'; + + $styles = ""; + if ( preg_match( "@$align@is", $inner, $newmatch ) ) { + // Align attribute found: Add an equivalent float + $styles .= "float: ".$newmatch[2].";"; + } + + if ( preg_match( "@$style@is", $inner, $newmatch ) ) { + // Style attribute found: Remember content, but minus some undesirable elements + $styles .= preg_replace("@(border(-[a-z]+)?|padding(-[a-z]+)?|margin-([a-z]+)?)\s*:[^;\"']*;?@is", "", $newmatch[2]); + } + + if ( preg_match( "@$class@is", $inner, $newmatch ) ) { + // Style attribute found: Remember content + $classes = trim(preg_replace("@(?<![a-z])frame(?!=[a-z])@is", "", $newmatch[2])); + } + + // Check width and height + $widthRegex = '@(^(?:<\s*a[^>]+>)?\s*<[^>]*?(?:width=[\'"]|width:\s*))([0-9]+)@is'; + $heightRegex = '@(^(?:<\s*a[^>]+>)?\s*<[^>]*?(?:height=[\'"]|height:\s*))([0-9]+)@is'; + + if ( preg_match( $widthRegex, $inner, $newmatch ) ) { + $width = $newmatch[2]; + } + if ( preg_match( $heightRegex, $inner, $newmatch ) ) { + $height = $newmatch[2]; + } + + if ( ( $width && $width < ELEGANT_GRUNGE_FRAME_MIN_WIDTH ) || ( $height && $height < ELEGANT_GRUNGE_FRAME_MIN_HEIGHT ) ) { + // Image is too small - just skip this one: return original content + return $inner; + } + + if ( $width && $width > ELEGANT_GRUNGE_FRAME_MAX_WIDTH ) { + // Image is too large - scale down proportionately + if ( $height ) { + $ratio = $width / $height; + $height = round(ELEGANT_GRUNGE_FRAME_MAX_WIDTH / $ratio); + + // Replace height value + $inner = preg_replace( $heightRegex, "\${1}$height", $inner ); + } + $width = ELEGANT_GRUNGE_FRAME_MAX_WIDTH; + + // Replace width value + $inner = preg_replace( $widthRegex, "\${1}$width", $inner ); + } + + $small = ''; + if ( ( $width && $width < ELEGANT_GRUNGE_FRAME_SMALL_WIDTH ) || ( $height && $height < ELEGANT_GRUNGE_FRAME_SMALL_HEIGHT ) ) { + // Image is too small for the large frame - use the small frame + $small = ' small'; + } + + // Wrap content, and remove align/style from inner tag + return '<span class="frame-outer '.$small.' '.$classes.'"'.($styles ? ' style="'.trim($styles).'"' : '' ).'><span><span><span><span>' . + preg_replace(array("@${align}@is","@${style}@is"), '\\1', $inner). + '</span></span></span></span></span>'; +} + + + +// Photoblog routines + + +/** + * Prepare image from post + * + * Scans post for images and sets a few variables on post object + */ +function image_setup(&$post) { + + if ( !preg_match("@(?:<a([^>]+?)/?>\s*)?<img([^>]+?)/?>(?:\s*</a>)?@", $post->post_content, $matches) ) { + return; + } + + $tagRegex = "@([a-zA-Z]+)(?:=([\"'])(.*?)\\2)@"; + if ( !preg_match_all($tagRegex, $matches[2], $tag) ) { + return; + } + + $image = array_combine($tag[1], $tag[3]); + + if ( $matches[1] && preg_match_all($tagRegex, $matches[1], $tag) ) { + $link = array_combine($tag[1], $tag[3]); + } + + if ( !$image["src"] ) { + return; + } + + $post->thumb_url = $post->image_url = clean_url( $image["src"], 'raw' ); + $post->image_tag = $matches[0]; + + if ( $link["href"] && preg_match("/jpg|jpeg|jpe|png|gif/i", $link["href"]) ) { + $post->image_url = $link["href"]; + } + + $post->image_dimensions = array("width" => $image["width"], "height" => $image["height"]); + + $post->image_info = $image; + $post->image_link_info = $link; + + $description = trim(strip_tags(preg_replace("/\[[a-zA-Z][^\]]+\]/", "", $post->post_content))); + if ( strlen($description) > 250 ) $description = substr($description, 0, 250)."..."; + $post->image_info["description"] = $description; +} + +/** + * Template tag: Get the image from the post + * + * @param return boolean If true, returns the image tag instead of printing it + */ +function the_image($return = null) { + global $post; + if(!$post->image_tag) { + image_setup($post); + } + if ($return) + return $post->image_tag; + else + echo $post->image_tag; +} + + +/** + * Template tag: Get the image URL from the post + * + * @param return boolean If true, returns the image URL instead of printing it + */ +function the_image_url($return = null) { + global $post; + if(!$post->image_url) { + image_setup($post); + } + if ($return) + return $post->image_url; + else + echo $post->image_url; +} + +/** + * Template tag: Get the thumbnail URL from the post + * + * @param return boolean If true, returns the thumb URL instead of printing it + */ +function the_image_thumb_url($return = false) { + global $post; + if(!$post->thumb_url) { + image_setup($post); + } + if ($return) + return $post->thumb_url; + else + echo $post->thumb_url; +} + +/** + * Get post image information + * + * @returns Information about the image + */ +function the_image_info() { + global $post; + if(!$post->thumb_url) { + image_setup($post); + } + return $post->image_info; +} + +/** + * Template tag: Determine if post has an image + * + * @returns True if an image exists, false otherwise + */ +function has_image() { + return (the_image_info() != null); +} + +/** + * Template tag: Get the scaled thumbnail + * + * Attempts to create a new image derived from the original image and + * scaled down to width x height. Will crop out of center of image if + * aspect ratio does not match + * + * @param width int Width of thumbnail + * @param height int Height of thumbnail + * @returns Path to scaled thumbnail, or false on failure + */ +function the_image_scaled_thumb_url($width, $height) { + + global $post; + $thumb = the_image_thumb_url(true); + if ( !$thumb ) return false; + + if ( substr($thumb, 0, strlen(WP_CONTENT_URL)) == WP_CONTENT_URL ) { + if ( file_exists($f = WP_CONTENT_DIR."/".substr($thumb, strlen(WP_CONTENT_URL))) ) + $thumb = $f; + } + + $path = "elegant-grunge-thumbnails/".preg_replace("/[^a-zA-Z0-9]/", "-", $thumb)."-$width.$height.jpg"; + + if ( file_exists(WP_CONTENT_DIR."/".$path) ) { + return clean_url(WP_CONTENT_URL."/".$path, 'raw'); + } + + if ( !get_option('create_photoblog_thumbnails') ) return false; + + // Check for GD support + if ( !function_exists('imagejpeg') ) return false; + + require_once("Image.class.php"); + $image = Image::Load($thumb); + if ( !$image ) return false; + + $image->Scale($width, $height, true); + + if ( !file_exists(WP_CONTENT_DIR."/elegant-grunge-thumbnails") ) { + mkdir(WP_CONTENT_DIR."/elegant-grunge-thumbnails", 0755); + } + + if ( !$image->Save(WP_CONTENT_DIR."/".$path) ) { + return false; + } + + return clean_url(WP_CONTENT_URL."/".$path, 'raw'); +} + +/** + * Template tag: Get the thumbnail + * + * @param width int Width of thumbnail (optional) + * @param height int Height of thumbnail (optional) + * @param return boolean If true, returns the thumb URL instead of printing it (optional) + */ +function the_thumbnail($width = 0, $height = 0, $return = false) { + global $post; + $url = the_image_url(true); + if ( !$url ) return; + + $info = the_image_info(); + + if ( !$width && !$height ) { + $width = 100; + $height = 80; + if ( $info["width"] && $info["height"] ) { + if ( $info["width"] > $info["height"] ) { + $height = 100; + $width = ($info["width"] / $info["height"]) * $height; + if ( $width > 300 ) { + $width = 300; + $height = ($info["height"] / $info["width"]) * $width; + } + } else { + $height = 100; + $width = ($info["width"] / $info["height"]) * $height; + } + } + + $width = round($width); + $height = round($height); + } + else if ( $width && !$height ) { + $height = (3/4) * $width; + if ( $info["width"] && $info["height"] ) { + $height = ($info["height"] / $info["width"]) * $width; + } + } + + $thumb = the_image_scaled_thumb_url($width, $height); + if ( !$thumb ) + $thumb = the_image_thumb_url(true); + + $link = (get_option('photoblog_lightbox') ? $url : get_permalink()); + + ob_start(); + ?> + <div class="photoblog-thumbnail"> + <a href="<?php echo $link ?>" rel="lightbox[photoblog]"><img src="<?php echo $thumb; ?>" width="<?php echo $width; ?>" <?php echo ($height ? "height=\"$height\"" : ""); ?> alt="<?php the_title(); ?>" title="<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><?php echo ($info["description"]?" - ".$info["description"]:""); ?>" /></a> + </div> + <?php + $content = ob_get_contents(); + ob_end_clean(); + + if ( $return ) + return $content; + echo $content; +} + +/** + * Favicon template tag + */ +function elegant_grunge_the_favicon() { + if ( file_exists(WP_CONTENT_DIR."/favicon.ico") ) { + ?><link rel="icon" href="<?php echo WP_CONTENT_URL?>/favicon.ico" type="image/x-icon" /> + <link rel="shortcut icon" href="<?php echo WP_CONTENT_URL?>/favicon.ico" type="image/x-icon" /><?php + } +} + + +/** + * Administration + */ +function elegant_grunge_admin() { + ?> + <div class="wrap"> + <h2>Elegant Grunge</h2> + + <form method="post" action="options.php"> + <?php wp_nonce_field('update-options'); ?> + + <table class="form-table"> + + <tr valign="top"> + <th scope="row"><?php _e('Header image:', 'elegant-grunge') ?></th> + <td> + <input type="text" class="text" style="width: 400px;" name="header_image" value="<?php echo htmlspecialchars(get_option('header_image')) ?>" /><br/> + <small><?php _e('If specified, the image (typically a transparent PNG) at the above URL will be used for the header.', 'elegant-grunge') ?></small> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('RSS subscription:', 'elegant-grunge') ?></th> + <td> + <input type="checkbox" name="show_rss" <?php echo (get_option('show_rss') ? "checked" : ""); ?> /> + <?php _e('Display RSS subscription link', 'elegant-grunge') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Post info:', 'elegant-grunge') ?></th> + <td> + <input type="checkbox" name="show_author" <?php echo (get_option('show_author') ? "checked" : ""); ?> /> + <?php _e('Display post author', 'elegant-grunge') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Page setup:', 'elegant-grunge') ?></th> + <td> + <select name="page_setup"> + <option value="right-sidebar" <?php echo (get_option('page_setup')=='right-sidebar' ? 'selected' : '') ?>>Right sidebar</option> + <option value="double-right-sidebar" <?php echo (get_option('page_setup')=='double-right-sidebar' ? 'selected' : '') ?>>Double Right sidebar</option> + <option value="no-sidebar" <?php echo (get_option('page_setup')=='no-sidebar' ? 'selected' : '') ?>>No sidebar</option> + </select> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Copyright message:', 'elegant-grunge') ?></th> + <td> + <input type="text" class="text" style="width: 300px;" name="copyright" value="<?php echo htmlspecialchars(get_option('copyright')) ?>" /> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Image frames:', 'elegant-grunge') ?></th> + <td> + <input type="checkbox" name="frame_all_images" <?php echo (get_option('frame_all_images') ? "checked" : ""); ?> /> + <?php _e('Apply frame to all images', 'elegant-grunge') ?><br/> + <small><?php printf(__('If enabled, all images larger than %1$d x %2$d + will have a frame with drop shadow applied. Otherwise, only images and other elements with a class + of \'frame\' will have this style applied.<br/> + This setting can be configured per-post and per-page, also.', 'elegant-grunge'), ELEGANT_GRUNGE_FRAME_MIN_WIDTH, ELEGANT_GRUNGE_FRAME_MIN_HEIGHT) ?></small> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e("Don't frame images with class:", 'elegant-grunge') ?></th> + <td> + <input type="text" class="text" style="width: 300px;" name="frame_class_skip" value="<?php echo htmlspecialchars(get_option('frame_class_skip')) ?>" /> + <br/><small><?php _e('Separate multiple classes with commas \',\'', 'elegant-grunge') ?></small> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Extra header content:', 'elegant-grunge') ?></th> + <td> + <textarea style="width: 300px; height: 100px;" name="extra_header"><?php echo htmlspecialchars(get_option('extra_header')) ?></textarea><br/> + <small><?php _e('This can be used to add extra RSS feed links from your page, for example, such as a Twitter feed.', 'elegant-grunge') ?></small> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Photoblog thumbnails:', 'elegant-grunge') ?></th> + <td> + <p> + <input type="checkbox" name="create_photoblog_thumbnails" <?php echo (get_option('create_photoblog_thumbnails') ? "checked" : ""); ?> /> + <?php _e('Create scaled thumbnails', 'elegant-grunge') ?><br/> + <small><?php _e('If enabled, will generate thumbnail files. Otherwise, will use the original images, resulting in slower loading times. + Note that the first photoblog page load after this is enabled will be slow, while images are being created, so you should + <a href="/tag/photoblog" target="_blank">load this</a> yourself.', 'elegant-grunge') ?></small> + </p> + <p> + <?php _e('Thumbnail size:', 'elegant-grunge') ?><br/> + <input type="text" class="text" size="5" name="photoblog_thumb_width" value="<?php echo get_option('photoblog_thumb_width') ?>" /> x + <input type="text" class="text" size="5" name="photoblog_thumb_height" value="<?php echo get_option('photoblog_thumb_height') ?>" /><br /> + <small><?php _e('Leave blank for flexible size', 'elegant-grunge') ?></small> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Photoblog display:', 'elegant-grunge') ?></th> + <td> + <p> + <?php _e('Number of thumbnails per page:', 'elegant-grunge') ?><br/> + <input type="text" class="text" size="5" name="photoblog_thumb_count" value="<?php echo get_option('photoblog_thumb_count') ?>" /> + </p> + <p> + <input type="checkbox" name="photoblog_lightbox" <?php echo (get_option('photoblog_lightbox') ? "checked" : ""); ?> /> + <?php _e('Use lightbox mode', 'elegant-grunge') ?><br/> + <small><?php _e('Requires a lightbox plugin to be installed, such as <a href="http://www.stimuli.ca/lightbox/">Lightbox 2</a>.', 'elegant-grunge') ?></small> + </p> + <p> + <input type="checkbox" name="photoblog_frames" <?php echo (get_option('photoblog_frames') ? "checked" : ""); ?> /> + <?php _e('Draw frames around photoblog items', 'elegant-grunge') ?><br/> + </p> + </td> + </tr> + + + </table> + + <input type="hidden" name="action" value="update" /> + <input type="hidden" name="page_options" value="header_image,show_rss,show_author,page_setup,copyright,frame_all_images,frame_class_skip,extra_header,create_photoblog_thumbnails,photoblog_thumb_count,photoblog_thumb_width,photoblog_thumb_height,photoblog_lightbox,photoblog_frames" /> + + <p class="submit"> + <input type="submit" name="Submit" value="<?php _e('Save Changes', 'elegant-grunge') ?>" /> + </p> + + </form> + </div> + <?php +} + +/** + * Per-post setup + */ +function elegant_grunge_post_options() { + global $post; + $post_id = $post; + if (is_object($post_id)) { + $post_id = $post_id->ID; + } + + + $frame_all_images = get_option("frame_all_images"); + $frame_all_images_post = get_post_meta($post_id, 'frame_all_images', true); + if ( $frame_all_images_post == "true" ) + $frame_all_images = true; + else if ( $frame_all_images_post == "false" ) + $frame_all_images = false; + + + ?> + <div class="postbox closed"> + <h3><?php _e('Elegant Grunge Theme Options', 'elegant-grunge') ?></h3> + <div class="inside"> + <input value="eg_edit" type="hidden" name="eg_edit" /> + <table class="form-table"> + <tr> + <th style="text-align:left;" colspan="2"><?php _e('Image frames:', 'elegant-grunge') ?></th> + <td> + <input type="hidden" name="frame_all_images" id="eg_frame_all_images" value="" /> + <input type="checkbox" name="frame_all_images_disabled" <?php echo ($frame_all_images ? "checked" : ""); ?> + onchange="document.getElementById('eg_frame_all_images').value = (this.checked ? 'true' : 'false');" /> + <?php _e('Apply frame to all images', 'elegant-grunge') ?><br/> + <small><?php printf(__('If enabled, all images larger than %1$d x %2$d + will have a frame with drop shadow applied. Otherwise, only images and other elements with a class + of \'frame\' will have this style applied.', 'elegant-grunge'), ELEGANT_GRUNGE_FRAME_MIN_WIDTH, ELEGANT_GRUNGE_FRAME_MIN_HEIGHT) ?></small> + </td> + </tr> + </table> + </div> + </div> + <?php +} + +/** + * Per-page setup + */ +function elegant_grunge_page_options() { + global $post; + $post_id = $post; + if (is_object($post_id)) { + $post_id = $post_id->ID; + } + + + $frame_all_images = get_option("frame_all_images"); + $frame_all_images_post = get_post_meta($post_id, 'frame_all_images', true); + if ( $frame_all_images_post == "true" ) + $frame_all_images = true; + else if ( $frame_all_images_post == "false" ) + $frame_all_images = false; + + $relatedTitle = get_post_meta($post_id, 'related_title', true); + if ( !$relatedTitle ) $relatedTitle = "Related posts"; + + ?> + <div class="postbox closed"> + <h3><?php _e('Elegant Grunge Theme Options', 'elegant-grunge') ?></h3> + <div class="inside"> + <input value="eg_edit" type="hidden" name="eg_edit" /> + <table class="form-table"> + <tr> + <th style="text-align:left;" colspan="2"><?php _e('Image frames:', 'elegant-grunge') ?></th> + <td> + <input type="hidden" name="frame_all_images" id="eg_frame_all_images" value="" /> + <input type="checkbox" name="frame_all_images_disabled" <?php echo ($frame_all_images ? "checked" : ""); ?> + onchange="document.getElementById('eg_frame_all_images').value = (this.checked ? 'true' : 'false');" /> + <?php _e('Apply frame to all images', 'elegant-grunge') ?><br/> + <small><?php printf(__('If enabled, all images larger than %1$d x %2$d + will have a frame with drop shadow applied. Otherwise, only images and other elements with a class + of \'frame\' will have this style applied.', 'elegant-grunge'), ELEGANT_GRUNGE_FRAME_MIN_WIDTH, ELEGANT_GRUNGE_FRAME_MIN_HEIGHT) ?></small> + </td> + </tr> + + <tr> + <th style="text-align:left;" colspan="2"><?php _e('Related tag(s):', 'elegant-grunge') ?></th> + <td> + <input value="<?php echo htmlspecialchars(get_post_meta($post_id, 'related_tags', true)); ?>" name="related_tags" /><br /> + <small> + <?php _e("If specified and 'Page with custom sidebar' page template is selected, will display posts from these tags + in the sidebar. Specify multiple tags by separating with a comma ','.", 'elegant-grunge') ?> + </small> + </td> + </tr> + + <tr> + <th style="text-align:left;" colspan="2"><?php _e('Related posts title:', 'elegant-grunge') ?></th> + <td> + <input type="text" class="text" name="related_title" value="<?php echo htmlspecialchars($relatedTitle); ?>" /><br /> + <small> + <?php _e("If 'Page with custom sidebar' page template is selected, and one or more related tags are provided above, this will be the title + above a list of related posts.", 'elegant-grunge') ?> + </small> + </td> + </tr> + + <tr> + <th style="text-align:left;" colspan="2"><?php _e('Extra sidebar content:', 'elegant-grunge') ?></th> + <td> + <textarea name="sidebar_content" style="width:300px; height:100px;"><?php echo htmlspecialchars(get_post_meta($post_id, 'sidebar_content', true)); ?></textarea><br/> + <small> + <?php _e("If 'Page with custom sidebar' page template is selected, this text/HTML will be displayed in the sidebar.", 'elegant-grunge') ?> + </small> + </td> + </tr> + </table> + </div> + </div> + <?php +} + +/** + * Save setup from post/page + */ +function elegant_grunge_save_post($id) { + if ( !isset($_REQUEST['eg_edit']) ) return; + + if ( isset($_REQUEST['frame_all_images']) && $_REQUEST['frame_all_images'] != '' ) { + delete_post_meta($id, 'frame_all_images'); + add_post_meta($id, 'frame_all_images', $_REQUEST['frame_all_images']); + } + + if ( isset($_REQUEST['related_tags']) ) { + delete_post_meta($id, 'related_tags'); + if ( $_REQUEST['related_tags'] ) + add_post_meta($id, 'related_tags', stripcslashes($_REQUEST['related_tags'])); + } + + if ( isset($_REQUEST['related_title']) ) { + delete_post_meta($id, 'related_title'); + if ( $_REQUEST['related_title'] ) + add_post_meta($id, 'related_title', stripcslashes($_REQUEST['related_title'])); + } + + if ( isset($_REQUEST['sidebar_content']) ) { + delete_post_meta($id, 'sidebar_content'); + if ( $_REQUEST['sidebar_content'] ) + add_post_meta($id, 'sidebar_content', stripcslashes($_REQUEST['sidebar_content'])); + } +} + +function elegant_grunge_setup_admin() { + add_theme_page('Elegant Grunge Setup', 'Elegant Grunge', 8, __FILE__, 'elegant_grunge_admin'); +} + +function elegant_grunge_photoblog($args) { + + $thumbs = array(); + $count = get_option('elegant_grunge_photoblog_entries'); + + $width = get_option('elegant_grunge_photoblog_width'); + $height = get_option('elegant_grunge_photoblog_height'); + + global $post; + + $posts = get_posts('tag='.get_option('elegant_grunge_photoblog_tags').'&numberposts='.$count.(get_option('elegant_grunge_photoblog_order')=='random' ? '&orderby=rand' : '')); + foreach ( $posts as $post ) { + + $thumb = the_thumbnail($width, $height, true); + + if ( $thumb ) { + $thumbs[] = $thumb; + } + if ( count($thumbs) == $count ) break; + } + + if ( count($thumbs) == 0 ) return; + + echo $args["before_widget"]; + if ( get_option('elegant_grunge_photoblog_heading') ) { + echo $args["before_title"].htmlspecialchars(get_option('elegant_grunge_photoblog_heading')).$args["after_title"]; + } + echo '<div>'; + foreach ( $thumbs as $thumb ) { + echo $thumb; + } + echo '</div>'; + echo $args["after_widget"]; + +} + +function elegant_grunge_photoblog_setup() { + + $options = array("elegant_grunge_photoblog_heading", + "elegant_grunge_photoblog_entries", + "elegant_grunge_photoblog_order", + "elegant_grunge_photoblog_tags", + "elegant_grunge_photoblog_width", + "elegant_grunge_photoblog_height"); + + foreach ( $options as $option ) { + if ( isset($_REQUEST[$option]) ) { + update_option($option, stripslashes($_REQUEST[$option])); + } + } + + ?> + <p> + <label for="photoblog_heading"><?php _e('Heading:', 'elegant-grunge') ?></label> + <input name="elegant_grunge_photoblog_heading" id="photoblog_heading" type="text" class="widefat text" value="<?php echo get_option('elegant_grunge_photoblog_heading') ?>" /> + </p> + + <p> + <label for="photoblog_entries"><?php _e('Display:', 'elegant-grunge') ?></label> + <input name="elegant_grunge_photoblog_entries" id="photoblog_entries" type="text" class="text" size="5" value="<?php echo get_option('elegant_grunge_photoblog_entries') ?>" /> <?php _e('entries', 'elegant-grunge')?><br/> + </p> + + <p> + <input type="radio" name="elegant_grunge_photoblog_order" id="photoblog_order_random" value="random" <?php echo ((get_option('elegant_grunge_photoblog_order')=='random') ? 'checked' : '') ?> /> + <label for="photoblog_order_random"><?php _e('Display random entries', 'elegant-grunge') ?></label><br /> + <input type="radio" name="elegant_grunge_photoblog_order" id="photoblog_order_recent" value="recent" <?php echo ((get_option('elegant_grunge_photoblog_order')=='recent') ? 'checked' : '') ?> /> + <label for="photoblog_order_recent"><?php _e('Display recent entries', 'elegant-grunge') ?></label><br /> + </p> + + <p> + <label for="photoblog_tags"><?php _e('Tags to display:', 'elegant-grunge') ?></label> + <input name="elegant_grunge_photoblog_tags" id="photoblog_tags" type="text" class="widefat text" value="<?php echo get_option('elegant_grunge_photoblog_tags') ?>" /><br/> + <small><?php _e('Separate multiple tags with commas', 'elegant-grunge') ?></small> + </p> + + <p> + <label for="photoblog_width"><?php _e('Image width:', 'elegant-grunge') ?></label> + <input name="elegant_grunge_photoblog_width" id="photoblog_width" type="text" class="text" size="5" value="<?php echo get_option('elegant_grunge_photoblog_width') ?>" /> + </p> + + <p> + <label for="photoblog_height"><?php _e('Image height:', 'elegant-grunge') ?></label> + <input name="elegant_grunge_photoblog_height" id="photoblog_height" type="text" class="text" size="5" value="<?php echo get_option('elegant_grunge_photoblog_height') ?>" /> + </p> + <?php +} + + +function elegant_grunge_widget_init() { + register_sidebar_widget('Photoblog', 'elegant_grunge_photoblog'); + register_widget_control('Photoblog', 'elegant_grunge_photoblog_setup'); + add_option('elegant_grunge_photoblog_tags', 'photoblog'); + add_option('elegant_grunge_photoblog_heading', 'Photoblog'); + add_option('elegant_grunge_photoblog_entries', '4'); + add_option('elegant_grunge_photoblog_order', 'random'); + add_option('elegant_grunge_photoblog_width', '100'); + add_option('elegant_grunge_photoblog_height', '70'); +} + +load_theme_textdomain('elegant-grunge'); + +add_filter( 'the_content', 'elegant_grunge_filter', 15 ); +add_option( 'header_image', '' ); +add_option( 'show_rss', true ); +add_option( 'show_author', false ); +add_option( 'copyright', 'Copyright © '.strftime('%Y').' '.get_bloginfo( 'name' ) ); +add_option( 'frame_all_images', true ); +add_option( 'frame_class_skip', 'noframe,wp-smiley' ); +add_option( 'create_photoblog_thumbnails', false ); +add_option( 'photoblog_thumb_count', 30 ); +add_option( 'photoblog_thumb_width', '' ); +add_option( 'photoblog_thumb_height', '' ); +add_option( 'photoblog_lightbox', function_exists('autoexpand_rel_wlightbox') ); +add_option( 'photoblog_frames', false ); +add_option( 'page_setup', 'right-sidebar' ); +add_action( 'admin_menu', 'elegant_grunge_setup_admin' ); + +add_action( 'edit_form_advanced', 'elegant_grunge_post_options' ); +add_action( 'edit_page_form', 'elegant_grunge_page_options' ); +add_action( 'save_post', 'elegant_grunge_save_post' ); +add_action( 'widgets_init', 'elegant_grunge_widget_init' ); + +/** + * Debug + */ +function EGDEBUG($text) { + global $__EGDEBUG_FD; + if ( !$__EGDEBUG_FD ) { + $__EGDEBUG_FD = fopen("eg_debug.txt", "a"); + } + + fwrite($__EGDEBUG_FD, $text."\n"); +} + +?> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/header.php b/wp-content/themes/elegant-grunge/header.php new file mode 100644 index 0000000000000000000000000000000000000000..a57bb1e25ceb528083e7c7a918f4122517f7a904 --- /dev/null +++ b/wp-content/themes/elegant-grunge/header.php @@ -0,0 +1,85 @@ +<!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" <?php language_attributes(); ?>> + +<head profile="http://gmpg.org/xfn/11"> +<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> + +<title> + <?php if ( is_home() ) { ?><?php bloginfo('description'); ?> | <?php bloginfo('name'); ?><?php } ?> + <?php if ( is_search() ) { ?><?php echo $s; ?> | <?php bloginfo('name'); ?><?php } ?> + <?php if ( is_single() ) { ?><?php wp_title(''); ?> | <?php bloginfo('name'); ?><?php } ?> + <?php if ( is_page() ) { ?><?php wp_title(''); ?> | <?php bloginfo('name'); ?><?php } ?> + <?php if ( is_category() ) { ?><?php _e('Archive', 'elegant-grunge') ?> <?php single_cat_title(); ?> | <?php bloginfo('name'); ?><?php } ?> + <?php if ( is_month() ) { ?><?php _e('Archive', 'elegant-grunge') ?> <?php the_time('F'); ?> | <?php bloginfo('name'); ?><?php } ?> + <?php if ( is_tag() ) { ?><?php single_tag_title();?> | <?php bloginfo('name'); ?><?php } ?> +</title> + +<?php elegant_grunge_the_favicon() ?> +<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> +<?php if ( get_option('header_image') ) : ?> +<style type="text/css"> +#header div { + background: url(<?php echo get_option('header_image') ?>) no-repeat center top; + width: 100%; + height: 100%; + display: block; +} +#header * { + display: none; +} +</style> +<?php endif; ?> +<!--[if IE]> +<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/ie.css" /> +<style type="text/css"> +#footer #subscribe a { + background:none; + filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php bloginfo('template_url')?>/images/rss.png'); +} +<?php if ( get_option('header_image') ) : ?> +#header div { + background: none; + filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo get_option('header_image')?>'); +} +<?php endif; ?> +</style> +<![endif]--> + +<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" /> +<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> + +<?php echo get_option("extra_header") ?> + +<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> + +<?php wp_head(); ?> + +</head> + +<?php +if ( !defined('EG_BODY_CLASS') && get_option('page_setup') != 'right-sidebar' ) + define('EG_BODY_CLASS', get_option('page_setup')); +?> + +<body <?php if ( defined('EG_BODY_CLASS') ) echo 'class="'.EG_BODY_CLASS.'"'; ?>> + +<div id="page"> + +<div id="menu"> + <ul> + <li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>"><a href="<?php bloginfo('url'); ?>"><?php _e('Home', 'elegant-grunge') ?></a></li> + <?php wp_list_pages('title_li=&depth=1'); ?> + </ul> + <div class="clear"></div> +</div> + +<div id="header-wrap"> +<div id="header"> + <div> + <h1><a href="<?php bloginfo('home') ?>"><?php bloginfo('name'); ?></a></h1> + <span id="blog-description"><?php bloginfo('description'); ?></span> + </div> +</div> +</div> + +<!-- end header --> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/ie.css b/wp-content/themes/elegant-grunge/ie.css new file mode 100644 index 0000000000000000000000000000000000000000..7ceb74452ad496ee68e653ede16a3691f75bbfb5 --- /dev/null +++ b/wp-content/themes/elegant-grunge/ie.css @@ -0,0 +1,37 @@ +.sidebar #searchform div #searchsubmit { + position: relative; + top: 3px; +} + +.sidebar #searchform div #s { + margin-left: 25px; +} + +.double-right-sidebar .sidebar #searchform div #s { + width: 119px; +} + +.hr { + margin-top: 0; +} + +.frame-outer span span span span * { + width: expression(this.width > 420? "420px" : this.width); +} + +.frame-outer .alignright { + float: none; +} + +.frame-outer .aligncenter { + display: inline-block; +} + +#footer-wrap-outer { + margin-top: 0; +} + +#footer { + height:auto !important; + height:30px; +} \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/images/background-bottom-left.jpg b/wp-content/themes/elegant-grunge/images/background-bottom-left.jpg new file mode 100644 index 0000000000000000000000000000000000000000..75f2b9a9db64dfeb1858005e2ebbb4acbd7c04a7 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/background-bottom-left.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/body-double-sidebar.jpg b/wp-content/themes/elegant-grunge/images/body-double-sidebar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..300c4e5a278c1896500e1de50bb5913d4e4cdad2 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/body-double-sidebar.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/body-no-sidebar.jpg b/wp-content/themes/elegant-grunge/images/body-no-sidebar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..77b92696d9161cf34bebf8c598a637822acec3ff Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/body-no-sidebar.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/body-top.jpg b/wp-content/themes/elegant-grunge/images/body-top.jpg new file mode 100644 index 0000000000000000000000000000000000000000..171e24b3069cb9319f5ce92329fff2d97c32d382 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/body-top.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/body.jpg b/wp-content/themes/elegant-grunge/images/body.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d47531caf5fb1d12ee51feb33f1d42faf44adc0b Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/body.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/comment.jpg b/wp-content/themes/elegant-grunge/images/comment.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9c26bce7374d5feee095d6b82bcc91a4508a6d26 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/comment.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/date.jpg b/wp-content/themes/elegant-grunge/images/date.jpg new file mode 100644 index 0000000000000000000000000000000000000000..050d3007997a8e3b1f6e25956715be11b9011506 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/date.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/footer-double-sidebar.jpg b/wp-content/themes/elegant-grunge/images/footer-double-sidebar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f82cce385f10ec21ddfc7b9c701cd6580b4a2631 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/footer-double-sidebar.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/footer-no-sidebar.jpg b/wp-content/themes/elegant-grunge/images/footer-no-sidebar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..01ad9c0f4bc441a7eec71781c16fa45c544ffe0e Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/footer-no-sidebar.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/footer-repeat.jpg b/wp-content/themes/elegant-grunge/images/footer-repeat.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a74faf7cb997493c54388ebecb0877e97e8398e4 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/footer-repeat.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/footer.jpg b/wp-content/themes/elegant-grunge/images/footer.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c077429b0f7ec460fb7839d1a6bb9a58798b2af5 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/footer.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/frame-bottom-left-small.jpg b/wp-content/themes/elegant-grunge/images/frame-bottom-left-small.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cf977363a57d8df97480420ba9d6d6e65a922aa6 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/frame-bottom-left-small.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/frame-bottom-left.jpg b/wp-content/themes/elegant-grunge/images/frame-bottom-left.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ac4a0642aa3bf139bf3b277bdc1178a957f37aec Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/frame-bottom-left.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/frame-bottom-right-small.jpg b/wp-content/themes/elegant-grunge/images/frame-bottom-right-small.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3ab7e094ec20973a992d15a8a93cae9bbe081698 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/frame-bottom-right-small.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/frame-bottom-right.jpg b/wp-content/themes/elegant-grunge/images/frame-bottom-right.jpg new file mode 100644 index 0000000000000000000000000000000000000000..199b1f39a98a8861d2ac5a904119ee59f01ea5a2 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/frame-bottom-right.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/frame-top-left-small.jpg b/wp-content/themes/elegant-grunge/images/frame-top-left-small.jpg new file mode 100644 index 0000000000000000000000000000000000000000..93a1b941a765ab51748781f00b10c80d07ac0228 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/frame-top-left-small.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/frame-top-left.jpg b/wp-content/themes/elegant-grunge/images/frame-top-left.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4b524d0d6a6930fb2930bfc4b1b85d2753861c7e Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/frame-top-left.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/frame-top-right-small.jpg b/wp-content/themes/elegant-grunge/images/frame-top-right-small.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2aefac57e7b329540e59d6ae27ad4c16f5f4a1fb Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/frame-top-right-small.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/frame-top-right.jpg b/wp-content/themes/elegant-grunge/images/frame-top-right.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3b11e4b0d8d4578c14d88bcb01a6a94dc300f6fa Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/frame-top-right.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/header-double-sidebar.jpg b/wp-content/themes/elegant-grunge/images/header-double-sidebar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c4fe47e036ae7e6fd4593bb842e771c1cdfbd2cf Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/header-double-sidebar.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/header-no-sidebar.jpg b/wp-content/themes/elegant-grunge/images/header-no-sidebar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ff64df331c4d3022a5c0f3cc7005005e3dbcc363 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/header-no-sidebar.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/header-repeat.jpg b/wp-content/themes/elegant-grunge/images/header-repeat.jpg new file mode 100644 index 0000000000000000000000000000000000000000..73446aa35c233edf9e338e9a9939ee2272057b26 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/header-repeat.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/header.jpg b/wp-content/themes/elegant-grunge/images/header.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7e0a1644826e290a5814f3e1e39223c4354ec2d3 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/header.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/hr.jpg b/wp-content/themes/elegant-grunge/images/hr.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5d730a789642beb33e6c7f6349625cbbd16d16cf Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/hr.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/more-link.png b/wp-content/themes/elegant-grunge/images/more-link.png new file mode 100644 index 0000000000000000000000000000000000000000..c194ac3312ea5ce9acad59f8f4770db5cd189069 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/more-link.png differ diff --git a/wp-content/themes/elegant-grunge/images/rss.png b/wp-content/themes/elegant-grunge/images/rss.png new file mode 100644 index 0000000000000000000000000000000000000000..fdd2fd4a586caad986c34f553e6fa15c42a9c317 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/rss.png differ diff --git a/wp-content/themes/elegant-grunge/images/searchform-double-sidebar.jpg b/wp-content/themes/elegant-grunge/images/searchform-double-sidebar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..76b519f73dad8e16102605e31c419da75cd08afc Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/searchform-double-sidebar.jpg differ diff --git a/wp-content/themes/elegant-grunge/images/searchform.jpg b/wp-content/themes/elegant-grunge/images/searchform.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9b9dd4e1772458f59b6dd5d22d9099119b1a7e28 Binary files /dev/null and b/wp-content/themes/elegant-grunge/images/searchform.jpg differ diff --git a/wp-content/themes/elegant-grunge/index.php b/wp-content/themes/elegant-grunge/index.php new file mode 100644 index 0000000000000000000000000000000000000000..8ad102fc688a00b51047802ba400846f08f0e46e --- /dev/null +++ b/wp-content/themes/elegant-grunge/index.php @@ -0,0 +1,70 @@ +<?php get_header(); ?> +<div id="content-container"> + +<div id="content"> + + <div id="body"> + + <?php if (have_posts()) : ?> + + <?php while (have_posts()) : the_post(); ?> + + <div class="post" id="post-<?php the_ID(); ?>"> + + <div class="date"> + <span class="month"><?php the_time('M') ?></span> + <span class="day"><?php the_time('j') ?></span> + <span class="year"><?php the_time('Y') ?></span> + </div> + + <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'elegant-grunge'), get_the_title()); ?>"><?php the_title(); ?></a></h2> + + <?php if ( get_option("show_author") ) : ?> + <div class="author"><?php the_author() ?></div> + <?php endif ;?> + + <!-- <div class="info">by <?php the_author() ?></div> --> + + <div class="entry"> + <?php the_content(__('Continue reading', 'elegant-grunge')); ?> + </div> + + <div class="clear"></div> + + <p class="metadata"> + <?php comments_popup_link(__('no comments', 'elegant-grunge'), __('1 comment', 'elegant-grunge'), __('% comments', 'elegant-grunge')); ?> + <?php the_tags(' | '.__('tags:', 'elegant-grunge').' ', ', ', ''); ?> + <?php if ( count(($categories=get_the_category())) > 1 || $categories[0]->cat_ID != 1 ) : ?> + | <?php _e('posted in', 'elegant-grunge')?> <?php the_category(', ') ?> + <?php endif; ?> + <?php edit_post_link(__('Edit', 'elegant-grunge'), ' | ', ''); ?> + </p> + + </div> + + <div class="hr"><hr /></div> + + <?php endwhile; ?> + + <div class="navigation"> + <div class="next"><?php next_posts_link(__('« Older Entries', 'elegant-grunge')) ?></div> + <div class="previous"><?php previous_posts_link(__('Newer Entries »', 'elegant-grunge')) ?></div> + </div> + + <?php else : ?> + + <h2 class="center"><?php _e('Not Found', 'elegant-grunge') ?></h2> + <p class="center"><?php _e('Sorry, but you are looking for something that isn\'t here.', 'elegant-grunge') ?></p> + <?php include (TEMPLATEPATH . "/searchform.php"); ?> + + <?php endif; ?> + + </div> + + <?php if ( get_option('page_setup') != 'no-sidebar' ) get_sidebar(); ?> + +</div> +<div class="clear"></div> +</div> + +<?php get_footer(); ?> diff --git a/wp-content/themes/elegant-grunge/links.php b/wp-content/themes/elegant-grunge/links.php new file mode 100644 index 0000000000000000000000000000000000000000..395518e9c3413ce6809fd0c276e93943f14d31fa --- /dev/null +++ b/wp-content/themes/elegant-grunge/links.php @@ -0,0 +1,23 @@ +<?php +/* +Template Name: Links +*/ +?> + +<?php get_header(); ?> +<div id="content-container"> + +<div id="content"> + +<h2><?php _e('Links', 'elegant-grunge')?></h2> +<ul> +<?php wp_list_bookmarks(); ?> +</ul> + +</div> +</div> + +<div class="clear"></div> +</div> + +<?php get_footer(); ?> diff --git a/wp-content/themes/elegant-grunge/page-custom-sidebar.php b/wp-content/themes/elegant-grunge/page-custom-sidebar.php new file mode 100644 index 0000000000000000000000000000000000000000..b67dd5a62f5a0a5064f9f190e75e988c277eac57 --- /dev/null +++ b/wp-content/themes/elegant-grunge/page-custom-sidebar.php @@ -0,0 +1,66 @@ +<?php +/* +Template Name: Page with custom sidebar +*/ +?> + +<?php define('EG_BODY_CLASS', 'right-sidebar'); get_header(); ?> + +<div id="content-container"> + +<div id="content"> + +<div id="body"> + + <?php if (have_posts()) : while (have_posts()) : the_post(); ?> + <div class="post" id="post-<?php the_ID(); ?>"> + <h2><?php the_title(); ?></h2> + <div class="entry"> + <?php the_content(__('<p class="serif">Read the rest of this page »</p>', 'elegant-grunge')); ?> + + <?php wp_link_pages(array('before' => '<p><strong>'.__('Pages:', 'elegant-grunge').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> + + </div> + </div> + <?php endwhile; endif; ?> + <?php edit_post_link(__('Edit this entry.', 'elegant-grunge'), '<p>', '</p>'); ?> + +</div> + +<div id="sidebar" class="sidebar"> + <ul> + + <?php if ( ($content = get_post_meta(get_the_ID(), 'sidebar_content', true)) ) : ?> + <li> + <?php echo $content ?> + </li> + <?php endif; ?> + + <?php if ( ($tags = get_post_meta(get_the_ID(), 'related_tags', true)) ) : ?> + + <?php + $relatedTitle = get_post_meta(get_the_ID(), 'related_title', true); + if ( !$relatedTitle ) $relatedTitle = __('Related posts', 'elegant-grunge'); + ?> + + <li> + <h2><?php echo $relatedTitle ?></h2> + <ul> + <?php query_posts("tag=".$tags); ?> + <?php while (have_posts()) : the_post(); ?> + <li><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></li> + <?php endwhile; ?> + </ul> + <div class="more-link"><a href="/?tag=<?php echo $tags; ?>"><?php _e('More updates', 'elegant-grunge') ?></a></div> + </li> + + <?php endif; ?> + </ul> +</div> + +<div class="clear"></div> + +</div> +</div> + +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/page-no-sidebar.php b/wp-content/themes/elegant-grunge/page-no-sidebar.php new file mode 100644 index 0000000000000000000000000000000000000000..f4ea9568945012c69d90234989eb97573944f289 --- /dev/null +++ b/wp-content/themes/elegant-grunge/page-no-sidebar.php @@ -0,0 +1,36 @@ +<?php +/* +Template Name: Page with no sidebar +*/ +?> + +<?php define("EG_BODY_CLASS", "no-sidebar"); get_header(); ?> + +<div id="content-container"> + +<div id="content"> + +<div id="body"> + + <?php if (have_posts()) : while (have_posts()) : the_post(); ?> + <div class="post" id="post-<?php the_ID(); ?>"> + <h2><?php the_title(); ?></h2> + <div class="entry"> + <?php the_content(__('<p class="serif">Read the rest of this page »</p>', 'elegant-grunge')); ?> + + <?php wp_link_pages(array('before' => '<p><strong>'.__('Pages:', 'elegant-grunge').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> + + </div> + </div> + <?php endwhile; endif; ?> + <?php edit_post_link(__('Edit this entry.', 'elegant-grunge'), '<p>', '</p>'); ?> + +</div> + + +<div class="clear"></div> + +</div> +</div> + +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/page.php b/wp-content/themes/elegant-grunge/page.php new file mode 100644 index 0000000000000000000000000000000000000000..48269a0151401a8c7f78e19c2fb420216499b322 --- /dev/null +++ b/wp-content/themes/elegant-grunge/page.php @@ -0,0 +1,28 @@ +<?php get_header(); ?> + +<div id="content-container"> +<div id="content"> +<div id="body"> + + <?php if (have_posts()) : while (have_posts()) : the_post(); ?> + <div class="post" id="post-<?php the_ID(); ?>"> + <h2><?php the_title(); ?></h2> + <div class="entry"> + <?php the_content(__('<p class="serif">Read the rest of this page »</p>', 'elegant-grunge')); ?> + + <?php wp_link_pages(array('before' => '<p><strong>'.__('Pages:', 'elegant-grunge').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> + + </div> + </div> + <?php endwhile; endif; ?> + <?php edit_post_link(__('Edit this entry.', 'elegant-grunge'), '<p>', '</p>'); ?> + +</div> + +<?php if ( get_option('page_setup') != 'no-sidebar' ) get_sidebar(); ?> +</div> + +<div class="clear"></div> +</div> + +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/screenshot.png b/wp-content/themes/elegant-grunge/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..2dac854e3f5ad29af5a371b4aa4066a2045b1870 Binary files /dev/null and b/wp-content/themes/elegant-grunge/screenshot.png differ diff --git a/wp-content/themes/elegant-grunge/search.php b/wp-content/themes/elegant-grunge/search.php new file mode 100644 index 0000000000000000000000000000000000000000..f860fe771bf5e072037bd2c0061530132224e352 --- /dev/null +++ b/wp-content/themes/elegant-grunge/search.php @@ -0,0 +1,50 @@ +<?php query_posts($query_string.'&posts_per_page=15') ?> + +<?php get_header(); ?> +<div id="content-container"> +<div id="content"> + + <div id="body"> + + <?php if (have_posts()) : ?> + + <h2 class="pagetitle"><?php _e('Search Results', 'elegant-grunge') ?></h2> + + + <?php while (have_posts()) : the_post(); ?> + <div class="search_result"> + <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'elegant-grunge'), get_the_title()); ?>"><?php the_title(); ?></a></h4> + <small><?php the_excerpt(); ?></small> + <p class="metadata"> + <?php comments_popup_link(__('no comments', 'elegant-grunge'), __('1 comment', 'elegant-grunge'), __('% comments', 'elegant-grunge')); ?> + <?php the_tags(' | '.__('tags:', 'elegant-grunge').' ', ', ', ''); ?> + <?php if ( count(($categories=get_the_category())) > 1 || $categories[0]->cat_ID != 1 ) : ?> + | <?php _e('posted in', 'elegant-grunge') ?> <?php the_category(', ') ?> + <?php endif; ?> + <?php edit_post_link(__('Edit', 'elegant-grunge'), ' | ', ''); ?> + </p> + </div> + <?php endwhile; ?> + + <div class="navigation"> + <div class="alignleft"><?php next_posts_link(__('« Older Entries', 'elegant-grunge')) ?></div> + <div class="alignright"><?php previous_posts_link(__('Newer Entries »', 'elegant-grunge')) ?></div> + </div> + + <?php else : ?> + + <h2 class="center"><?php _e('No posts found. Try a different search?', 'elegant-grunge') ?></h2> + <?php include (TEMPLATEPATH . '/searchform.php'); ?> + + <?php endif; ?> + + </div> + + <?php if ( get_option('page_setup') != 'no-sidebar' ) get_sidebar(); ?> + + +</div> + +<div class="clear"></div> +</div> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/searchform.php b/wp-content/themes/elegant-grunge/searchform.php new file mode 100644 index 0000000000000000000000000000000000000000..cca0f8e3a24ca259aee22ead38d3c2bcde0c8b6a --- /dev/null +++ b/wp-content/themes/elegant-grunge/searchform.php @@ -0,0 +1,7 @@ +<?php $searchText = __('search', 'elegant-grunge'); ?> +<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/"> + <div> + <input type="text" value="<?php echo htmlspecialchars(get_search_query() ? get_search_query() : $searchText ); ?>" onfocus="if (this.value == '<?php echo htmlspecialchars($searchText) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php echo htmlspecialchars($searchText) ?>';}" name="s" id="s" /> + <input type="submit" id="searchsubmit" value="<?php _e('Go', 'elegant-grunge') ?>" /> + </div> +</form> diff --git a/wp-content/themes/elegant-grunge/sidebar-footer.php b/wp-content/themes/elegant-grunge/sidebar-footer.php new file mode 100644 index 0000000000000000000000000000000000000000..4d7f8f1eb96baa3d4bb377b68699fdf7265a8758 --- /dev/null +++ b/wp-content/themes/elegant-grunge/sidebar-footer.php @@ -0,0 +1 @@ +<?php if ( function_exists('dynamic_sidebar') ) dynamic_sidebar('footer'); ?> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/sidebar.php b/wp-content/themes/elegant-grunge/sidebar.php new file mode 100644 index 0000000000000000000000000000000000000000..586d175f9f819926e00fa6488c167457706f2c6d --- /dev/null +++ b/wp-content/themes/elegant-grunge/sidebar.php @@ -0,0 +1,84 @@ +<div id="sidebar" class="sidebar"> + <ul> + <?php /* Widgetized sidebar, if you have the plugin installed. */ + if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar') ) : ?> + <li> + <?php include (TEMPLATEPATH . '/searchform.php'); ?> + </li> + + <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it. + <li><h2>Author</h2> + <p>A little something about you, the author. Nothing lengthy, just an overview.</p> + </li> + --> + + <?php if ( is_404() || is_category() || is_day() || is_month() || + is_year() || is_search() || is_paged() ) { + ?> <li> + + <?php /* If this is a 404 page */ if (is_404()) { ?> + <?php /* If this is a category archive */ } elseif (is_category()) { ?> + <p><?php printf(__('You are currently browsing the archives for the %s category.', 'elegant-grunge'), single_cat_title('', false)) ?></p> + + <?php /* If this is a yearly archive */ } elseif (is_day()) { ?> + <p><?php printf(__('You are currently browsing the %1$s blog archives for the day %2$s', 'elegant-grunge'), + '<a href="'.get_bloginfo('url').'/">'.get_bloginfo('name').'</a>', + get_the_time(__('l, F jS, Y', 'elegant-grunge'))) ?></p> + + <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> + <p><?php printf(__('You are currently browsing the %1$s blog archives for %2$s', 'elegant-grunge'), + '<a href="'.get_bloginfo('url').'/">'.get_bloginfo('name').'</a>', + get_the_time(__('F, Y', 'elegant-grunge'))) ?>.</p> + + <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> + <p><?php printf(__('You are currently browsing the %1$s blog archives for the year %2$s', 'elegant-grunge'), + '<a href="'.get_bloginfo('url').'/">'.get_bloginfo('name').'</a>', + get_the_time(__('Y', 'elegant-grunge'))) ?></p> + + <?php /* If this is a monthly archive */ } elseif (is_search()) { ?> + <p><?php printf(__('You have searched the %1$s blog archives for <strong>%2$s</strong>. If you are unable to find anything in these search results, you can try one of these links.', 'elegant-grunge'), + '<a href="'.get_bloginfo('url').'/">'.get_bloginfo('name').'</a>', get_search_query()) ?></p> + + <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> + <p> <?php printf(__('You are currently browsing the %s blog archives', 'elegant-grunge'), + '<a href="'.get_bloginfo('url').'/">'.get_bloginfo('name').'</a>') ?></p> + + <?php } ?> + + </li> <?php }?> + + <?php wp_list_pages('title_li=<h2>'.__('Pages', 'elegant-grunge').'</h2>' ); ?> + + <li><h2><?php _e('Archives', 'elegant-grunge') ?></h2> + <ul> + <?php wp_get_archives('type=monthly'); ?> + </ul> + </li> + + <?php wp_list_categories('show_count=1&title_li=<h2>'.__('Categories', 'elegant-grunge').'</h2>'); ?> + + <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> + <?php wp_list_bookmarks(); ?> + + <li><h2><?php _e('Meta', 'elegant-grunge') ?></h2> + <ul> + <?php wp_register(); ?> + <li><?php wp_loginout(); ?></li> + <li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li> + <li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li> + <li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li> + <?php wp_meta(); ?> + </ul> + </li> + <?php } ?> + + <?php endif; ?> + </ul> +</div> +<?php if ( defined('EG_BODY_CLASS') && EG_BODY_CLASS == 'double-right-sidebar' ) : ?> +<div id="sidebar2" class="sidebar"> + <ul> + <?php if ( function_exists('dynamic_sidebar') ) dynamic_sidebar('Sidebar 2'); ?> + </ul> +</div> +<?php endif; ?> \ No newline at end of file diff --git a/wp-content/themes/elegant-grunge/single.php b/wp-content/themes/elegant-grunge/single.php new file mode 100644 index 0000000000000000000000000000000000000000..6f5738707267d5be3fa7bd6c42a23f0cc3d703fb --- /dev/null +++ b/wp-content/themes/elegant-grunge/single.php @@ -0,0 +1,78 @@ +<?php get_header(); ?> +<div id="content-container"> + + <div id="content"> + <div id="body"> + + <?php if (have_posts()) : while (have_posts()) : the_post(); ?> + + <div class="post" id="post-<?php the_ID(); ?>"> + + + <h2><?php the_title(); ?></h2> + + <?php if ( get_option("show_author") ) : ?> + <div class="author"><?php the_author() ?></div> + <?php endif ;?> + + <div class="entry"> + <?php the_content(); ?> + </div> + + <div class="clear"></div> + + <?php wp_link_pages(array('before' => '<p><strong>'.__('Pages', 'elegant-grunge').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> + + <div class="metadata"> + <?php the_tags( '<p>'.__('Tags:', 'elegant-grunge').' ', ', ', '</p>'); ?> + + <?php + printf(__('This entry was posted on %1$s at %2$s', 'elegant-grunge'), get_the_time(__('l, F jS, Y', 'elegant-grunge')), get_the_time()); + if ( count(($categories=get_the_category())) > 1 || $categories[0]->cat_ID != 1 ) { + printf(__('and is filed under %s', 'elegant-grunge'), join(', ', array_map(create_function('$item', 'return $item->cat_name;'), get_the_category(', ')))); + } + _e('. ', 'elegant-grunge'); + printf(__('You can follow any responses to this entry through the <a href="%s">RSS 2.0</a> feed.', 'elegant-grunge'), get_post_comments_feed_link()); + ?> + + <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) { + // Both Comments and Pings are open ?> + <?php printf(__('You can %1$sleave a response%2$s, or %3$strackback%4$s from your own site.', 'elegant-grunge'), + '<a href="#respond">', '</a>', '<a href="'.get_trackback_url().'" rel="trackback">', '</a>') ?> + + <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) { + // Only Pings are Open ?> + <?php printf(__('Responses are currently closed, but you can %1$strackback%2$s from your own site.', 'elegant-grunge'), + '<a href="'.get_trackback_url().'" rel="trackback">', '</a>') ?> + + <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) { + // Comments are open, Pings are not ?> + <?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.', 'elegant-grunge') ?> + + <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) { + // Neither Comments, nor Pings are open ?> + <?php _e('Both comments and pings are currently closed.', 'elegant-grunge') ?> + + <?php } edit_post_link(__('Edit this entry', 'elegant-grunge'),'','.'); ?> + + </div> + </div> + <div class="hr"><hr /></div> + + <?php comments_template(); ?> + + <?php endwhile; else: ?> + + <p><?php _e('Sorry, no posts matched your criteria.', 'elegant-grunge') ?></p> + + <?php endif; ?> + + </div> <!-- End body /--> + + <?php if ( get_option('page_setup') != 'no-sidebar' ) get_sidebar(); ?> + + </div> + + <div class="clear"></div> +</div> +<?php get_footer(); ?> diff --git a/wp-content/themes/elegant-grunge/style.css b/wp-content/themes/elegant-grunge/style.css new file mode 100644 index 0000000000000000000000000000000000000000..7f02720b57333e3b74bcb38114565dfe3e27f841 --- /dev/null +++ b/wp-content/themes/elegant-grunge/style.css @@ -0,0 +1,825 @@ +/* +Theme Name: Elegant Grunge +Theme URI: http://michael.tyson.id.au/elegant-grunge-wordpress-theme +Description: An unwashed yet crisp theme with a feature footer, styled image frames, a page template with a uniquely configurable sidebar and a photoblog tag page +Author: Michael Tyson +Author URI: http://michael.tyson.id.au +Version: 1.0.3 +Tags: tan, light, one-column, two-columns, three-columns, fixed-width, custom-header, right-sidebar, theme-options, threaded-comments, photoblogging + + Elegant Grunge by Michael Tyson + http://michael.tyson.id.au/elegant-grunge-wordpress-theme + + The CSS, XHTML, design and PHP are released under GPL: + http://www.opensource.org/licenses/gpl-license.php + +*/ + + +/**************************** + ** Contents + **************************** + + * General + * Layout (Top-level page element styles) + - Menu + - Header + - Content + - Sidebar + - Footer + * Content (Formatting of items in main content area) + - General + - Standard wordpress + - Comments + - Comment form + - Frame + * Sidebar (Formatting of items in sidebar) + - General + - Search + - Tag cloud + - Wordpress calendar + - Photoblog widget + * Footer (Formatting of items in footer) + + + + + + +/**************************** + ** General + ****************************/ + +body { + margin: 0; + padding: 0; + background: #4c4c4c; + font-family: "Palatino", "Georgia", "Baskerville", serif; + color: #666; +} + +a { + color: #5f5f5f; +} + +img { + border: 0; +} + + + +/**************************** + ** Layout + ****************************/ + + +/* Menu */ + +#menu { + background-color: #191919; + height:3.0em; + border-bottom: 1px solid #373737; +} + +#menu ul { + width: 800px; + margin: 0 auto; + padding: 0; + bottom: 0; + left: 0; + list-style: none; +} + +.double-right-sidebar #menu ul { + width: 947px; +} + +#menu ul li { + float: left; +} + +#menu .page_item a { + display: block; + padding-right: 40px; + line-height: 3.0em; + color: #868686; + text-decoration: none; +} + +#menu .current_page_item a, #menu .page_item a:hover { + color: #fff; +} + +/* Header */ + +#header-wrap { + background: url(images/header-repeat.jpg) repeat-x center top; +} + +#header { + height: 216px; + background: url(images/header.jpg) no-repeat center; +} + +.no-sidebar div #header { + background-image: url(images/header-no-sidebar.jpg); +} + +.double-right-sidebar div #header { + background-image: url(images/header-double-sidebar.jpg); +} + +#header div { + width: 800px; + margin: 0 auto; +} + +.double-right-sidebar #header div { + width: 947px; +} + +#header h1 { + font: 2.2em/169px "Georgia", "Baskerville", serif; + margin: 0; +} + +#header h1 a { + color: #d3d3d3; + text-decoration: none; + font-weight: normal; + font-style: normal; + text-shadow: #000 0 1px 2px; + float: left; +} + +#blog-description { + position: relative; + top: 60px; + color: #616161; + text-shadow: #000 0 1px 1px; + left: 1.3em; +} + +/* Content */ + +#content-container { + background: #f3f4ee url(images/body.jpg) repeat-y center top; +} + +.no-sidebar div #content-container { + background-image: url(images/body-no-sidebar.jpg); +} + +.double-right-sidebar div #content-container { + background-image: url(images/body-double-sidebar.jpg); +} + +#content { + width: 800px; + margin: 0 auto; +} + +.double-right-sidebar #content { + width: 947px; +} + +#body { + float: left; + width: 490px; + padding-left: 20px; + padding-right: 20px; +} + +.no-sidebar div div #body { + width: 760px; + float: none; +} + +/* Sidebar */ + +#sidebar { + float: right; + font-size: 0.9em; + width: 220px; + position: relative; + left: -15px; +} + +.double-right-sidebar #sidebar { + font-size: 0.8em; + float: left; + position: relative; + left: 28px; + width: 181px; +} + +.double-right-sidebar #sidebar2 { + font-size: 0.8em; + float: right; + position: relative; + left: -8px; + width: 169px; +} + +/* Footer */ + +#footer-wrap-outer { + margin-top: -51px; + background: #4c4c4c url(images/footer-repeat.jpg) repeat-x center top; +} + +#footer-wrap { + width: 100%; + background: url(images/footer.jpg) no-repeat center top; + padding-top: 91px; + padding-bottom: 30px; +} + +.no-sidebar div #footer-wrap { + background-image: url(images/footer-no-sidebar.jpg); +} + +.double-right-sidebar div #footer-wrap { + background-image: url(images/footer-double-sidebar.jpg); +} + +#footer { + width: 800px; + margin: 0 auto; + padding-left: 7px; + padding-right: 7px; + padding-top: 90px; + min-height: 30px; +} + + +/**************************** + ** Content + ****************************/ + +/* General */ + +h2 { + font-size: 2.4em; + font-weight: normal; + font-style: normal; + color: #3b3b3b; + margin-top: 0px; + margin-bottom: 0.5em; +} + +h2 a { + text-decoration: none; + color: #3b3b3b; +} + +.post .entry { + font-size: 0.9em; + line-height: 1.3em; + clear: both; +} + +.post .author { + color: #949494; + font-size: 0.8em; + position: relative; + top: -1.5em; +} + +.post .info { + color: #bcbcbc; + font-size: 0.8em; +} + +.post .date { + background-image: url(images/date.jpg); + width: 89px; + height: 73px; + text-align: center; + float: right; + text-transform: uppercase; +} + +.post .date .month { + display: block; + font-size: 14px; + line-height: 17px; + padding-top: 3px; + color: #a9a9a9; + font-weight: bold; +} + +.post .date .day { + display: block; + font-weight: bold; + font-size: 20px; + padding-top: 3px; + line-height: 18px; + color: #afafaf; +} + +.post .date .year { + display: block; + font-size: 0.7em; + padding-top: 3px; + color: #a5a5a5; +} + +.metadata { + margin-top: 40px; + text-align: center; + font-size: 0.7em; + color: #797979; +} + +.metadata a { + text-decoration: none; +} + +.photoblog-thumbnail { + display: inline; + vertical-align: middle; +} + +.more-link { + clear: both; + display: block; + margin-top: 30px; + margin-left: 20px; + font-size: 0.9em; + color: #88897b; + background: url(images/more-link.png) no-repeat left center; + padding-left: 30px; +} + +.hr { + clear: both; + border: 0; + background-image: url(images/hr.jpg); + color: #f8faf7; + background-color: #f8faf7; + width: 426px; + height: 121px; + margin: -8px auto 0; +} + +.hr hr { + display: none; +} + +.navigation { + width: 100%; + margin-top: 50px; +} + +.navigation a { + text-decoration: none; + font-size: 0.7em; +} + +.navigation .previous { + float: right; +} + +.navigation .next { + float: left; +} + +.search_result { + margin-left: 20px; +} + +.search_result h4 { + margin-left: -20px; +} + +.search_result h4 a { + text-decoration: none; +} + +.search_result .metadata { + color: #BFC4C1; + margin-top: 10px; + text-align: left; +} + +.search_result .metadata a { + color: #BFC4C1; +} + + +/* Standard wordpress */ + +.aligncenter, div.aligncenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.clear { + clear:both; +} + +.wp-caption { + border: none; + text-align: center; + background-color: #f8faf7; + padding-top: 4px; +} + +.wp-caption img { + margin: 0; + padding: 0; + border: 0 none; +} + +.wp-caption p.wp-caption-text { + font-size: 11px; + line-height: 17px; + padding: 0 4px 5px; + margin: 0; +} + + +/* Comments */ + + +.commentlist { + padding: 0; + list-style-type: none; + margin-top: 16px; + margin-left: 0px; +} + +.commentlist li { + margin-top: 16px; + margin-left: 30px; + max-width: 460px; +} + +.commentlist li .comment-content, +.commentlist li .before-comment, +.commentlist li .after-comment, +.commentlist li .after-comment div { + background:transparent url(images/comment.jpg) no-repeat top right; +} + +.commentlist li .comment-content { + position:relative; + zoom:1; + _overflow-y:hidden; + padding: 28px 0 0px 0px; +} + +.commentlist li .before-comment { + /* top+left vertical slice */ + position:absolute; + left:0px; + top:0px; + width: 27px; /* top slice width */ + margin-left: -27px; + height:100%; + _height:1600px; /* arbitrary long height, IE 6 */ + background-position:top left; +} + +.commentlist li .after-comment { + /* bottom */ + position:relative; + width:100%; +} + +.commentlist li .after-comment, +.commentlist li .after-comment div { + height: 40px; /* height of bottom cap/shade */ + font-size:1px; +} + +.commentlist li .after-comment { + background-position:bottom right; +} + +.commentlist li .after-comment div { + position:relative; + width:27px; /* bottom corner width */ + margin-left: -27px; + background-position:bottom left; +} + +.commentlist .comment { + margin: 0; + font-size: 0.8em; + padding-right: 27px; +} + +.comment-text { + margin-left: 42px; + margin-right: 10px; + margin-top: 24px; + font-size: 0.9em; +} + +.comment-text * { + margin-bottom: 0; + padding-bottom: 0; +} + +.commentlist .comment .reply { + text-align: right; + position: relative; + top: 15px; + z-index: 100; + font-size: 0.9em; +} + +.commentlist .comment .reply a { + color: #D7DBD8; + text-decoration: none; +} + + + +.avatar { + float: left; + margin:0 10px 0 0!important; +} + +/* Comment Form */ + + +input.text { + width: 200px; + + padding: 5px; + border: 1px solid #f2f2f2; +} + +textarea { + width: 410px; + height: 100px; + margin: 0; + padding: 5px; + border: 1px solid #f2f2f2; +} + +/* Frame */ + + +.frame-outer.aligncenter { + text-align: center; +} + +.frame-outer span { + display: inline-block; + background: url(images/frame-top-left.jpg) no-repeat left top; +} + +.frame-outer span span { + background: url(images/frame-bottom-left.jpg) no-repeat left bottom; +} + +.frame-outer span span span { + background: url(images/frame-top-right.jpg) no-repeat right top; +} + +.frame-outer span span span span { + background: url(images/frame-bottom-right.jpg) no-repeat right bottom; + padding: 32px; + min-width: 150px; + min-height: 150px; + text-align: center; + overflow: hidden; +} + +.frame-outer span span span span * { + max-width: 425px; +} + +.frame-outer.small span { + background: url(images/frame-top-left-small.jpg) no-repeat left top; +} + +.frame-outer.small span span { + background: url(images/frame-bottom-left-small.jpg) no-repeat left bottom; +} + +.frame-outer.small span span span { + background: url(images/frame-top-right-small.jpg) no-repeat right top; +} + +.frame-outer.small span span span span { + background: url(images/frame-bottom-right-small.jpg) no-repeat right bottom; + padding: 10px; + min-height: 38px; + min-width: 38px; +} + +.frame-outer span span span span span { + background: none; +} + +.frame-outer span span span span .wp-caption-text { + margin-top: 10px; +} + +/**************************** + ** Sidebar + ****************************/ + +/* General */ + +.sidebar h2 { + font-size: 1.4em; + color: #676767; + margin-bottom: 20px; +} + +.sidebar a { + color: #9f9f9f; +} + +.sidebar ul, .sidebar ul ol { + margin: 0; + padding: 0; +} + +.sidebar ul li { + list-style-type: none; + list-style-image: none; + margin-bottom: 25px; +} + +.sidebar ul p, .sidebar ul select { + margin: 5px 0 8px; +} + +.sidebar ul ul, .sidebar ul ol { + margin: 5px 0 0 10px; +} + +.sidebar ul ul ul, .sidebar ul ol { + margin: 0 0 0 10px; +} + +ol li, .sidebar ul ol li { + list-style: decimal outside; +} + +.sidebar ul ul li, .sidebar ul ol li { + margin: 3px 0 0; + padding: 0; +} + +/* Search */ + +.sidebar #searchform div { + background-image: url(images/searchform.jpg); + width: 226px; + height: 49px; + margin-left: -7px; +} +.sidebar #searchform div #s { + border: 0; + margin-top: 14px; + margin-left: 19px; + width: 149px; + height: 16px; + color: #909090; + font-size: 1.0em; + outline: none; +} +.sidebar #searchform div #searchsubmit { + border: 0; + background: none; + width: 39px; + height: 26px; + margin-left: 4px; + overflow: hidden; + cursor: pointer; + font-family: "Palatino", "Georgia", "Baskerville", serif; + color: #999; + font-size: 0.7em; + text-transform: lowercase; +} + +.double-right-sidebar .sidebar #searchform div { + background-image: url(images/searchform-double-sidebar.jpg); + width: 190px; + height: 45px; + margin-left: -3px; +} +.double-right-sidebar .sidebar #searchform div #s { + border: 0; + margin-top: 14px; + margin-left: 19px; + width: 117px; + height: 16px; + color: #909090; + font-size: 0.9em; + outline: none; +} + + +/* Tag cloud */ + +.widget_tag_cloud a { + text-decoration: none; +} + +/* Wordpress calendar */ + +#calendar_wrap { + margin: 0px; +} + +#wp-calendar { + width: 100%; +} + +#wp-calendar th { + text-align: left; +} + +/* Photoblog widget */ + +.sidebar .elegant_grunge_photoblog div { + text-align: center; +} + +.sidebar .photoblog-thumbnail img { + background: #fff; + border: 1px solid #aaa; + padding: 3px; + display: inline; +} + + +/**************************** + ** Footer + ****************************/ + +#footer #subscribe a { + display: block; + position: absolute; + background-image: url(images/rss.png); + width: 149px; + height: 126px; + margin-left: -126px; + margin-top: -68px; + text-indent: -2000px; + overflow: hidden; +} + +#footer .legal, #footer .credit { + color: #5f5f5f; +} + +#footer .legal { + float: left; +} + +#footer .credit a { + text-decoration: none; +} + +#footer .credit { + float: right; +} + + +#footer .widget-wrap { + float: left; + width: 264px; + margin-bottom: 36px; +} + + +#footer .widget { + margin-right: 21px; + margin-left: 21px; +} + +#footer { + font-size: 0.8em; + line-height: 1.1em; +} + +#footer a { + color: #a3a3a3; +} + +#footer h2 { + color: #fff; + font-size: 1.3em; + margin-bottom: 15px; + font-weight: normal; + font-style: normal; +} diff --git a/wp-content/themes/elegant-grunge/tag-photoblog.php b/wp-content/themes/elegant-grunge/tag-photoblog.php new file mode 100644 index 0000000000000000000000000000000000000000..b8047c8ecb9ba0d1a00a0ab5378ee1db77dffddb --- /dev/null +++ b/wp-content/themes/elegant-grunge/tag-photoblog.php @@ -0,0 +1,83 @@ +<?php get_header(); ?> + +<?php query_posts($query_string.'&posts_per_page='.(get_option('photoblog_thumb_count')+1)); ?> + +<div id="content-container"> +<div id="content"> + <div id="body"> + + <?php if (have_posts()) : ?> + + <!-- first item --> + <?php the_post(); ?> + + <div class="post" id="post-<?php the_ID(); ?>"> + + <div class="date"> + <span class="month"><?php the_time('M') ?></span> + <span class="day"><?php the_time('j') ?></span> + <span class="year"><?php the_time('Y') ?></span> + </div> + + <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'elegant-grunge'), get_the_title()); ?>"><?php the_title(); ?></a></h2> + + <?php if ( get_option("show_author") ) : ?> + <div class="author"><?php the_author() ?></div> + <?php endif ;?> + + <!-- <div class="info">by <?php the_author() ?></div> --> + + <div class="entry"> + <?php the_content(__('Continue reading', 'elegant-grunge')); ?> + </div> + + <div class="clear"></div> + + <p class="metadata"> + <?php comments_popup_link(__('no comments', 'elegant-grunge'), __('1 comment', 'elegant-grunge'), __('% comments', 'elegant-grunge')); ?> + <?php the_tags(' | '.__('tags:', 'elegant-grunge').' ', ', ', ''); ?> + <?php if ( count(($categories=get_the_category())) > 1 || $categories[0]->cat_ID != 1 ) : ?> + | <?php _e('posted in', 'elegant-grunge')?> <?php the_category(', ') ?> + <?php endif; ?> + <?php edit_post_link(__('Edit', 'elegant-grunge'), ' | ', ''); ?> + </p> + + </div> + + <div class="hr"><hr /></div> + + <!-- remaining items --> + <?php while (have_posts()) : the_post(); ?> + <?php if ( !has_image() ) continue; ?> + <?php if ( get_option('photoblog_frames') ) : ?> + <span class="frame-outer small"><span><span><span><span> + <?php endif; ?> + <?php the_thumbnail(get_option('photoblog_thumb_width'), get_option('photoblog_thumb_height')); ?> + <?php if ( get_option('photoblog_frames') ) : ?> + </span></span></span></span></span> + <?php endif; ?> + <?php endwhile; ?> + + <div class="clear"></div> + + <div class="navigation"> + <div class="next"><?php next_posts_link(__('« Older Entries', 'elegant-grunge')) ?></div> + <div class="previous"><?php previous_posts_link(__('Newer Entries »', 'elegant-grunge')) ?></div> + </div> + + <?php else : ?> + + <h2 class="center"><?php _e('Not Found', 'elegant-grunge') ?></h2> + <p class="center"><?php _e('Sorry, but you are looking for something that isn\'t here.', 'elegant-grunge') ?></p> + <?php include (TEMPLATEPATH . "/searchform.php"); ?> + + <?php endif; ?> + +</div> + +<?php get_sidebar(); ?> + +</div> +<div class="clear"></div> +</div> +<?php get_footer(); ?>