functions.php and other code-related changes
This commit is contained in:
parent
cac287bc5d
commit
f6f459ed85
@ -1,6 +1,6 @@
|
|||||||
<?php get_header() ?>
|
<?php get_header() ?>
|
||||||
|
|
||||||
<div id="content" class="archive">
|
<div id="content" class="narrowcolumn">
|
||||||
|
|
||||||
<?php if (have_posts()) : ?>
|
<?php if (have_posts()) : ?>
|
||||||
|
|
||||||
@ -93,6 +93,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include(TEMPLATEPATH . '/sidebar.php') ?>
|
<?php get_sidebar(); ?>
|
||||||
|
|
||||||
<?php get_footer() ?>
|
<?php get_footer() ?>
|
49
comic-navigation-functions.php
Normal file
49
comic-navigation-functions.php
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function comic_navigation() {
|
||||||
|
global $post, $wp_query;
|
||||||
|
$temppost = $post;
|
||||||
|
$temp_query = $wp_query;
|
||||||
|
$temp_single = $wp_query->is_single;
|
||||||
|
echo '<div id="comic_navi_wrapper">';
|
||||||
|
echo ' <div id="comic_navi_prev">';
|
||||||
|
$first_comic = get_first_comic_permalink();
|
||||||
|
if ($first_comic != get_permalink()) {
|
||||||
|
echo ' <a href="'.$first_comic.'" class="rollfirst" title="First"> </a>';
|
||||||
|
} else {
|
||||||
|
echo ' <img src="'.get_bloginfo('stylesheet_directory').'/images/disabled_firstroll.png" alt="At First" style="float:left;" class="disabled_navi" />';
|
||||||
|
}
|
||||||
|
$wp_query->is_single = true;
|
||||||
|
$prev_comic = get_permalink(get_adjacent_post(true, '', true));
|
||||||
|
if (!empty($prev_comic) && (get_permalink() != $first_comic)) {
|
||||||
|
echo ' <a href="'.$prev_comic.'" class="rollprev" title="Previous"> </a>';
|
||||||
|
} else {
|
||||||
|
echo ' <img src="'.get_bloginfo('stylesheet_directory').'/images/disabled_prevroll.png" alt="No Previous" style="float:left;" class="disabled_navi" />';
|
||||||
|
}
|
||||||
|
$wp_query->is_single = $temp_single;
|
||||||
|
echo ' </div>';
|
||||||
|
echo ' <div id="comic_navi_next">';
|
||||||
|
$last_comic = get_last_comic_permalink();
|
||||||
|
if ($last_comic != get_permalink()) {
|
||||||
|
echo ' <a href="/" class="rolllast" title="Last"> </a>';
|
||||||
|
} else {
|
||||||
|
echo ' <img src="'.get_bloginfo('stylesheet_directory').'/images/disabled_lastroll.png" alt="No Last" style="float: right;" class="disabled_navi" />';
|
||||||
|
}
|
||||||
|
$next_comic = get_permalink(get_adjacent_post(true, '', false));
|
||||||
|
if (!empty($next_comic) && (get_permalink() != $last_comic)) {
|
||||||
|
echo ' <a href="'.$next_comic.'" class="rollnext" title="Next"> </a>';
|
||||||
|
} else {
|
||||||
|
echo ' <img src="'.get_bloginfo('stylesheet_directory').'/images/disabled_nextroll.png" alt="No Next" style="float: right;" class="disabled_navi" />';
|
||||||
|
}
|
||||||
|
echo ' </div>';
|
||||||
|
echo ' <div class="clear"></div>';
|
||||||
|
echo '</div>';
|
||||||
|
$wp_query = $temp_query;
|
||||||
|
$wp_query->is_single = $temp_single;
|
||||||
|
$post = $temp_post;
|
||||||
|
$temp_post = null;
|
||||||
|
$temp_query = null;
|
||||||
|
$temp_single = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -1,8 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
if (file_exists(get_template_directory().'/wpmu-functions.php')) {
|
||||||
|
include(get_template_directory() . '/wpmu-functions.php');
|
||||||
|
} else {
|
||||||
include(get_template_directory() . '/comicpress-config.php');
|
include(get_template_directory() . '/comicpress-config.php');
|
||||||
|
}
|
||||||
include(get_template_directory() . '/comment-functions.php');
|
include(get_template_directory() . '/comment-functions.php');
|
||||||
include(get_template_directory() . '/custom-image-header.php');
|
include(get_template_directory() . '/custom-image-header.php');
|
||||||
|
include(get_template_directory() . '/comic-navigation-functions.php');
|
||||||
|
include(get_template_directory() . '/buystrip-functions.php');
|
||||||
|
|
||||||
// If any errors occur while searching for a comic file, the error messages will be pushed into here.
|
// If any errors occur while searching for a comic file, the error messages will be pushed into here.
|
||||||
$comic_pathfinding_errors = array();
|
$comic_pathfinding_errors = array();
|
||||||
@ -139,6 +145,7 @@ function get_terminal_post_in_category($categoryID, $first = true) {
|
|||||||
* @param string $filter The $comic_filename_filters to use.
|
* @param string $filter The $comic_filename_filters to use.
|
||||||
* @return string The relative path to the comic file, or false if not found.
|
* @return string The relative path to the comic file, or false if not found.
|
||||||
*/
|
*/
|
||||||
|
if (!function_exists('get_comic_path')) {
|
||||||
function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default') {
|
function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default') {
|
||||||
global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $comic_pathfinding_errors;
|
global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $comic_pathfinding_errors;
|
||||||
|
|
||||||
@ -166,6 +173,7 @@ function get_comic_path($folder = 'comic', $override_post = null, $filter = 'def
|
|||||||
$comic_pathfinding_errors[] = sprintf(__("Unable to find the file in the <strong>%s</strong> folder that matched the pattern <strong>%s</strong>. Check your WordPress and ComicPress settings.", 'comicpress'), $folder, $filter_with_date);
|
$comic_pathfinding_errors[] = sprintf(__("Unable to find the file in the <strong>%s</strong> folder that matched the pattern <strong>%s</strong>. Check your WordPress and ComicPress settings.", 'comicpress'), $folder, $filter_with_date);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a comic file in the filesystem and return an absolute URL to that file.
|
* Find a comic file in the filesystem and return an absolute URL to that file.
|
||||||
@ -637,42 +645,4 @@ function szub_is_search_key($key='') {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function comic_navigation() {
|
|
||||||
global $post;
|
|
||||||
echo '<div id="comic_navi_wrapper">';
|
|
||||||
echo ' <div id="comic_navi_prev">';
|
|
||||||
$at_first = false;
|
|
||||||
$first = get_first_comic();
|
|
||||||
if (!empty($first)) { $at_first = ($post->ID == $first->ID); }
|
|
||||||
if (!$at_first) {
|
|
||||||
echo ' <a href="'.get_permalink($at_first).'" class="rollfirst"> </a>';
|
|
||||||
} else {
|
|
||||||
echo ' <img src="'.get_bloginfo('stylesheet_directory').'/images/disabled_firstroll.png" alt="At First" class="disabled_navi" />';
|
|
||||||
}
|
|
||||||
$prev_comic = get_permalink(get_previous_comic()->ID);
|
|
||||||
if (!empty($prev_comic)) {
|
|
||||||
echo ' <a href="'.$prev_comic.'" class="rollprev"> </a>';
|
|
||||||
} else {
|
|
||||||
echo ' <img src="'.get_bloginfo('stylesheet_directory').'/images/disabled_prevroll.png" alt="No Previous" class="disabled_navi" />';
|
|
||||||
}
|
|
||||||
echo ' </div>';
|
|
||||||
echo ' <div id="comic_navi_next">';
|
|
||||||
$next = get_permalink(get_next_comic()->ID);
|
|
||||||
if (!empty($next)) {
|
|
||||||
echo ' <a href="'.get_permalink($next).'" class="rollnext"> </a>';
|
|
||||||
} else {
|
|
||||||
echo ' <img src="'.get_bloginfo('stylesheet_directory').'/images/disabled_nextroll.png" alt="No Next" class="disabled_navi" />';
|
|
||||||
}
|
|
||||||
$at_last = false;
|
|
||||||
$last = get_last_comic();
|
|
||||||
if (!empty($last)) { $at_last = ($post->idate == $last->idate); }
|
|
||||||
if (!$at_last) {
|
|
||||||
echo ' <a href="'.get_permalink($at_last).'" class="rollnext"> </a>';
|
|
||||||
} else {
|
|
||||||
echo ' <img src="'.get_bloginfo('stylesheet_directory').'/images/disabled_lastroll.png" alt="No Last" class="disabled_navi" />';
|
|
||||||
}
|
|
||||||
echo ' </div>';
|
|
||||||
echo ' <div class="clear"></div>';
|
|
||||||
echo '</div>';
|
|
||||||
}
|
|
||||||
?>
|
?>
|
@ -9,7 +9,8 @@
|
|||||||
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" />
|
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" />
|
||||||
</div>
|
</div>
|
||||||
<div id="comic-foot"></div>
|
<div id="comic-foot"></div>
|
||||||
<?php comic_navigation(); ?>
|
<?php // if (function_exists('buy_this_comic')) { buy_this_comic(); } ?>
|
||||||
|
<?php // if (function_exists('comic_navigation')) { comic_navigation(); } ?>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
|
||||||
<div id="content" class="narrowcolumn">
|
<div id="content" class="narrowcolumn">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php get_header() ?>
|
<?php get_header() ?>
|
||||||
|
|
||||||
<div id="content" class="archive">
|
<div id="content" class="narrowcolumn">
|
||||||
|
|
||||||
<div class="post-page-head"></div>
|
<div class="post-page-head"></div>
|
||||||
<div class="post-page">
|
<div class="post-page">
|
||||||
@ -77,6 +77,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include(TEMPLATEPATH . '/sidebar.php') ?>
|
<?php get_sidebar(); ?>
|
||||||
|
|
||||||
<?php get_footer() ?>
|
<?php get_footer() ?>
|
@ -1,6 +1,6 @@
|
|||||||
<?php get_header() ?>
|
<?php get_header() ?>
|
||||||
|
|
||||||
<div id="content" class="archive">
|
<div id="content" class="narrowcolumn">
|
||||||
|
|
||||||
<div class="post-page-head"></div>
|
<div class="post-page-head"></div>
|
||||||
<div class="post-page">
|
<div class="post-page">
|
||||||
@ -77,6 +77,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include(TEMPLATEPATH . '/sidebar.php') ?>
|
<?php get_sidebar(); ?>
|
||||||
|
|
||||||
<?php get_footer() ?>
|
<?php get_footer() ?>
|
@ -6,7 +6,8 @@
|
|||||||
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" />
|
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" />
|
||||||
</div>
|
</div>
|
||||||
<div id="comic-foot"></div>
|
<div id="comic-foot"></div>
|
||||||
<?php comic_navigation(); ?>
|
<?php // if (function_exists('buy_this_comic')) { buy_this_comic(); } ?>
|
||||||
|
<?php // if (function_exists('comic_navigation')) { comic_navigation(); } ?>
|
||||||
<?php } endwhile; ?>
|
<?php } endwhile; ?>
|
||||||
|
|
||||||
<div id="content" class="narrowcolumn">
|
<div id="content" class="narrowcolumn">
|
||||||
|
17
style.css
17
style.css
@ -4,7 +4,7 @@ Theme URI: http://comicpress.org
|
|||||||
Description: Publish a comic with WordPress. Standard Edition. <a href="http://comicpress.org">Visit the ComicPress Website.</a>
|
Description: Publish a comic with WordPress. Standard Edition. <a href="http://comicpress.org">Visit the ComicPress Website.</a>
|
||||||
Author: Tyler Martin, John Bintz, Philip M. Hofer (Frumph)
|
Author: Tyler Martin, John Bintz, Philip M. Hofer (Frumph)
|
||||||
Author URI: http://mindfaucet.com/
|
Author URI: http://mindfaucet.com/
|
||||||
Version: 2.7.2
|
Version: 2.8
|
||||||
.
|
.
|
||||||
The CSS, XHTML and design is released under GPL v3:
|
The CSS, XHTML and design is released under GPL v3:
|
||||||
http://www.opensource.org/licenses/gpl-3.0.html
|
http://www.opensource.org/licenses/gpl-3.0.html
|
||||||
@ -1050,3 +1050,18 @@ a.rollfirst:hover, a.rollprev:hover, a.rollnext:hover, a.rolllast:hover
|
|||||||
width: 260px;
|
width: 260px;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** BUY THIS **/
|
||||||
|
|
||||||
|
.buythis {
|
||||||
|
float: right;
|
||||||
|
margin-right: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buythisbutton
|
||||||
|
{
|
||||||
|
height: 28px;
|
||||||
|
width: 240px;
|
||||||
|
background: url('images/buythis.png') no-repeat;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user