ComicPress Options styling to WP Admin.

This commit is contained in:
mindfaucet 2009-11-16 18:50:50 -07:00
parent eef1855af2
commit a1a6a4c14b
7 changed files with 107 additions and 112 deletions

View File

@ -7,49 +7,47 @@ function options() {
add_action('admin_head-'.$pagehook, 'comicpress_admin_page_head');
}
function comicpress_admin_page_head() {
global $is_IE;
if ($is_IE) { ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/js/tabbed/tabbed_pages_ie.css" type="text/css" media="screen" />
<?php } else { ?>
function comicpress_admin_page_head() { ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/js/tabbed/tabbed_pages.css" type="text/css" media="screen" />
<?php } ?>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/tabbed/tabbed_pages.js"></script>
<!--[if lt ie 8]>
<style>
div.show {
position: static;
margin-top: 1px;
}
#cpadmin div.off {
height: 22px;
}
</style>
<![endif]-->
<?php }
function comicpress_admin() {
global $options, $upload_path, $blogcat, $moods_directory, $calendar_directory, $graphicnav_directory;
global $options, $upload_path, $blogcat, $moods_directory, $calendar_directory, $graphicnav_directory; ?>
?>
<div class="wrap">
<div class="wrap">
<div id="cpadmin-headericon" style="background: url('<?php echo get_template_directory_uri(); ?>/images/options/comicpress_icon.png') no-repeat;"></div>
<h2 class="alignleft"><?php _e('ComicPress Options','comicpress'); ?></h2>
<a class="alignright" style="margin: 20px;" href="http://comicpress.org/"><img src="<?php echo get_template_directory_uri(); ?>/images/options/comicpress_logo.png" alt="ComicPress" /></a>
<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" />
<div class="clear"></div>
<?php
if ( wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
if ('comicpress_save'== $_REQUEST['action']) {
if ('comicpress_save' == $_REQUEST['action']) {
foreach ($options as $value) {
if( !isset( $_REQUEST[ $value['id'] ] ) ) { } else { update_option( $value['id'], stripslashes($_REQUEST[ $value['id']])); } } ?>
<div id="message" class="updated fade"><p><strong><?php _e('Options/Settings SAVED!','comicpress'); ?></strong></p></div>
<div id="message" class="updated fade"><p><strong><?php _e('ComicPress Settings SAVED!','comicpress'); ?></strong></p></div>
<script>function hidemessage() { document.getElementById('message').style.display = 'none'; }</script>
<?php }
if ('comicpress_reset' == $_REQUEST['action'] ) {
if ('comicpress_reset' == $_REQUEST['action']) {
foreach ($options as $default) {
delete_option($default['id'],$default['default']);
} ?>
<div id="message" class="updated fade"><p><strong><?php _e('Options/Settings RESET!','comicpress'); ?></strong></p></div>
<div id="message" class="updated fade"><p><strong><?php _e('ComicPress Settings RESET!','comicpress'); ?></strong></p></div>
<script>function hidemessage() { document.getElementById('message').style.display = 'none'; }</script>
<?php
}
}
@ -65,11 +63,11 @@ function comicpress_admin() {
@require(get_template_directory() . '/comicpress-config.php');
?>
<div id="poststuff" class="metabox-holder">
<div id="cpadmin">
<div class="on" title="themestyle"><span><?php _e('Theme Style','comicpress'); ?></span></div>
<div id="cpadmin" onclick="hidemessage();">
<div class="on" title="themestyle"><span><?php _e('Layout','comicpress'); ?></span></div>
<div class="off" title="generaloptions"><span><?php _e('General','comicpress'); ?></span></div>
<div class="off" title="indexoptions"><span><?php _e('Index Page','comicpress'); ?></span></div>
<div class="off" title="postoptions"><span><?php _e('Post','comicpress'); ?></span></div>
@ -79,7 +77,6 @@ function comicpress_admin() {
<div class="off" title="buyprintoptions"><span><?php _e('Buy Print','comicpress'); ?></span></div>
<div class="off" title="membersoptions"><span><?php _e('Members','comicpress'); ?></span></div>
</div>
<?php include(get_template_directory() . '/options/themestyle.php'); ?>
<?php include(get_template_directory() . '/options/generaloptions.php'); ?>
<?php include(get_template_directory() . '/options/indexoptions.php'); ?>
@ -90,12 +87,10 @@ function comicpress_admin() {
<?php include(get_template_directory() . '/options/buyprintoptions.php'); ?>
<?php include(get_template_directory() . '/options/membersoptions.php'); ?>
</div>
<div style="margin-top: 10px; text-align:center;padding: 5px; background: #eee; -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 2.8 (<?php global $comicpress_version; echo $comicpress_version; ?>)</a>, <?php _e('created by','comicpress'); ?> <a href="http://mindfaucet.com/">Tyler Martin</a>, <?php _e('with','comicpress'); ?> <a href="http://www.coswellproductions.com/">John Bintz</a> <?php _e('and','comicpress'); ?> <a href="http://frumph.net/">Philip M. Hofer (Frumph)</a><br />
<?php _e('If you like the ComicPress theme, please donate. It will help in creating new versions.','comicpress'); ?><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div class="cpadmin-footer">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" class="cpadmin-donate">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="7827910">
<input type="image"
@ -106,6 +101,15 @@ function comicpress_admin() {
src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1"
height="1">
</form>
<a href="http://comicpress.org/"><strong>ComicPress 2.9</strong> <small>[ <?php global $comicpress_version; echo $comicpress_version; ?> ]</small></a>. <?php _e('Created by','comicpress'); ?> <a href="http://mindfaucet.com/">Tyler Martin</a> <?php _e('with','comicpress'); ?> <a href="http://www.coswellproductions.com/">John Bintz</a> <?php _e('and','comicpress'); ?> <a href="http://webcomicplanet.com/">Philip M. Hofer</a> <small>(<a href="http://frumph.net/">Frumph</a>)</small>.<br />
<?php _e('If you like the ComicPress theme, please donate. It will help in creating new versions.','comicpress'); ?>
<br />
<br />
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<input name="comicpress_reset" type="submit" class="button" value="Reset All Settings" />
<input type="hidden" name="action" value="comicpress_reset" />
</form>
<div class="clear"></div>
</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,34 +1,53 @@
#cpadmin-headericon {
height: 36px;
width: 36px;
margin: 14px 6px 0 0;
float: left;
}
#cpadmin {
font: 11px verdana,arial,sans-serif;
font-family: 'Verdana', sans-serif;
font-size: 11px;
padding: 5px 0 0 0;
line-height: 5px;
margin: 0 0 -1px 0;
}
#cpadmin div {
border-top-left-radius: 3px;
-moz-border-radius-topleft: 3px;
-webkit-border-top-left-radius: 3px;
-khtml-border-top-left-radius: 3px;
border-top-right-radius: 3px;
-moz-border-radius-topright: 3px;
-webkit-border-top-right-radius: 3px;
-khtml-border-top-right-radius: 3px;
}
#cpadmin div.off {
color: #000;
color: #999;
height: 23px;
margin: 0 2px -2px 0;
margin: 0 0 -2px 5px;
line-height: 23px;
padding: 0 10px;
padding: 0 7px;
float: left;
background: url(tabs_0.gif) repeat-x left bottom;
border-top: 1px solid #ddd;
border-left: solid 1px #ddd;
border-right: solid 1px #ddd;
background: #e9e9e9;
border-top: 1px solid #dfdfdf;
border-left: solid 1px #dfdfdf;
border-right: solid 1px #dfdfdf;
position: relative;
cursor: pointer;
z-index: 20;
}
#cpadmin div.on {
color: #c00;
padding: 0 10px;
margin: 0 2px -1px 0;
color: #333;
padding: 0 7px;
margin: 0 0 -1px 5px;
float: left;
background: url(tabs_2.gif) repeat-x left bottom;
border-top: 1px solid #000;
border-left: 1px solid #000;
border-right: 1px solid #000;
background: #fff;
border-top: 1px solid #dfdfdf;
border-left: 1px solid #dfdfdf;
border-right: 1px solid #dfdfdf;
border-bottom: 0px;
cursor: pointer;
height: 23px;
@ -42,17 +61,26 @@ div.hide {
width: 0;
overflow: hidden;
}
div.show {
clear: left;
display: run-in;
background: #fff;
border: 1px solid #000;
padding: 20px;
border: 1px solid #dfdfdf;
padding: 10px;
z-index: 50;
margin-top: -2px;
position: relative;
font: 11px verdana, arial, sans-serif;
line-height: 18px;
border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
-webkit-border-top-left-radius: 6px;
-khtml-border-top-left-radius: 6px;
border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
-webkit-border-top-right-radius: 6px;
-khtml-border-top-right-radius: 6px;
}
div.show img {
float: left;
@ -61,3 +89,26 @@ div.show img {
.clear {
clear: both;
}
.cpadmin-footer {
padding: 10px;
background: #ededed;
border-width: 0 1px 1px 1px;
border-style: solid;
border-color: #dfdfdf;
font-family: 'Arial', sans-serif;
border-bottom-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
-webkit-border-bottom-left-radius: 6px;
-khtml-border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-moz-border-radius-bottomright: 6px;
-webkit-border-bottom-right-radius: 6px;
-khtml-border-bottom-right-radius: 6px;
}
.cpadmin-donate {
float: right;
}
.cpadmin-footer a {
text-decoration: none;
}

View File

@ -1,60 +0,0 @@
#cpadmin {
font: 11px verdana,arial,sans-serif;
padding: 5px 0 0 0;
line-height: 5px;
margin: 0 0 -1px 0;
}
#cpadmin div.off {
color: #000;
height: 23px;
margin: -1px 2px -1px 0;
line-height: 23px;
padding: 0 10px;
float: left;
background: url(tabs_0.gif) repeat-x left bottom;
border-top: 1px solid #ddd;
border-left: solid 1px #ddd;
border-right: solid 1px #ddd;
position: relative;
cursor: pointer;
z-index: 20;
}
#cpadmin div.on {
color: #c00;
padding: 0 10px;
margin: 0 2px 0 0 0;
float: left;
background: url(tabs_2.gif) repeat-x left bottom;
border-top: 1px solid #000;
border-left: 1px solid #000;
border-right: 1px solid #000;
cursor: pointer;
height: 23px;
line-height: 22px;
position: relative;
z-index: 100;
}
div.hide {
display: none;
width: 0;
overflow: hidden;
}
div.show {
clear: left;
display: run-in;
background: #fff;
border: 1px solid #000;
padding: 20px;
z-index: 50;
font: 11px verdana, arial, sans-serif;
line-height: 18px;
}
div.show img {
float: left;
margin: 0 10px 10px 0;
}
.clear {
clear: both;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B