Footer displays first year to last year copyright, changed html for moods display

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-08-24 17:40:04 -07:00
parent 358925ffdd
commit e0e7405263
5 changed files with 42 additions and 16 deletions

View File

@ -25,7 +25,13 @@ function comicpress_admin() {
<br clear="all" />
<div style="float: right">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<input name="comicpress_reset" type="submit" class="button-primary" value="Reset Settings" />
<input type="hidden" name="action" value="comicpress_reset" />
</form>
</div>
<br clear="all" />
<?php
if ( wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
@ -89,10 +95,10 @@ function comicpress_admin() {
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" class="code" onchange="showimage(this,'cpthemestyle')">
<option class="level-0" value="standard" <?php if (get_option($value['id'])=='standard') {?>selected="selected" <?php } ?>>Standard</option>
<option class="level-0" value="3c" <?php if (get_option($value['id'])=='3c') {?>selected="selected" <?php } ?>>3C</option>
<option class="level-0" value="gn" <?php if (get_option($value['id'])=='gn') {?>selected="selected" <?php } ?>>GN</option>
<option class="level-0" value="v" <?php if (get_option($value['id'])=='v') {?>selected="selected" <?php } ?>>V</option>
<option class="level-0" value="v3c" <?php if (get_option($value['id'])=='v3c') {?>selected="selected" <?php } ?>>V3C</option>
<option class="level-0" value="3c" <?php if (get_option($value['id'])=='3c') {?>selected="selected" <?php } ?>>3-Column</option>
<option class="level-0" value="gn" <?php if (get_option($value['id'])=='gn') {?>selected="selected" <?php } ?>>Graphic Novel</option>
<option class="level-0" value="v" <?php if (get_option($value['id'])=='v') {?>selected="selected" <?php } ?>>Vertical</option>
<option class="level-0" value="v3c" <?php if (get_option($value['id'])=='v3c') {?>selected="selected" <?php } ?>>Vertical 3-Column</option>
</select>
</label>
</td>
@ -622,7 +628,7 @@ function comicpress_admin() {
</div>
</div>
<div style="text-align:center;padding: 5px; background: #ddd; -moz-border-radius: 10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;border: solid 1px #000;">
<div style="margin-top: 10px; text-align:center;padding: 5px; background: #ddd; -moz-border-radius: 10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;border: solid 1px #000;">
<a href="http://comicpress.org/">ComicPress <?php echo comicpress_current_theme_version(); ?></a>, created by <a href="http://mindfaucet.com/">Tyler Martin</a>, with <a href="http://www.coswellproductions.com/">John Bintz</a> and <a href="http://webcomicplanet.com/">Philip M. Hofer</a> (<a href="http://frumph.webcomicplanet.com/">Frumph</a>)<br />
If you like the ComicPress theme, please donate. It will help in creating new versions.<br />

View File

@ -10,7 +10,7 @@
<?php } ?>
<?php get_sidebar('footer'); ?>
<p>
&copy; <?php echo date('Y'); ?> <?php echo the_author_meta('firstname',0); echo "&nbsp;"; echo the_author_meta('lastname'); ?>. <?php bloginfo('name') ?> is powered by <a href="http://wordpress.org/">WordPress</a> with <a href="http://comicpress.org/">ComicPress</a>
&copy;<?php echo cp_copyright_year(); ?> <?php echo the_author_meta('firstname',0); echo "&nbsp;"; echo the_author_meta('lastname'); ?>. <?php bloginfo('name') ?> is powered by <a href="http://wordpress.org/">WordPress</a> with <a href="http://comicpress.org/">ComicPress</a>
| Subscribe: <a href="<?php bloginfo('rss2_url') ?>">RSS Feed</a> | <a href="#outside" onclick="scrollup(); return false;">Return to Top &nbsp;</a><br />
<!-- <?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds. -->
</p>

View File

@ -699,4 +699,16 @@ function comicpress_is_active_sidebar( $name ) {
return false;
}
function cp_copyright_year() {
$latest_comic = get_terminal_post_in_category('',true);
$archive_year = get_post_time('Y', false, $latest_comic, true);
$current_year = date('Y');
if ($archive_year == $current_year) {
$return_year = $current_year;
} else {
$return_year = $archive_year . '-' . $current_year;
}
return $return_year;
}
?>

View File

@ -52,18 +52,24 @@ function comicpress_showmood_edit_post() {
Using Moods from directory: '.$moods_directory.'<br />
Current Mood: '.$mood.'<br /><br />';
if (!empty($results)) { ?>
<div style="float:left; margin-top: 10px; text-align: center; width: 68px; padding-top: 64px;">
None.<br />
<label><input name="postmood" id="postmood-none" type="radio" value="none"<?php if ( $mood == "none" ) { echo " checked"; } ?> /></label>
<div style="float:left; margin-top: 70px; text-align: center; width: 68px; overflow: hidden;">
<label for="postmood-none" style="cursor:pointer;">
none
</label>
<br />
<input name="postmood" style="margin-top: 3px;" id="postmood-anger" type="radio" value="none" />
</div>
<?php foreach ($results as $file) {
$newmood_file = basename($file);
$newmood = explode(".", $newmood_file);
$newmood = $newmood[0]; ?>
<div style="float:left; margin-top: 10px; text-align: center; width: 68px; overflow: hidden;">
<label for="<?php echo $newmood; ?>" style="cursor:pointer;">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo basename($file); ?>"><br />
<?php echo $newmood; ?><br />
<label><input name="postmood" style="margin-top: 3px;" id="postmood-<?php echo $newmood; ?>" type="radio" value="<?php echo $newmood_file; ?>"<?php if ( $mood == $newmood ) { echo " checked"; } ?> /></label>
<?php echo $newmood; ?>
</label>
<br />
<input name="postmood" style="margin-top: 3px;" id="postmood-<?php echo $newmood; ?>" type="radio" value="<?php echo $newmood_file; ?>"<?php if ( $mood == $newmood ) { echo " checked"; } ?> />
</div>
<?php }
} ?>
@ -71,6 +77,7 @@ function comicpress_showmood_edit_post() {
</div>
<?php }
function comicpress_handle_edit_post_mood_save($post_id) {
if (empty($_POST['postmood']) || $_POST['postmood'] == 'none') {
$postmood = 'none';

View File

@ -40,7 +40,8 @@ function comicpress_menubar() {
$menulinks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $menulinks);
$menulinks = preg_replace('#<ul ([^>]*)>#', '', $menulinks);
$menulinks = str_replace('</ul>', '', $menulinks);
$bookmarks = wp_list_bookmarks('echo=0&title_li=&categorize=0&title_before=&title_after=&category_name=menulinks');
$bookmarkargs =
$bookmarks = wp_list_bookmarks('echo=0&title_li=&categorize=1&title_before=&title_after=&exclude_name=menubar');
$bookmarks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $bookmarks);
$bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks);
$listpages = wp_list_pages('echo=0&sort_column=menu_order&depth=4&title_li=');