From 886b27a310d926d5dee88e943ffa275c7fcd4b82 Mon Sep 17 00:00:00 2001 From: "Philip M. Hofer (Frumph)" Date: Sun, 22 Nov 2009 22:33:29 -0800 Subject: [PATCH] ComicPress Options Revamp (part 4 - done, need testing) Signed-off-by: Philip M. Hofer (Frumph) --- comicpress-options.php | 146 +++++++++++++------------ functions/custom-image-header.php | 4 +- functions/wp-pagenavi.php | 2 +- options/archivesearchoptions.php | 2 +- options/buyprintoptions.php | 173 ++++++++++++++---------------- options/customheaderoptions.php | 97 ++++++++--------- options/generaloptions.php | 2 +- options/indexoptions.php | 6 +- options/membersoptions.php | 38 +++---- options/menubaroptions.php | 6 +- options/postoptions.php | 6 +- options/themestyle.php | 2 +- 12 files changed, 238 insertions(+), 246 deletions(-) diff --git a/comicpress-options.php b/comicpress-options.php index a6a1356..79ccbe3 100644 --- a/comicpress-options.php +++ b/comicpress-options.php @@ -41,15 +41,6 @@ function comicpress_admin() { 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']; - $tab = 'archivesearch'; - 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 ); @@ -66,75 +57,96 @@ function comicpress_admin() { 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 ); + $comicpress_options['disable_blog_frontpage'] = (bool)($_REQUEST['disable_blog_frontpage'] == 1 ? true : false ); + $tab = 'index'; + update_option('comicpress_options',$comicpress_options); } - /* - - - $comicpress_options['disable_page_titles'] = (bool)($_REQUEST['disable_page_titles'] == 1 ? true : false ); - $comicpress_options['static_blog'] = (bool)($_REQUEST['static_blog'] == 1 ? true : false ); - - + + if ($_REQUEST['action'] == 'comicpress_save_post') { $comicpress_options['transcript_in_posts'] = (bool)($_REQUEST['transcript_in_posts'] == 1 ? true : false ); - - $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('980'); - $comicpress_options['custom_image_header_height'] = wp_filter_nohtml_kses('120'); - - - $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['enable_post_calendar'] = (bool)($_REQUEST['enable_post_calendar'] == 1 ? true : false ); - $comicpress_options['enable_post_author_gravatar'] = (bool)($_REQUEST['enable_post_author_gravatar'] == 1 ? true : false ); - $comicpress_options['enable_comic_post_calendar'] = (bool)($_REQUEST['enable_comic_post_calendar'] == 1 ? true : false ); - $comicpress_options['enable_comic_post_author_gravatar'] = (bool)($_REQUEST['enable_comic_post_author_gravatar'] == 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['remove_wptexturize'] = (bool)($_REQUEST['remove_wptexturize'] == 1 ? true : false ); - $comicpress_options['moods_directory'] = 'default'; - $comicpress_options['calendar_directory'] = 'none'; - $comicpress_options['avatar_directory'] = 'none'; + $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 ); + + $tab = 'post'; + 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']; + $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 ); - - - - $comicpress_options['members_post_category'] = ''; - - $comicpress_options['split_column_in_two'] = (bool)($_REQUEST['split_column_in_two'] == 1 ? true : false ); - $comicpress_options['author_column_one'] = ''; - $comicpress_options['author_column_two'] = ''; - - $comicpress_options['buy_print_email'] = 'philip@frumph.net'; - $comicpress_options['buy_print_url'] = '/shop/'; - $comicpress_options['buy_print_us_amount'] = '24.95'; - $comicpress_options['buy_print_int_amount'] = '29.95'; + $comicpress_options['disable_default_menubar'] = (bool)($_REQUEST['disable_default_menubar'] == 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'; + 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'] = '4.95'; - $comicpress_options['buy_print_int_ship'] = '9.95'; - */ - // update_option('comicpress_options',$comicpress_options); + $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'; + update_option('comicpress_options',$comicpress_options); + } if ($tab) { ?> -

+

- -

@@ -146,15 +158,15 @@ function comicpress_admin() {
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/functions/custom-image-header.php b/functions/custom-image-header.php index 7519d56..f7fc44f 100644 --- a/functions/custom-image-header.php +++ b/functions/custom-image-header.php @@ -1,7 +1,7 @@ +
diff --git a/options/buyprintoptions.php b/options/buyprintoptions.php index c63e1dc..37a21e7 100644 --- a/options/buyprintoptions.php +++ b/options/buyprintoptions.php @@ -1,103 +1,94 @@ -
-
+
+ - - - - - - - - - - -
*

- -
*

-
- - + +
\ No newline at end of file diff --git a/options/membersoptions.php b/options/membersoptions.php index 3ad426d..32e9289 100644 --- a/options/membersoptions.php +++ b/options/membersoptions.php @@ -1,4 +1,4 @@ -
+

Main

@@ -6,22 +6,22 @@ - - - - - + + + + +
Members Category - - The category that is designated to show members only content. -
Members Category + + The category that is designated to show members only content. +
@@ -33,7 +33,7 @@

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.


- - + +
diff --git a/options/menubaroptions.php b/options/menubaroptions.php index 066ae55..b8c3fa7 100644 --- a/options/menubaroptions.php +++ b/options/menubaroptions.php @@ -1,4 +1,4 @@ - diff --git a/options/postoptions.php b/options/postoptions.php index 1f9b448..f12a1b0 100644 --- a/options/postoptions.php +++ b/options/postoptions.php @@ -1,4 +1,4 @@ -
+
@@ -305,7 +305,7 @@
- - + +
\ No newline at end of file diff --git a/options/themestyle.php b/options/themestyle.php index 61c8f85..20f4c07 100644 --- a/options/themestyle.php +++ b/options/themestyle.php @@ -6,7 +6,7 @@ } -
+