Lotsa Freakin stuff.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-08-25 05:37:13 -07:00
parent f5b065e722
commit bb67f466f5
21 changed files with 873 additions and 796 deletions

View File

@ -168,7 +168,11 @@ $options = array (
"id" => "comicpress-moods_directory",
"default" => "default",
"type" => "comicpress-moods_directory"),
array(
"id" => "comicpress-graphicnav_directory",
"default" => "scifi",
"type" => "comicpress-graphicnav_directory"),
array("type" => "close")
);

View File

@ -251,6 +251,37 @@ function comicpress_admin() {
</tr>
<?php break;
case "comicpress-graphicnav_directory":
$current_gnav_directory = get_option($value['id']);
if (empty($current_directory)) $current_directory = 'scifi';
$count = count($results = glob(get_template_directory() . '/images/nav/'.$current_directory.'/*'));
$gnav_directories = glob(get_template_directory() . '/images/nav/*');
?>
<tr>
<th scope="row"><strong>Graphic Navigation Directory</strong><br /><br />Choose a directory to get the graphic navigation styling from.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<?php
foreach ($gnav_directories as $gnav_dirs) {
if (is_dir($gnav_dirs)) {
$gnav_dir_name = basename($gnav_dirs); ?>
<option class="level-0" value="<?php echo $gnav_dir_name; ?>" <?php if ($current_gnav_directory == $gnav_dir_name) { ?>selected="selected"<?php } ?>><?php echo $gnav_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
<td valign="top">
<br />
Graphic Navigation directories are found in your theme directory/images/nav/* to create your own custom graphic navigation menu buttons just create a directory
under images/nav/ and place your image files inside of it and create a navstyle.css file to determine the style of your navigation display.
</td>
</tr>
<?php break;
}
}
?>
@ -629,7 +660,7 @@ function comicpress_admin() {
</div>
<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 />
<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.net/">Frumph</a>)<br />
If you like the ComicPress theme, please donate. It will help in creating new versions.<br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal-wrap">

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -69,6 +69,7 @@ if (get_option('upload_path') !== false) {
'disable_tags_in_posts' => 'disable_tags_in_posts',
'disable_categories_in_posts' => 'disable_categories_in_posts',
'moods_directory' => 'moods_directory',
'graphicnav_directory' => 'graphicnav_directory',
'contact_in_menubar' => 'contact_in_menubar' ) as $options => $variable_name) {
$variables_to_extract[$variable_name] = get_option("comicpress-${options}");
}
@ -76,6 +77,9 @@ if (get_option('upload_path') !== false) {
extract($variables_to_extract);
}
if (empty($graphicnav_directory)) $graphicnav_directory = 'scifi';
if (empty($moods_directory)) $moods_directory = 'default';
function is_cp_theme_style($choices) {
global $cp_theme_style;

View File

@ -7,14 +7,7 @@
*/
function display_blog_post() {
global $post, $wp_query, $authordata, $enable_related_posts, $enable_post_author_gravatar, $enable_post_calendar;
if (is_single()) { ?>
<div class="nav-blog">
<div class="nav-blog-previous"><?php previous_post_link('%link','&lsaquo; Previous', TRUE) ?></div>
<div class="nav-blog-next"><?php next_post_link('%link','Next &rsaquo;', TRUE) ?></div>
</div>
<div class="clear"></div>
<?php } ?>
global $post, $wp_query, $authordata, $enable_related_posts, $enable_post_author_gravatar, $enable_post_calendar; ?>
<div class="post-head"></div>
<div class="post" id="post-<?php the_ID() ?>">
<div class="post-info">

View File

@ -18,6 +18,10 @@
?></title>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>" type="text/css" media="screen" />
<?php global $graphicnav_directory; if (file_exists(get_template_directory() . '/images/nav/' .$graphicnav_directory. '/navstyle.css')) { ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory') ?>/images/nav/<?php echo $graphicnav_directory; ?>/navstyle.css" type="text/css" media="screen" />
<?php } ?>
<link rel="SHORTCUT ICON" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico"/>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name') ?> RSS2 Feed" href="<?php bloginfo('rss2_url') ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name') ?> Atom Feed" href="<?php bloginfo('atom_url') ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url') ?>" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,109 @@
/* COMIC NAVIGATION
Author: Philip M. Hofer (Frumph)
Style: Sci Fi
*/
#comic_navi_wrapper {
width: 540px;
margin: 0 auto;
}
.comic_navi_comments_count {
top: 5px;
left: 15px;
font-size: 18px;
position: relative;
}
.comic_navi_first, .comic_navi_story_previous, .comic_navi_previous,
.comic_navi_random, .comic_navi_archives, .comic_navi_comments,
.comic_navi_next, .comic_navi_story_next, .comic_navi_latest {
padding: 0;
margin: 0 auto;
float: left;
}
a.rollnext, .rollnext {
display: inline-block;
height: 50px;
width: 60px;
text-decoration: none;
background: url('nextroll.png') no-repeat;
}
a.rolllast, .rolllast {
display: inline-block;
height: 50px;
width: 60px;
text-decoration: none;
background: url('lastroll.png') no-repeat;
}
a.rollprev, .rollprev {
display: inline-block;
height: 50px;
width: 60px;
text-decoration: none;
background: url('prevroll.png') no-repeat;
}
a.rollfirst, .rollfirst {
display: inline-block;
height: 50px;
width: 60px;
text-decoration: none;
background: url('firstroll.png') no-repeat;
}
a.rollstoryprev, .rollstoryprev {
display: inline-block;
height: 50px;
width: 60px;
text-decoration: none;
background: url('prevstoryroll.png') no-repeat;
}
a.rollstorynext, .rollstorynext {
display: inline-block;
height: 50px;
width: 60px;
text-decoration: none;
background: url('nextstoryroll.png') no-repeat;
}
a.rollrandom, .rollrandom {
display: inline-block;
height: 50px;
width: 60px;
text-decoration: none;
background: url('randomroll.png') no-repeat;
}
a.rollarchives, .rollarchives {
display: inline-block;
height: 50px;
width: 60px;
text-decoration: none;
background: url('archiveroll.png') no-repeat;
}
a.rollcomments, .rollcomments {
display: inline-block;
height: 50px;
width: 60px;
text-decoration: none;
background: url('commentsroll.png') no-repeat;
}
a.rollfirst:hover, a.rollprev:hover, a.rollnext:hover, a.rolllast:hover, a.rollrandom:hover, a.rollarchives:hover, a.rollcomments:hover, a.rollstoryprev:hover, a.rollstorynext:hover {
background-position: -60px 0;
}
.rollagain {
background-position: -120px 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

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

View File

@ -1,3 +1,4 @@
<div id="sidebar-left-top"></div>
<div id="sidebar-left">
<div class="sidebar">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) : ?>
@ -17,4 +18,5 @@
</ul>
<?php endif; ?>
</div>
</div>
</div>
<div id="sidebar-left-bottom"></div>

View File

@ -1,3 +1,4 @@
<div id="sidebar-right-top"></div>
<div id="sidebar-right">
<div class="sidebar">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Sidebar') ) : ?>
@ -30,4 +31,5 @@
</ul>
<?php endif; ?>
</div>
</div>
</div>
<div id="sidebar-right-bottom"></div>

1293
style.css

File diff suppressed because it is too large Load Diff

View File

@ -9,65 +9,6 @@ Author URI: http://webcomicplanet.com/
*/
function comic_navigation() {
global $post,$wp_query;
$this_permalink = get_permalink();
$temp_query = $wp_query->is_single;
$wp_query->is_single = true;
$prev_comic = get_previous_comic_permalink();
$next_comic = get_next_comic_permalink();
$wp_query->is_single = $temp_query;
$temp_query = null;
$first_comic = get_first_comic_permalink();
$last_comic = get_last_comic_permalink();
echo '<div id="comic_navi_wrapper">';
echo ' <div class="comic_navi">';
echo ' <div class="comic_navi_left">';
if (!empty($first_comic) && ($first_comic != $this_permalink)) {
echo ' <a href="'.$first_comic.'" class="rollfirst" title="First">&nbsp;</a>';
} else {
echo ' <div class="rollfirst rollagain"></div>';
}
if (!empty($prev_comic)) {
echo ' <a href="'.$prev_comic.'" class="rollprev" title="Previous">&nbsp;</a>';
} else {
echo ' <div class="rollprev rollagain"></div>';
}
echo ' <div class="clear"></div>';
echo ' </div>';
echo ' <div class="comic_navi_right">';
if (!empty($next_comic)) {
echo ' <a href="'.$next_comic.'" class="rollnext" title="Next">&nbsp;</a>';
} else {
echo ' <div class="rollnext rollagain"></div>';
}
if (!empty($last_comic) && ($last_comic != $this_permalink)) {
echo ' <a href="'.$last_comic.'" class="rolllast" title="Last">&nbsp;</a>';
} else {
echo ' <div class="rolllast rollagain"></div>';
}
echo ' <div class="clear"></div>';
echo ' </div>';
echo ' <div class="comic_navi_center_spacer">';
echo ' <div class="comic_navi_center">';
echo ' <a href="'.get_bloginfo('url').'?randomcomic" class="rollrandom" title="Random Comic">&nbsp;</a>';
echo ' </div>';
echo ' </div>';
echo ' <div class="clear"></div>';
echo ' </div>';
echo '</div>';
}
class widget_comicpress_graphical_navigation extends WP_Widget {
function widget_comicpress_graphical_navigation() {
@ -77,16 +18,146 @@ class widget_comicpress_graphical_navigation extends WP_Widget {
function widget($args, $instance) {
global $wp_query, $post;
extract($args, EXTR_SKIP);
echo $before_widget;
comic_navigation();
echo $after_widget;
}
$this_permalink = get_permalink();
$temp_query = $wp_query->is_single;
$wp_query->is_single = true;
$prev_comic = get_previous_comic_permalink();
$next_comic = get_next_comic_permalink();
$wp_query->is_single = $temp_query;
$temp_query = null;
$first_comic = get_first_comic_permalink();
$last_comic = get_last_comic_permalink();
$prev_story = '';
$next_story = '';
?>
<div id="comic_navi_wrapper">
<?php if ($instance['firstlast'] != 'off') { ?>
<div class="comic_navi_first">
<?php if (!empty($first_comic) && ($first_comic != $this_permalink)) { ?>
<a href="<?php echo $first_comic; ?>" class="rollfirst" title="First">&nbsp;</a>
<?php } else { ?>
<div class="rollfirst rollagain"></div>
<?php } ?>
</div>
<?php }
if ($instance['storynav'] != 'off') { ?>
<div class="comic_navi_story_previous">
<?php if (!empty($prev_story)) { ?>
<a href="<?php echo $prev_story; ?>" class="rollstoryprev" title="Previous Story Start">&nbsp;</a>
<?php } else { ?>
<div class="rollstoryprev rollagain"></div>
<?php } ?>
</div>
<?php }
if ($instance['previous'] != 'off') { ?>
<div class="comic_navi_previous">
<?php if (!empty($prev_comic)) { ?>
<a href="<?php echo $prev_comic; ?>" class="rollprev" title="Previous">&nbsp;</a>
<?php } else { ?>
<div class="rollprev rollagain"></div>
<?php } ?>
</div>
<?php }
if ($instance['archives'] != 'off' && !empty($instance['archive_path'])) { ?>
<div class="comic_navi_archives">
<a href="<?php echo $instance['archive_path']; ?>" class="rollarchives" title="Archives">&nbsp;</a>
</div>
<?php }
if ($instance['random'] != 'off') { ?>
<div class="comic_navi_random">
<a href="<?php echo bloginfo('url'); ?>/?randomcomic" class="rollrandom" title="Random Comic">&nbsp;</a>
</div>
<?php }
if ($instance['comments'] != 'off') { ?>
<div class="comic_navi_comments">
<a href="<?php the_permalink(); ?>#respond" class="rollcomments" title="Comments"><span class="comic_navi_comments_count"><?php comments_number('0', '1', '%'); ?></span></a>
</div>
<?php }
if ($instance['next'] != 'off') { ?>
<div class="comic_navi_next">
<?php if (!empty($next_comic)) { ?>
<a href="<?php echo $next_comic; ?>" class="rollnext" title="Next">&nbsp;</a>
<?php } else { ?>
<div class="rollnext rollagain"></div>
<?php } ?>
</div>
<?php }
if ($instance['storynav'] != 'off') { ?>
<div class="comic_navi_story_next">
<?php if (!empty($next_story)) { ?>
<a href="<?php echo $next_story; ?>" class="rollstorynext" title="Next Story Start">&nbsp;</a>
<?php } else { ?>
<div class="rollstorynext rollagain"></div>
<?php } ?>
</div>
<?php }
if ($instance['firstlast'] != 'off') { ?>
<div class="comic_navi_latest">
<?php if (!empty($last_comic) && ($last_comic != $this_permalink)) { ?>
<a href="<?php echo $first_comic; ?>" class="rolllast" title="Latest">&nbsp;</a>
<?php } else { ?>
<div class="rolllast rollagain"></div>
<?php } ?>
</div>
<?php } ?>
<div class="clear"></div>
</div>
<?php }
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['firstlast'] = $new_instance['firstlast'];
$instance['storynav'] = $new_instance['storynav'];
$instance['previous'] = $new_instance['previous'];
$instance['random'] = $new_instance['random'];
$instance['archives'] = $new_instance['archives'];
$instance['comments'] = $new_instance['comments'];
$instance['next'] = $new_instance['next'];
$instance['archive_path'] = strip_tags($new_instance['archive_path']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'firstlast' => 'on', 'storynav' => 'off', 'previous' => 'on', 'random' => 'off', 'archives' => 'off', 'comments' => 'off', 'next' => 'on', 'archive_path' => '' ) );
$firstlast = $instance['firstlast']; if (empty($firstlast)) $firstlast = 'on';
$storynav = $instance['storynav']; if (empty($storynav)) $storynav = 'off';
$previous = $instance['previous']; if (empty($previous)) $previous = 'on';
$random = $instance['random']; if (empty($random)) $random = 'off';
$archives = $instance['archives']; if (empty($archives)) $archives = 'off';
$comments = $instance['comments']; if (empty($comments)) $comments = 'off';
$archive_path = $instance['archive_path'];
$next = $instance['next']; if (empty($next)) $next = 'on';
?>
<label for="<?php echo $this->get_field_id('firstlast'); ?>"><strong>First &amp; Last</strong><br />
<input id="<?php echo $this->get_field_id('firstlast'); ?>" name="<?php echo $this->get_field_name('firstlast'); ?>" type="radio" value="on"<?php if ( $firstlast == "on") { echo " checked"; } ?> />On</label>&nbsp;<input id="<?php echo $this->get_field_id('firstlast'); ?>" name="<?php echo $this->get_field_name('firstlast'); ?>" type="radio" value="off"<?php if ( $firstlast == "off") { echo " checked"; } ?> />Off</label><br />
<br />
<label for="<?php echo $this->get_field_id('storynav'); ?>"><strong>Storyline Prev &amp; Next</strong><br />
<input id="<?php echo $this->get_field_id('storynav'); ?>" name="<?php echo $this->get_field_name('storynav'); ?>" type="radio" value="on"<?php if ( $storynav == "on") { echo " checked"; } ?> />On</label>&nbsp;<input id="<?php echo $this->get_field_id('storynav'); ?>" name="<?php echo $this->get_field_name('storynav'); ?>" type="radio" value="off"<?php if ( $storynav == "off") { echo " checked"; } ?> />Off</label><br />
<br />
<label for="<?php echo $this->get_field_id('previous'); ?>"><strong>Previous</strong><br />
<input id="<?php echo $this->get_field_id('previous'); ?>" name="<?php echo $this->get_field_name('previous'); ?>" type="radio" value="on"<?php if ( $previous == "on") { echo " checked"; } ?> />On</label>&nbsp;<input id="<?php echo $this->get_field_id('previous'); ?>" name="<?php echo $this->get_field_name('previous'); ?>" type="radio" value="off"<?php if ( $previous == "off") { echo " checked"; } ?> />Off</label><br />
<br />
<label for="<?php echo $this->get_field_id('next'); ?>"><strong>Next</strong><br />
<input id="<?php echo $this->get_field_id('next'); ?>" name="<?php echo $this->get_field_name('next'); ?>" type="radio" value="on"<?php if ( $next == "on") { echo " checked"; } ?> />On</label>&nbsp;<input id="<?php echo $this->get_field_id('next'); ?>" name="<?php echo $this->get_field_name('next'); ?>" type="radio" value="off"<?php if ( $next == "off") { echo " checked"; } ?> />Off</label><br />
<br />
<label for="<?php echo $this->get_field_id('archives'); ?>"><strong>Archives</strong><br />
<input id="<?php echo $this->get_field_id('archives'); ?>" name="<?php echo $this->get_field_name('archives'); ?>" type="radio" value="on"<?php if ( $archives == "on") { echo " checked"; } ?> />On</label>&nbsp;<input id="<?php echo $this->get_field_id('archives'); ?>" name="<?php echo $this->get_field_name('archives'); ?>" type="radio" value="off"<?php if ( $archives == "off") { echo " checked"; } ?> />Off<br />
Archive URL:<br />
<input class="widefat" id="<?php echo $this->get_field_id('archive_path'); ?>" name="<?php echo $this->get_field_name('archive_path'); ?>" type="text" value="<?php echo attribute_escape($archive_path); ?>" /></label><br />
<br />
<label for="<?php echo $this->get_field_id('comments'); ?>"><strong>Comments</strong><br />
<input id="<?php echo $this->get_field_id('comments'); ?>" name="<?php echo $this->get_field_name('comments'); ?>" type="radio" value="on"<?php if ( $comments == "on") { echo " checked"; } ?> />On</label>&nbsp;<input id="<?php echo $this->get_field_id('comments'); ?>" name="<?php echo $this->get_field_name('comments'); ?>" type="radio" value="off"<?php if ( $comments == "off") { echo " checked"; } ?> />Off</label><br />
<br />
<label for="<?php echo $this->get_field_id('random'); ?>"><strong>Random</strong><br />
<input id="<?php echo $this->get_field_id('random'); ?>" name="<?php echo $this->get_field_name('random'); ?>" type="radio" value="on"<?php if ( $random == "on") { echo " checked"; } ?> />On</label>&nbsp;<input id="<?php echo $this->get_field_id('random'); ?>" name="<?php echo $this->get_field_name('random'); ?>" type="radio" value="off"<?php if ( $random == "off") { echo " checked"; } ?> />Off</label><br />
<?php
}
}
register_widget('widget_comicpress_graphical_navigation');