Compare commits
255 Commits
media-hand
...
master
Author | SHA1 | Date |
---|---|---|
John Bintz | a2e13853ab | |
John Bintz | c5b54a19f3 | |
Philip M. Hofer (Frumph) | d7797ef29a | |
Philip M. Hofer (Frumph) | f38e92d374 | |
Philip M. Hofer (Frumph) | 367d6f9b41 | |
John Bintz | 6181a4ee3c | |
John Bintz | 66b7948576 | |
John Bintz | 398bbc01c2 | |
John Bintz | d189d12f03 | |
Philip M. Hofer (Frumph) | fd52a600ba | |
Philip M. Hofer (Frumph) | 96b5db1227 | |
Philip M. Hofer (Frumph) | 36a8a1a2b6 | |
Philip M. Hofer (Frumph) | 8f254211e5 | |
Philip M. Hofer (Frumph) | 5ff967308e | |
Philip M. Hofer (Frumph) | 758ebe3ce8 | |
Philip M. Hofer (Frumph) | 548e077a94 | |
Philip M. Hofer (Frumph) | 2dcd8bf19b | |
Philip M. Hofer (Frumph) | 80d9d946a6 | |
Philip M. Hofer (Frumph) | bae1436fc1 | |
John Bintz | 3613121c05 | |
Philip M. Hofer (Frumph) | a68e5258d1 | |
John Bintz | 9a3dba75dc | |
John Bintz | 85c46dbc3a | |
John Bintz | 001f51fe65 | |
John Bintz | ee7a1cdf1c | |
John Bintz | 84e2381f02 | |
John Bintz | a335a33468 | |
John Bintz | e8800de4fd | |
John Bintz | c5500420e9 | |
Philip M. Hofer (Frumph) | 1f7702ac6c | |
Philip M. Hofer (Frumph) | ba43d0b07b | |
John Bintz | 08694eaf85 | |
Philip M. Hofer (Frumph) | d8b7e04127 | |
Philip M. Hofer (Frumph) | 9a442ad122 | |
Philip M. Hofer (Frumph) | a937debad6 | |
Philip M. Hofer (Frumph) | 5f475d7e62 | |
Philip M. Hofer (Frumph) | ccd515b973 | |
Philip M. Hofer (Frumph) | b7315d9806 | |
Philip M. Hofer (Frumph) | 202e0d51ff | |
Philip M. Hofer (Frumph) | d696edd7ef | |
Philip M. Hofer (Frumph) | b333f28b2b | |
Philip M. Hofer (Frumph) | ba3c401231 | |
Philip M. Hofer (Frumph) | 163b318e49 | |
Philip M. Hofer (Frumph) | 656d78b152 | |
Philip M. Hofer (Frumph) | c81b590fca | |
Philip M. Hofer (Frumph) | add5e68dc9 | |
Philip M. Hofer (Frumph) | 99a8586e01 | |
Philip M. Hofer (Frumph) | b120e7a8bc | |
Philip M. Hofer (Frumph) | 51c5b14585 | |
Philip M. Hofer (Frumph) | 7b1b915cef | |
Philip M. Hofer (Frumph) | b805536a82 | |
Philip M. Hofer (Frumph) | 64ac05ce57 | |
Philip M. Hofer (Frumph) | 75e1261c37 | |
Philip M. Hofer (Frumph) | fdbb8f74ad | |
Philip M. Hofer (Frumph) | 38ec53bc35 | |
John Bintz | 4147a731ce | |
Philip M. Hofer (Frumph) | dc158aab76 | |
John Bintz | 109f18baf1 | |
John Bintz | 6820d73ee6 | |
Philip M. Hofer (Frumph) | 3cb97c0cf4 | |
Philip M. Hofer (Frumph) | ee80a7c428 | |
Philip M. Hofer (Frumph) | babb991ba3 | |
Philip M. Hofer (Frumph) | 71c853cd02 | |
Philip M. Hofer (Frumph) | 97eb1c382d | |
Philip M. Hofer (Frumph) | 7d1fc2dbd3 | |
Philip M. Hofer (Frumph) | ca7c42d262 | |
Philip M. Hofer (Frumph) | bf106ed7bb | |
Philip M. Hofer (Frumph) | 118e20b816 | |
Philip M. Hofer (Frumph) | d925515515 | |
Philip M. Hofer (Frumph) | c4e7bbad7a | |
Philip M. Hofer (Frumph) | 97dadac78c | |
Philip M. Hofer (Frumph) | 436e72740d | |
Philip M. Hofer (Frumph) | 1616e6de31 | |
Philip M. Hofer (Frumph) | f939071692 | |
Philip M. Hofer (Frumph) | a59711c6cb | |
John Bintz | ce108969f9 | |
John Bintz | 3568dbaef2 | |
Philip M. Hofer (Frumph) | 3ef3b76d25 | |
Philip M. Hofer (Frumph) | 1b31062590 | |
Philip M. Hofer (Frumph) | 9e334d8998 | |
John Bintz | 71c30e3008 | |
Philip M. Hofer (Frumph) | 30f3ebea26 | |
Philip M. Hofer (Frumph) | fff8d4c5a9 | |
Philip M. Hofer (Frumph) | 0d25e953c9 | |
Philip M. Hofer (Frumph) | 94d7cdbc02 | |
Philip M. Hofer (Frumph) | 6ac1fb1884 | |
Philip M. Hofer (Frumph) | fb1a2ef2cc | |
Philip M. Hofer (Frumph) | ae43e681d2 | |
Philip M. Hofer (Frumph) | 043ae81177 | |
Philip M. Hofer (Frumph) | 07de006d31 | |
Philip M. Hofer (Frumph) | 637ca2300c | |
John Bintz | b93e252368 | |
John Bintz | 87fedb04c7 | |
Philip M. Hofer (Frumph) | 5de0427d66 | |
Philip M. Hofer (Frumph) | 2297c16ea9 | |
Philip M. Hofer (Frumph) | 3615389411 | |
Philip M. Hofer (Frumph) | a8a94eef46 | |
Philip M. Hofer (Frumph) | eb6db19306 | |
Philip M. Hofer (Frumph) | 54ef378748 | |
Philip M. Hofer (Frumph) | 3150c96c29 | |
Philip M. Hofer (Frumph) | 98853e20b1 | |
Philip M. Hofer (Frumph) | c3e6f5ce39 | |
Philip M. Hofer (Frumph) | 0b0b274063 | |
Philip M. Hofer (Frumph) | 0c271311b5 | |
Philip M. Hofer (Frumph) | 0cc82d4c21 | |
Philip M. Hofer (Frumph) | 0aac1cc944 | |
Philip M. Hofer (Frumph) | 800a840be7 | |
Philip M. Hofer (Frumph) | 42364029d1 | |
Philip M. Hofer (Frumph) | 4c793dc6f2 | |
Philip M. Hofer (Frumph) | 7ab9c22c9c | |
Philip M. Hofer (Frumph) | 463edd67d2 | |
Philip M. Hofer (Frumph) | 2f39ec7413 | |
Philip M. Hofer (Frumph) | 782a7feb29 | |
Philip M. Hofer (Frumph) | cc2f5cae62 | |
Philip M. Hofer (Frumph) | 9f3e86ce6f | |
Philip M. Hofer (Frumph) | e2fa538ee4 | |
Philip M. Hofer (Frumph) | c34a4d6f50 | |
Philip M. Hofer (Frumph) | 15ec1d1c08 | |
Philip M. Hofer (Frumph) | a73d8fdc8a | |
Philip M. Hofer (Frumph) | b94d4973c9 | |
Philip M. Hofer (Frumph) | 6a44dea720 | |
John Bintz | 4f4c0e8810 | |
Philip M. Hofer (Frumph) | 0d80bc807d | |
Philip M. Hofer (Frumph) | 3153800485 | |
Philip M. Hofer (Frumph) | f39c22bfcb | |
Philip M. Hofer (Frumph) | 645629932c | |
Philip M. Hofer (Frumph) | 217b14dcce | |
Philip M. Hofer (Frumph) | 522e305f2e | |
Philip M. Hofer (Frumph) | 3369d27686 | |
Philip M. Hofer (Frumph) | b85f7bf1ad | |
Philip M. Hofer (Frumph) | 97f1f66b2d | |
Philip M. Hofer (Frumph) | fb985a66e1 | |
Philip M. Hofer (Frumph) | 781b16dbf6 | |
Philip M. Hofer (Frumph) | 24ccd0ab84 | |
Philip M. Hofer (Frumph) | 79bffa7055 | |
Philip M. Hofer (Frumph) | 67a1a155aa | |
Philip M. Hofer (Frumph) | fd66df637a | |
Philip M. Hofer (Frumph) | 0357068abe | |
Philip M. Hofer (Frumph) | d75c46345b | |
Philip M. Hofer (Frumph) | 7cf3aa4afc | |
Philip M. Hofer (Frumph) | 0823a14d2b | |
Philip M. Hofer (Frumph) | 8f76c62ada | |
Philip M. Hofer (Frumph) | 45418a90d1 | |
Philip M. Hofer (Frumph) | 40da7b3935 | |
Philip M. Hofer (Frumph) | 02e0a9f66f | |
Philip M. Hofer (Frumph) | 160539e223 | |
Philip M. Hofer (Frumph) | 10471a2d7e | |
Philip M. Hofer (Frumph) | 5ef1e94826 | |
Philip M. Hofer (Frumph) | b0ad9bec80 | |
Philip M. Hofer (Frumph) | 40295c662a | |
Philip M. Hofer (Frumph) | 8e07fa1110 | |
Philip M. Hofer (Frumph) | e8cdd1f7cf | |
mindfaucet | cf51e18177 | |
Philip M. Hofer (Frumph) | 0a4c4d0f47 | |
Philip M. Hofer (Frumph) | c7d22e1464 | |
Philip M. Hofer (Frumph) | b8fef1fa9e | |
Philip M. Hofer (Frumph) | e8f665c721 | |
mindfaucet | c7b9335b59 | |
mindfaucet | f8b50256c6 | |
John Bintz | 7edeb74ffa | |
John Bintz | 12b5b87c20 | |
Philip M. Hofer (Frumph) | 1ceb695ffc | |
mindfaucet | c07936c363 | |
mindfaucet | 35fae562c3 | |
John Bintz | 1fa777f3b5 | |
John Bintz | 6023e03ce0 | |
Philip M. Hofer (Frumph) | ad7b902199 | |
Philip M. Hofer (Frumph) | 61f7a5c1b3 | |
John Bintz | 49fcef804e | |
John Bintz | 4896100fbe | |
John Bintz | 2b9ae901d4 | |
John Bintz | 3e84f9d36b | |
John Bintz | 657080c990 | |
John Bintz | 2ca186d739 | |
John Bintz | 64c94a292f | |
John Bintz | 3b0c3cea0d | |
Philip M. Hofer (Frumph) | d2faccd1e8 | |
Philip M. Hofer (Frumph) | a0903a32ec | |
Philip M. Hofer (Frumph) | 14ede616c0 | |
John Bintz | 0bca4d94be | |
mindfaucet | 991b70cf1f | |
Philip M. Hofer (Frumph) | a586a31df7 | |
Philip M. Hofer (Frumph) | 600029ee13 | |
Philip M. Hofer (Frumph) | 1bd10daaa8 | |
Philip M. Hofer (Frumph) | 6dca8e0546 | |
Philip M. Hofer (Frumph) | 9a85711ccb | |
Philip M. Hofer (Frumph) | 0586c62ed8 | |
Philip M. Hofer (Frumph) | 9122867933 | |
John Bintz | f7e91dd397 | |
John Bintz | 8544267d0d | |
John Bintz | 01e2073aee | |
Philip M. Hofer (Frumph) | c16297e4eb | |
John Bintz | dbdfcf055c | |
Philip M. Hofer (Frumph) | e33cd2d2fb | |
Philip M. Hofer (Frumph) | 34d8078b1d | |
Philip M. Hofer (Frumph) | 2cc315dcdc | |
Philip M. Hofer (Frumph) | 12ffca740a | |
Philip M. Hofer (Frumph) | 7fecf9104c | |
John Bintz | d5b1fd6b52 | |
John Bintz | d7e84d31aa | |
John Bintz | 29f1f4dc56 | |
Philip M. Hofer (Frumph) | 4a25965398 | |
John Bintz | 1ed115dd20 | |
John Bintz | a7b1945866 | |
Philip M. Hofer (Frumph) | 1cfc3fadf2 | |
John Bintz | a818df4f4d | |
John Bintz | 923bda444d | |
John Bintz | 86547ca4b7 | |
John Bintz | 8992ecbc81 | |
Philip M. Hofer (Frumph) | 1cd7a6effc | |
John Bintz | 6759df3f78 | |
John Bintz | e9dc0e1bf7 | |
Philip M. Hofer (Frumph) | 9ba892b1b6 | |
Philip M. Hofer (Frumph) | 38b36126ca | |
John Bintz | daac33185b | |
Philip M. Hofer (Frumph) | fdf26ffabf | |
John Bintz | a9c6b3d65c | |
Philip M. Hofer (Frumph) | 54774522c2 | |
Philip M. Hofer (Frumph) | c12c7751ba | |
Philip M. Hofer (Frumph) | 39c678fbc2 | |
Philip M. Hofer (Frumph) | 02c200c782 | |
John Bintz | cb83eeb049 | |
John Bintz | 6eeed97896 | |
John Bintz | 95c1b7df3a | |
John Bintz | 372b8fc3d2 | |
John Bintz | cc516694ef | |
John Bintz | 200a89bd93 | |
John Bintz | 14b79a3b82 | |
John Bintz | a0fd4219ff | |
John Bintz | 61436fb243 | |
John Bintz | 0edca9e64a | |
Philip M. Hofer (Frumph) | 3dbe4dccf7 | |
mindfaucet | 8cf4021f78 | |
mindfaucet | 7120f1f550 | |
Philip M. Hofer (Frumph) | f2e33119d3 | |
Philip M. Hofer (Frumph) | 6c21ad462c | |
Philip M. Hofer (Frumph) | a956fa2b6c | |
Philip M. Hofer (Frumph) | 5eb5c26822 | |
John Bintz | d86588fc3a | |
Philip M. Hofer (Frumph) | 96110d138a | |
John Bintz | b6f7d96019 | |
John Bintz | 690aa46ba1 | |
John Bintz | 039763281b | |
John Bintz | 4a32858ab4 | |
John Bintz | 9641d10cc9 | |
Philip M. Hofer (Frumph) | 509330ed99 | |
John Bintz | 8a160873a9 | |
mindfaucet | 001411a42a | |
mindfaucet | dbeb73050a | |
Philip M. Hofer (Frumph) | 042a790820 | |
Philip M. Hofer (Frumph) | d1b03c4903 | |
John Bintz | 68cc7fb0b2 | |
John Bintz | 3fb1081afc | |
Philip M. Hofer (Frumph) | d9f0d00240 | |
Philip M. Hofer (Frumph) | 10130125b5 |
10
404.php
|
@ -1,14 +1,14 @@
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div class="post page post-404">
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<h2 class="pagetitle"><?php _e('Page Not Found','comicpress'); ?></h2>
|
||||
<p><a href="<?php bloginfo('wpurl') ?>"><?php _e('Click here to return to the home page','comicpress'); ?></a> <?php _e('or try a search:','comicpress'); ?></p>
|
||||
<p><?php include (get_template_directory() . '/searchform.php') ?></p>
|
||||
<p><?php the_widget('WP_Widget_Search'); ?></p>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
|
|
6
README
|
@ -1,8 +1,8 @@
|
|||
ComicPress is the WordPress Comic Pubishing Theme.
|
||||
|
||||
Copyright 2005-2009 Tyler Martin
|
||||
Copyright 2008-2009 John Bintz
|
||||
Copyright 2009 Philip M. Hofer
|
||||
Copyright 2005-2010 Tyler Martin
|
||||
Copyright 2008-2010 John Bintz
|
||||
Copyright 2009-2010 Philip M. Hofer
|
||||
|
||||
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
|
||||
|
|
|
@ -67,25 +67,16 @@ $month['11'] = array('month' => __('November','comicpress'), 'days' => '30');
|
|||
$month['12'] = array('month' => __('December','comicpress'), 'days' => '31');
|
||||
|
||||
?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?> <span class="page-archive-year"> <?php echo $archive_year; ?></span></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
|
||||
<?php comicpress_display_post(); ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="archive-yearlist">|
|
||||
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC");
|
||||
foreach ( $years as $year ) {
|
||||
|
@ -95,7 +86,7 @@ foreach ( $years as $year ) {
|
|||
</div>
|
||||
<div class="cpcal-cals">
|
||||
<?php $i=1; while($i<=12) {
|
||||
$calendar_directory = $comicpress_calendar['calendar_directory'];
|
||||
$calendar_directory = $comicpress_options['calendar_directory'];
|
||||
if (!empty($calendar_directory) && $calendar_directory != 'none') { ?>
|
||||
<div class="cpcal-month" style="height: 257px;" id="<?php echo $month[$i]['month'] ?>">
|
||||
<?php if (file_exists(get_stylesheet_directory() . '/images/cal') && $calendar_directory != 'default') { ?>
|
||||
|
@ -161,10 +152,9 @@ foreach ( $years as $year ) {
|
|||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
<br class="clear-margins" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
|
|
@ -1,31 +1,18 @@
|
|||
<?php
|
||||
/*
|
||||
Template Name: Month at a glance
|
||||
Template Name: This Month of Comics
|
||||
*/
|
||||
?>
|
||||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
|
||||
<?php
|
||||
//based on Austin Matzko's code from wp-hackers email list
|
||||
function filter_where($where = '') {
|
||||
//posts in the last 30 days
|
||||
|
@ -37,18 +24,25 @@ add_filter('posts_where', 'filter_where');
|
|||
$posts = query_posts('&show_posts=-1&posts_per_page=-1&cat='.get_all_comic_categories_as_cat_string());
|
||||
|
||||
?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
|
||||
<div class="comicthumbwrap">
|
||||
<div class="comicarchiveframe">
|
||||
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_mini() ?>" alt="<?php the_title() ?>" title="<?php the_title() ?>" style="width: <?php echo $mini_comic_width; ?>px" /></a><br />
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; endif; ?>
|
||||
|
||||
<?php endwhile; endif; ?>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
|
@ -6,24 +6,17 @@ Template Name: Comic Storyline with Thumbs
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<ul id="storyline" class="level-0">
|
||||
<?php if (get_option('comicpress-enable-storyline-support') == 1) {
|
||||
if (($result = get_option("comicpress-storyline-category-order")) !== false) {
|
||||
|
@ -38,12 +31,6 @@ Template Name: Comic Storyline with Thumbs
|
|||
$description = $category->description;
|
||||
$first_comic_in_category = get_terminal_post_in_category($category_id,true);
|
||||
$first_comic_permalink = get_permalink($first_comic_in_category->ID);
|
||||
$archive_image = null;
|
||||
foreach (array("mini", "archive", "rss", "comic") as $type) {
|
||||
if (($requested_archive_image = get_comic_url($type, $first_comic_in_category)) !== false) {
|
||||
$archive_image = $requested_archive_image; break;
|
||||
}
|
||||
}
|
||||
if ($target_depth < $current_depth) {
|
||||
echo str_repeat("</ul></li>", ($current_depth - $target_depth));
|
||||
}
|
||||
|
@ -56,7 +43,7 @@ Template Name: Comic Storyline with Thumbs
|
|||
|
||||
<li id="storyline-<?php echo $category->category_nicename ?>"<?php echo $storyline_root; $storyline_root = null ?>>
|
||||
<?php if (!empty($first_comic_in_category)) { ?>
|
||||
<a href="<?php echo $first_comic_permalink ?>" title="<?php _e('First comic in','comicpress'); ?> <?php echo $category->cat_name ?>."><img src="<?php echo $archive_image ?>" style="width: <?php echo $mini_comic_width; ?>px" /></a>
|
||||
<a href="<?php echo $first_comic_permalink ?>" title="<?php _e('First comic in','comicpress'); ?> <?php echo $category->cat_name ?>."><?php echo comicpress_display_comic_image('mini,archive,rss,comic', false, $first_comic_in_category, __('First comic in','comicpress').' '.$category->cat_name); ?></a>
|
||||
<?php } ?>
|
||||
<a href="<?php echo get_category_link($category_id) ?>" class="storyline-title"><?php echo $category->cat_name ?></a>
|
||||
<?php if (!empty($description)) { ?>
|
||||
|
@ -77,8 +64,10 @@ Template Name: Comic Storyline with Thumbs
|
|||
</ul>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
|
@ -6,24 +6,17 @@ Template Name: Comic Storyline Archive
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<ul id="storyline" class="level-0">
|
||||
<?php if (get_option('comicpress-enable-storyline-support') == 1) {
|
||||
if (($result = get_option("comicpress-storyline-category-order")) !== false) {
|
||||
|
@ -38,12 +31,6 @@ Template Name: Comic Storyline Archive
|
|||
$description = $category->description;
|
||||
$first_comic_in_category = get_terminal_post_in_category($category_id);
|
||||
$first_comic_permalink = get_permalink($first_comic_in_category->ID);
|
||||
$archive_image = null;
|
||||
foreach (array("mini", "archive", "rss", "comic") as $type) {
|
||||
if (($requested_archive_image = get_comic_url($type, $first_comic_in_category)) !== false) {
|
||||
$archive_image = $requested_archive_image; break;
|
||||
}
|
||||
}
|
||||
if ($target_depth < $current_depth) {
|
||||
echo str_repeat("</ul></li>", ($current_depth - $target_depth));
|
||||
}
|
||||
|
@ -79,8 +66,10 @@ Template Name: Comic Storyline Archive
|
|||
</ul>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
|
@ -17,26 +17,17 @@ if (isset($_REQUEST['archive_year'])) {
|
|||
if (empty($archive_year) || $archive_year == '') $archive_year = date('Y');
|
||||
?>
|
||||
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?> <span class="page-archive-year"> <?php echo $archive_year; ?></span></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
<?php endwhile; ?>
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="archive-yearlist">|
|
||||
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC");
|
||||
foreach ( $years as $year ) {
|
||||
|
@ -51,12 +42,12 @@ if (empty($archive_year) || $archive_year == '') $archive_year = date('Y');
|
|||
<tr><td class="archive-date"><?php the_time('M j') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="<?php _e('Permanent Link:','comicpress'); ?> <?php the_title() ?>"><?php the_title() ?></a></td></tr>
|
||||
<?php endwhile; ?>
|
||||
</table>
|
||||
|
||||
<br class="clear-margins" />
|
||||
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
|
@ -5,43 +5,38 @@ Template Name: Comic Archive
|
|||
?>
|
||||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC");
|
||||
foreach ( $years as $year ) {
|
||||
if ($year != (0) ) { ?>
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC");
|
||||
foreach ( $years as $year ) {
|
||||
if ($year != (0) ) {
|
||||
?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<h3><?php echo $year ?></h3>
|
||||
<table class="month-table">
|
||||
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$year);
|
||||
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$year);
|
||||
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
|
||||
<tr><td class="archive-date"><?php the_time('M j') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="<?php _e('Permanent Link:','comicpress'); ?> <?php the_title() ?>"><?php the_title() ?></a></td></tr>
|
||||
<?php endwhile; ?>
|
||||
</table>
|
||||
<?php } } ?>
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
156
archive.php
|
@ -17,10 +17,9 @@
|
|||
} else {
|
||||
$posts = query_posts($query_string.'&order='.$archive_display_order);
|
||||
} ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div class="content">
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
|
||||
<?php /* Category Archive */ if (is_category()) { ?>
|
||||
<h2 class="pagetitle"><?php _e('Archive for ‘','comicpress'); ?><?php single_cat_title() ?>’</h2>
|
||||
|
@ -37,111 +36,56 @@
|
|||
<?php /* Paged Archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
|
||||
<h2 class="pagetitle"><?php _e('Archives','comicpress'); ?></h2>
|
||||
<?php } ?>
|
||||
<div class="searchresults"><?php printf(__ngettext("%d item.", "%d items.", $count,'comicpress'),$count); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
|
||||
<?php if (is_category() && in_comic_category()) { ?>
|
||||
|
||||
<div class="comicthumbwrap">
|
||||
<div class="comicarchiveframe" style="width: <?php echo $mini_comic_width; ?>px">
|
||||
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_mini() ?>" alt="<?php the_title() ?>" title="<?php the_title() ?>" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } else { ?>
|
||||
<?php global $archive_comic_width; if (in_comic_category()) { ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-comic-head"></div>
|
||||
<div class="post-comic">
|
||||
<div class="post-info">
|
||||
<?php if ($comicpress_options['enable_comic_post_author_gravatar']) { ?>
|
||||
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
|
||||
<?php } ?>
|
||||
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
|
||||
<?php if ($comicpress_options['enable_comic_post_calendar']) { ?>
|
||||
<div class="post-date">
|
||||
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="post-text">
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<small> <?php _e('By','comicpress'); ?> <?php the_author_posts_link(); ?> <?php _e('on','comicpress'); ?> <?php the_time('F jS, Y'); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></small><br />
|
||||
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?>
|
||||
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' » </li><li>', multiple) ?></li></ul>
|
||||
<?php } else { ?>
|
||||
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
|
||||
<small> <?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></small><br />
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="comicarchiveframe" style="max-width:<?php echo $archive_comic_width; ?>px;">
|
||||
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." style="max-width: <?php echo $archive_comic_width ?>px" /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-comic-foot"></div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-head"></div>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-info">
|
||||
<?php if ($comicpress_options['enable_post_author_gravatar']) { ?>
|
||||
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
|
||||
<?php } ?>
|
||||
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
|
||||
<?php if ($comicpress_options['enable_post_calendar']) { ?>
|
||||
<div class="post-date">
|
||||
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="post-text">
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent Link to','comicpress'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<small> <?php _e('By','comicpress'); ?> <?php the_author_posts_link(); ?> <?php _e('on','comicpress'); ?> <?php the_time('F jS, Y'); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></small><br />
|
||||
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
|
||||
<small> <?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></small><br />
|
||||
<?php } ?>
|
||||
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php
|
||||
if ($comicpress_options['excerpt_or_content_archive'] != 'excerpt') {
|
||||
the_content(__('↓ Read the rest of this entry...','comicpress'));
|
||||
} else {
|
||||
the_excerpt();
|
||||
} ?>
|
||||
<div class="post-extras">
|
||||
<div class="post-tags">
|
||||
<?php the_tags(__('└ Tags:','comicpress'),', ','<br />'); ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php endwhile; ?>
|
||||
<div class="clear"></div>
|
||||
<?php else : ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-head"></div>
|
||||
<div class="post">
|
||||
<h3><?php _e('No posts found.','comicpress'); ?></h3>
|
||||
<p><?php _e('Try another search?','comicpress'); ?></p>
|
||||
<p><?php include(get_template_directory() . '/searchform.php') ?></p>
|
||||
<div class="searchresults"><?php printf(_n("%d item.", "%d items.", $count,'comicpress'),$count); ?></div>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if (is_category() && in_comic_category()) { ?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
|
||||
<?php } ?>
|
||||
<?php while (have_posts()) : the_post();
|
||||
|
||||
if (is_category() && in_comic_category()) { ?>
|
||||
|
||||
<div class="comicthumbwrap">
|
||||
<?php global $mini_comic_width; ?>
|
||||
<div class="comicarchiveframe" style="width: <?php echo $mini_comic_width; ?>px">
|
||||
<a href="<?php the_permalink() ?>"><?php echo comicpress_display_comic_image("mini,rss,archive,comic", false); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } else {
|
||||
comicpress_display_post();
|
||||
}
|
||||
|
||||
endwhile;
|
||||
|
||||
if (is_category() && in_comic_category()) { ?>
|
||||
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
<?php else : ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post">
|
||||
<h3><?php _e('No entries found.','comicpress'); ?></h3>
|
||||
<p><?php _e('Try another search?','comicpress'); ?></p>
|
||||
<p><?php the_widget('WP_Widget_Search'); ?></p>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php comicpress_pagination(); ?>
|
||||
|
|
46
archives.php
|
@ -5,20 +5,40 @@ Template Name: Archives
|
|||
?>
|
||||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div id="archivepage">
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<ul><?php wp_get_archives('type=monthly') ?></ul>
|
||||
<h2><?php _e('Archives by Subject:','comicpress'); ?></h2>
|
||||
<ul><?php wp_list_categories() ?></ul>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div id="archivepage">
|
||||
<h2><?php _e('Archives by Month:','comicpress'); ?></h2>
|
||||
<ul><?php wp_get_archives('type=monthly') ?></ul>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div id="archivepage">
|
||||
<h2><?php _e('Archives by Subject:','comicpress'); ?></h2>
|
||||
<ul><?php wp_list_categories() ?></ul>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
15
author.php
|
@ -3,17 +3,16 @@
|
|||
|
||||
<?php
|
||||
if(get_query_var('author_name') ) {
|
||||
// NOTE: 2.0 bug requires: get_userdatabylogin(get_the_author_login());
|
||||
$curauth = get_userdatabylogin(get_query_var('author_name'));
|
||||
$curauth = get_user_by('slug', get_query_var('author_name'));
|
||||
} else {
|
||||
$curauth = get_userdata(get_query_var('author'));
|
||||
}
|
||||
if (empty($curauth)) { ?>
|
||||
<h2><?php _e('No such author.','comicpress'); ?></h2>
|
||||
<?php } else { ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="userpage-avatar">
|
||||
<?php echo str_replace("alt='", "alt='".wp_specialchars($curauth->display_name, 1)."' title='".wp_specialchars($curauth->display_name, 1), comicpress_get_avatar($curauth->user_email, 64)); ?>
|
||||
</div>
|
||||
|
@ -49,12 +48,12 @@
|
|||
<h3><?php _e('Posts by','comicpress'); ?> <?php echo $authorname; ?> (<?php echo get_usernumposts($curauth->ID); ?>) ¬</h3>
|
||||
<?php // this area is a loop that shows what posts the person has done. ?>
|
||||
<ol>
|
||||
<table class="month-table">
|
||||
<li><table class="month-table">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<tr><td class="archive-date" align="right"><?php the_time('M j, Y') ?></td><td class="archive-title"><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></td>
|
||||
|
||||
<?php endwhile; ?>
|
||||
</table>
|
||||
</table></li>
|
||||
</ol>
|
||||
|
||||
<?php comicpress_pagination(); ?>
|
||||
|
@ -62,7 +61,7 @@
|
|||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
|
8
blog.php
|
@ -6,16 +6,16 @@ Template Name: Blog
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php global $blog_postcount;
|
||||
if (!$comicpress['split_column_in_two']) {
|
||||
$blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
|
||||
<?php
|
||||
if (!$comicpress_options['split_column_in_two']) {
|
||||
$blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
|
||||
|
||||
$posts = query_posts($blog_query);
|
||||
if (have_posts()) {
|
||||
|
||||
while (have_posts()) : the_post();
|
||||
|
||||
display_blog_post();
|
||||
comicpress_display_post();
|
||||
|
||||
endwhile;
|
||||
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
$pear_ok = true;
|
||||
if (!extension_loaded('zip')) { $pear_ok = false; }
|
||||
|
||||
if (!$pear_ok) {
|
||||
echo "This script requires the zip PECL extension\n. Please install it before proceeding.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!file_exists('comicpress-config.php.dist')) {
|
||||
echo "Must be run from the root ComicPress theme directory!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (empty($argv[1])) {
|
||||
echo "Usage: {$argv[0]} <name of destination file>\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!$zip_file = tempnam('', 'comicpress')) {
|
||||
echo "A temp directory could not be created!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$zip_file .= '.zip';
|
||||
|
||||
$ignore_filters = array(
|
||||
'#~$#', '#^\.#', '#^test$#', '#^build$#', '#^Makefile$#', '#^phpunit.xml$#'
|
||||
);
|
||||
|
||||
$renames = array(
|
||||
'#^(.*)\.dist$#' => '\1'
|
||||
);
|
||||
|
||||
$zip = new ZipArchive();
|
||||
$result = $zip->open($zip_file, ZipArchive::CREATE);
|
||||
if ($result === true) {
|
||||
$dir_stack = array('.');
|
||||
while (!empty($dir_stack)) {
|
||||
$dir = array_shift($dir_stack);
|
||||
$zip_dir = preg_replace('#^.#', 'comicpress', $dir);
|
||||
$zip->addEmptyDir($zip_dir);
|
||||
if ($dh = opendir($dir)) {
|
||||
while ($file = readdir($dh)) {
|
||||
$ok = true;
|
||||
foreach ($ignore_filters as $filter) {
|
||||
if (preg_match($filter, $file) > 0) { $ok = false; break; }
|
||||
}
|
||||
if ($ok) {
|
||||
$target = $dir . '/' . $file;
|
||||
if (is_dir($target)) {
|
||||
$dir_stack[] = $target;
|
||||
} else {
|
||||
$zip_target = $file;
|
||||
foreach ($renames as $filter => $replacement) {
|
||||
$zip_target = preg_replace($filter, $replacement, $zip_target);
|
||||
}
|
||||
$zip_target = $zip_dir . '/' . $zip_target;
|
||||
echo $zip_target . "\n";
|
||||
$zip->addFile($target, $zip_target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
rename($zip_file, $argv[1]);
|
||||
}
|
130
buystrip.php
|
@ -11,57 +11,40 @@ Template Version: 2.14
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php if (!empty($comicnum)): ?>
|
||||
<?php $temppost = $post; ?>
|
||||
<?php $post = & get_post( $comicnum ); ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div style="float:right;">
|
||||
<br />
|
||||
<img src="<?php echo get_template_directory_uri(); ?>/images/paypal.png" alt="<?php _e('Powered by Paypal','comicpress'); ?>" /><br />
|
||||
</div>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (!empty($comicnum)):
|
||||
$this_post = & get_post( $comicnum );
|
||||
?>
|
||||
<div <?php post_class(); ?>>
|
||||
<?php comicpress_display_post_thumbnail(); ?>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<h2 class="pagetitle"><?php the_title(); ?></h2>
|
||||
<?php } ?>
|
||||
<?php _e('Comic ID','comicpress'); ?> - #<?php echo $comicnum; ?><br />
|
||||
<?php _e('Title:','comicpress'); ?> <?php echo the_title(); ?><br />
|
||||
<?php _e('Title:','comicpress'); ?> <?php echo get_the_title($this_post); ?><br />
|
||||
<br />
|
||||
<?php $post = & get_post( $comicnum ); ?>
|
||||
<?php
|
||||
foreach (array("archive", "rss", "comic", "mini") as $type) {
|
||||
if (($requested_image = get_comic_url($type, $post)) !== false) {
|
||||
$image = $requested_image; break;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
echo comicpress_display_comic_image("archive,comic", false, $this_post, get_the_title($this_post));
|
||||
?>
|
||||
<center>
|
||||
<img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" /><br />
|
||||
<br />
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left" valign="center">
|
||||
<td align="left">
|
||||
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<input type="hidden" name="add" value="1">
|
||||
<input type="hidden" name="cmd" value="_cart">
|
||||
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>">
|
||||
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>">
|
||||
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>">
|
||||
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
|
||||
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>">
|
||||
<input type="hidden" name="add" value="1" />
|
||||
<input type="hidden" name="cmd" value="_cart" />
|
||||
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>" />
|
||||
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>" />
|
||||
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>" />
|
||||
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo get_the_title($this_post); ?>" />
|
||||
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>" />
|
||||
<?php if ($comicpress_options['buy_print_add_shipping']) { ?>
|
||||
<input type="hidden" name="shipping" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>">
|
||||
US/Canada<br>
|
||||
<input type="hidden" name="shipping" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>" />
|
||||
US/Canada<br />
|
||||
$<?php echo $comicpress_options['buy_print_us_amount']; ?> + $<?php echo $comicpress_options['buy_print_us_ship']; ?> <?php _e('shipping','comicpress'); ?><br />
|
||||
<?php } else { ?>
|
||||
US/Canada<br>
|
||||
US/Canada<br />
|
||||
$<?php echo $comicpress_options['buy_print_us_amount']; ?><br />
|
||||
<?php } ?>
|
||||
<input type="image" src="<?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png" name="submit32" alt="<?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?>" />
|
||||
|
@ -69,21 +52,21 @@ Template Version: 2.14
|
|||
</td>
|
||||
<td width="40">
|
||||
</td>
|
||||
<td align="left" valign="center">
|
||||
<td align="left">
|
||||
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<input type="hidden" name="add" value="1">
|
||||
<input type="hidden" name="cmd" value="_cart">
|
||||
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>">
|
||||
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>">
|
||||
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>">
|
||||
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
|
||||
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>">
|
||||
<input type="hidden" name="add" value="1" />
|
||||
<input type="hidden" name="cmd" value="_cart" />
|
||||
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>" />
|
||||
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>" />
|
||||
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>" />
|
||||
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo get_the_title($this_post); ?>" />
|
||||
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>" />
|
||||
<?php if ($comicpress_options['buy_print_add_shipping']) { ?>
|
||||
<input type="hidden" name="shipping" value="<?php echo $buy_print_int_ship; ?>">
|
||||
International<br>
|
||||
<input type="hidden" name="shipping" value="<?php echo $buy_print_int_ship; ?>" />
|
||||
International<br />
|
||||
$<?php echo $comicpress_options['buy_print_int_amount']; ?> + $<?php echo $comicpress_options['buy_print_int_ship']; ?> <?php _e('shipping','comicpress'); ?><br />
|
||||
<?php } else { ?>
|
||||
International<br>
|
||||
International<br />
|
||||
$<?php echo $comicpress_options['buy_print_int_amount']; ?><br />
|
||||
<?php } ?>
|
||||
<input type="image" src="<?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png" name="submit32" alt="<?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?>" />
|
||||
|
@ -94,29 +77,36 @@ Template Version: 2.14
|
|||
<br />
|
||||
<?php _e('The purchase of this strip is based on availability. A Print of this strip is what you are purchasing.','comicpress'); ?><br />
|
||||
</center>
|
||||
<br />
|
||||
<?php $post = $temppost; ?>
|
||||
<div class="clear"></div>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page" id="post-<?php the_ID() ?>">
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<div class="entry">
|
||||
<?php the_content() ?>
|
||||
<?php wp_link_pages(array('before' => '<p><strong>'.__('Pages:','comicpress').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')) ?>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<?php comicpress_display_post_thumbnail(); ?>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/* ComicPress Custom CSS over-rides for [ chrome ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe {
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
|
@ -106,6 +106,19 @@ class ComicPressDBInterface {
|
|||
function get_next_post($categories = null, $override_post = null) { return $this->get_adjacent_post($categories, true, $override_post); }
|
||||
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
?>
|
||||
function get_parent_child_category_ids() {
|
||||
global $wpdb;
|
||||
|
||||
$parent_child_categories = array();
|
||||
|
||||
$result = $wpdb->get_results("SELECT term_id, parent FROM $wpdb->term_taxonomy", ARRAY_A);
|
||||
if (!empty($result)) {
|
||||
foreach ($result as $row) {
|
||||
$parent_child_categories[$row['term_id']] = $row['parent'];
|
||||
}
|
||||
}
|
||||
|
||||
return $parent_child_categories;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,12 +24,15 @@ class ComicPressMediaHandling {
|
|||
|
||||
function _get_filter($filter_to_use = null) {
|
||||
global $comic_filename_filters;
|
||||
|
||||
if (!is_null($filter_to_use)) {
|
||||
if (is_string($filter_to_use)) {
|
||||
if (isset($comic_filename_filters[$filter_to_use])) {
|
||||
return $this->_convert_to_percent_filter($comic_filename_filters[$filter_to_use]);
|
||||
}
|
||||
$options = get_option('comicpress_options');
|
||||
// if (isset($options['comic_filename_filters'][$filter_to_use])) {
|
||||
// return $this->_convert_to_percent_filter($options['comic_filename_filters'][$filter_to_use]);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +42,6 @@ class ComicPressMediaHandling {
|
|||
} else {
|
||||
$filter = str_replace('{date}', $this->default_filename_filter, $filter);
|
||||
}
|
||||
|
||||
return $filter;
|
||||
}
|
||||
|
||||
|
@ -72,7 +74,7 @@ class ComicPressMediaHandling {
|
|||
|
||||
function _get_regex_filename($input) {
|
||||
$input = preg_replace('#\\\(?![.])#', '/', $input);
|
||||
return basename($input);
|
||||
return preg_replace('#^.*\/([^\/]+)$#', '$1', $input);
|
||||
}
|
||||
|
||||
function _resolve_regex_path($input) {
|
||||
|
@ -83,7 +85,7 @@ class ComicPressMediaHandling {
|
|||
|
||||
// @codeCoverageIgnoreStart
|
||||
function _abspath() {
|
||||
return trailingslashit($this->_resolve_regex_path(realpath(ABSPATH)));
|
||||
return trailingslashit($this->_resolve_regex_path(ABSPATH));
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
|
|
|
@ -1,37 +1,35 @@
|
|||
<?php
|
||||
|
||||
class ComicPressPostMediaHandlingMetabox {
|
||||
// @codeCoverageIgnoreStart
|
||||
function __comicpress_init() {
|
||||
add_action('admin_menu', array('ComicPressPostMediaHandlingMetabox', 'admin_menu'));
|
||||
}
|
||||
|
||||
function handle_update() {}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
function _get_valid_types() {
|
||||
return array_keys(ComicPressMediaHandling::_bundle_global_variables());
|
||||
}
|
||||
|
||||
function handle_post_media_update($info) {
|
||||
if (isset($info['post_id'])) {
|
||||
if (is_numeric($info['post_id'])) {
|
||||
$result = array();
|
||||
if (isset($info['urls'])) {
|
||||
if (is_array($info['urls'])) {
|
||||
$valid_types = ComicPressPostMediaHandlingMetabox::_get_valid_types();
|
||||
foreach ($info['urls'] as $field => $value) {
|
||||
if (in_array($field, $valid_types)) {
|
||||
$result[$field] = strip_tags($value);
|
||||
}
|
||||
function _verify_nonce() { return __comicpress_verify_nonce(); }
|
||||
|
||||
function save_post($post_id) {
|
||||
if ($this->_verify_nonce() == 'post-media-update') {
|
||||
$info = $_REQUEST['cp'];
|
||||
$result = array();
|
||||
if (isset($info['urls'])) {
|
||||
if (is_array($info['urls'])) {
|
||||
$valid_types = ComicPressPostMediaHandlingMetabox::_get_valid_types();
|
||||
foreach ($info['urls'] as $field => $value) {
|
||||
if (in_array($field, $valid_types)) {
|
||||
$result[$field] = strip_tags($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
update_post_meta($info['post_id'], 'backend_url_images', $result);
|
||||
}
|
||||
update_post_meta($post_id, 'backend_url_images', $result);
|
||||
}
|
||||
}
|
||||
|
||||
function _save_post($post_id) {
|
||||
$mb = new ComicPressPostMediaHandlingMetabox();
|
||||
$mb->save_post($post_id);
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
function admin_menu() {
|
||||
add_meta_box('comicpress-post-media-handling', __('ComicPress Post Media', 'comicpress'), array('ComicPressPostMediaHandlingMetabox', 'metabox'), 'post', 'normal', 'low');
|
||||
|
@ -51,3 +49,6 @@ class ComicPressPostMediaHandlingMetabox {
|
|||
include('partials/post-media-handling/metabox.inc');
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_menu', array('ComicPressPostMediaHandlingMetabox', 'admin_menu'));
|
||||
add_action('save_post', array('ComicPressPostMediaHandlingMetabox', '_save_post'));
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
<?php
|
||||
|
||||
require_once('ComicPressStoryline.inc');
|
||||
|
||||
class ComicPressRelatedPosts {
|
||||
var $related_categories;
|
||||
|
||||
function display_related_comics($attrs = '') {
|
||||
$rp = new ComicPressRelatedPosts();
|
||||
return $rp->_handle_shortcode(
|
||||
extract(ComicPressRelatedPosts::_handle_shortcode_attrs($attrs)),
|
||||
__('Related Comics ¬', 'comicpress'), true
|
||||
);
|
||||
}
|
||||
|
||||
function display_related_posts($attrs = '') {
|
||||
$rp = new ComicPressRelatedPosts();
|
||||
return $rp->_handle_shortcode(
|
||||
extract(ComicPressRelatedPosts::_handle_shortcode_attrs($attrs)),
|
||||
__('Related Posts ¬', 'comicpress'), false
|
||||
);
|
||||
}
|
||||
|
||||
function _handle_shortcode($attrs, $title, $is_in_storyline) {
|
||||
global $post;
|
||||
|
||||
if (is_object($post)) {
|
||||
if (isset($post->ID)) {
|
||||
$this->_setup_categories($is_in_storyline);
|
||||
$tags = $this->_extract_tag_ids($post->ID);
|
||||
|
||||
if (!empty($tags)) {
|
||||
$posts = $this->_do_tags_query($post->ID, $tags, $attrs['limit']);
|
||||
if (!empty($posts)) {
|
||||
return $this->build_post_table($title, $posts);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function _handle_shortcode_attrs($attrs) {
|
||||
return shortcode_atts(array(
|
||||
'limit' => '5',
|
||||
), $attrs);
|
||||
}
|
||||
|
||||
function _new_comicpressstoryline() { return new ComicPressStoryline(); }
|
||||
|
||||
function _setup_categories($is_in_storyline = true) {
|
||||
$storyline = new ComicPressStoryline();
|
||||
$storyline->read_from_options();
|
||||
$storyline_categories = $storyline->build_from_restrictions();
|
||||
|
||||
if ($is_in_storyline) {
|
||||
$this->related_categories = $storyline_categories;
|
||||
} else {
|
||||
$this->related_categories = array_diff(get_all_category_ids(), $storyline_categories);
|
||||
}
|
||||
}
|
||||
|
||||
function build_post_table($title, $posts) {
|
||||
$output = array();
|
||||
if (!empty($posts)) {
|
||||
$output[] = '<div class="related_posts">';
|
||||
$output[] = '<h4>' . $title . '</h4>';
|
||||
$output[] = '<ul>';
|
||||
foreach ($posts as $post) {
|
||||
if (array_intersect($this->related_categories, wp_get_post_categories($post->ID))) {
|
||||
$output[] = '<li><a title="' . esc_attr(get_the_title($post)) . '" href="' . esc_attr(get_permalink($post)) . '">' . esc_html(get_the_title($post)) . '</a></li>';
|
||||
}
|
||||
}
|
||||
$output[] = '</ul>';
|
||||
$output[] = '</div>';
|
||||
}
|
||||
return implode('', $output);
|
||||
}
|
||||
|
||||
function _extract_tag_ids($post_id) {
|
||||
$output = array();
|
||||
foreach (wp_get_post_tags($post_id) as $tag) {
|
||||
$output[] = $tag->term_id;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
function _do_tags_query($post_id, $tags = array(), $limit = 5) {
|
||||
global $wpdb;
|
||||
|
||||
if (!empty($tags)) {
|
||||
if (empty($limit)) {
|
||||
$limit = 5;
|
||||
}
|
||||
|
||||
// Do the query
|
||||
$q = "SELECT p.*, count(tr.object_id) as count
|
||||
FROM
|
||||
$wpdb->term_taxonomy AS tt,
|
||||
$wpdb->term_relationships AS tr,
|
||||
$wpdb->posts AS p
|
||||
WHERE
|
||||
tt.taxonomy ='post_tag' AND
|
||||
tt.term_taxonomy_id = tr.term_taxonomy_id AND
|
||||
tr.object_id = p.ID AND
|
||||
tt.term_id IN (%s) AND
|
||||
p.ID != %d AND
|
||||
p.post_status = 'publish' AND
|
||||
p.post_date < NOW()
|
||||
GROUP BY tr.object_id
|
||||
ORDER BY count DESC, p.post_date DESC
|
||||
LIMIT %d";
|
||||
|
||||
return $wpdb->get_results($wpdb->prepare($q, implode(',', $tags), $post_id, $limit));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
add_shortcode('related_posts', array('ComicPressRelatedPosts', 'display_related_posts'));
|
||||
add_shortcode('related_comics', array('ComicPressRelatedPosts', 'display_related_comics'));
|
||||
|
|
@ -247,19 +247,36 @@ class ComicPressStoryline {
|
|||
return $this->_merge_simple_storyline($simple_storyline);
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
function get_comicpress_dbi() {
|
||||
return ComicPressDBInterface::get_instance();
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
/**
|
||||
* Get a simple structure.
|
||||
*/
|
||||
function get_category_simple_structure($parent = null) {
|
||||
$structure = array();
|
||||
foreach (get_all_category_ids() as $category_id) {
|
||||
$category = get_category($category_id);
|
||||
if (!isset($structure[$category->parent])) {
|
||||
$structure[$category->parent] = array();
|
||||
}
|
||||
$structure[$category->parent][$category_id] = true;
|
||||
$cache_key = $this->generate_cache_key('storyline-structure', $parent);
|
||||
$result = wp_cache_get($cache_key, 'comicpress');
|
||||
if (is_array($result)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$structure = array();
|
||||
$dbi = $this->get_comicpress_dbi();
|
||||
|
||||
$result = $dbi->get_parent_child_category_ids();
|
||||
|
||||
foreach ($result as $cat_id => $cat_parent) {
|
||||
if (!isset($structure[$cat_parent])) {
|
||||
$structure[$cat_parent] = array();
|
||||
}
|
||||
$structure[$cat_parent][$cat_id] = true;
|
||||
}
|
||||
|
||||
$structure = $this->_merge_simple_storyline($structure);
|
||||
|
||||
if (!empty($parent)) {
|
||||
if (isset($structure[0])) {
|
||||
foreach ($structure[0] as $key => $children) {
|
||||
|
@ -267,9 +284,19 @@ class ComicPressStoryline {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
wp_cache_set($cache_key, $structure, 'comicpress');
|
||||
|
||||
return $structure;
|
||||
}
|
||||
|
||||
function generate_cache_key($key_name, $param) {
|
||||
if (!empty($param)) {
|
||||
$key_name = "${key_name}-${param}";
|
||||
}
|
||||
return $key_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a flattened category node list.
|
||||
*/
|
||||
|
@ -339,6 +366,9 @@ class ComicPressStoryline {
|
|||
|
||||
$valid_ids = get_all_category_ids();
|
||||
|
||||
if (!isset($comicpress->comicpress_options['category_groupings'])) { $comicpress->comicpress_options['category_groupings'] = array(); }
|
||||
if (!is_array($comicpress->comicpress_options['category_groupings'])) { $comicpress->comicpress_options['category_groupings'] = array(); }
|
||||
|
||||
foreach ($comicpress->comicpress_options['category_groupings'] as $group_id => $category_ids) {
|
||||
$comicpress->comicpress_options['category_groupings'][$group_id] = array_intersect($category_ids, $valid_ids);
|
||||
if (empty($comicpress->comicpress_options['category_groupings'][$group_id])) {
|
||||
|
|
|
@ -22,7 +22,7 @@ $archive_comic_width = "380";
|
|||
$rss_comic_width = "600";
|
||||
|
||||
//BLOG POSTCOUNT - the number of blog entries to appear on the home page (default "5").
|
||||
$blog_postcount = "3";
|
||||
$blog_postcount = "5";
|
||||
|
||||
//Mini Comic Width - The width your comics will appear in minithumbs (default "100")
|
||||
$mini_comic_width = "80";
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
<?php
|
||||
|
||||
function comicpress_notice_debug() {
|
||||
global $current_user, $comiccat, $blogcat, $comic_folder, $wpdb, $category_tree, $non_comic_categories, $comicpress_options;
|
||||
|
||||
if( substr( $_SERVER[ 'PHP_SELF' ], -19 ) != '/wp-admin/index.php' || !$comicpress_options['enable_comicpress_debug'])
|
||||
return;
|
||||
|
||||
$comicpress_options = comicpress_load_options();
|
||||
|
||||
$error = array();
|
||||
|
||||
if (floatval(phpversion()) < 5.0) {
|
||||
$phpversion = phpversion();
|
||||
$error[] = array('header', __('You are using PHP version: ','comicpress'). $phpversion);
|
||||
$error[] = __('Version 5 or higher is required for this theme to work correctly. Please check with your host about upgrading to a newer version.','comicpress');
|
||||
}
|
||||
|
||||
$post_cat_link = get_bloginfo('wpurl') . '/wp-admin/categories.php';
|
||||
|
||||
// Check Categories
|
||||
if ($comiccat == $blogcat) {
|
||||
$error[] = array('header', __('Primary Comic and Blog categories are not configured properly.','comicpress'));
|
||||
$error[] = __('ComicPress requires 2 categories to be added to the ','comicpress') . '<a href="'.$post_cat_link.'">' . __('post categories.','comicpress') . '</a>' .
|
||||
__(' It is necessary to have 2 more categories in addition to the uncategorized category, a Blog and Comic primary categories. These two additional categories will be the root categories that seperate the difference between the comic and blog posts. When you post a new comic you will be posting it into the comic category or heirarchal children of the comic category. When posting a new blog post you need to set it into the blog category or child of the blog category. Uncategorized will act as a blog post category (do not rename uncategorized). You can configure the categories to set as the primary blog and comic category from within the ComicPress Manager plugin.','comicpress');
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
// Check Comics Folder
|
||||
$document_root = ABSPATH;
|
||||
|
||||
if (function_exists('cpm_wpmu_modify_path')) {
|
||||
$document_root = cpm_wpmu_modify_path($document_root);
|
||||
}
|
||||
if (!is_dir($document_root .'/'. $comic_folder)) {
|
||||
$error[] = array('header', __('Comics Folder is not configured and is unable to be found.','comicpress'));
|
||||
$error[] = __('ComicPress stores the files it uses inside a specific directory and that directory is set from within ComicPress Manager. When this error is present it means that the theme is unable to find the appropriate directory to read the comics from.','comicpress');
|
||||
$error[] = __('ComicPress Manager - Manager Config will allow you to create the directories needed.');
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
// Make sure the ComicPress theme is installed in themes/comicpress
|
||||
if (ABSPATH . 'wp-content/themes/comicpress' != get_template_directory()) {
|
||||
$error[] = array('header', __('ComicPress theme is not installed into the correct folder.','comicpress'));
|
||||
$error[] = __('As of version 2.9, the ComicPress main core theme is required to be installed into the wp-content/themes/comicpress directory. It is currently not installed into that directory.','comicpress');
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error) && $comicpress_options['enable_full_post_check']) {
|
||||
// Check to make sure posts are not in blogcat and comiccat both
|
||||
$founderror = false;
|
||||
$non_comic_categories = str_replace(' and ', ',', $non_comic_categories);
|
||||
$blog_query = '&show_posts=-1&posts_per_page=-1&cat='.$non_comic_categories;
|
||||
|
||||
query_posts($blog_query);
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
if (in_comic_category()) {
|
||||
$founderrorpostlist .= '<a href="'.get_bloginfo('wpurl').'/wp-admin/post.php?action=edit&post='.get_the_ID().'">'.get_the_title().'</a> - Error: Category Crossover<br />';
|
||||
$founderror = true;
|
||||
}
|
||||
endwhile;
|
||||
}
|
||||
if ($founderror) {
|
||||
$error[] = array('header', __('Post\'s are in both a comic category and blog category.','comicpress'));
|
||||
$error[] = __('The following posts are set both in a comic category and a blog category, with ComicPress the designations of categories is very important. The rule of thumb is to make sure that all posts are only in a single category. If a post is in both the comic category and blog category there will be issues with both navigation and execution of the ComicPress code.','comicpress');
|
||||
$error[] = $founderrorpostlist;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error) && $comicpress_options['enable_full_post_check']) {
|
||||
$founderror = false;
|
||||
$blog_query = '&show_posts=-1&posts_per_page=-1';
|
||||
$posts = query_posts($blog_query);
|
||||
foreach ($posts as $testpost) {
|
||||
$post_title_slug = $testpost->post_name;
|
||||
if (is_numeric($post_title_slug)) {
|
||||
$founderror = true;
|
||||
$founderrorpostname .= '<a href="'.get_bloginfo('wpurl').'/wp-admin/post.php?action=edit&post='.$testpost->ID.'">'.get_the_title($testpost->ID).'</a> - Error: Post Slug (Permalink) is Numeric<br />';
|
||||
}
|
||||
}
|
||||
if ($founderror) {
|
||||
$error[] = array('header', __('Post\'s slug is a numeric.','comicpress'));
|
||||
$error[] = __('The following posts have a post slug (permalink) that is numeric. This will cause problems with permalinks. Post slugs must have at least one alphabetic character in them for Wordpress to handle correctly.','comicpress');
|
||||
$error[] = $founderrorpostname;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($error)) {
|
||||
?>
|
||||
<div class="error">
|
||||
<h2>ComicPress Debug</h2>
|
||||
ComicPress doesn't seem to be fully installed at this time, check out these messages.<br />
|
||||
<br />
|
||||
<?php
|
||||
foreach ($error as $info) {
|
||||
unset($text);
|
||||
if (is_array($info)) {
|
||||
list($type, $text) = $info;
|
||||
} else {
|
||||
if (is_string($info)) {
|
||||
$text = $info;
|
||||
$type = 'paragraph';
|
||||
}
|
||||
}
|
||||
if (!empty($text) && !empty($type)) {
|
||||
switch ($type) {
|
||||
case 'header': echo "<h3>${text}</h3>"; break;
|
||||
case 'raw': echo $text; break;
|
||||
default: echo "<p>${text}</p>"; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'admin_notices', 'comicpress_notice_debug' );
|
||||
|
||||
?>
|
|
@ -1,3 +0,0 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -1,182 +1,267 @@
|
|||
<?php
|
||||
|
||||
function options() {
|
||||
$pagehook = add_submenu_page('themes.php','comicpress', __('ComicPress Options','comicpress'), 10, 'comicpress-options', 'comicpress_admin');
|
||||
add_action('admin_head-'.$pagehook, 'comicpress_admin_page_head');
|
||||
function comicpress_options_setup() {
|
||||
$pagehook = add_submenu_page('themes.php',__('ComicPress Options', 'comicpress'), __('ComicPress Options','comicpress'), 10, 'comicpress-options', 'comicpress_admin');
|
||||
add_action('admin_head-' . $pagehook, 'comicpress_admin_page_head');
|
||||
add_action('admin_print_scripts-' . $pagehook, 'comicpress_admin_print_scripts');
|
||||
add_action('admin_print_styles-' . $pagehook, 'comicpress_admin_print_styles');
|
||||
}
|
||||
|
||||
function comicpress_admin_print_scripts() {
|
||||
wp_enqueue_script('utils');
|
||||
wp_enqueue_script('jquery');
|
||||
}
|
||||
|
||||
function comicpress_admin_print_styles() {
|
||||
wp_admin_css('css/global');
|
||||
wp_admin_css('css/colors');
|
||||
wp_admin_css('css/ie');
|
||||
wp_enqueue_style('comicpress-options', get_template_directory_uri() . '/options/options.css');
|
||||
}
|
||||
|
||||
function comicpress_admin_page_head() { ?>
|
||||
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/options/options.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/tabbed_pages.js"></script>
|
||||
<!--[if lt ie 8]> <style> div.show { position: static; margin-top: 1px; } #cpadmin div.off { height: 22px; } </style> <![endif]-->
|
||||
|
||||
<!--[if lt ie 8]> <style> div.show { position: static; margin-top: 1px; } #cpadmin div.off { height: 22px; } </style> <![endif]-->
|
||||
<?php }
|
||||
|
||||
function comicpress_admin() {
|
||||
global $upload_path, $blogcat;
|
||||
$comicpress_options = get_option('comicpress_options'); ?>
|
||||
|
||||
$comicpress_options = get_option('comicpress_options');
|
||||
?>
|
||||
|
||||
<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>
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
<?php
|
||||
$tab = '';
|
||||
if ( wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_layout') {
|
||||
$comicpress_options['cp_theme_layout'] = $_REQUEST['cp_theme_layout'];
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_layout') {
|
||||
$comicpress_options['cp_theme_layout'] = wp_filter_nohtml_kses($_REQUEST['cp_theme_layout']);
|
||||
$tab = 'themestyle';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_general') {
|
||||
$comicpress_options['disable_page_restraints'] = (bool)( $_REQUEST['disable_page_restraints'] == 1 ? true : false );
|
||||
$comicpress_options['rascal_says'] = (bool)($_REQUEST['rascal_says'] == 1 ? true : false );
|
||||
$comicpress_options['disable_comment_note'] = (bool)($_REQUEST['disable_comment_note'] == 1 ? true : false );
|
||||
$comicpress_options['enable_numbered_pagination'] = (bool)($_REQUEST['enable_numbered_pagination'] == 1 ? true : false );
|
||||
$comicpress_options['comic_clicks_next'] = (bool)($_REQUEST['comic_clicks_next'] == 1 ? true : false );
|
||||
$comicpress_options['disable_default_comic_nav'] = (bool)($_REQUEST['disable_default_comic_nav'] == 1 ? true : false );
|
||||
$comicpress_options['graphicnav_directory'] = wp_filter_nohtml_kses($_REQUEST['graphicnav_directory']);
|
||||
$comicpress_options['enable_widgetarea_use_sidebar_css'] = (bool)($_REQUEST['enable_widgetarea_use_sidebar_css'] == 1 ? true : false );
|
||||
$comicpress_options['disable_lrsidebars_frontpage'] = (bool)($_REQUEST['disable_lrsidebars_frontpage'] == 1 ? true : false );
|
||||
$comicpress_options['disable_footer_text'] = (bool)($_REQUEST['disable_footer_text'] == 1 ? true : false );
|
||||
$comicpress_options['disable_blogheader'] = (bool)($_REQUEST['disable_blogheader'] == 1 ? true : false );
|
||||
|
||||
foreach (array(
|
||||
'disable_page_restraints',
|
||||
'rascal_says',
|
||||
'disable_comment_note',
|
||||
'enable_numbered_pagination',
|
||||
'enable_comment_count_in_rss',
|
||||
'enable_post_thumbnail_rss',
|
||||
'comic_clicks_next',
|
||||
'disable_default_comic_nav',
|
||||
'enable_widgetarea_use_sidebar_css',
|
||||
'disable_lrsidebars',
|
||||
'disable_footer_text',
|
||||
'disable_blogheader',
|
||||
'enable_comicpress_debug',
|
||||
'enable_full_post_check',
|
||||
'enable_scroll_to_top',
|
||||
'enable_page_load_info'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
'graphicnav_directory'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
$tab = 'general';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_index') {
|
||||
$comicpress_options['disable_comic_frontpage'] = (bool)($_REQUEST['disable_comic_frontpage'] == 1 ? true : false );
|
||||
$comicpress_options['disable_comic_blog_frontpage'] = (bool)($_REQUEST['disable_comic_blog_frontpage'] == 1 ? true : false );
|
||||
$comicpress_options['disable_comic_blog_single'] = (bool)($_REQUEST['disable_comic_blog_single'] == 1 ? true : false );
|
||||
$comicpress_options['disable_blog_frontpage'] = (bool)($_REQUEST['disable_blog_frontpage'] == 1 ? true : false );
|
||||
foreach (array(
|
||||
'disable_comic_frontpage',
|
||||
'disable_comic_blog_frontpage',
|
||||
'disable_comic_blog_single',
|
||||
'disable_blog_frontpage',
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
$comicpress_options['blog_postcount'] = wp_filter_nohtml_kses($_REQUEST['blog_postcount']);
|
||||
$tab = 'index';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_post') {
|
||||
$comicpress_options['transcript_in_posts'] = (bool)($_REQUEST['transcript_in_posts'] == 1 ? true : false );
|
||||
$comicpress_options['enable_related_comics'] = (bool)($_REQUEST['enable_related_comics'] == 1 ? true : false );
|
||||
$comicpress_options['enable_related_posts'] = (bool)($_REQUEST['enable_related_posts'] == 1 ? true : false );
|
||||
$comicpress_options['remove_wptexturize'] = (bool)($_REQUEST['remove_wptexturize'] == 1 ? true : false );
|
||||
|
||||
$comicpress_options['split_column_in_two'] = (bool)($_REQUEST['split_column_in_two'] == 1 ? true : false );
|
||||
$comicpress_options['author_column_one'] = wp_filter_nohtml_kses($_REQUEST['author_column_one']);
|
||||
$comicpress_options['author_column_two'] = wp_filter_nohtml_kses($_REQUEST['author_column_two']);
|
||||
|
||||
$comicpress_options['enable_comic_post_author_gravatar'] = (bool)($_REQUEST['enable_comic_post_author_gravatar'] == 1 ? true : false );
|
||||
$comicpress_options['enable_post_author_gravatar'] = (bool)($_REQUEST['enable_post_author_gravatar'] == 1 ? true : false );
|
||||
$comicpress_options['avatar_directory'] = wp_filter_nohtml_kses($_REQUEST['avatar_directory']);
|
||||
$comicpress_options['moods_directory'] = wp_filter_nohtml_kses($_REQUEST['moods_directory']);
|
||||
|
||||
$comicpress_options['calendar_directory'] = wp_filter_nohtml_kses($_REQUEST['calendar_directory']);
|
||||
$comicpress_options['enable_comic_post_calendar'] = (bool)($_REQUEST['enable_comic_post_calendar'] == 1 ? true : false );
|
||||
$comicpress_options['enable_post_calendar'] = (bool)($_REQUEST['enable_post_calendar'] == 1 ? true : false );
|
||||
|
||||
$comicpress_options['disable_tags_in_posts'] = (bool)($_REQUEST['disable_tags_in_posts'] == 1 ? true : false );
|
||||
$comicpress_options['disable_categories_in_posts'] = (bool)($_REQUEST['disable_categories_in_posts'] == 1 ? true : false );
|
||||
|
||||
$comicpress_options['blogposts_with_comic'] = (bool)($_REQUEST['blogposts_with_comic'] == 1 ? true : false );
|
||||
$comicpress_options['static_blog'] = (bool)($_REQUEST['static_blog'] == 1 ? true : false );
|
||||
$comicpress_options['disable_page_titles'] = (bool)($_REQUEST['disable_page_titles'] == 1 ? true : false );
|
||||
|
||||
foreach (array(
|
||||
'transcript_in_posts',
|
||||
'enable_related_comics',
|
||||
'enable_related_posts',
|
||||
'remove_wptexturize',
|
||||
'enable_comic_post_author_gravatar',
|
||||
'enable_post_author_gravatar',
|
||||
'split_column_in_two',
|
||||
'enable_comic_post_calendar',
|
||||
'enable_post_calendar',
|
||||
'disable_tags_in_posts',
|
||||
'disable_categories_in_posts',
|
||||
'blogposts_with_comic',
|
||||
'static_blog',
|
||||
'disable_page_titles'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
foreach (array(
|
||||
'author_column_one',
|
||||
'author_column_two',
|
||||
'avatar_directory',
|
||||
'moods_directory',
|
||||
'calendar_directory'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
$tab = 'post';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_archivesearch') {
|
||||
$comicpress_options['archive_display_order'] = $_REQUEST['archive_display_order'];
|
||||
$comicpress_options['excerpt_or_content_archive'] = $_REQUEST['excerpt_or_content_archive'];
|
||||
$comicpress_options['excerpt_or_content_search'] = $_REQUEST['excerpt_or_content_search'];
|
||||
$comicpress_options['category_thumbnail_postcount'] = $_REQUEST['category_thumbnail_postcount'];
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_archivesearch') {
|
||||
foreach (array(
|
||||
'archive_display_order',
|
||||
'excerpt_or_content_archive',
|
||||
'excerpt_or_content_search',
|
||||
'category_thumbnail_postcount'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
$tab = 'archivesearch';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_menubar') {
|
||||
$comicpress_options['enable_search_in_menubar'] = (bool)($_REQUEST['enable_search_in_menubar'] == 1 ? true : false );
|
||||
$comicpress_options['enable_rss_in_menubar'] = (bool)($_REQUEST['enable_rss_in_menubar'] == 1 ? true : false );
|
||||
$comicpress_options['enable_navigation_in_menubar'] = (bool)($_REQUEST['enable_navigation_in_menubar'] == 1 ? true : false );
|
||||
$comicpress_options['contact_in_menubar'] = (bool)($_REQUEST['contact_in_menubar'] == 1 ? true : false );
|
||||
$comicpress_options['disable_dynamic_menubar_links'] = (bool)($_REQUEST['disable_dynamic_menubar_links'] == 1 ? true : false );
|
||||
$comicpress_options['disable_default_menubar'] = (bool)($_REQUEST['disable_default_menubar'] == 1 ? true : false );
|
||||
foreach (array(
|
||||
'enable_search_in_menubar',
|
||||
'enable_rss_in_menubar',
|
||||
'enable_navigation_in_menubar',
|
||||
'contact_in_menubar',
|
||||
'disable_dynamic_menubar_links',
|
||||
'disable_default_menubar',
|
||||
'enable_blogroll_off_links'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
$tab = 'menubar';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_customheader') {
|
||||
$comicpress_options['enable_custom_image_header'] = (bool)($_REQUEST['enable_custom_image_header'] == 1 ? true : false );
|
||||
$comicpress_options['custom_image_header_width'] = wp_filter_nohtml_kses($_REQUEST['custom_image_header_width']);
|
||||
$comicpress_options['custom_image_header_height'] = wp_filter_nohtml_kses($_REQUEST['custom_image_header_height']);
|
||||
$tab = 'customheader';
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_addons') {
|
||||
foreach (array(
|
||||
'enable_custom_image_header',
|
||||
'enable_members_only_post_comments',
|
||||
'buy_print_add_shipping'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
foreach (array(
|
||||
'custom_image_header_width',
|
||||
'custom_image_header_height',
|
||||
'enable_members_only',
|
||||
'members_post_category',
|
||||
'buy_print_email',
|
||||
'buy_print_url',
|
||||
'buy_print_us_amount',
|
||||
'buy_print_int_amount',
|
||||
'buy_print_us_ship',
|
||||
'buy_print_int_ship'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
$tab = 'addons';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_buyprint') {
|
||||
$comicpress_options['buy_print_email'] = wp_filter_nohtml_kses($_REQUEST['buy_print_email']);
|
||||
$comicpress_options['buy_print_url'] = wp_filter_nohtml_kses($_REQUEST['buy_print_url']);
|
||||
$comicpress_options['buy_print_us_amount'] = wp_filter_nohtml_kses($_REQUEST['buy_print_us_amount']);
|
||||
$comicpress_options['buy_print_int_amount'] = wp_filter_nohtml_kses($_REQUEST['buy_print_int_amount']);
|
||||
$comicpress_options['buy_print_add_shipping'] = (bool)($_REQUEST['buy_print_add_shipping'] == 1 ? true : false );
|
||||
$comicpress_options['buy_print_us_ship'] = wp_filter_nohtml_kses($_REQUEST['buy_print_us_ship']);
|
||||
$comicpress_options['buy_print_int_ship'] = wp_filter_nohtml_kses($_REQUEST['buy_print_int_ship']);
|
||||
$tab = 'buyprint';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_members') {
|
||||
$comicpress_options['members_post_category'] = wp_filter_nohtml_kses($_REQUEST['members_post_category']);
|
||||
$tab = 'members';
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_config') {
|
||||
|
||||
foreach (array(
|
||||
'comiccat',
|
||||
'blogcat',
|
||||
'comic_folder',
|
||||
'rss_comic_folder',
|
||||
'archive_comic_folder',
|
||||
'mini_comic_folder',
|
||||
'archive_comic_width',
|
||||
'rss_comic_width',
|
||||
'mini_comic_width'
|
||||
) as $key) {
|
||||
$comicpress_options['comicpress_config'][$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
$tab = 'config';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($tab) {
|
||||
?>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('ComicPress Settings SAVED!','comicpress'); ?></strong></p></div>
|
||||
<div id="message" class="updated"><p><strong><?php _e('ComicPress Settings SAVED!','comicpress'); ?></strong></p></div>
|
||||
<script>function hidemessage() { document.getElementById('message').style.display = 'none'; }</script>
|
||||
<?php }
|
||||
<?php }
|
||||
}
|
||||
if ($_REQUEST['action'] == 'comicpress_reset') {
|
||||
delete_option('comicpress_options');
|
||||
$comicpress_options = comicpress_load_options();
|
||||
?>
|
||||
<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>
|
||||
<div id="message" class="updated"><p><strong><?php _e('ComicPress Settings RESET!','comicpress'); ?></strong></p></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div id="poststuff" class="metabox-holder">
|
||||
|
||||
<div id="cpadmin" onclick="hidemessage();">
|
||||
<div class="<?php if ($tab == 'themestyle' || empty($tab)) { ?>on<?php } else { ?>off<?php } ?>" title="themestyle"><span><?php _e('Layout','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'general') { ?>on<?php } else { ?>off<?php } ?>" title="generaloptions"><span><?php _e('General','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'index') { ?>on<?php } else { ?>off<?php } ?>" title="indexoptions"><span><?php _e('Home Page','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'post') { ?>on<?php } else { ?>off<?php } ?>" title="postoptions"><span><?php _e('Posts & Pages','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'archivesearch') { ?>on<?php } else { ?>off<?php } ?>" title="archivesearch"><span><?php _e('Archive & Search','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'menubar') { ?>on<?php } else { ?>off<?php } ?>" title="menubaroptions"><span><?php _e('Menubar','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'customheader') { ?>on<?php } else { ?>off<?php } ?>" title="customheader"><span><?php _e('Custom Header','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'buyprint') { ?>on<?php } else { ?>off<?php } ?>" title="buyprintoptions"><span><?php _e('Buy Print','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'members') { ?>on<?php } else { ?>off<?php } ?>" title="membersoptions"><span><?php _e('Members','comicpress'); ?></span></div>
|
||||
?>
|
||||
|
||||
<div id="poststuff" class="metabox-holder">
|
||||
<div id="cpadmin">
|
||||
<?php
|
||||
$tab_info = array(
|
||||
'themestyle' => __('Layout', 'comicpress'),
|
||||
'general' => __('General', 'comicpress'),
|
||||
'index' => __('Home Page', 'comicpress'),
|
||||
'post' => __('Posts & Pages', 'comicpress'),
|
||||
'archivesearch' => __('Archive & Search', 'comicpress'),
|
||||
'menubar' => __('Menubar', 'comicpress'),
|
||||
'addons' => __('Add Ons', 'comicpress'),
|
||||
'config' => __('Configuration', 'comicpress'),
|
||||
);
|
||||
|
||||
if (empty($tab)) { $tab = array_shift(array_keys($tab_info)); }
|
||||
|
||||
foreach($tab_info as $tab_id => $label) { ?>
|
||||
<div id="comicpress-tab-<?php echo $tab_id ?>" class="comicpress-tab <?php echo ($tab == $tab_id) ? 'on' : 'off'; ?>"><span><?php echo $label; ?></span></div>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-pages">
|
||||
<?php foreach (glob(get_template_directory() . '/options/*.php') as $file) { include($file); } ?>
|
||||
</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'); ?>
|
||||
<?php include(get_template_directory() . '/options/postoptions.php'); ?>
|
||||
<?php include(get_template_directory() . '/options/archivesearchoptions.php'); ?>
|
||||
<?php include(get_template_directory() . '/options/menubaroptions.php'); ?>
|
||||
<?php include(get_template_directory() . '/options/customheaderoptions.php'); ?>
|
||||
<?php include(get_template_directory() . '/options/buyprintoptions.php'); ?>
|
||||
<?php include(get_template_directory() . '/options/membersoptions.php'); ?>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var showPage = function(which) {
|
||||
$('#comicpress-options-pages > div').each(function(i) {
|
||||
$(this)[(this.id == 'comicpress-' + which) ? 'show' : 'hide']();
|
||||
});
|
||||
};
|
||||
|
||||
$('.comicpress-tab').click(function() {
|
||||
$('#message').animate({height:"0", opacity:0, margin: 0}, 100, 'swing', function() { $(this).remove() });
|
||||
|
||||
showPage(this.id.replace('comicpress-tab-', ''));
|
||||
var myThis = this;
|
||||
$('.comicpress-tab').each(function() {
|
||||
var isSame = (this == myThis);
|
||||
$(this).toggleClass('on', isSame).toggleClass('off', !isSame);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
showPage('<?php echo esc_js($tab) ?>');
|
||||
}(jQuery));
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
add_action('admin_menu', 'options');
|
||||
|
||||
?>
|
||||
add_action('admin_menu', 'comicpress_options_setup');
|
||||
|
|
16
footer.php
|
@ -1,12 +1,8 @@
|
|||
<?php global $wpmu_version, $comicpress_options; ?>
|
||||
<div id="footer">
|
||||
<?php if (function_exists('the_project_wonderful_ad')) { ?>
|
||||
<div class="footerpwad">
|
||||
<center>
|
||||
<?php the_project_wonderful_ad('footer'); ?>
|
||||
</center>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (function_exists('the_project_wonderful_ad')) {
|
||||
the_project_wonderful_ad('footer');
|
||||
} ?>
|
||||
<?php get_sidebar('footer'); ?>
|
||||
<?php if (!$comicpress_options['disable_footer_text']) { ?>
|
||||
<p>
|
||||
|
@ -31,13 +27,17 @@
|
|||
<span class="footer-pipe">|</span>
|
||||
Subscribe: <a href="<?php bloginfo('rss2_url') ?>">RSS</a>
|
||||
</span>
|
||||
<?php if ($comicpress_options['enable_scroll_to_top']) { ?>
|
||||
<span class="footer-uptotop">
|
||||
<span class="footer-pipe">|</span>
|
||||
<a href="#outside" onclick="scrollup(); return false;"><?php _e('Back to Top ↑','comicpress'); ?></a>
|
||||
</span>
|
||||
<!-- <?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds. -->
|
||||
<?php } ?>
|
||||
</p>
|
||||
<?php } ?>
|
||||
<?php if ($comicpress_options['enable_page_load_info']) { ?>
|
||||
<p><?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds.</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if (!$comicpress_options['disable_page_restraints']) { ?>
|
||||
|
|
283
functions.php
|
@ -1,29 +1,55 @@
|
|||
<?php
|
||||
|
||||
// the_post_image('thumbnail/medium/full');
|
||||
global $comicpress_options;
|
||||
|
||||
// the_post_thumbnail('thumbnail/medium/full');
|
||||
if (function_exists('add_theme_support')) {
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
}
|
||||
|
||||
function __comicpress_widgets_init() {
|
||||
$available_widgets = array();
|
||||
|
||||
if (($dh = opendir(dirname(__FILE__) . '/widgets')) !== false) {
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if (strpos($file, '.inc') !== false) {
|
||||
$class_name = preg_replace('#\..*$#', '', $file);
|
||||
$class_name = "ComicPress" . preg_replace('#\..*$#', '', $file);
|
||||
require_once(dirname(__FILE__) . '/widgets/' . $file);
|
||||
register_widget($class_name);
|
||||
$widget = new $class_name();
|
||||
if (method_exists($widget, 'init')) { $widget->init(); }
|
||||
$widget = new $class_name(true);
|
||||
if (method_exists($widget, 'init')) {
|
||||
$widget->init();
|
||||
}
|
||||
|
||||
$available_widgets[strtolower($class_name)] = $widget;
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
foreach (wp_get_sidebars_widgets() as $type => $widgets) {
|
||||
if ($type != 'wp_inactive_widgets') {
|
||||
foreach ($widgets as $widget_id) {
|
||||
foreach ($available_widgets as $key => $widget) {
|
||||
if (method_exists($widget, 'is_active')) {
|
||||
if (strpos(strtolower($widget_id), $key) === 0) {
|
||||
$widget->is_active();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function __comicpress_init() {
|
||||
global $comicpress_options, $__comicpress_handlable_classes;
|
||||
|
||||
$comicpress_options = array();
|
||||
|
||||
// Check if the $comicpress_options exist, if not set defaults
|
||||
$comicpress_options = comicpress_load_options();
|
||||
|
||||
// xili-language plugin check
|
||||
if (class_exists('xili_language')) {
|
||||
define('THEME_TEXTDOMAIN','comicpress');
|
||||
|
@ -33,32 +59,51 @@ function __comicpress_init() {
|
|||
}
|
||||
|
||||
// Queue up the scripts.
|
||||
wp_enqueue_script('comicpress_scroll', get_template_directory_uri() . '/js/scroll.js');
|
||||
if (!is_admin() && $comicpress_options['enable_scroll_to_top']) {
|
||||
wp_enqueue_script('comicpress_scroll', get_template_directory_uri() . '/js/scroll.js');
|
||||
}
|
||||
|
||||
// remove intense debates control over the comment numbers
|
||||
if (function_exists('id_get_comment_number')) {
|
||||
remove_filter('comments_number','id_get_comment_number');
|
||||
}
|
||||
|
||||
$storyline = get_option('comicpress-storyline-category-order');
|
||||
|
||||
$do_rebuild = false;
|
||||
|
||||
if (empty($storyline)) {
|
||||
$do_rebuild = true;
|
||||
} else {
|
||||
$first = array_pop(explode('/', array_shift(explode(',', $storyline))));
|
||||
|
||||
if ($first != $comicpress_options['comicpress_config']['comiccat']) {
|
||||
$do_rebuild = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($do_rebuild) {
|
||||
$storyline = new ComicPressStoryline();
|
||||
|
||||
update_option('comicpress-storyline-category-order', $storyline->get_category_flattened($comicpress_options['comicpress_config']['comiccat']));
|
||||
}
|
||||
|
||||
do_action('comicpress_init');
|
||||
|
||||
if ($verified_nonce = __comicpress_verify_nonce()) {
|
||||
do_action("comicpress_init-${verified_nonce}");
|
||||
}
|
||||
}
|
||||
|
||||
function __comicpress_verify_nonce() {
|
||||
if (isset($_REQUEST['cp'])) {
|
||||
if (is_array($_REQUEST['cp'])) {
|
||||
if (($_REQUEST['cp']['post_id'] <= 0) && ($_POST['post_ID'] > 0)) {
|
||||
$_REQUEST['cp']['post_id'] = $_POST['post_ID'];
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['cp']['_nonce'])) {
|
||||
if (wp_verify_nonce($_REQUEST['cp']['_nonce'], 'comicpress')) {
|
||||
if (isset($_REQUEST['cp']['action'])) {
|
||||
if (isset($_REQUEST['cp']['_action_nonce'])) {
|
||||
if (wp_verify_nonce($_REQUEST['cp']['_action_nonce'], 'comicpress-' . $_REQUEST['cp']['action'])) {
|
||||
$method_name = 'handle_' . str_replace('-', '_', $_REQUEST['cp']['action']);
|
||||
foreach ($__comicpress_handlable_classes as $class_name) {
|
||||
if (method_exists($class_name, $method_name)) {
|
||||
call_user_func(array($class_name, $method_name), $_REQUEST['cp']);
|
||||
}
|
||||
}
|
||||
return $_REQUEST['cp']['action'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -66,54 +111,35 @@ function __comicpress_init() {
|
|||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
add_action('widgets_init', '__comicpress_widgets_init');
|
||||
add_action('init', '__comicpress_init');
|
||||
|
||||
global $wpmu_version;
|
||||
if (!empty($wpmu_version)) {
|
||||
|
||||
if (get_option('upload_path') !== false) {
|
||||
$variables_to_extract = array();
|
||||
|
||||
foreach (array(
|
||||
'comiccat' => 'comiccat',
|
||||
'blogcat' => 'blogcat',
|
||||
'comics_path' => 'comic_folder',
|
||||
'comicsrss_path' => 'rss_comic_folder',
|
||||
'comicsarchive_path' => 'archive_comic_folder',
|
||||
'comicsmini_path' => 'mini_comic_folder',
|
||||
'archive_comic_width' => 'archive_comic_width',
|
||||
'rss_comic_width' => 'rss_comic_width',
|
||||
'mini_comic_width' => 'mini_comic_width',
|
||||
'blog_postcount' => 'blog_postcount') as $options => $variable_name) {
|
||||
$variables_to_extract[$variable_name] = get_option("comicpress-${options}");
|
||||
}
|
||||
|
||||
extract($variables_to_extract);
|
||||
}
|
||||
|
||||
} else {
|
||||
require(get_template_directory() . '/comicpress-config.php');
|
||||
}
|
||||
|
||||
function comicpress_load_options() {
|
||||
global $comicpress_options;
|
||||
global $comicpress_options, $comiccat, $blogcat, $comic_folder, $rss_comic_folder,
|
||||
$archive_comic_folder, $mini_comic_folder, $archive_comic_width, $mini_comic_width,
|
||||
$rss_comic_width;
|
||||
|
||||
$comicpress_options = get_option('comicpress_options');
|
||||
if (empty($comicpress_options)) {
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.4';
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.11';
|
||||
foreach (array(
|
||||
'cp_theme_layout' => 'standard',
|
||||
|
||||
'disable_comic_frontpage' => false,
|
||||
'blog_postcount' => '10',
|
||||
'disable_comic_blog_frontpage' => false,
|
||||
'disable_comic_blog_single' => false,
|
||||
'disable_blog_frontpage' => false,
|
||||
'disable_lrsidebars_frontpage' => false,
|
||||
'disable_lrsidebars' => false,
|
||||
'disable_footer_text' => false,
|
||||
'disable_blogheader' => false,
|
||||
'disable_page_titles' => false,
|
||||
'static_blog' => false,
|
||||
'disable_default_comic_nav' => false,
|
||||
'enable_post_thumbnail_rss' => true,
|
||||
|
||||
'cp_theme_layout' => 'standard',
|
||||
'transcript_in_posts' => false,
|
||||
|
@ -123,7 +149,7 @@ function comicpress_load_options() {
|
|||
'custom_image_header_width' => '980',
|
||||
'custom_image_header_height' => '120',
|
||||
|
||||
'enable_numbered_pagination' => false,
|
||||
'enable_numbered_pagination' => true,
|
||||
'disable_page_restraints' => false,
|
||||
|
||||
'enable_related_comics' => false,
|
||||
|
@ -171,7 +197,17 @@ function comicpress_load_options() {
|
|||
'buy_print_int_amount' => '29.95',
|
||||
'buy_print_add_shipping' => false,
|
||||
'buy_print_us_ship' => '4.95',
|
||||
'buy_print_int_ship' => '9.95'
|
||||
'buy_print_int_ship' => '9.95',
|
||||
|
||||
'enable_comicpress_debug' => true,
|
||||
'enable_full_post_check' => false,
|
||||
|
||||
'enable_blogroll_off_links' => false,
|
||||
|
||||
'enable_comment_count_in_rss' => false,
|
||||
'enable_scroll_to_top' => false,
|
||||
'enable_page_load_info' => false
|
||||
|
||||
) as $field => $value) {
|
||||
$comicpress_options[$field] = $value;
|
||||
}
|
||||
|
@ -179,34 +215,70 @@ function comicpress_load_options() {
|
|||
add_option('comicpress_options', $comicpress_options, '', 'yes');
|
||||
// update_option('comicpress_options', $comicpress_options);
|
||||
}
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.4';
|
||||
|
||||
if (!isset($comicpress_options['comicpress_config'])) {
|
||||
foreach (array(
|
||||
'comiccat' => '3',
|
||||
'blogcat' => '1',
|
||||
'comic_folder' => 'comics',
|
||||
'rss_comic_folder' => 'comics-rss',
|
||||
'archive_comic_folder' => 'comics-archive',
|
||||
'mini_comic_folder' => 'comics-mini',
|
||||
'rss_comic_width' => '320',
|
||||
'archive_comic_width' => '480',
|
||||
'mini_comic_width' => '80'
|
||||
) as $field => $value) {
|
||||
$comicpress_options['comicpress_config'][$field] = $value;
|
||||
}
|
||||
}
|
||||
update_option('comicpress_options', $comicpress_options);
|
||||
extract($comicpress_options['comicpress_config']);
|
||||
return $comicpress_options;
|
||||
}
|
||||
|
||||
function is_cp_theme_layout($choices) {
|
||||
global $comicpress_options;
|
||||
$comicpress_options = comicpress_load_options();
|
||||
$choices = explode(",", $choices);
|
||||
foreach ($choices as $choice) {
|
||||
|
||||
if ($choice == $comicpress_options['cp_theme_layout']) {
|
||||
if ($comicpress_options['cp_theme_layout'] == $choice) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_cp_layout_avail($layout, $avail_layouts) {
|
||||
if (empty($layout)) return false;
|
||||
if (empty($avail_layouts)) $avail_layouts = 'standard,v,3c,3c2r,v3c,v3cr,gn,rgn';
|
||||
$avail_layouts = explode(",",$avail_layouts);
|
||||
foreach ($avail_layouts as $able_layout) {
|
||||
if ($layout == $able_layout) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove of wordpress auto-texturizer.
|
||||
* Dependant on the need remove the commented out areas of this code.
|
||||
* Ex. Russian Language users will need to uncomment all of these to handle the character set dependant on
|
||||
* if they utilize the language translation pack.
|
||||
**/
|
||||
if ($comicpress_options['remove_wptexturize']) {
|
||||
// Remove the wptexturizer from changing the quotes and squotes.
|
||||
remove_filter('the_content', 'wptexturize');
|
||||
// remove_filter('the_content', 'wpautop');
|
||||
// remove_filter('the_title', 'wptexturize');
|
||||
// remove_filter('the_excerpt', 'wptexturize');
|
||||
// remove_filter('comment_text', 'wptexturize');
|
||||
}
|
||||
|
||||
// WIDGETS WP 2.8 compatible ONLY, no backwards compatibility here.
|
||||
$dirs_to_search = array_unique(array(get_template_directory(), get_stylesheet_directory()));
|
||||
$__comicpress_handlable_classes = array();
|
||||
foreach ($dirs_to_search as $dir) {
|
||||
foreach (array('widgets' => 'php', 'functions' => 'php', 'classes' => 'inc') as $folder => $extension) {
|
||||
foreach (glob($dir . "/${folder}/*.${extension}") as $__file) {
|
||||
foreach ($dirs_to_search as $__dir) {
|
||||
foreach (array('classes' => 'inc', 'widgets' => 'php', 'functions' => 'php') as $folder => $extension) {
|
||||
foreach (glob($__dir . "/${folder}/*.${extension}") as $__file) {
|
||||
require_once($__file);
|
||||
$__class_name = preg_replace('#\..*$#', '', basename($__file));
|
||||
if (class_exists($__class_name)) {
|
||||
|
@ -224,6 +296,7 @@ foreach ($dirs_to_search as $dir) {
|
|||
|
||||
// Dashboard Menu Comicpress Options and ComicPress CSS
|
||||
require_once(get_template_directory() . '/comicpress-options.php');
|
||||
require_once(get_template_directory() . '/comicpress-debug.php');
|
||||
|
||||
// If you want to run multiple comics on a single day, define your additional filters here.
|
||||
// Example: you want to run an additional comic with the filename 2008-01-01-a-my-new-years-comic.jpg.
|
||||
|
@ -360,7 +433,7 @@ function get_adjacent_comic($category, $previous = false) {
|
|||
* Find the terminal post in a specific category.
|
||||
*/
|
||||
function get_terminal_post_in_category($categoryID, $first = true) {
|
||||
global $post;
|
||||
global $post, $wp_query;
|
||||
|
||||
$temp = $wp_query; $wp_query = null;
|
||||
$sortOrder = $first ? "asc" : "desc";
|
||||
|
@ -654,9 +727,11 @@ function comicpress_list_storyline_categories($args = "") {
|
|||
* Display text when image (comic) is hovered
|
||||
* Text is taken from a custom field named "hovertext"
|
||||
*/
|
||||
function the_hovertext() {
|
||||
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
||||
echo (empty($hovertext)) ? get_the_title() : $hovertext;
|
||||
function the_hovertext($post_to_use = null) {
|
||||
global $post;
|
||||
$post_to_use = !is_null($override_post) ? $override_post : $post;
|
||||
$hovertext = get_post_meta( $post_to_use->ID, "hovertext", true );
|
||||
return (empty($hovertext)) ? get_the_title($post_to_use->ID) : $hovertext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -697,26 +772,6 @@ function the_transcript($displaymode = 'raw') {
|
|||
}
|
||||
}
|
||||
|
||||
//Insert the comic image into the RSS feed
|
||||
function comic_feed() {
|
||||
foreach (array("rss", "archive", "mini", "comic") as $type) {
|
||||
if (($requested_thumbnail_image = get_comic_url($type, $first_comic_in_category)) !== false) {
|
||||
$thumbnail_image = $requested_thumbnail_image; break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p><a href="<?php the_permalink() ?>"><img src="<?php echo $thumbnail_image; ?>" border="0" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a></p><?php
|
||||
}
|
||||
|
||||
function insert_comic_feed($content) {
|
||||
if (is_feed() && in_comic_category()) {
|
||||
return comic_feed() . $content;
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
add_filter('the_content','insert_comic_feed');
|
||||
|
||||
// Register Sidebar and Define Widgets
|
||||
|
||||
if ( function_exists('register_sidebar') ) {
|
||||
|
@ -737,10 +792,10 @@ if ( function_exists('register_sidebar') ) {
|
|||
) as $label) {
|
||||
register_sidebar(array(
|
||||
'name'=> $label,
|
||||
'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h2 class="widgettitle">',
|
||||
'after_title' => '</h2>'
|
||||
'before_widget' => "<div class=\"widget-head\"></div>\r\n<div id=\"".'%1$s'."\" class=\"widget ".'%2$s'."\">\r\n",
|
||||
'after_widget' => "</div>\r\n<div class=\"widget-foot\"></div>\r\n",
|
||||
'before_title' => "<h2 class=\"widgettitle\">\r\n",
|
||||
'after_title' => "</h2>\r\n"
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -808,19 +863,6 @@ function comicpress_check_child_file($filename = '') {
|
|||
return false;
|
||||
}
|
||||
|
||||
function rss_count_comments(){
|
||||
global $wpdb,$post;
|
||||
$args = func_get_args();
|
||||
$comments = get_comments_number();
|
||||
echo $args[0];
|
||||
if ($comments == 0) $comment_text = " (No Comments)";
|
||||
if ($comments == 1) $comment_text = " (1 Comment)";
|
||||
if ($comments > 1) $comment_text = " (". $comments . " Comments)";
|
||||
if ($comments>0) echo $comment_text;
|
||||
}
|
||||
|
||||
add_action('the_title_rss','rss_count_comments');
|
||||
|
||||
function comicpress_gnav_display_css() {
|
||||
global $comicpress_options;
|
||||
if (file_exists(get_stylesheet_directory() . '/images/nav/' . $comicpress_options['graphicnav_directory'] . '/navstyle.css')) { ?>
|
||||
|
@ -832,25 +874,38 @@ function comicpress_gnav_display_css() {
|
|||
|
||||
if (comicpress_check_child_file('childfunctions') == false) {}
|
||||
|
||||
/**
|
||||
* Render the ComicPress calendar widget.
|
||||
*/
|
||||
function comicpress_calendar_embed() {
|
||||
$calendar = new CalendarWidget();
|
||||
if ( isset( $_GET['latestcomic'] ) )
|
||||
add_action( 'template_redirect', 'latest_comic_jump' );
|
||||
|
||||
$instance = array();
|
||||
foreach (array('before_widget', 'after_widget', 'thumbnail', 'link', 'small', 'medium', 'large') as $field) {
|
||||
$instance[$field] = '';
|
||||
}
|
||||
|
||||
$calendar->widget($instance, array());
|
||||
//to use simply create a URL link to "/?latestcomic"
|
||||
function latest_comic_jump() {
|
||||
wp_redirect( get_permalink( get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false) ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the ComicPress bookmark widget.
|
||||
*/
|
||||
function comicpress_comic_bookmark_embed() {
|
||||
$bookmark = new BookmarkWidget();
|
||||
$bookmark->init();
|
||||
$bookmark->widget(array(), array());
|
||||
//Generate a random comic page - to use simply create a URL link to "/?randomcomic"
|
||||
function random_comic() {
|
||||
$randomComicQuery = new WP_Query(); $randomComicQuery->query('showposts=1&orderby=rand&cat='.get_all_comic_categories_as_cat_string());
|
||||
while ($randomComicQuery->have_posts()) : $randomComicQuery->the_post();
|
||||
$random_comic_id = get_the_ID();
|
||||
endwhile;
|
||||
wp_redirect( get_permalink( $random_comic_id ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( isset( $_GET['randomcomic'] ) )
|
||||
add_action( 'template_redirect', 'random_comic' );
|
||||
|
||||
//Generate a random post page - to use simply create a URL link to "/?randompost"
|
||||
function random_post() {
|
||||
$randomComicQuery = new WP_Query(); $randomComicQuery->query('showposts=1&orderby=rand&cat=-'.exclude_comic_categories());
|
||||
while ($randomComicQuery->have_posts()) : $randomComicQuery->the_post();
|
||||
$random_comic_id = get_the_ID();
|
||||
endwhile;
|
||||
wp_redirect( get_permalink( $random_comic_id ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( isset( $_GET['randompost'] ) )
|
||||
add_action( 'template_redirect', 'random_post' );
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -1,17 +1,9 @@
|
|||
<?php
|
||||
/**
|
||||
* Body Classes
|
||||
* function function comicpress_body_class
|
||||
*
|
||||
* Author: Philip M. Hofer (Frumph)
|
||||
* Author URI: http://frumph.net/ http://frumph.net/
|
||||
* Version: 1.0.6
|
||||
*
|
||||
* This function adds the browser type as a class
|
||||
* in the <body> tag where you can then do .ie #page and do things specific
|
||||
* for each browser type as well as a few other classes that the normal body_class
|
||||
* does not yet support.
|
||||
*
|
||||
* Author URI: http://frumph.net/
|
||||
* Version: 1.0.7
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -35,10 +27,12 @@ function comicpress_body_class($classes = '') {
|
|||
}
|
||||
}
|
||||
|
||||
if (in_comic_category()) {
|
||||
$classes[] = 'comic';
|
||||
} else {
|
||||
$classes[] = 'noncomic';
|
||||
if (!is_page()) {
|
||||
if (in_comic_category()) {
|
||||
$classes[] = 'comic';
|
||||
} else {
|
||||
$classes[] = 'noncomic';
|
||||
}
|
||||
}
|
||||
|
||||
if($is_lynx) $classes[] = 'lynx';
|
||||
|
@ -91,37 +85,43 @@ function comicpress_body_class($classes = '') {
|
|||
return $classes;
|
||||
}
|
||||
|
||||
function comicpress_post_class($class = '') {
|
||||
add_filter('post_class','comicpress_post_class');
|
||||
|
||||
function comicpress_post_class($classes = '') {
|
||||
global $post;
|
||||
static $post_alt;
|
||||
|
||||
$is_comic = in_comic_category();
|
||||
|
||||
$args = array(
|
||||
'entry_tax' => array( 'category', 'post_tag' )
|
||||
);
|
||||
|
||||
/* Microformats. */
|
||||
$classes[] = 'uentry';
|
||||
|
||||
/* if a comic category */
|
||||
if ($is_comic) $classes[] = 'post-comic';
|
||||
if (is_page()) $classes[] = 'post-page';
|
||||
if (!$is_comic && !is_page()) $classes[] = 'post-blog';
|
||||
|
||||
|
||||
/* Post alt class. */
|
||||
$classes[] = 'postonpage-' . ++$post_alt;
|
||||
|
||||
|
||||
if ( $post_alt % 2 )
|
||||
$classes[] = 'odd';
|
||||
else
|
||||
$classes[] = 'even';
|
||||
|
||||
|
||||
/* Sticky class (only on home/blog page). */
|
||||
if( is_sticky() && is_home() )
|
||||
$classes[] = 'sticky';
|
||||
|
||||
|
||||
/* Author class. */
|
||||
if ( !is_attachment() )
|
||||
$classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) );
|
||||
|
||||
/* Password-protected posts. */
|
||||
if ( post_password_required() )
|
||||
$classes[] = 'protected';
|
||||
|
||||
|
||||
/* User-created classes. */
|
||||
if ( !empty( $class ) ) :
|
||||
if ( !is_array( $class ) )
|
||||
|
@ -129,10 +129,11 @@ function comicpress_post_class($class = '') {
|
|||
$classes = array_merge( $classes, $class );
|
||||
endif;
|
||||
|
||||
/* Join all the classes into one string and echo them. */
|
||||
$class = join( ' ', $classes );
|
||||
/* Password-protected posts. */
|
||||
if ( post_password_required() )
|
||||
$classes[] = 'protected';
|
||||
|
||||
echo apply_filters( 'comicpress_post_class', $class );
|
||||
return $classes;
|
||||
}
|
||||
|
||||
add_filter('comment_class','comicpress_comment_class');
|
||||
|
|
|
@ -36,34 +36,34 @@ if ($comicpress_options['enable_custom_image_header']) {
|
|||
|
||||
function theme_header_style() {
|
||||
?>
|
||||
<style type="text/css">
|
||||
#header
|
||||
{
|
||||
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
|
||||
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
|
||||
background: url(<?php header_image(); ?>) no-repeat center;
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
<style type="text/css">
|
||||
#header {
|
||||
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
|
||||
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
|
||||
background: url(<?php header_image(); ?>) center center no-repeat;
|
||||
}
|
||||
|
||||
<?php
|
||||
// Has the text been hidden?
|
||||
// If so, set display to equal none
|
||||
if ( 'blank' == get_header_textcolor() ) { ?>
|
||||
#header h1, #header .description {
|
||||
display: none;
|
||||
}
|
||||
<?php } else {
|
||||
// Otherwise, set the color to be the user selected one
|
||||
?>
|
||||
#header *
|
||||
{
|
||||
color: #<?php header_textcolor();?>;
|
||||
}
|
||||
}
|
||||
<?php } ?>
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
#header h1, #header .description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
<?php } else {
|
||||
// Otherwise, set the color to be the user selected one
|
||||
?>
|
||||
|
||||
#header * {
|
||||
color: #<?php header_textcolor();?>;
|
||||
}
|
||||
<?php } ?>
|
||||
</style>
|
||||
|
||||
<?php }
|
||||
|
||||
if ( function_exists('add_custom_image_header') ) {
|
||||
add_custom_image_header('theme_header_style', 'theme_admin_header_style');
|
||||
}
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Display post
|
||||
* Displays the post info
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
function display_blog_post() {
|
||||
global $post, $wp_query, $authordata, $comicpress_options; ?>
|
||||
<?php if (is_single()) { ?>
|
||||
<div class="blognav">
|
||||
<div class="nav-single">
|
||||
<?php previous_post_link('%link',__(' ‹ Previous ','comicpress'), TRUE); ?>
|
||||
<?php next_post_link('%link',__('| Next › ','comicpress'), TRUE); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="clear"></div>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-head"></div>
|
||||
<div class="post" id="post-<?php the_ID() ?>">
|
||||
<div class="post-info">
|
||||
<?php if ($comicpress_options['enable_post_author_gravatar']) { ?>
|
||||
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
|
||||
<?php } ?>
|
||||
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
|
||||
<?php if ($comicpress_options['enable_post_calendar']) { ?>
|
||||
<div class="post-date">
|
||||
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="post-text">
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-image">
|
||||
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_post_image('full'); ?></a>
|
||||
</div>
|
||||
<?php } else {?>
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php } ?>
|
||||
<div class="post-author"> <?php the_time('F jS, Y'); ?> <span class="pipe">|</span> by <?php the_author_posts_link(); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></div>
|
||||
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
|
||||
<div class="post-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div>
|
||||
<?php } ?>
|
||||
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="entry">
|
||||
<?php if (!is_single()) { global $more; $more = 0; } ?>
|
||||
<?php the_content(__('↓ Read the rest of this entry...','comicpress')); ?>
|
||||
<?php if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-extras">
|
||||
<?php if (!$comicpress_options['disable_tags_in_posts']) { ?>
|
||||
<div class="post-tags">
|
||||
<?php the_tags(__('└ Tags: ','comicpress'), ', ', '<br />'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ('open' == $post->comment_status) {
|
||||
if (comicpress_check_child_file('partials/commentlink') == false && !(is_single())) { ?>
|
||||
<div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty"> </span> '.__('Comments ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress')); ?></div>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<?php if ($comicpress_options['enable_related_posts']) echo related_posts_shortcode(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
|
@ -1,47 +1,128 @@
|
|||
<?php
|
||||
/**
|
||||
* Display Comic
|
||||
* Displays the comic.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
function display_comic() {
|
||||
global $post, $wp_query, $rascal_says, $comicpress_options, $comic_filename_filters;
|
||||
$next_comic = get_next_comic_permalink();
|
||||
$comic = explode(".", the_comic_filename());
|
||||
if ($comic[1] == 'swf') { ?>
|
||||
<?php
|
||||
$height = get_post_meta( get_the_ID(), "fheight", true );
|
||||
$width = get_post_meta( get_the_ID(), "fwidth", true );
|
||||
if (empty($height)) $height = '300';
|
||||
if (empty($width)) $width = '100%';
|
||||
?>
|
||||
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?php echo $width; ?>" height="<?php echo $height; ?>">
|
||||
<param name="movie" value="<?php echo get_comic_url(); ?>" />
|
||||
<!--[if !IE]>--><object type="application/x-shockwave-flash" data="<?php echo get_comic_url(); ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>"><!--<![endif]-->
|
||||
<div>
|
||||
<h1>Get Flash!</h1>
|
||||
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
|
||||
</div>
|
||||
<!--[if !IE]>--></object><!--<![endif]--></object>
|
||||
<?php } else {
|
||||
if ($comicpress_options['comic_clicks_next']) {
|
||||
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
||||
if ($comicpress_options['rascal_says'] && !empty($hovertext)) { ?>
|
||||
<a href="<?php echo $next_comic; ?>" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><?php the_hovertext() ?></span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo $next_comic; ?>"><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a>
|
||||
<?php } ?>
|
||||
<?php } else {
|
||||
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
||||
if ($comicpress_options['rascal_says'] && !empty($hovertext)) { ?>
|
||||
<a href="#" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><?php the_hovertext() ?></span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
|
||||
<?php } else { ?>
|
||||
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" class="instant itiltleft icolorFFFCE9 ishadow40 historical" />
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
function comicpress_display_comic_area() {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (comicpress_check_child_file('partials/displaycomic') == false) { ?>
|
||||
<div id="comic-wrap">
|
||||
<div id="comic-head"><?php get_sidebar('over'); ?></div>
|
||||
<div class="clear"></div>
|
||||
<?php get_sidebar('comicleft'); ?>
|
||||
<div id="comic"><?php comicpress_display_comic(); ?></div>
|
||||
<?php get_sidebar('comicright'); ?>
|
||||
<div class="clear"></div>
|
||||
<div id="comic-foot"><?php get_sidebar('under'); ?></div>
|
||||
</div>
|
||||
<?php }
|
||||
}
|
||||
|
||||
function comicpress_display_comic_image($searchorder = "comic", $use_post_image = false, $override_post = null, $title = null) {
|
||||
global $post;
|
||||
$post_to_use = !is_null($override_post) ? $override_post : $post;
|
||||
$title_to_use = !is_null($title) ? $title : the_hovertext($post_to_use);
|
||||
$comic = explode(".", the_comic_filename());
|
||||
if ($use_post_image || strtolower($comic[1]) == 'swf') {
|
||||
if (function_exists('has_post_thumbnail')) {
|
||||
if ( has_post_thumbnail($post_to_use->ID) ) {
|
||||
$comic_image = get_the_post_thumbnail($post_to_use->ID,'full');
|
||||
$comic_image = preg_replace('#title="([^*]*)"#', 'title="'.$title_to_use.'"', $comic_image);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isset($comic_image)) {
|
||||
$comic = explode(".", the_comic_filename());
|
||||
if (strtolower($comic[1]) == 'swf') {
|
||||
if (file_exists(get_stylesheet_directory().'/images/mediafile.png')) {
|
||||
$directory_to_use = get_stylesheet_directory_uri();
|
||||
} else {
|
||||
$directory_to_use = get_template_directory_uri();
|
||||
}
|
||||
$comic_image = "<img src=\"{$directory_to_use}/images/mediafile.png\" alt=\"{$title_to_use}\" />";
|
||||
}
|
||||
}
|
||||
if (!isset($comic_image)) {
|
||||
$searchorder = explode(',',$searchorder);
|
||||
$requested_archive_image = '';
|
||||
foreach ($searchorder as $type) {
|
||||
if (($requested_archive_image = get_comic_url($type, $post_to_use)) !== false) {
|
||||
$comic_image = "<img src=\"{$requested_archive_image}\" alt=\"".get_the_title($post_to_use)."\" title=\"{$title_to_use}\" class=\"instant itiltleft icolorFFFCE9 ishadow40 historical\" />";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$comic_image = preg_replace('/\<(.*?)(width="(.*?)")(.*?)(height="(.*?)")(.*?)\>/i', '<$1$4$7>', $comic_image);
|
||||
return apply_filters('comicpress_display_comic_image',$comic_image);
|
||||
}
|
||||
|
||||
function comicpress_display_comic_swf() {
|
||||
global $post;
|
||||
$height = get_post_meta( get_the_ID(), "fheight", true );
|
||||
$width = get_post_meta( get_the_ID(), "fwidth", true );
|
||||
if (empty($height)) $height = '300';
|
||||
if (empty($width)) $width = '100%';
|
||||
$output = "<object id=\"myId\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"{$width}\" height=\"{$height}\">\r\n";
|
||||
$output .= " <param name=\"movie\" value=\"".get_comic_url()."\" />\r\n";
|
||||
$output .= "<!--[if !IE]>--><object type=\"application/x-shockwave-flash\" data=\"".get_comic_url()."\" width=\"{$width}\" height=\"{$height}\"><!--<![endif]-->\r\n";
|
||||
$output .= " <div>\r\n";
|
||||
$output .= " <h1>Get Flash!</h1>\r\n";
|
||||
$output .= " <p><a href=\"http://www.adobe.com/go/getflashplayer\"><img src=\"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif\" alt=\"Get Adobe Flash player\" /></a></p>\r\n";
|
||||
$output .= " </div>\r\n";
|
||||
$output .= "<!--[if !IE]>--></object><!--<![endif]--></object>\r\n";
|
||||
return apply_filters('comicpress_display_comic_swf',$output);
|
||||
}
|
||||
|
||||
function comicpress_display_comic() {
|
||||
global $post;
|
||||
$comic = explode(".", the_comic_filename());
|
||||
switch (strtolower($comic[1])) {
|
||||
case 'swf':
|
||||
$output = comicpress_display_comic_swf();
|
||||
break;
|
||||
case 'png':
|
||||
case 'gif':
|
||||
case 'jpg':
|
||||
default:
|
||||
$output = comicpress_display_comic_image('comic', false, $post, the_hovertext());
|
||||
}
|
||||
echo apply_filters('comicpress_display_comic', $output);
|
||||
}
|
||||
|
||||
function comicpress_comic_clicks_next($output) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_search() || is_archive()) return $output;
|
||||
$next_comic = get_next_comic_permalink();
|
||||
$output = "<a href=\"{$next_comic}\">{$output}</a>\r\n";
|
||||
return $output;
|
||||
}
|
||||
|
||||
function comicpress_rascal_says($output) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_search() || is_archive()) return $output;
|
||||
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
||||
if (!empty($hovertext)) {
|
||||
$output = preg_replace('#title="([^*]*)"#', '', $output);
|
||||
$href_to_use = "#";
|
||||
|
||||
$output = "<span class=\"tooltip\"><span class=\"top\"> </span><span class=\"middle\">{$hovertext}</span><span class=\"bottom\"> </span></span>{$output}\r\n";
|
||||
}
|
||||
if ($comicpress_options['comic_clicks_next']) {
|
||||
$href_to_use = get_next_comic_permalink();
|
||||
$output = "<a href=\"{$href_to_use}\" class=\"tt\">{$output}</a>";
|
||||
} else {
|
||||
$output = "<a href=\"{$href_to_use}\">{$output}</a>";
|
||||
}
|
||||
return apply_filters('comicpress_rascal_says',$output);
|
||||
}
|
||||
|
||||
// global $comicpress_options, $post;
|
||||
|
||||
if ($comicpress_options['rascal_says']) {
|
||||
add_filter('comicpress_display_comic_image', 'comicpress_rascal_says');
|
||||
}
|
||||
|
||||
if ($comicpress_options['comic_clicks_next'] && !$comicpress_options['rascal_says']) {
|
||||
add_filter('comicpress_display_comic_image', 'comicpress_comic_clicks_next');
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -1,83 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Display comic post
|
||||
* Displays the post info for the comic
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
function display_comic_post() {
|
||||
global $post, $wp_query, $authordata, $comicpress_options;
|
||||
$first_comic = get_first_comic_permalink(); $last_comic = get_last_comic_permalink();
|
||||
if (!$comicpress_options['disable_default_comic_nav']) { ?>
|
||||
<div class="nav">
|
||||
<?php if ( get_permalink() != $first_comic ) { ?><div class="nav-first"><a href="<?php echo $first_comic ?>"><?php _e('‹‹ First','comicpress'); ?></a></div><?php } ?>
|
||||
<div class="nav-previous"><?php $temp_query = $wp_query->is_single; $wp_query->is_single = true; previous_comic_link('%link', __('‹ Previous','comicpress')); $wp_query->is_single = $temp_query;$temp_query = null; ?></div>
|
||||
<div class="nav-next"><?php next_comic_link('%link', __('Next ›','comicpress')) ?></div>
|
||||
<?php if ( get_permalink() != $last_comic ) { ?><div class="nav-last"><a href="<?php echo $last_comic ?>"><?php _e('Last ››','comicpress'); ?></a></div><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-comic-head"></div>
|
||||
<div class="post-comic" id="post-comic-<?php the_ID() ?>">
|
||||
<div class="post-comic-info">
|
||||
<?php if ($comicpress_options['enable_comic_post_author_gravatar']) { ?>
|
||||
<div class="post-comic-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
|
||||
<?php } ?>
|
||||
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
|
||||
<?php if ($comicpress_options['enable_comic_post_calendar']) { ?>
|
||||
<div class="post-comic-date">
|
||||
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="post-comic-text">
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-comic-image">
|
||||
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_post_image('full'); ?></a>
|
||||
</div>
|
||||
<?php } else {?>
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php } ?>
|
||||
<div class="post-comic-author"> <?php the_time('F jS, Y'); ?> <span class="pipe">|</span> by <?php the_author_posts_link(); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></div>
|
||||
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?>
|
||||
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' » </li><li>', multiple) ?></li></ul>
|
||||
<?php } else { ?>
|
||||
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
|
||||
<div class="post-comic-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="entry">
|
||||
<?php if (!is_single()) { global $more; $more = 0; } ?>
|
||||
<?php the_content(__('↓ Read the rest of this entry...','comicpress')); ?>
|
||||
<?php if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-comic-extras">
|
||||
<?php if (!$comicpress_options['disable_tags_in_posts']) { ?>
|
||||
<div class="post-comic-tags">
|
||||
<?php the_tags(__('└ Tags: ','comicpress'), ', ', '<br />'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ('open' == $post->comment_status && !$comicpress_options['static_blog'] && !(is_single())) {
|
||||
if (comicpress_check_child_file('partials/commentlink') == false) { ?>
|
||||
<div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty"> </span> '.__('Comments ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress')); ?></div>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<?php if ($comicpress_options['enable_related_comics']) echo related_comics_shortcode(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-comic-foot"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,195 @@
|
|||
<?php
|
||||
|
||||
function comicpress_display_post_title($is_comic = false) {
|
||||
global $post, $wp_query;
|
||||
if (is_page()) {
|
||||
$post_title = "<h2 class=\"page-title\">";
|
||||
} else {
|
||||
$post_title = "<h2 class=\"post-title\">";
|
||||
}
|
||||
if (is_home() || is_search() || is_archive() || $is_comic && !is_page()) $post_title .= "<a href=\"".get_permalink()."\">";
|
||||
$post_title .= get_the_title();
|
||||
if (is_home() || is_search() || is_archive() || $is_comic && !is_page()) $post_title .= "</a>";
|
||||
$post_title .= "</h2>\r\n";
|
||||
echo apply_filters('comicpress_display_post_title',$post_title);
|
||||
}
|
||||
|
||||
function comicpress_display_post_thumbnail($is_comic = false) {
|
||||
global $post;
|
||||
if (function_exists('has_post_thumbnail') && !$is_comic) {
|
||||
if ( has_post_thumbnail() ) {
|
||||
$post_thumbnail = "<div class=\"post-image\"><a href=\"".get_permalink()."\" rel=\"bookmark\" title=\"Permanent Link to ".get_the_title()."\">".get_the_post_thumbnail($post->ID,'full')."</a></div>\r\n";
|
||||
echo apply_filters('comicpress_display_post_thumbnail',$post_thumbnail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_author_gravatar($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_page()) return;
|
||||
if (((!$is_comic && $comicpress_options['enable_post_author_gravatar']) || ($is_comic && $comicpress_options['enable_comic_post_author_gravatar']))) {
|
||||
$author_get_gravatar = str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64));
|
||||
$author_gravatar = "<div class=\"post-author-gravatar\">".$author_get_gravatar."</div>\r\n";
|
||||
echo apply_filters('comicpress_display_author_gravatar', $author_gravatar);
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_post_calendar($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_page()) return;
|
||||
if ((!$is_comic && $comicpress_options['enable_post_calendar']) || ($is_comic && $comicpress_options['enable_comic_post_calendar'])) {
|
||||
$post_calendar = "<div class=\"post-calendar-date\"><div class=\"calendar-date\"><span>".get_the_time('M')."</span>".get_the_time('d')."</div></div>\r\n";
|
||||
echo apply_filters('comicpress_display_post_calendar',$post_calendar);
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_post_author() {
|
||||
global $post,$authordata;
|
||||
|
||||
$post_author = "<span class=\"post-date\">".get_the_time('F jS, Y')."</span> <span class=\"pipe\">|</span> <span class=\"post-author\"> ".__(' by ','comicpress')."<a href=\"".get_author_posts_url( $authordata->ID, $authordata->user_nicename )."\">".get_the_author()."</a></span>\r\n";
|
||||
echo apply_filters('comicpress_display_post_author',$post_author);
|
||||
}
|
||||
|
||||
function comicpress_display_post_category($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (!$comicpress_options['disable_categories_in_posts']) {
|
||||
if (get_option('comicpress-enable-storyline-support') == 1 && $is_comic) {
|
||||
$post_category = "<ul class=\"storyline-cats\"><li class=\"storyline-root\">". get_the_category_list(' » </li><li>', 'multiple')."</li></ul>\r\n";
|
||||
} else {
|
||||
$post_category = "<div class=\"post-cat\">". __('Posted In: ','comicpress') .get_the_category_list(',')."</div>\r\n";
|
||||
}
|
||||
echo apply_filters('comicpress_display_post_category',$post_category);
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_post_tags() {
|
||||
global $post, $comicpress_options;
|
||||
if (!$comicpress_options['disable_tags_in_posts']) {
|
||||
$post_tags = "<div class=\"post-tags\">".get_the_tag_list(__('└ Tags: ','comicpress'), ', ', '<br />')."</div>\r\n";
|
||||
echo apply_filters('comicpress_display_post_tags',$post_tags);
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_comment_link() {
|
||||
global $post, $wp_query;
|
||||
if ('open' == $post->comment_status && !is_singular()) {
|
||||
if (comicpress_check_child_file('partials/commentlink') == false) { ?>
|
||||
<div class="comment-link">
|
||||
<?php comments_popup_link('<span class="comment-balloon comment-balloon-empty"> </span> '.__('Comment ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress')); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_related_posts($is_comic = false) {
|
||||
global $post, $comicpress_options;
|
||||
if ($is_comic && $comicpress_options['enable_related_comics']) {
|
||||
echo ComicPressRelatedPosts::display_related_comics();
|
||||
}
|
||||
if (!$is_comic && $comicpress_options['enable_related_posts']) {
|
||||
echo ComicPressRelatedPosts::display_related_posts();
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_blog_navigation($is_comic = false) {
|
||||
global $post, $wp_query;
|
||||
if (is_single() && !$is_comic && !is_page() && !is_archive() && !is_search()) { ?>
|
||||
<div class="blognav">
|
||||
<div class="nav-single">
|
||||
<?php previous_post_link('%link',__(' ‹ Previous ','comicpress'), TRUE); ?>
|
||||
<?php next_post_link('%link',__('| Next › ','comicpress'), TRUE); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<?php }
|
||||
}
|
||||
|
||||
function comicpress_display_comic_navigation($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (!$comicpress_options['disable_default_comic_nav'] && $is_comic) {
|
||||
$first_comic = get_first_comic_permalink();
|
||||
$last_comic = get_last_comic_permalink();
|
||||
$wp_query->is_single = true;
|
||||
if (!is_search() && !is_archive() && !is_page()) { ?>
|
||||
<div class="nav">
|
||||
<?php if ( get_permalink() != $first_comic ) { ?><div class="nav-first"><a href="<?php echo $first_comic ?>"><?php _e('‹‹ First','comicpress'); ?></a></div><?php } ?>
|
||||
<div class="nav-previous"><?php $temp_query = $wp_query->is_single; $wp_query->is_single = true; previous_comic_link('%link', __('‹ Previous','comicpress')); $wp_query->is_single = $temp_query;$temp_query = null; ?></div>
|
||||
<div class="nav-next"><?php next_comic_link('%link', __('Next ›','comicpress')) ?></div>
|
||||
<?php if ( get_permalink() != $last_comic ) { ?><div class="nav-last"><a href="<?php echo $last_comic ?>"><?php _e('Last ››','comicpress'); ?></a></div><?php } ?>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function comicpress_display_the_content($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_archive() || is_search()) {
|
||||
if ($is_comic) { ?>
|
||||
<div class="comicarchiveframe">
|
||||
<a href="<?php the_permalink() ?>"><?php echo comicpress_display_comic_image("archive,rss,comic", true); ?></a>
|
||||
</div>
|
||||
<?php }
|
||||
if ($comicpress_options['excerpt_or_content_archive'] != 'excerpt') {
|
||||
the_content(__('↓ Read the rest of this entry...','comicpress'));
|
||||
} else {
|
||||
the_excerpt();
|
||||
}
|
||||
} else {
|
||||
if (!is_single()) { global $more; $more = 0; }
|
||||
the_content(__('↓ Read the rest of this entry...','comicpress'));
|
||||
if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function comicpress_display_post() {
|
||||
global $post, $wp_query;
|
||||
$is_comic = 0;
|
||||
if (in_comic_category()) $is_comic = 1; ?>
|
||||
<?php comicpress_display_blog_navigation($is_comic); ?>
|
||||
<?php comicpress_display_comic_navigation($is_comic); ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<?php comicpress_display_post_thumbnail($is_comic); ?>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="post-info">
|
||||
<?php comicpress_display_author_gravatar($is_comic); ?>
|
||||
<?php comicpress_display_post_calendar($is_comic); ?>
|
||||
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
|
||||
<div class="post-text">
|
||||
<?php
|
||||
comicpress_display_post_title($is_comic);
|
||||
if (!is_page()) {
|
||||
comicpress_display_post_author($is_comic);
|
||||
comicpress_display_post_category($is_comic);
|
||||
if (function_exists('the_ratings')) { the_ratings(); }
|
||||
if (!is_archive() && !is_search()) { ?>
|
||||
<small><?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></small>
|
||||
<?php }
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="entry">
|
||||
<?php comicpress_display_the_content($is_comic); ?>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<?php wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">'.__('Pages:','comicpress').'</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
|
||||
<div class="post-extras">
|
||||
<?php comicpress_display_post_tags(); ?>
|
||||
<?php comicpress_display_comment_link(); ?>
|
||||
<div class="clear"></div>
|
||||
<?php comicpress_display_related_posts($is_comic); ?>
|
||||
<?php if (is_page()) { edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>'); } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -1,26 +1,26 @@
|
|||
<?php
|
||||
|
||||
function comicpress_dual_columns() {
|
||||
global $comicpress_options, $blog_postcount; ?>
|
||||
global $comicpress_options; ?>
|
||||
<div id="dualcolumns">
|
||||
<div class="column_one">
|
||||
<div class="column_one_header"></div>
|
||||
<?php $blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_one'].'&paged='.$paged;
|
||||
<?php $blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_one'].'&paged='.$paged;
|
||||
$posts = query_posts($blog_query);
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
display_blog_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
} ?>
|
||||
<span class="viewpostsbyone">View all posts by: <?php the_author_posts_link(); ?><span><br />
|
||||
</div>
|
||||
<div class="column_two">
|
||||
<div class="column_two_header"></div>
|
||||
<?php $blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_two'];
|
||||
<?php $blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_two'];
|
||||
$posts = query_posts($blog_query);
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
display_blog_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
} ?>
|
||||
<span class="viewpostsbytwo">View all posts by: <?php the_author_posts_link(); ?></span><br />
|
||||
|
|
|
@ -9,115 +9,131 @@
|
|||
* example: [members]Only members can read this.[/members]
|
||||
*
|
||||
*
|
||||
* Still need to do, make it a way to flag someone a site_member TRUE
|
||||
*
|
||||
*/
|
||||
global $comicpress_options;
|
||||
|
||||
|
||||
add_shortcode( 'members', 'shortcode_for_comicpress_members_only' );
|
||||
add_shortcode( 'member', 'shortcode_for_comicpress_members_only' );
|
||||
add_action('show_user_profile', 'comicpress_profile_members_only');
|
||||
add_action('edit_user_profile', 'comicpress_profile_members_only');
|
||||
add_action('profile_update', 'comicpress_profile_members_only_save');
|
||||
|
||||
|
||||
add_filter('pre_get_posts','comicpress_members_filter');
|
||||
|
||||
function comicpress_members_filter($query) {
|
||||
global $comicpress_options, $current_user;
|
||||
$members_post_category = $comicpress_options['members_post_category'];
|
||||
if ($members_post_category != 'none' && !empty($members_post_category) && !$query->is_search && !$query->is_page && !$query->is_archive) {
|
||||
$oldset = $query->get('cat');
|
||||
$is_member = '';
|
||||
|
||||
if (!empty($oldset)) {
|
||||
$excludeset = $oldset.',-'.$members_post_category;
|
||||
} else {
|
||||
$excludeset = '-'.$members_post_category;
|
||||
if ($comicpress_options['enable_members_only']) {
|
||||
|
||||
add_shortcode( 'members', 'shortcode_for_comicpress_members_only' );
|
||||
add_shortcode( 'member', 'shortcode_for_comicpress_members_only' );
|
||||
add_action('show_user_profile', 'comicpress_profile_members_only');
|
||||
add_action('edit_user_profile', 'comicpress_profile_members_only');
|
||||
add_action('profile_update', 'comicpress_profile_members_only_save');
|
||||
|
||||
|
||||
if ($comicpress_options['members_post_category'])
|
||||
add_filter('pre_get_posts','comicpress_members_filter');
|
||||
|
||||
function comicpress_members_filter($query) {
|
||||
global $comicpress_options, $current_user;
|
||||
$members_post_category = $comicpress_options['members_post_category'];
|
||||
if ($members_post_category != 'none' && !empty($members_post_category) && !$query->is_search && !$query->is_page && !$query->is_archive) {
|
||||
$oldset = $query->get('cat');
|
||||
$is_member = '';
|
||||
|
||||
if (!empty($oldset)) {
|
||||
$excludeset = $oldset.',-'.$members_post_category;
|
||||
} else {
|
||||
$excludeset = '-'.$members_post_category;
|
||||
}
|
||||
|
||||
if ( !empty($current_user->ID) ) {
|
||||
$is_member = get_usermeta($current_user->ID,'comicpress-is-member');
|
||||
}
|
||||
if ($is_member != 'yes' || empty($is_member)) {
|
||||
$query->set('cat',$excludeset);
|
||||
}
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function shortcode_for_comicpress_members_only( $atts, $content = null ) {
|
||||
global $post, $userdata, $profileuser, $current_user, $errormsg;
|
||||
$returninfo = '<div class="non-member"><p>'.__('There is Members Only content here.<br />To view this content you need to be a member of this site.','comicpress').'</p></div>';
|
||||
if ( !empty($current_user->ID) ) {
|
||||
$is_member = get_usermeta($current_user->ID,'comicpress-is-member');
|
||||
if ($is_member == 'yes' || current_user_can('publish_posts')) {
|
||||
$content = str_replace('<p>', '', $content);
|
||||
$content = str_replace('</p>', '', $content);
|
||||
$returninfo = "<div class=\"members-only\">\r\n<p>$content</p>\r\n</div>\r\n";
|
||||
}
|
||||
}
|
||||
if ($is_member != 'yes' || empty($is_member)) {
|
||||
$query->set('cat',$excludeset);
|
||||
}
|
||||
return $returninfo;
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
function shortcode_for_comicpress_members_only( $atts, $content = null ) {
|
||||
global $post, $userdata, $profileuser, $current_user, $errormsg;
|
||||
$returninfo = '<div class="non-member">'.__('There is Members Only content here.<br />To view this content you need to be a member of this site.','comicpress').'</div>';
|
||||
if ( !empty($current_user->ID) ) {
|
||||
$is_member = get_usermeta($current_user->ID,'comicpress-is-member');
|
||||
if ($is_member == 'yes' || current_user_can('publish_posts')) {
|
||||
$returninfo = '<div class="members-only">'.$content.'</div>';
|
||||
}
|
||||
}
|
||||
return $returninfo;
|
||||
}
|
||||
|
||||
function comicpress_profile_members_only() {
|
||||
global $profileuser, $current_user, $errormsg;
|
||||
$comicpress_is_member = get_usermeta($profileuser->ID,'comicpress-is-member');
|
||||
if (empty($comicpress_is_member)) $comicpress_is_member = 'no';
|
||||
?>
|
||||
<h3><?php _e('Member of','comicpress'); ?> <?php bloginfo('name'); ?></h3>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th><label for="Memberflag"><?php _e('Member?','comicpress'); ?></label></th>
|
||||
|
||||
function comicpress_profile_members_only() {
|
||||
global $profileuser, $current_user, $errormsg;
|
||||
$comicpress_is_member = get_usermeta($profileuser->ID,'comicpress-is-member');
|
||||
if (empty($comicpress_is_member)) $comicpress_is_member = 'no';
|
||||
?>
|
||||
<h3><?php _e('Member of','comicpress'); ?> <?php bloginfo('name'); ?></h3>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th><label for="Memberflag"><?php _e('Member?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<?php
|
||||
if (current_user_can('manage_options')) { ?>
|
||||
<label><input name="comicpress-is-member" id="comicpress-is-member-yes" type="radio" value="yes"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label>
|
||||
|
||||
<label><input name="comicpress-is-member" id="comicpress-is-member-no" type="radio" value="no"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') != "yes" ) { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
|
||||
|
||||
<?php } else {
|
||||
if ($comicpress_is_member == 'yes') {
|
||||
echo 'Yes';
|
||||
} else {
|
||||
echo 'No';
|
||||
}
|
||||
if (current_user_can('manage_options')) { ?>
|
||||
<label><input name="comicpress-is-member" id="comicpress-is-member-yes" type="radio" value="yes"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label>
|
||||
|
||||
<label><input name="comicpress-is-member" id="comicpress-is-member-no" type="radio" value="no"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') != "yes" ) { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
|
||||
|
||||
<?php } else {
|
||||
if ($comicpress_is_member == 'yes') {
|
||||
echo 'Yes';
|
||||
} else {
|
||||
echo 'No';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php }
|
||||
|
||||
|
||||
function comicpress_profile_members_only_save() {
|
||||
$id = $_POST['user_id'];
|
||||
$comicpress_is_member = $_POST['comicpress-is-member'];
|
||||
</tr>
|
||||
</table>
|
||||
<?php }
|
||||
|
||||
if (!empty($comicpress_is_member)) {
|
||||
update_usermeta($id, 'comicpress-is-member', $comicpress_is_member);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the current post is in the members category.
|
||||
*/
|
||||
function in_members_category() {
|
||||
global $post, $category_tree, $comicpress_options;
|
||||
$members_post_category = $comicpress_options['members_post_category'];
|
||||
$members_post_category_array = array();
|
||||
$members_post_category_array = explode($members_post_category);
|
||||
|
||||
return (count(array_intersect($members_post_category, wp_get_post_categories($post->ID))) > 0);
|
||||
}
|
||||
|
||||
function comicpress_is_member() {
|
||||
global $user_ID;
|
||||
if (!empty($user_ID)) {
|
||||
$is_member = get_usermeta($user_ID,'comicpress-is-member');
|
||||
if ($is_member == 'yes' || current_user_can('publish_posts')) {
|
||||
return true;
|
||||
|
||||
function comicpress_profile_members_only_save() {
|
||||
$id = $_POST['user_id'];
|
||||
$comicpress_is_member = $_POST['comicpress-is-member'];
|
||||
|
||||
if (!empty($comicpress_is_member)) {
|
||||
update_usermeta($id, 'comicpress-is-member', $comicpress_is_member);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
/**
|
||||
* Return true if the current post is in the members category.
|
||||
*/
|
||||
function in_members_category() {
|
||||
global $post, $category_tree, $comicpress_options;
|
||||
$members_post_category = $comicpress_options['members_post_category'];
|
||||
$members_post_category_array = array();
|
||||
$members_post_category_array = explode($members_post_category);
|
||||
|
||||
return (count(array_intersect($members_post_category, wp_get_post_categories($post->ID))) > 0);
|
||||
}
|
||||
|
||||
function comicpress_is_member() {
|
||||
global $user_ID;
|
||||
if (!empty($user_ID)) {
|
||||
$is_member = get_usermeta($user_ID,'comicpress-is-member');
|
||||
if ($is_member == 'yes' || current_user_can('publish_posts')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function comicpress_members_comment_filter($content) {
|
||||
global $comicpress_options;
|
||||
if (comicpress_is_member() || !$comicpress_options['enable_members_only_post_comments']) {
|
||||
return $content;
|
||||
}
|
||||
return '<div class="non-member"><p>'.__('There is Members Only content here.<br />To view this content you need to be a member of this site.','comicpress').'</p></div>';
|
||||
|
||||
}
|
||||
|
||||
add_filter('comment_text', 'comicpress_members_comment_filter', $content);
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -21,7 +21,7 @@ function comicpress_show_mood_in_post() {
|
|||
if (!empty($moods_directory) && $moods_directory != 'none') {
|
||||
$mood_file = get_post_meta( get_the_ID(), "mood", true );
|
||||
if (!empty($mood_file) && $mood_file != '') {
|
||||
$mood = explode(".", $mood);
|
||||
$mood = explode(".", $mood_file);
|
||||
$mood = reset($mood);
|
||||
if ( !empty($mood_file) && file_exists(get_stylesheet_directory() . '/images/moods/'.$moods_directory.'/'.$mood_file) ) { ?>
|
||||
<div class="post-mood post-<?php echo $mood; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo $mood_file; ?>" alt="<?php echo $mood; ?>" title="<?php echo $mood; ?>" /></div>
|
||||
|
@ -75,7 +75,7 @@ function comicpress_showmood_edit_post() {
|
|||
$newmood = $newmood[0]; ?>
|
||||
<div style="float:left; margin-top: 10px; text-align: center; width: 68px; overflow: hidden;">
|
||||
<label for="postmood-<?php echo $newmood; ?>" style="cursor:pointer;">
|
||||
<img src="<?php echo $moods_uri; ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo basename($file); ?>"><br />
|
||||
<img src="<?php echo $moods_uri; ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo basename($file); ?>" /><br />
|
||||
<?php echo $newmood; ?>
|
||||
</label>
|
||||
<br />
|
||||
|
|
|
@ -12,7 +12,7 @@ function display_comics_multi() {
|
|||
if (($result = get_comic_path('comic', '', '', 1)) !== false) {
|
||||
foreach ($result as $pathto_comic) { ?>
|
||||
<div class="comicdisp">
|
||||
<img src="<?php echo get_option('home'). '/' .$pathto_comic; ?>" alt="<?php the_title(); ?>" title="<?php the_hovertext(); ?>" />
|
||||
<img src="<?php echo get_option('home'). '/' .$pathto_comic; ?>" alt="<?php the_title(); ?>" title="<?php echo the_hovertext(); ?>" />
|
||||
</div>
|
||||
<?php }
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<?php
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Protect global $post and $wp_query.
|
||||
* @param object $use_this_post If provided, after saving the current post, set up this post for template tag use.
|
||||
*/
|
||||
function Protect($use_this_post = null) {
|
||||
global $post, $wp_query, $__post, $__wp_query;
|
||||
|
||||
$__post = $post;
|
||||
$__wp_query = $wp_query;
|
||||
|
||||
if (!is_null($use_this_post)) {
|
||||
$post = $use_this_post;
|
||||
setup_postdata($post);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporarily restore the global $post variable and set it up for use.
|
||||
*/
|
||||
function Restore() {
|
||||
global $post, $__post;
|
||||
|
||||
$post = $__post;
|
||||
setup_postdata($post);
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore global $post and $wp_query.
|
||||
*/
|
||||
function Unprotect() {
|
||||
global $post, $wp_query, $__post, $__wp_query;
|
||||
|
||||
$post = $__post;
|
||||
$wp_query = $__wp_query;
|
||||
|
||||
$__post = $__wp_query = null;
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,3 +0,0 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -1,72 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Related comics
|
||||
* Displays a list of comic links that are related to this current one using shortcode.
|
||||
*
|
||||
* Usage: [related_comics]
|
||||
*
|
||||
*/
|
||||
|
||||
function related_comics_shortcode( $atts = '' ) {
|
||||
extract(shortcode_atts(array(
|
||||
'limit' => '5',
|
||||
), $atts));
|
||||
|
||||
global $wpdb, $post, $table_prefix, $category_tree;
|
||||
|
||||
if ($post->ID) {
|
||||
// Get tags
|
||||
$tags = wp_get_post_tags($post->ID);
|
||||
$tagsarray = array();
|
||||
foreach ($tags as $tag) {
|
||||
$tagsarray[] = $tag->term_id;
|
||||
}
|
||||
$tagslist = implode(',', $tagsarray);
|
||||
if (empty($tagslist)) return;
|
||||
if (empty($limit)) $limit = 5;
|
||||
// Do the query
|
||||
$q = "SELECT p.*, count(tr.object_id) as count
|
||||
FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID
|
||||
AND p.post_status = 'publish'
|
||||
AND p.post_date_gmt < NOW()
|
||||
GROUP BY tr.object_id
|
||||
ORDER BY count DESC, p.post_date_gmt DESC
|
||||
LIMIT $limit;";
|
||||
|
||||
$related = $wpdb->get_results($q);
|
||||
if ( $related ) {
|
||||
$retval = '
|
||||
<div class="related_posts">
|
||||
'.__('Related Comics ¬','comicpress');
|
||||
$retval .= '
|
||||
<ul><li>';
|
||||
$comic_categories = array();
|
||||
foreach ($category_tree as $node) {
|
||||
$comic_categories[] = end(explode("/", $node));
|
||||
}
|
||||
$in_comic_cat = 0;
|
||||
$retval .= '
|
||||
<table class="month-table">';
|
||||
foreach($related as $r) :
|
||||
if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) > 0)
|
||||
$retval .= '
|
||||
<tr><td class="archive-date" align="right">'.date('M j, Y',strtotime($r->post_date)).'</td><td class="archive-title"><a title="'.wptexturize($r->post_title).'" href="'.get_permalink($r->ID).'">'.wptexturize($r->post_title).'</a></td></tr>';
|
||||
endforeach;
|
||||
$retval .= '
|
||||
</table>';
|
||||
} else {
|
||||
$retval .= '
|
||||
<li>'.__('No related comics found','comicpress').'</li>';
|
||||
}
|
||||
$retval .= '
|
||||
</li></ul>';
|
||||
$retval .= '
|
||||
</div>';
|
||||
return $retval;
|
||||
}
|
||||
return;
|
||||
}
|
||||
add_shortcode('related_comics', 'related_comics_shortcode');
|
||||
|
||||
|
||||
?>
|
|
@ -1,74 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Related posts
|
||||
* Displays a list of blog links that are related to this current one using shortcode.
|
||||
*
|
||||
* Usage: [related_posts]
|
||||
*
|
||||
*/
|
||||
|
||||
function related_posts_shortcode( $atts = '' ) {
|
||||
extract(shortcode_atts(array(
|
||||
'limit' => '5',
|
||||
), $atts));
|
||||
|
||||
global $wpdb, $post, $table_prefix, $category_tree;
|
||||
|
||||
if ($post->ID) {
|
||||
// Get tags
|
||||
$tags = wp_get_post_tags($post->ID);
|
||||
$tagsarray = array();
|
||||
foreach ($tags as $tag) {
|
||||
$tagsarray[] = $tag->term_id;
|
||||
}
|
||||
$tagslist = implode(',', $tagsarray);
|
||||
if (empty($tagslist)) return;
|
||||
if (empty($limit)) $limit = 5;
|
||||
// Do the query
|
||||
$q = "SELECT p.*, count(tr.object_id) as count
|
||||
FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID
|
||||
AND p.post_status = 'publish'
|
||||
AND p.post_date_gmt < NOW()
|
||||
GROUP BY tr.object_id
|
||||
ORDER BY count DESC, p.post_date_gmt DESC
|
||||
LIMIT $limit;";
|
||||
|
||||
$related = $wpdb->get_results($q);
|
||||
|
||||
if ( $related ) {
|
||||
$retval = '
|
||||
<div class="related_posts">
|
||||
'.__('Related Posts ¬','comicpress');
|
||||
$retval .= '
|
||||
<ul><li>';
|
||||
$comic_categories = array();
|
||||
foreach ($category_tree as $node) {
|
||||
$comic_categories[] = end(explode("/", $node));
|
||||
}
|
||||
$in_comic_cat = 0;
|
||||
$counter = 0;
|
||||
$retval .= '
|
||||
<table class="month-table">';
|
||||
foreach($related as $r) :
|
||||
if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) == 0)
|
||||
$retval .= '
|
||||
<tr><td class="archive-date" align="right">'.date('M j, Y',strtotime($r->post_date)).'</td><td class="archive-title"><a title="'.wptexturize($r->post_title).'" href="'.get_permalink($r->ID).'">'.wptexturize($r->post_title).'</a></td></tr>';
|
||||
endforeach;
|
||||
$retval .= '
|
||||
</table>';
|
||||
} else {
|
||||
$retval .= '
|
||||
<li>'.__('No related posts found','comicpress').'</li>';
|
||||
}
|
||||
$retval .= '
|
||||
</li></ul>';
|
||||
$retval .= '
|
||||
</div>';
|
||||
return $retval;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
add_shortcode('related_posts', 'related_posts_shortcode');
|
||||
|
||||
?>
|
|
@ -16,8 +16,8 @@ Author URI: http://szub.net
|
|||
*/
|
||||
|
||||
function szub_search_custom_join($join) {
|
||||
global $wpdb;
|
||||
if( is_search() && szub_is_search_key() ) {
|
||||
global $wpdb, $wp_query;
|
||||
if( /* is_search() && */ szub_is_search_key() ) {
|
||||
$join = " LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id ";
|
||||
}
|
||||
return $join;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
add_shortcode( 'version', 'comicpress_ver_shortcode' );
|
||||
|
||||
function comicpress_ver_shortcode( $atts, $content = null ) {
|
||||
global $comicpress_options;
|
||||
return '<div class="comicpress_ver">'.$comicpress_options['comicpress_version'].'</div>';
|
||||
}
|
||||
|
||||
?>
|
|
@ -10,8 +10,8 @@ function cp_add_to_feed_count_rss() {
|
|||
$feedcount = get_option('comicpress_feed_count_rss');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_rss', $feedcount);
|
||||
} else {
|
||||
update_option('comicpress_feed_count_rss', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_rss', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,8 @@ function cp_add_to_feed_count_rdf() {
|
|||
$feedcount = get_option('comicpress_feed_count_rdf');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_rdf', $feedcount);
|
||||
} else {
|
||||
update_option('comicpress_feed_count_rdf', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_rdf', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
@ -36,8 +36,8 @@ function cp_add_to_feed_count_atom() {
|
|||
$feedcount = get_option('comicpress_feed_count_atom');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_atom', $feedcount);
|
||||
} else {
|
||||
update_option('comicpress_feed_count_atom', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_atom', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
@ -48,12 +48,67 @@ function cp_add_to_feed_count_rss2() {
|
|||
$feedcount = get_option('comicpress_feed_count_rss2');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_rss2', $feedcount);
|
||||
} else {
|
||||
update_option('comicpress_feed_count_rss2', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_rss2', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
||||
add_action('do_feed_rss2', 'cp_add_to_feed_count_rss2',5);
|
||||
*/
|
||||
?>
|
||||
|
||||
/**
|
||||
* Add the number of post comments to the title of the RSS feed items.
|
||||
* TODO Make this togglable via options.
|
||||
* @param string $title The title of the post.
|
||||
* @return string The filtered title of the post.
|
||||
*/
|
||||
function comicpress_the_title_rss($title = '') {
|
||||
switch ($count = get_comments_number()) {
|
||||
case 0:
|
||||
$title_pattern = __('%s (No Comments)', 'comicpress');
|
||||
break;
|
||||
case 1:
|
||||
$title_pattern = __('%s (1 Comment)', 'comicpress');
|
||||
break;
|
||||
default:
|
||||
$title_pattern = sprintf(__('%%s (%d Comments)', 'comicpress'), $count);
|
||||
break;
|
||||
}
|
||||
|
||||
return sprintf($title_pattern, $title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle making changes to ComicPress before the export process starts.
|
||||
*/
|
||||
function comicpress_export_wp() {
|
||||
remove_filter('the_title_rss', 'comicpress_the_title_rss');
|
||||
}
|
||||
|
||||
global $comicpress_options;
|
||||
if ($comicpress_options['enable_comment_count_in_rss']) {
|
||||
add_filter('the_title_rss', 'comicpress_the_title_rss');
|
||||
add_action('export_wp', 'comicpress_export_wp');
|
||||
}
|
||||
|
||||
//Insert the comic image into the RSS feed
|
||||
function comicpress_comic_feed() {
|
||||
global $post, $comicpress_options; ?>
|
||||
<p><a href="<?php the_permalink() ?>"><?php echo comicpress_display_comic_image('rss,comic',$comicpress_options['enable_post_thumbnail_rss']); ?></a></p><?php
|
||||
}
|
||||
|
||||
// removed the in_comic_category so that if it has a post-image it will add it to the rss feed (else rss comic thumb)
|
||||
function comicpress_insert_comic_feed($content) {
|
||||
global $post, $wp_query;
|
||||
if (is_feed()) {
|
||||
return comicpress_comic_feed() . $content;
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
add_filter('the_content','comicpress_insert_comic_feed');
|
||||
add_filter('the_excerpt','comicpress_insert_comic_feed');
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Render the ComicPress calendar widget.
|
||||
*/
|
||||
function comicpress_calendar_embed() {
|
||||
$calendar = new CalendarWidget();
|
||||
|
||||
$instance = array();
|
||||
foreach (array('before_widget', 'after_widget', 'thumbnail', 'link', 'small', 'medium', 'large') as $field) {
|
||||
$instance[$field] = '';
|
||||
}
|
||||
|
||||
$calendar->widget($instance, array());
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the ComicPress bookmark widget.
|
||||
*/
|
||||
function comicpress_comic_bookmark_embed() {
|
||||
$bookmark = new BookmarkWidget();
|
||||
$bookmark->init();
|
||||
$bookmark->widget(array(), array());
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the monthly archive dropdown widget
|
||||
*/
|
||||
function comicpress_archive_dropdown() {
|
||||
$archive = new ComicPressArchiveDropdownWidget();
|
||||
$archive->widget(array(), array('mode' => 'monthly_archive'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the comic archive dropdown widget
|
||||
*/
|
||||
function comicpress_archive_dropdown_comics() {
|
||||
$archive = new ComicPressArchiveDropdownWidget();
|
||||
$archive->widget(array(), array('mode' => 'comic_archive'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the storyline order dropdown widget
|
||||
*/
|
||||
function comicpress_archive_dropdown_storyline() {
|
||||
$archive = new ComicPressArchiveDropdownWidget();
|
||||
$archive->widget(array(), array('mode' => 'storyline_order'));
|
||||
}
|
|
@ -92,9 +92,15 @@ if ($comicpress_options['enable_numbered_pagination']) {
|
|||
echo '<li class="paginav-extend">'.$pagenavi_options['dotleft_text'].'</li>';
|
||||
}
|
||||
}
|
||||
echo '<li class="paginav-previous">';
|
||||
previous_posts_link($pagenavi_options['prev_text']);
|
||||
echo '</li>';
|
||||
$prev_post_link = get_previous_posts_link( $pagenavi_options['prev_text'] );
|
||||
|
||||
if (!empty($prev_post_link)) {
|
||||
echo "<li class=\"paginav-previous\">\r\n";
|
||||
echo $prev_post_link . "\r\n";
|
||||
echo "</li>\r\n";
|
||||
}
|
||||
|
||||
|
||||
for($i = $start_page; $i <= $end_page; $i++) {
|
||||
if($i == $paged) {
|
||||
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
|
||||
|
@ -104,9 +110,12 @@ if ($comicpress_options['enable_numbered_pagination']) {
|
|||
echo '<li><a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'">'.$page_text.'</a></li>';
|
||||
}
|
||||
}
|
||||
echo '<li class="paginav-next">';
|
||||
next_posts_link($pagenavi_options['next_text'], $max_page);
|
||||
echo '</li>';
|
||||
$next_post_link = get_next_posts_link($pagenavi_options['next_text'], $max_page);
|
||||
if (!empty($next_post_link)) {
|
||||
echo "<li class=\"paginav-next\">\r\n";
|
||||
echo $next_post_link ."\r\n";
|
||||
echo "</li>\r\n";
|
||||
}
|
||||
if ($end_page < $max_page) {
|
||||
if(!empty($pagenavi_options['dotright_text'])) {
|
||||
echo '<li class="paginav-extend">'.$pagenavi_options['dotright_text'].'</li>';
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/* ComicPress Custom CSS over-rides for [ gecko ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
a:focus { outline: 0; }
|
||||
|
||||
.comicarchiveframe {
|
||||
-moz-opacity: 0.99; /* mozilla, netscape */
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
-moz-opacity: 0.7; /* mozilla, netscape */
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
-moz-opacity: 0.5; /* mozilla, netscape, gecko */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
-moz-opacity: 0; /* mozilla, netscape */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
background: #a1c0d9; /* Firefox */
|
||||
}
|
37
header.php
|
@ -23,40 +23,37 @@
|
|||
<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') ?>" />
|
||||
<meta name="ComicPress" content="<?php echo $comicpress_options['comicpress_version']; ?>" />
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/ie6submenus.js"></script>
|
||||
<![endif]-->
|
||||
<?php wp_head(); ?>
|
||||
|
||||
<?php wp_head(); ?>
|
||||
|
||||
</head>
|
||||
|
||||
<body <?php if (function_exists('body_class')) { body_class(); } ?>>
|
||||
|
||||
<?php do_action('comicpress-header'); ?>
|
||||
<?php get_sidebar('above'); ?>
|
||||
|
||||
<div id="page-head"></div>
|
||||
|
||||
<?php if (!$comicpress_options['disable_page_restraints']) {
|
||||
<?php if (!$comicpress_options['disable_page_restraints']) {
|
||||
if (is_cp_theme_layout('standard,v')) { ?>
|
||||
<div id="page-wrap"><!-- Wraps outside the site width -->
|
||||
<div id="page"><!-- Defines entire site width - Ends in Footer -->
|
||||
<div id="page-wrap"><!-- Wraps outside the site width -->
|
||||
<div id="page"><!-- Defines entire site width - Ends in Footer -->
|
||||
<?php } else { ?>
|
||||
<div id="page-wide-wrap">
|
||||
<div id="page-wide">
|
||||
<div id="page-wide-wrap"><!-- Wraps outside the site width -->
|
||||
<div id="page-wide"><!-- Defines entire site width - Ends in Footer -->
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
<?php if (comicpress_check_child_file('partials/headerarea') == false) { ?>
|
||||
<div id="header">
|
||||
<?php if (function_exists('the_project_wonderful_ad')) { ?>
|
||||
<div class="headerpwad">
|
||||
<?php the_project_wonderful_ad('header'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<h1><a href="<?php bloginfo('wpurl'); ?>"><?php bloginfo('name') ?></a></h1>
|
||||
<div id="header">
|
||||
<?php if (function_exists('the_project_wonderful_ad')) {
|
||||
the_project_wonderful_ad('header');
|
||||
} ?>
|
||||
<h1><a href="<?php bloginfo('wpurl'); ?>"><?php bloginfo('name') ?></a></h1>
|
||||
<div class="description"><?php bloginfo('description') ?></div>
|
||||
<?php get_sidebar('header'); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php get_sidebar('header'); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php get_sidebar('menubar'); ?>
|
||||
|
|
13
ie_style.css
|
@ -1,13 +0,0 @@
|
|||
/* These overrides are for the IE browser, fixes and what not to make it work. */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
#menubar {
|
||||
zoom: 1; /* IE fix, allows for variable height menu */
|
||||
}
|
||||
|
||||
tt a:hover
|
||||
{
|
||||
z-index:1000; color: #aaaaff;
|
||||
background-color: Transparent;
|
||||
}
|
28
image.php
|
@ -2,16 +2,10 @@
|
|||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page" id="post-<?php the_ID() ?>">
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<?php comicpress_display_post_thumbnail(); ?>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content" id="post-<?php the_ID() ?>">
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
|
@ -52,21 +46,19 @@
|
|||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php the_content() ?>
|
||||
<?php if ('open' == $post->comment_status) {
|
||||
comments_template('', true);
|
||||
} ?>
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php endwhile; else: ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<p><?php _e('Sorry, no image matched your criteria.','comicpress'); ?></p>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
BIN
images/1.gif
Before Width: | Height: | Size: 329 B |
BIN
images/2.gif
Before Width: | Height: | Size: 321 B |
BIN
images/2a.gif
Before Width: | Height: | Size: 345 B |
BIN
images/3.gif
Before Width: | Height: | Size: 288 B |
BIN
images/3a.gif
Before Width: | Height: | Size: 300 B |
BIN
images/4.gif
Before Width: | Height: | Size: 270 B |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 8.3 KiB |
|
@ -0,0 +1,140 @@
|
|||
/* COMIC NAVIGATION
|
||||
Author: Tyler Martin
|
||||
Style: Silver
|
||||
*/
|
||||
#comic_navi_wrapper {
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.comic_navi_left {
|
||||
}
|
||||
|
||||
.comic_navi_center {
|
||||
}
|
||||
|
||||
.comic_navi_right {
|
||||
}
|
||||
|
||||
.comic_navi {
|
||||
|
||||
}
|
||||
|
||||
.navi-comictitle {
|
||||
text-align: center;
|
||||
padding-top: 26px;
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
.navi {
|
||||
width: 66px;
|
||||
padding: 66px 0 0 0;
|
||||
/* margin: 0 5px; */
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.navi:hover {
|
||||
background-position: -66px 0;
|
||||
}
|
||||
|
||||
.navi-first {
|
||||
background: url('first.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-prevchap, .navi-story_prev {
|
||||
background: url('prevchap.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-story_prev_in {
|
||||
background: url('prevchap.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-prev, .navi-previous {
|
||||
margin-right: 10px;
|
||||
background: url('prev.png') no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.navi-comments, .navi-archive, .navi-random, .navi-buyprint {
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.navi-buyprint {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: url('buyprint.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-buyprint:hover, button .navi-buyprint:hover {
|
||||
background: url('buyprint.png') no-repeat;
|
||||
background-position: -66px 0;
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.navi-buyprint-form {
|
||||
width: 76px;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navi-archive, .navi-archives {
|
||||
background: url('archive.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-random {
|
||||
background: url('random.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-comments {
|
||||
padding: 0;
|
||||
background: url('comments.png') no-repeat;
|
||||
}
|
||||
|
||||
a.navi-comments span {
|
||||
display: inline-block;
|
||||
width: 66px;
|
||||
height: 66px;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 66px;
|
||||
color: #c5c5c5;
|
||||
}
|
||||
|
||||
a.navi-comments span:hover {
|
||||
color: #860b04;
|
||||
}
|
||||
|
||||
.navi-next {
|
||||
margin-left: 10px;
|
||||
background: url('next.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-nextchap, .navi-story_next {
|
||||
background: url('nextchap.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-story_next_in {
|
||||
background: url('nextchap.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-last {
|
||||
background: url('last.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-void, .navi-void:hover {
|
||||
color: #999;
|
||||
background-position: -132px 0;
|
||||
}
|
||||
|
||||
.comic-left .navi-prev, .comic-right .navi-prev, .comic-left .navi-next, .comic-right .navi-next {
|
||||
/* margin: 0 5px; */
|
||||
}
|
||||
|
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 14 KiB |
|
@ -2,20 +2,21 @@
|
|||
Author: Tyler Martin
|
||||
Style: Default
|
||||
*/
|
||||
|
||||
#comic_navi_wrapper {
|
||||
width: 100%;
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.comic_navi_left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.comic_navi_center {
|
||||
}
|
||||
|
||||
.comic_navi_right {
|
||||
float: right;
|
||||
}
|
||||
|
@ -24,44 +25,21 @@ Style: Default
|
|||
padding: 2px;
|
||||
}
|
||||
|
||||
.comic_navi a {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.comic_navi a:hover {
|
||||
color: #b00;
|
||||
}
|
||||
|
||||
|
||||
.navi-comictitle {
|
||||
padding: 0px 6px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
.navi-comictitle a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navi-comictitle a:hover {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.navi {
|
||||
padding: 0 6px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navi a {
|
||||
display: block;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navi a:hover {
|
||||
color: #000;
|
||||
background: #f00;
|
||||
}
|
||||
|
||||
.navi-first {
|
||||
float: left;
|
||||
}
|
||||
|
@ -78,7 +56,6 @@ Style: Default
|
|||
float: left;
|
||||
}
|
||||
|
||||
|
||||
.navi-comments, .navi-archive, .navi-random, .navi-buyprint {
|
||||
display: inline-block;
|
||||
}
|
||||
|
@ -87,35 +64,22 @@ Style: Default
|
|||
height: 25px;
|
||||
width: 80px;
|
||||
line-height: 15px;
|
||||
color: #000;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navi-buyprint:hover, button .navi-buyprint:hover {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.navi-buyprint-form {
|
||||
}
|
||||
|
||||
.navi-archive, .navi-archives {
|
||||
}
|
||||
|
||||
.navi-random {
|
||||
}
|
||||
|
||||
.navi-comments {
|
||||
}
|
||||
|
||||
a.navi-comments span {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
a.navi-comments span:hover {
|
||||
}
|
||||
|
||||
.navi-comments-count {
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.navi-comments-count {
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.navi-next {
|
||||
float: left;
|
||||
|
@ -134,10 +98,5 @@ Style: Default
|
|||
}
|
||||
|
||||
.navi-void, .navi-void:hover {
|
||||
color: #555;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.comic-left .navi-prev, .comic-right .navi-prev, .comic-left .navi-next, .comic-right .navi-next {
|
||||
/* margin: 0 5px; */
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
93
index.php
|
@ -1,68 +1,26 @@
|
|||
<?php get_header(); ?>
|
||||
<div id="content-wrapper-head"></div>
|
||||
<div id="content-wrapper">
|
||||
|
||||
<?php if (is_cp_theme_layout('gn,v3c')) get_sidebar('left'); ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('gn,rgn')) { ?>
|
||||
<div id="pagewrap-right">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!(is_paged())) { ?>
|
||||
|
||||
<?php if (!$comicpress_options['disable_comic_frontpage']) { ?>
|
||||
<?php $wp_query ->in_the_loop = true; $comicFrontpage = new WP_Query(); $comicFrontpage->query('showposts=1&cat='.get_all_comic_categories_as_cat_string());
|
||||
while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post() ?>
|
||||
<?php if (comicpress_check_child_file('partials/displaycomic') == false) { ?>
|
||||
<div id="comic-wrap">
|
||||
<div id="comic-head"><?php get_sidebar('over'); ?></div>
|
||||
<div class="clear"></div>
|
||||
<?php get_sidebar('comicleft'); ?>
|
||||
<div id="comic"><?php display_comic(); ?></div>
|
||||
<?php get_sidebar('comicright'); ?>
|
||||
<div class="clear"></div>
|
||||
<div id="comic-foot"><?php get_sidebar('under'); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php } ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php if (!$comicpress_options['disable_comic_frontpage'] && !$comicpress_options['disable_comic_blog_frontpage'] && !is_paged() ) {
|
||||
if (is_archive()) echo "Thinks its an archive";
|
||||
Protect();
|
||||
$comic_query = 'showposts=1&cat="'.get_all_comic_categories_as_cat_string().'"';
|
||||
query_posts($comic_query);
|
||||
$wp_query->is_archive = false;
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
Restore();
|
||||
UnProtect();
|
||||
wp_reset_query();
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c,standard,3c2r')) { ?>
|
||||
<div id="subcontent-wrapper-head"></div>
|
||||
<div id="subcontent-wrapper">
|
||||
<?php } ?>
|
||||
|
||||
<?php get_sidebar('overblog'); ?>
|
||||
<?php if (is_cp_theme_layout('3c,rgn')) get_sidebar('left'); ?>
|
||||
|
||||
<?php if (!is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!$comicpress_options['disable_comic_frontpage'] && !$comicpress_options['disable_comic_blog_frontpage'] && !is_paged() ) { ?>
|
||||
<?php while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post();
|
||||
display_comic_post();
|
||||
$comicFrontPage->is_single = true;
|
||||
comments_template();
|
||||
endwhile; ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (function_exists('the_project_wonderful_ad')) { ?>
|
||||
<div class="blogpwad">
|
||||
<center>
|
||||
<?php the_project_wonderful_ad('blog'); ?>
|
||||
</center>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (function_exists('the_project_wonderful_ad')) {
|
||||
the_project_wonderful_ad('blog');
|
||||
} ?>
|
||||
|
||||
<?php get_sidebar('blog'); ?>
|
||||
|
||||
|
@ -70,10 +28,10 @@
|
|||
<div id="blogheader"><!-- This area can be used for a heading above your main page blog posts --></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!$comicpress_options[disable_blog_frontpage]) {
|
||||
global $blog_postcount;
|
||||
<?php if (!$comicpress_options['disable_blog_frontpage']) {
|
||||
Protect();
|
||||
if (!$comicpress_options['split_column_in_two']) {
|
||||
$blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
|
||||
$blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
|
||||
|
||||
$posts = query_posts($blog_query);
|
||||
if (have_posts()) { ?>
|
||||
|
@ -81,7 +39,7 @@
|
|||
<div class="blogindex">
|
||||
<?php while (have_posts()) : the_post();
|
||||
|
||||
display_blog_post();
|
||||
comicpress_display_post();
|
||||
|
||||
endwhile; ?>
|
||||
</div>
|
||||
|
@ -90,7 +48,10 @@
|
|||
comicpress_pagination();
|
||||
} else {
|
||||
comicpress_dual_columns();
|
||||
}
|
||||
}
|
||||
Restore();
|
||||
UnProtect();
|
||||
wp_reset_query();
|
||||
} ?>
|
||||
|
||||
<?php get_sidebar('underblog'); ?>
|
||||
|
|
141
js/bookmark.js
|
@ -1,72 +1,99 @@
|
|||
var button_images = {
|
||||
'clear-tag': {
|
||||
'off': '3a.gif', 'on': '3.gif'
|
||||
},
|
||||
'goto-tag': {
|
||||
'off': '2a.gif', 'on': '2.gif'
|
||||
}
|
||||
};
|
||||
|
||||
var BookmarkInfo = Class.create({
|
||||
'def': {
|
||||
'permalink': false
|
||||
},
|
||||
'initialize': function() {
|
||||
this.jar = new CookieJar({
|
||||
'expires': 60 * 60 * 24 * 31,
|
||||
'path': '/'
|
||||
});
|
||||
},
|
||||
'read': function() {
|
||||
var bookmark_info = this.jar.get('bookmark-info');
|
||||
'permalink': false
|
||||
},
|
||||
'initialize': function() {
|
||||
this.jar = new CookieJar({
|
||||
'expires': 60 * 60 * 24 * 31,
|
||||
'path': '/'
|
||||
});
|
||||
},
|
||||
'read': function() {
|
||||
var bookmark_info = this.jar.get('bookmark-info');
|
||||
|
||||
if ((typeof(bookmark_info) != 'object') || (bookmark_info == null)) {
|
||||
bookmark_info = this.def;
|
||||
}
|
||||
if ((typeof(bookmark_info) != 'object') || (bookmark_info == null)) {
|
||||
bookmark_info = this.def;
|
||||
}
|
||||
|
||||
return bookmark_info;
|
||||
},
|
||||
'write': function(bookmark_info) {
|
||||
this.jar.put('bookmark-info', bookmark_info);
|
||||
if (this.onWrite) { this.onWrite(bookmark_info); }
|
||||
}
|
||||
return bookmark_info;
|
||||
},
|
||||
'write': function(bookmark_info) {
|
||||
this.jar.put('bookmark-info', bookmark_info);
|
||||
if (this.onWrite) { this.onWrite(bookmark_info); }
|
||||
}
|
||||
});
|
||||
|
||||
Event.observe(window, 'load', function() {
|
||||
var bookmark_info = new BookmarkInfo();
|
||||
var info = bookmark_info.read();
|
||||
var ComicBookmark = {};
|
||||
ComicBookmark.setup = function(id, mode, url, elements) {
|
||||
var bookmark_info = new BookmarkInfo();
|
||||
var info = bookmark_info.read();
|
||||
|
||||
if ($('comic-bookmark-holder')) {
|
||||
var hrefs = {};
|
||||
$$('#comic-bookmark-holder a').each(function(a) {
|
||||
if ($(id)) {
|
||||
var hrefs = {};
|
||||
$$('#' + id + ' a').each(function(a) {
|
||||
var name = $w(a.className).shift();
|
||||
hrefs[name] = a;
|
||||
});
|
||||
|
||||
var set_goto_tag = function(i) {
|
||||
hrefs['goto-tag'].href = (i.permalink ? i.permalink : "#");
|
||||
[ 'goto-tag','clear-tag' ].each(function(which) {
|
||||
hrefs[which].select('img')[0].src = image_root + button_images[which][i.permalink ? "on" : "off"];
|
||||
});
|
||||
};
|
||||
switch (mode) {
|
||||
case 'three-button':
|
||||
var set_goto_tag = function(i) {
|
||||
hrefs['goto-tag'].href = (i.permalink ? i.permalink : "#");
|
||||
['goto-tag','clear-tag'].each(function(which) {
|
||||
hrefs[which].innerHTML = elements[which + '-' + (i.permalink ? "on" : "off")];
|
||||
});
|
||||
|
||||
bookmark_info.onWrite = function(i) { set_goto_tag(i); }
|
||||
set_goto_tag(info);
|
||||
$H(hrefs).each(function(info) {
|
||||
info.value[i.permalink ? 'addClassName' : 'removeClassName']('active');
|
||||
});
|
||||
};
|
||||
|
||||
Event.observe(hrefs['tag-page'], 'click', function(e) {
|
||||
Event.stop(e);
|
||||
info.permalink = permalink;
|
||||
bookmark_info.write(info);
|
||||
});
|
||||
hrefs['tag-page'].innerHTML = elements['tag-page'];
|
||||
|
||||
Event.observe(hrefs['clear-tag'], 'click', function(e) {
|
||||
Event.stop(e);
|
||||
info.permalink = false;
|
||||
bookmark_info.write(info);
|
||||
});
|
||||
bookmark_info.onWrite = function(i) { set_goto_tag(i); }
|
||||
set_goto_tag(info);
|
||||
|
||||
Event.observe(hrefs['goto-tag'], 'click', function(e) {
|
||||
if (hrefs['goto-tag'].href == "#") { Event.stop(e); }
|
||||
});
|
||||
}
|
||||
});
|
||||
hrefs['tag-page'].observe('click', function(e) {
|
||||
Event.stop(e);
|
||||
info.permalink = url;
|
||||
bookmark_info.write(info);
|
||||
});
|
||||
|
||||
hrefs['goto-tag'].observe('click', function(e) {
|
||||
if (hrefs['goto-tag'].href == "#") { Event.stop(e); }
|
||||
});
|
||||
|
||||
hrefs['clear-tag'].observe('click', function(e) {
|
||||
Event.stop(e);
|
||||
info.permalink = false;
|
||||
bookmark_info.write(info);
|
||||
});
|
||||
|
||||
break;
|
||||
case 'one-button':
|
||||
var set_goto_tag = function(i) {
|
||||
hrefs['bookmark-clicker'].href = (i.permalink ? i.permalink : "#");
|
||||
hrefs['bookmark-clicker'].innerHTML = elements['bookmark-clicker-' + (i.permalink ? "on" : "off")];
|
||||
hrefs['bookmark-clicker'][i.permalink ? 'addClassName' : 'removeClassName']('active');
|
||||
};
|
||||
bookmark_info.onWrite = function(i) { set_goto_tag(i); }
|
||||
set_goto_tag(info);
|
||||
|
||||
hrefs['bookmark-clicker'].observe('click', function(e) {
|
||||
var current_link = info.permalink;
|
||||
info.permalink = (hrefs['bookmark-clicker'].href.match(/#$/)) ? url : false;
|
||||
bookmark_info.write(info);
|
||||
|
||||
if (hrefs['bookmark-clicker'].href.match(/#$/) == null) {
|
||||
hrefs['bookmark-clicker'].href = url;
|
||||
Event.stop(e);
|
||||
} else {
|
||||
document.location.href = current_link;
|
||||
Event.stop(e);
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/* ================================================================
|
||||
This copyright notice must be untouched at all times.
|
||||
|
||||
The original version of this script and the associated (x)html
|
||||
is available at http://www.stunicholls.com/various/tabbed_pages.html
|
||||
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
|
||||
This script and the associated (x)html may be modified in any
|
||||
way to fit your requirements.
|
||||
=================================================================== */
|
||||
|
||||
|
||||
onload = function() {
|
||||
var e, i = 0;
|
||||
while (e = document.getElementById('cpadmin').getElementsByTagName ('DIV') [i++]) {
|
||||
if (e.className == 'on' || e.className == 'off') {
|
||||
e.onclick = function () {
|
||||
var getEls = document.getElementsByTagName('DIV');
|
||||
for (var z=0; z<getEls.length; z++) {
|
||||
getEls[z].className=getEls[z].className.replace('show', 'hide');
|
||||
getEls[z].className=getEls[z].className.replace('on', 'off');
|
||||
}
|
||||
this.className = 'on';
|
||||
var max = this.getAttribute('title');
|
||||
document.getElementById(max).className = "show";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +1,18 @@
|
|||
<?php if (comicpress_check_child_file('layout-foot') == false) { ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (is_cp_theme_layout('3c2r')) {
|
||||
<?php if (is_cp_theme_layout('v3cr')) { ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="subcontent-wrapper-foot"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c2r,v3cr')) {
|
||||
get_sidebar('left');
|
||||
} ?>
|
||||
|
||||
<?php
|
||||
if (is_cp_theme_layout('3c,v3c,gn,standard,v,3c2r')) {
|
||||
if (is_cp_theme_layout('3c,v3c,gn,standard,v,3c2r,v3cr')) {
|
||||
get_sidebar('right'); ?>
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<?php global $comicpress_options; ?>
|
||||
<?php if (comicpress_check_child_file('layout-head') == false) { ?>
|
||||
|
||||
<div id="content-wrapper-head"></div>
|
||||
|
@ -8,23 +9,57 @@
|
|||
<?php if (is_cp_theme_layout('gn,rgn')) { ?>
|
||||
<div id="pagewrap-right">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
|
||||
<?php if (is_cp_theme_layout('v3cr')) { ?>
|
||||
<div id="pagewrap-left">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c,standard,3c2r')) { ?>
|
||||
<div id="subcontent-wrapper-head"></div>
|
||||
<div id="subcontent-wrapper">
|
||||
<?php } ?>
|
||||
|
||||
<?php get_sidebar('overblog'); ?>
|
||||
<?php if (is_cp_theme_layout('3c,rgn')) get_sidebar('left'); ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v,v3c')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<?php get_sidebar('overblog'); ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if (is_home()) {
|
||||
if (!$comicpress_options['disable_comic_frontpage']) {
|
||||
Protect();
|
||||
$comic_query = 'showposts=1&cat='.get_all_comic_categories_as_cat_string();
|
||||
query_posts($comic_query);
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
$temp_single = $wp_query->is_single;
|
||||
$wp_query->is_single = true;
|
||||
comicpress_display_comic_area();
|
||||
$wp_query->is_single = $temp_single;
|
||||
$temp_single = null;
|
||||
endwhile;
|
||||
}
|
||||
Restore();
|
||||
UnProtect();
|
||||
wp_reset_query();
|
||||
}
|
||||
} else {
|
||||
if (is_single() && in_comic_category()) {
|
||||
comicpress_display_comic_area();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c,standard,3c2r')) { ?>
|
||||
<div id="subcontent-wrapper-head"></div>
|
||||
<div id="subcontent-wrapper">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c,rgn')) get_sidebar('left'); ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3cr')) { ?>
|
||||
<div id="subcontent-wrapper-head"></div>
|
||||
<div id="subcontent-wrapper">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
<?php get_sidebar('overblog'); ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
|
|
61
links.php
|
@ -6,43 +6,34 @@ Template Name: Links
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php
|
||||
$linkcatid = get_term_by('name','menubar','link_category');
|
||||
$linkcatid = $linkcatid->term_id;
|
||||
$bookmarks = wp_list_bookmarks('echo=0&categorize=1&exclude_category='.$linkcatid);
|
||||
$bookmarks = preg_replace('#<li ([^>]*)>#', '<li>', $bookmarks);
|
||||
$bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks);
|
||||
?>
|
||||
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
<div id="linkspage">
|
||||
<ul>
|
||||
<?php echo $bookmarks; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$linkcatid = get_term_by('name','menubar','link_category');
|
||||
$linkcatid = $linkcatid->term_id;
|
||||
$bookmarks = wp_list_bookmarks('echo=0&categorize=1&exclude_category='.$linkcatid);
|
||||
$bookmarks = preg_replace('#<li ([^>]*)>#', '<li>', $bookmarks);
|
||||
$bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks);
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div id="linkspage">
|
||||
<ul>
|
||||
<?php echo $bookmarks; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
/* ComicPress Custom CSS over-rides for [ lynx ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
|
@ -2,27 +2,35 @@
|
|||
/*
|
||||
Template Name: Members Only Blog
|
||||
*/
|
||||
?>
|
||||
<?php get_header(); global $members_post_category; ?>
|
||||
<?php remove_filter('pre_get_posts','comicpress_members_filter'); ?>
|
||||
get_header();
|
||||
global $comicpress_options;
|
||||
remove_filter('pre_get_posts','comicpress_members_filter');
|
||||
include(get_template_directory() . '/layout-head.php');
|
||||
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php if (have_posts()):
|
||||
|
||||
$blog_query = '&cat='.$members_post_category.'&paged='.$paged;
|
||||
if ($comicpress_options['enable_members_only']) {
|
||||
if ($comicpress_options['members_post_category'] && comicpress_is_member()) {
|
||||
$blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat='.$comicpress_options['members_post_category'].'&paged='.$paged;
|
||||
|
||||
$posts = query_posts($blog_query);
|
||||
while (have_posts()) : the_post();
|
||||
if (have_posts()) {
|
||||
|
||||
display_blog_post();
|
||||
|
||||
endwhile;
|
||||
|
||||
comicpress_pagination();
|
||||
while (have_posts()) : the_post();
|
||||
|
||||
comicpress_display_post();
|
||||
|
||||
endwhile;
|
||||
|
||||
}
|
||||
comicpress_pagination();
|
||||
} else {
|
||||
_e("This page is restricted to members only.",'comicpress');
|
||||
}
|
||||
} else {
|
||||
_e('Member\'s Only content is not enabled on this installation.');
|
||||
}
|
||||
|
||||
endif; ?>
|
||||
<?php get_sidebar('underblog'); ?>
|
||||
get_sidebar('underblog');
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
||||
include(get_template_directory() . '/layout-foot.php');
|
||||
|
||||
get_footer() ?>
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/* ComicPress Custom CSS over-rides for [ gecko ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe
|
||||
{
|
||||
-moz-opacity: 0.99; /* mozilla, netscape */
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.99; /* khtml, old safari */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
-moz-opacity: 0.7; /* mozilla, netscape */
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.7; /* khtml, old safari */
|
||||
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
-moz-opacity: 0.5; /* mozilla, netscape, gecko */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.5; /* khtml, old safari */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
-moz-opacity: 0; /* mozilla, netscape */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.5; /* khtml, old safari */
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
background: #a1c0d9; /* Firefox */
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
/* selection colors */
|
||||
::selection {
|
||||
background: #ffb7b7; /* Safari */
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
/* ComicPress Custom CSS over-rides for [ ns4 ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe {
|
||||
-moz-opacity: 0.99; /* mozilla, netscape */
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
-moz-opacity: 0.7; /* mozilla, netscape */
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
-moz-opacity: 0.5; /* mozilla, netscape, gecko */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
-moz-opacity: 0; /* mozilla, netscape */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/* ComicPress Custom CSS over-rides for [ opera ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe {
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
<div id="comicpress-addons">
|
||||
|
||||
<form method="post" id="myForm-addons" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Custom Header','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_custom_image_header"><?php _e('Use Custom Header','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_custom_image_header" name="enable_custom_image_header" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_custom_image_header']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Adds Custom Header option under Dashboard -> Appearance. Allows you to add your own header image and customize or hide the default text.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="custom_image_header_width"><?php _e('Width','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="5" name="custom_image_header_width" id="custom_image_header_width" value="<?php echo $comicpress_options['custom_image_header_width']; ?>" /><br />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Sets the width of the image you want to use for Custom Header. Defaults widths are 780px or 980px depending on the layout. Refer to the width of the layout you chose and any custom changes you have made to site width in the CSS.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="custom_image_header_height"><?php _e('Height','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="5" name="custom_image_header_height" id="custom_image_header_height" value="<?php echo $comicpress_options['custom_image_header_height']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Sets the height of the image you want to use for Custom Header. Recommended maximum height is 120px, but if your logo/image demands it you can set it higher.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Members Only Content','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_members_only"><?php _e('Enable Members Only options?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_members_only" name="enable_members_only" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_members_only']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('When enabled this will allow all of the members only code to be active and working.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_members_only_post_comments"><?php _e('Enable Members only comment content?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_members_only_post_comments" name="enable_members_only_post_comments" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_members_only_post_comments']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('When enabled this will make all the content of each of the comments available to be seen only by users registered and set as members.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row" colspan="2">
|
||||
<label for="members_post_category"><?php _e('Members category','comicpress'); ?></label>
|
||||
<?php
|
||||
$select = wp_dropdown_categories('show_option_none=Select category&show_count=0&orderby=name&echo=0&selected='.$comicpress_options['members_post_category']);
|
||||
$select = preg_replace('#<select([^>]*)>#', '<select name="members_post_category" id="members_post_category">', $select);
|
||||
echo $select;
|
||||
?>
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('The category that is designated to show members only content.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<p><?php _e('USAGE: Edit the user with <em>Dashboard -> Users -> Authors & Users</em> and flag the user you want to be a member with the option at the bottom.','comicpress'); ?></p>
|
||||
<p><?php _e('Inside posts, add [members] content you only want members to see [/members]','comicpress'); ?></p>
|
||||
<p><?php _e('When setting a \'members\' category, you *cannot* use an existing comic category, uncategorized, or blog category!','comicpress'); ?></p>
|
||||
<p><?php _e('You MUST create a whole new category and called it "members", then you select that category here and create a page called "Members" or something equivelant and associate the Member\'s Only template to it.','comicpress'); ?></p>
|
||||
<p><?php _e('This will make it so that that category is only seen as blogposts inside that area and not anywhere else on the site unless the user has the members flag.','comicpress'); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Buy Print','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<th scope="row" colspan="2">
|
||||
<label for="buy_print_email"><?php _e('Paypal email address','comicpress'); ?></label>
|
||||
<input type="text" size="25" name="buy_print_email" id="buy_print_email" value="<?php echo $comicpress_options['buy_print_email']; ?>" />
|
||||
</th>
|
||||
<td>
|
||||
<span style="color: #d54e21;"><?php _e('* This must be correct, you do not want other people getting your money.','comicpress'); ?></span><br />
|
||||
<?php _e('The Email address you registered with Paypal and that your store is associated with.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"colspan="2">
|
||||
<label for="buy_print_url"><?php _e('URL of the template page','comicpress'); ?></label>
|
||||
<input type="text" size="25" name="buy_print_url" id="buy_print_url" value="<?php echo $comicpress_options['buy_print_url']; ?>" />
|
||||
</th>
|
||||
<td>
|
||||
<span style="color: #d54e21;"><?php _e('* This must be correct, the form needs some place to go.','comicpress'); ?></span><br />
|
||||
<?php _e('The URL address to which you associated the buy print template.','comicpress'); ?><br />
|
||||
<em>
|
||||
<?php _e('Examples:','comicpress'); ?>
|
||||
"http://yourdomain.com/?p=233",
|
||||
"http://yourdomain.com/shop/",
|
||||
"/?p=233",
|
||||
"/shop/".
|
||||
</em>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_add_shipping"><?php _e('Add shipping to each item','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="buy_print_add_shipping" name="buy_print_add_shipping" type="checkbox" value="1" <?php checked(true, $comicpress_options['buy_print_add_shipping']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Enabling this option will make it so that shipping costs will be added to each item purchased.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="buy_print_us_amount"><?php _e('Print Cost (US/Canada)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_us_amount" id="buy_print_us_amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How much does a print cost for people in the United States and Canada?','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_us_ship"><?php _e('Shipping Cost (US/Canada)','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="buy_print_us_ship" id="buy_print_us_ship" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="buy_print_int_amount"><?php _e('Print Cost (International)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_int_amount" id="buy_print_int_amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How much does a print cost for people *NOT* in the United States and Canada (International)','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_int_ship"><?php _e('Shipping Cost (International)','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="buy_print_int_ship" id="buy_print_int_ship" value="<?php echo $comicpress_options['buy_print_int_ship']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<input name="comicpress_save_customheader" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_addons" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,14 +1,14 @@
|
|||
<div id="archivesearch" class="<?php if ($tab == 'archivesearch') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
<div id="comicpress-archivesearch">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<form method="post" id="myForm-archivesearch" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
<div class="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Archive & Search Results','comicpress'); ?></th>
|
||||
<th colspan="3"><?php _e('Archive & Search Results','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
|
@ -55,23 +55,23 @@
|
|||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How many images in the comic category would you like to see in the archive page?','comicpress'); ?>
|
||||
<?php _e('How many images in the comic category would you like to see in the archive page (-1 will display all available).','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<input name="comicpress_save_archivesearch" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_archivesearch" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
<div id="buyprintoptions" class="<?php if ($tab == 'buyprint') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Buy Print','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<th scope="row" colspan="2">
|
||||
<label for="buy_print_email"><?php _e('Paypal email address','comicpress'); ?></label>
|
||||
<input type="text" size="25" name="buy_print_email" id="buy_print_email" value="<?php echo $comicpress_options['buy_print_email']; ?>" />
|
||||
</th>
|
||||
<td>
|
||||
<span style="color: #d54e21;"><?php _e('* This must be correct, you do not want other people getting your money.','comicpress'); ?></span><br />
|
||||
<?php _e('The Email address you registered with Paypal and that your store is associated with.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"colspan="2">
|
||||
<label for="buy_print_url"><?php _e('URL of the template page','comicpress'); ?></label>
|
||||
<input type="text" size="25" name="buy_print_url" id="buy_print_url" value="<?php echo $comicpress_options['buy_print_url']; ?>" />
|
||||
</th>
|
||||
<td>
|
||||
<span style="color: #d54e21;"><?php _e('* This must be correct, the form needs some place to go.','comicpress'); ?></span><br />
|
||||
<?php _e('The URL address to which you associated the buy print template.','comicpress'); ?><br />
|
||||
<em>
|
||||
<?php _e('Examples:','comicpress'); ?>
|
||||
"http://yourdomain.com/?p=233",
|
||||
"http://yourdomain.com/shop/",
|
||||
"/?p=233",
|
||||
"/shop/".
|
||||
</em>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_add_shipping"><?php _e('Add shipping to each item','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="buy_print_add_shipping" name="buy_print_add_shipping" type="checkbox" value="1" <?php checked(true, $comicpress_options['buy_print_add_shipping']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Enabling this option will make it so that shipping costs will be added to each item purchased.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="buy_print_us_amount"><?php _e('Print Cost (US/Canada)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_us_amount" id="buy_print_us_amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How much does a print cost for people in the United States and Canada?','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_us_ship"><?php _e('Shipping Cost (US/Canada)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_us_ship" id="buy_print_us_ship" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="buy_print_int_amount"><?php _e('Print Cost (International)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_int_amount" id="buy_print_int_amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How much does a print cost for people *NOT* in the United States and Canada (International)','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_int_ship"><?php _e('Shipping Cost (International)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_int_ship" id="buy_print_int_ship" value="<?php echo $comicpress_options['buy_print_int_ship']; ?>" />
|
||||
</td>
|
||||
<td/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_buyprint" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_buyprint" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,179 @@
|
|||
<div id="comicpress-config">
|
||||
|
||||
<form method="post" id="myForm-config" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5"><?php _e('Configuration','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr class="alternate">
|
||||
<th scope="row">
|
||||
<label for="comiccat"><?php _e('Comic Category','comicpress'); ?></label>
|
||||
<?php
|
||||
$comiccat = $comicpress_options['comicpress_config']['comiccat'];
|
||||
$select = wp_dropdown_categories('show_option_all=Select category&hide_empty=0&show_count=0&orderby=name&echo=0&selected='.$comiccat);
|
||||
$select = preg_replace('#<select([^>]*)>#', '<select name="comiccat" id="comicccat">', $select);
|
||||
echo $select;
|
||||
?>
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('The category that is designated for the primary comic category.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="comiccat"><?php _e('Blog Category','comicpress'); ?></label>
|
||||
<?php
|
||||
$blogcat = $comicpress_options['comicpress_config']['blogcat'];
|
||||
$select = wp_dropdown_categories('show_option_all=Select category&hide_empty=0&show_count=0&orderby=name&echo=0&selected='.$blogcat);
|
||||
$select = preg_replace('#<select([^>]*)>#', '<select name="blogcat" id="blogcat">', $select);
|
||||
echo $select;
|
||||
?>
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('The primary blog category.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$dirs_to_search = array_unique(array(ABSPATH));
|
||||
$directories = array();
|
||||
foreach ($dirs_to_search as $dir) { $directories = array_merge($directories,glob("${dir}/*")); }
|
||||
|
||||
$current_directory = $comicpress_options['comicpress_config']['comic_folder'];
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="comic_folder"><?php _e('Comic Folder','comicpress'); ?></label>
|
||||
|
||||
<select name="comic_folder" id="comic_folder">
|
||||
<?php
|
||||
foreach ($directories as $dirs) {
|
||||
if (is_dir($dirs)) {
|
||||
$dir_name = basename($dirs); ?>
|
||||
<option class="level-0" value="<?php echo $dir_name; ?>" <?php if ($current_directory == $dir_name) { ?>selected="selected"<?php } ?>><?php echo $dir_name; ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the original sized comics from.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$current_directory = $comicpress_options['comicpress_config']['rss_comic_folder'];
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><label for="rss_comic_folder"><?php _e('RSS Thumbnail Folder','comicpress'); ?></label>
|
||||
|
||||
<select name="rss_comic_folder" id="rss_comic_folder">
|
||||
<?php
|
||||
foreach ($directories as $dirs) {
|
||||
if (is_dir($dirs)) {
|
||||
$dir_name = basename($dirs); ?>
|
||||
<option class="level-0" value="<?php echo $dir_name; ?>" <?php if ($current_directory == $dir_name) { ?>selected="selected"<?php } ?>><?php echo $dir_name; ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the RSS thumbnails from.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$current_directory = $comicpress_options['comicpress_config']['archive_comic_folder'];
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="archive_comic_folder"><?php _e('Archive Thumbnail Folder','comicpress'); ?></label>
|
||||
|
||||
<select name="archive_comic_folder" id="archive_comic_folder">
|
||||
<?php
|
||||
foreach ($directories as $dirs) {
|
||||
if (is_dir($dirs)) {
|
||||
$dir_name = basename($dirs); ?>
|
||||
<option class="level-0" value="<?php echo $dir_name; ?>" <?php if ($current_directory == $dir_name) { ?>selected="selected"<?php } ?>><?php echo $dir_name; ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the ARCHIVE/SEARCH thumbnails from.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$current_directory = $comicpress_options['comicpress_config']['mini_comic_folder'];
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><label for="mini_comic_folder"><?php _e('Mini Thumbnail Folder','comicpress'); ?></label>
|
||||
|
||||
<select name="mini_comic_folder" id="mini_comic_folder">
|
||||
<?php
|
||||
foreach ($directories as $dirs) {
|
||||
if (is_dir($dirs)) {
|
||||
$dir_name = basename($dirs); ?>
|
||||
<option class="level-0" value="<?php echo $dir_name; ?>" <?php if ($current_directory == $dir_name) { ?>selected="selected"<?php } ?>><?php echo $dir_name; ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the MINI thumbnails from. (for archive-comic-list, etc.)','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="rss_comic_width"><?php _e('RSS Thumbnail Width','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="rss_comic_width" id="rss_comic_width" value="<?php echo $comicpress_options['comicpress_config']['rss_comic_width']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="archive_comic_width"><?php _e('ARCHIVE Thumbnail Width','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="archive_comic_width" id="archive_comic_width" value="<?php echo $comicpress_options['comicpress_config']['archive_comic_width']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="mini_comic_width"><?php _e('MINI Thumbnail Width','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="mini_comic_width" id="mini_comic_width" value="<?php echo $comicpress_options['comicpress_config']['mini_comic_width']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<input name="comicpress_save_config" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_config" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,57 +0,0 @@
|
|||
<div id="customheader" class="<?php if ($tab == 'customheader') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Custom Header','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_custom_image_header"><?php _e('Use Custom Header','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_custom_image_header" name="enable_custom_image_header" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_custom_image_header']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Adds Custom Header option under Dashboard -> Appearance. Allows you to add your own header image and customize or hide the default text.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="custom_image_header_width"><?php _e('Width','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="5" name="custom_image_header_width" id="custom_image_header_width" value="<?php echo $comicpress_options['custom_image_header_width']; ?>" /><br />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Sets the width of the image you want to use for Custom Header. Defaults widths are 780px or 980px depending on the layout. Refer to the width of the layout you chose and any custom changes you have made to site width in the CSS.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="custom_image_header_height"><?php _e('Height','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="5" name="custom_image_header_height" id="custom_image_header_height" value="<?php echo $comicpress_options['custom_image_header_height']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Sets the height of the image you want to use for Custom Header. Recommended maximum height is 120px, but if your logo/image demands it you can set it higher.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_customheader" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_customheader" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,9 +1,9 @@
|
|||
<div id="generaloptions" class="<?php if ($tab == 'general') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
<div id="comicpress-general">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<form method="post" id="myForm-general" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<input id="disable_page_restraints" name="disable_page_restraints" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_page_restraints']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Allows the width of your site to either be Dynamic (fills browser window) or Fixed (width is specified, e.g., 980px, 780px, etc.) If Dynamic is enabled #page and #page-wide will not load. This allow you to use the entire browser for your canvas instead of the 780px/980px that the two elements limit you to by default.','comicpress'); ?></th>
|
||||
<?php _e('Allows the width of your site to either be Dynamic (fills browser window) or Fixed (width is specified, e.g., 980px, 780px, etc.) If Dynamic is enabled #page and #page-wide will not load. This allow you to use the entire browser for your canvas instead of the 780px/980px that the two elements limit you to by default.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -41,14 +41,40 @@
|
|||
<tr>
|
||||
<th scope="row"><label for="disable_blogheader"><?php _e('Disable blog header','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_blogheader" name="disable_blogheader" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blogheader']); ?> />
|
||||
<input id="disable_blogheader" name="disable_blogheader" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blogheader']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and your site will not display the contents of #blogheader.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('RSS','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_comment_count_in_rss"><?php _e('Enable the comment count to show in feed title.','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_comment_count_in_rss" name="enable_comment_count_in_rss" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_comment_count_in_rss']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Will show how many comments there are in the title of the post in the feed.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_post_thumbnail_rss"><?php _e('Enable the post thumbnails in the RSS feed?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_post_thumbnail_rss" name="enable_post_thumbnail_rss" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_post_thumbnail_rss']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('If enabled will show the post thumbnail of the post in the RSS feed.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -79,37 +105,37 @@
|
|||
<input id="disable_default_comic_nav" name="disable_default_comic_nav" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_default_comic_nav']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Previous Entries and Next Entries buttons are replaced by a bar of numbered pages. The default comic post navigation is above each comic blog post.','comicpress'); ?>
|
||||
<?php _e('The default comic post navigation is above each comic blog post.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
$current_gnav_directory = $comicpress_options['graphicnav_directory'];
|
||||
if (empty($current_gnav_directory)) $current_gnav_directory = 'default';
|
||||
$dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory()));
|
||||
$gnav_directories = array();
|
||||
foreach ($dirs_to_search as $dir) { $gnav_directories = array_merge($gnav_directories,glob("${dir}/images/nav/*")); }
|
||||
?>
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row" colspan="2"><label for="graphicnav_directory"><?php _e('Graphic Navigation Directory','comicpress'); ?></label>
|
||||
|
||||
<th scope="row" colspan="2"><label for="graphicnav_directory"><?php _e('Graphic Navigation Directory','comicpress'); ?></label>
|
||||
|
||||
<select name="graphicnav_directory" id="graphicnav_directory">
|
||||
<?php
|
||||
foreach ($gnav_directories as $gnav_dirs) {
|
||||
if (is_dir($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>
|
||||
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the graphic navigation styling from. To create your own custom graphic navigation menu buttons just create a directory under <i>images/nav/</i> and place your image files inside of it and create a navstyle.css file to determine the style of your navigation display.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -117,7 +143,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_widgetarea_use_sidebar_css"><?php _e('Enable main Sidebar CSS for all sidebars?','comicpress'); ?></label></th>
|
||||
<th scope="row"><label for="enable_widgetarea_use_sidebar_css"><?php _e('Enable main Sidebar CSS for all sidebars','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_widgetarea_use_sidebar_css" name="enable_widgetarea_use_sidebar_css" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_widgetarea_use_sidebar_css']); ?> />
|
||||
</td>
|
||||
|
@ -126,16 +152,16 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="disable_lrsidebars_frontpage"><?php _e('Disable home page sidebars','comicpress'); ?></label></th>
|
||||
<th scope="row"><label for="disable_lrsidebars"><?php _e('Disable left and right sidebars','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_lrsidebars_frontpage" name="disable_lrsidebars_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_lrsidebars_frontpage']); ?> />
|
||||
<input id="disable_lrsidebars" name="disable_lrsidebars" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_lrsidebars']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Your home page will not display the default left/right sidebars. Minimalists dream. WARNING: Not recommended for use with Graphic Novel layouts.','comicpress'); ?>
|
||||
<?php _e('Your site will not display the default left/right sidebars. Minimalists dream. WARNING: Not recommended for use with Graphic Novel layouts.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -151,21 +177,64 @@
|
|||
<?php _e('Default text in the footer will not display. Enable this if you do not want any text in the footer. If you wish to add you own custom content, you may do so via Appearance -> Widgets-> Footer.', 'comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_scroll_to_top"><?php _e('Enable the scroll to top link in the footer?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_scroll_to_top" name="enable_scroll_to_top" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_scroll_to_top']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('When this link is clicked on long pages it will scroll back to the top.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Debug','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_comicpress_debug"><?php _e('Enable the dashboard ComicPress debug?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_comicpress_debug" name="enable_comicpress_debug" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_comicpress_debug']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Default enabled, this will do some sanity checks on your ComicPress installation and report the findings on your dashboard.', 'comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_full_post_check"><?php _e('Enable checking EVERY post for category problems?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_full_post_check" name="enable_full_post_check" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_full_post_check']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Enable this if you would like to check ALL of your posts to see if there are any category problems and inconsistancies.', 'comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_page_load_info"><?php _e('Enable the page load info in the footer?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_page_load_info" name="enable_page_load_info" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_page_load_info']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Will display information on how many queries and how fast it took to load the page in the footer.', 'comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<input name="comicpress_save_general" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_general" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<div id="indexoptions" class="<?php if ($tab == 'index') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
<div id="comicpress-index">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<form method="post" id="myForm-index" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -14,12 +14,21 @@
|
|||
<tr class="alternate">
|
||||
<th scope="row"><label for="disable_blog_frontpage"><?php _e('Disable the blog on the Home page','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_blog_frontpage" name="disable_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blog_frontpage']); ?> />
|
||||
<input id="disable_blog_frontpage" name="disable_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blog_frontpage']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and the blog will not display on the Home page of your site. The features allows to either not have a blog at all, or, if you place a menu link to your blog page, you can maintain your blog within the same site without readers having to see it when they are just trying to read your comic.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="blog_postcount"><?php _e('Blog Post Count','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="blog_postcount" id="blog_postcount" value="<?php echo $comicpress_options['blog_postcount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How many blog posts you would like displayed on the index page at one time.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
|
@ -31,7 +40,7 @@
|
|||
<tr class="alternate">
|
||||
<th scope="row"><label for="disable_comic_frontpage"><?php _e('Disable comic on Home page','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_comic_frontpage" name="disable_comic_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_frontpage']); ?> />
|
||||
<input id="disable_comic_frontpage" name="disable_comic_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_frontpage']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and the comic will not display on the home page of your site. You can use the Latest Thumbnail widget to display your comic in a sidebar. Make sure you set the archive-thumbnail size to under 200px. Note: Turning this off and using the Graphic Novel style turns ComicPress into a blog only.','comicpress'); ?>
|
||||
|
@ -40,35 +49,35 @@
|
|||
<tr>
|
||||
<th scope="row"><label for="disable_comic_blog_frontpage"><?php _e('Disable the comic blog on Home page','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_comic_blog_frontpage" name="disable_comic_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_frontpage']); ?> />
|
||||
<input id="disable_comic_blog_frontpage" name="disable_comic_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_frontpage']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and the comic blog will not display on the Home Page. Enabling this allows you to either not have a comic blog at all, or you can place it where you want using the comic blog post widget. If there is no content in the post it will not display regardless.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="disable_comic_blog_single"><?php _e('Disable the comic blog on the single pages','comicpress'); ?></lable></th>
|
||||
<th scope="row"><label for="disable_comic_blog_single"><?php _e('Disable the comic blog on the single pages','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_comic_blog_single" name="disable_comic_blog_single" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_single']); ?> />
|
||||
<input id="disable_comic_blog_single" name="disable_comic_blog_single" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_single']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and the blog portion of the comic will not display on the single/archive pages of your site.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<input name="comicpress_save_index" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_index" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
<div id="membersoptions" class="<?php if ($tab == 'members') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e('Members Only Content','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row">
|
||||
<label for="members_post_category"><?php _e('Members category','comicpress'); ?></label>
|
||||
<?php
|
||||
$select = wp_dropdown_categories('show_option_none=Select category&show_count=0&orderby=name&echo=0&selected='.$comicpress_options['members_post_category']);
|
||||
$select = preg_replace('#<select([^>]*)>#', '<select name="members_post_category" id="members_post_category">', $select);
|
||||
echo $select;
|
||||
?>
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('The category that is designated to show members only content.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<p><?php _e('USAGE: Edit the user with <em>Dashboard -> Users -> Authors & Users</em> and flag the user you want to be a member with the option at the bottom.','comicpress'); ?></p>
|
||||
<p><?php _e('Inside posts, add [members] content you only want members to see [/members]','comicpress'); ?></p>
|
||||
<p><?php _e('When setting a \'members\' category, you *cannot* use an existing comic category, uncategorized, or blog category!','comicpress'); ?></p>
|
||||
<p><?php _e('You MUST create a whole new category and called it "members", then you select that category here and create a page called "Members" or something equivelant and associate the Member\'s Only template to it.','comicpress'); ?></p>
|
||||
<p><?php _e('This will make it so that that category is only seen as blogposts inside that area and not anywhere else on the site unless the user has the members flag.','comicpress'); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_members" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_members" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,9 +1,9 @@
|
|||
<div id="menubaroptions" class="<?php if ($tab == 'menubar') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
<div id="comicpress-menubar">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<form method="post" id="myForm-menubar" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
<div class="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<td>
|
||||
<?php _e('Allows you to customize the location of the Menubar via Widgets.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_search_in_menubar"><?php _e('Enable Search Form','comicpress'); ?></label></th>
|
||||
<td>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<td>
|
||||
<?php _e('Searchforms can be fun when you have something to search for.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_rss_in_menubar"><?php _e('Enable RSS Link','comicpress'); ?></label></th>
|
||||
<td>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<td>
|
||||
<?php _e('Adds an RSS link icon to your menubar on the right side.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_navigation_in_menubar"><?php _e('Enable mini navigation','comicpress'); ?></label></th>
|
||||
<td>
|
||||
|
@ -46,7 +46,7 @@
|
|||
<td>
|
||||
<?php _e('Mini Navigation adds small previous and next arrows arrow to the right side of your Menubar.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="contact_in_menubar"><?php _e('Enable Contact/custom links','comicpress'); ?></label></th>
|
||||
<td>
|
||||
|
@ -55,30 +55,39 @@
|
|||
<td>
|
||||
<?php _e('Adds a Contact button to the Menubar associated with your admin email. You can also create a links category called <i>Menubar</i> and whatever links you add to that will appear in the Menubar.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="disable_dynamic_menubar_links"><?php _e('Disable auto-generated WordPress links','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_dynamic_menubar_links" name="disable_dynamic_menubar_links" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_dynamic_menubar_links']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Allows you to use the links category <i>menubar</i> (you will need to create this category if it does not already exist) to create custom links on the Menubar (mostly used for making graphic images as links). Otherwise, ALL published pages will appear automatically.','comicpress'); ?>
|
||||
<?php _e('Disable creation of the pages from the wordpress core.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_blogroll_off_links"><?php _e('Enable the blogroll to appear as a dropdown off the Links page','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_blogroll_off_links" name="enable_blogroll_off_links" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_blogroll_off_links']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Allows you to show a dropdown of your blogroll off the page created Links. When creating the links page, the name must be a capital-L lowercase inks for it to work.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<input name="comicpress_save_menubar" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_menubar" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|