2.9.0.5 and comicpress-debug

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-12-11 08:28:19 -08:00
parent d86588fc3a
commit 5eb5c26822
2 changed files with 36 additions and 28 deletions

View File

@ -2,42 +2,49 @@
function comicpress_notice_debug() { function comicpress_notice_debug() {
global $current_user, $comiccat, $blogcat; global $current_user, $comiccat, $blogcat;
if( strpos( $_SERVER[ 'PHP_SELF' ], -'/wp-admin/index.php' ) === false )
if( substr( $_SERVER[ 'PHP_SELF' ], -19 ) != '/wp-admin/index.php' )
return; return;
$error = array();
$comicpress_options = comicpress_load_options(); $comicpress_options = comicpress_load_options();
$error = array();
$post_cat_link = get_bloginfo('wpurl') . '/wp-admin/categories.php';
if ($comiccat == $blogcat) { if ($comiccat == $blogcat) {
$error[] = array('header', 'The $comiccat is the same as $blogcat.'); $error[] = array('header', __('Primary Comic and Blog categories are not configured properly.','comicpress'));
$error[] = 'Installation instructions on how to set the comicpress-options.php settings and comicpress manager settings here, not to mention the __( for language pack.'; $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).','comicpress');
}
if (!empty($error)) { if (!empty($error)) {
?> ?>
<div class="error"> <div class="error">
<h2>ComicPress Installation Problems Detected</h2> <h2>ComicPress Debug</h2>
<p>ComicPress doesn't seem to be fully installed at this time, check out these messages:</p> ComicPress doesn't seem to be fully installed at this time, check out these messages.<br />
<?php <br />
foreach ($error as $info) { <?php
unset($text); foreach ($error as $info) {
if (is_array($info)) { unset($text);
list($type, $text) = $info; if (is_array($info)) {
} else { list($type, $text) = $info;
if (is_string($info)) { } else {
$text = $info; if (is_string($info)) {
$type = 'paragraph'; $text = $info;
} $type = 'paragraph';
} }
if (!empty($text) && !empty($type)) { }
switch ($type) { if (!empty($text) && !empty($type)) {
case 'header': echo "<h3>${text}</h3>"; break; switch ($type) {
case 'raw': echo $text; break; case 'header': echo "<h3>${text}</h3>"; break;
default: echo "<p>${text}</p>"; break; case 'raw': echo $text; break;
} default: echo "<p>${text}</p>"; break;
} }
}
} }
?> ?>
<br />
<br />
</div> </div>
<?php <?php
} }
@ -45,3 +52,4 @@ function comicpress_notice_debug() {
add_action( 'admin_notices', 'comicpress_notice_debug' ); add_action( 'admin_notices', 'comicpress_notice_debug' );
?>

View File

@ -102,7 +102,7 @@ function comicpress_load_options() {
global $comicpress_options; global $comicpress_options;
$comicpress_options = get_option('comicpress_options'); $comicpress_options = get_option('comicpress_options');
if (empty($comicpress_options)) { if (empty($comicpress_options)) {
$comicpress_options['comicpress_version'] = '2.9.0.4'; $comicpress_options['comicpress_version'] = '2.9.0.5';
foreach (array( foreach (array(
'disable_comic_frontpage' => false, 'disable_comic_frontpage' => false,
'disable_comic_blog_frontpage' => false, 'disable_comic_blog_frontpage' => false,
@ -179,7 +179,7 @@ function comicpress_load_options() {
add_option('comicpress_options', $comicpress_options, '', 'yes'); add_option('comicpress_options', $comicpress_options, '', 'yes');
// update_option('comicpress_options', $comicpress_options); // update_option('comicpress_options', $comicpress_options);
} }
$comicpress_options['comicpress_version'] = '2.9.0.4'; $comicpress_options['comicpress_version'] = '2.9.0.5';
update_option('comicpress_options', $comicpress_options); update_option('comicpress_options', $comicpress_options);
return $comicpress_options; return $comicpress_options;
} }