Permalink
Browse files

ComicPress put back on github.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
  • Loading branch information...
0 parents commit 1ad92c189e0be16a341f0834f7a9bef01f0f7143 Philip M. Hofer (Frumph) committed Sep 24, 2010
Showing with 14,463 additions and 0 deletions.
  1. +13 −0 404.php
  2. +50 −0 addons/custom-image-header.php
  3. +99 −0 addons/ipn.php
  4. +134 −0 addons/membersonly.php
  5. +69 −0 addons/relatedcomics.php
  6. +111 −0 addons/relatedposts.php
  7. +165 −0 archive-comic-calendar.php
  8. +44 −0 archive-comic-month.php
  9. +68 −0 archive-comic-storyline-thumbs.php
  10. +67 −0 archive-comic-storyline.php
  11. +71 −0 archive-comic-year.php
  12. +43 −0 archive-comic.php
  13. +104 −0 archive.php
  14. +37 −0 archives.php
  15. +67 −0 author.php
  16. +31 −0 blog.php
  17. +178 −0 buystrip.php
  18. +6 −0 changelog.txt
  19. +308 −0 comicpress-admin.php
  20. +31 −0 comicpress-config.php
  21. +133 −0 comicpress-debug.php
  22. +150 −0 comments.php
  23. +26 −0 footer.php
  24. +656 −0 functions.php
  25. +31 −0 functions/avatars.php
  26. +78 −0 functions/buyprint-functions.php
  27. +159 −0 functions/classes.php
  28. +179 −0 functions/comment-functions.php
  29. +27 −0 functions/copyright.php
  30. +369 −0 functions/displaycomic.php
  31. +248 −0 functions/displaypost.php
  32. +34 −0 functions/dual-columns.php
  33. +115 −0 functions/moods.php
  34. +236 −0 functions/navigation.php
  35. +16 −0 functions/pagination.php
  36. +47 −0 functions/protect.php
  37. +45 −0 functions/redirects.php
  38. +17 −0 functions/shortcodes.php
  39. +83 −0 functions/syndication.php
  40. +58 −0 header.php
  41. +66 −0 image.php
  42. BIN images/1.gif
  43. BIN images/2.gif
  44. BIN images/2a.gif
  45. BIN images/3.gif
  46. BIN images/3a.gif
  47. BIN images/4.gif
  48. BIN images/avatars/default/rascal.png
  49. BIN images/bubble.png
  50. BIN images/buynow_paypal.png
  51. BIN images/buythis.png
  52. BIN images/cal/default.png
  53. BIN images/cal/default/april.jpg
  54. BIN images/cal/default/august.jpg
  55. BIN images/cal/default/december.jpg
  56. BIN images/cal/default/february.jpg
  57. BIN images/cal/default/january.jpg
  58. BIN images/cal/default/july.jpg
  59. BIN images/cal/default/june.jpg
  60. BIN images/cal/default/march.jpg
  61. BIN images/cal/default/may.jpg
  62. BIN images/cal/default/november.jpg
  63. BIN images/cal/default/october.jpg
  64. BIN images/cal/default/september.jpg
  65. BIN images/calendar.png
  66. BIN images/comicpress-icon.png
  67. BIN images/comicpress-rascal.png
  68. BIN images/down.gif
  69. BIN images/header-blank.png
  70. BIN images/moods/default/anger.png
  71. BIN images/moods/default/angry.png
  72. BIN images/moods/default/awe.png
  73. BIN images/moods/default/burn.png
  74. BIN images/moods/default/confused.png
  75. BIN images/moods/default/cool.png
  76. BIN images/moods/default/coolglare.png
  77. BIN images/moods/default/crazy.png
  78. BIN images/moods/default/cry.png
  79. BIN images/moods/default/crying.png
  80. BIN images/moods/default/dizzy.png
  81. BIN images/moods/default/embarrass.png
  82. BIN images/moods/default/fire.png
  83. BIN images/moods/default/grimace.png
  84. BIN images/moods/default/happy.png
  85. BIN images/moods/default/love.png
  86. BIN images/moods/default/lust.png
  87. BIN images/moods/default/miao.png
  88. BIN images/moods/default/morequestions.png
  89. BIN images/moods/default/music.png
  90. BIN images/moods/default/ninja.png
  91. BIN images/moods/default/normal.png
  92. BIN images/moods/default/ooo.png
  93. BIN images/moods/default/prettiness.png
  94. BIN images/moods/default/pwnburn.png
  95. BIN images/moods/default/question.png
  96. BIN images/moods/default/shout.png
  97. BIN images/moods/default/shy.png
  98. BIN images/moods/default/silent.png
  99. BIN images/moods/default/sleep.png
  100. BIN images/moods/default/slobber.png
  101. BIN images/moods/default/smile.png
  102. BIN images/moods/default/spook.png
  103. BIN images/moods/default/startle.png
  104. BIN images/moods/default/surprise.png
  105. BIN images/moods/default/sweat.png
  106. BIN images/moods/default/tears.png
  107. BIN images/moods/default/thirst.png
  108. BIN images/moods/default/vomit.png
  109. BIN images/nav/box/archive.png
  110. BIN images/nav/box/buyprint.png
  111. BIN images/nav/box/comments.png
  112. BIN images/nav/box/first.png
  113. BIN images/nav/box/firstin.png
  114. BIN images/nav/box/last.png
  115. BIN images/nav/box/lastin.png
  116. +170 −0 images/nav/box/navstyle.css
  117. BIN images/nav/box/next-in.png
  118. BIN images/nav/box/next.png
  119. BIN images/nav/box/nextchap.png
  120. BIN images/nav/box/prev-in.png
  121. BIN images/nav/box/prev.png
  122. BIN images/nav/box/prevchap.png
  123. BIN images/nav/box/random.png
  124. BIN images/nav/box/share.png
  125. BIN images/nav/box/sharebox.png
  126. BIN images/nav/box/subscribe.png
  127. BIN images/nav/comical/archive.png
  128. BIN images/nav/comical/buyprint.png
  129. BIN images/nav/comical/comments.png
  130. BIN images/nav/comical/first.png
  131. BIN images/nav/comical/last.png
  132. +160 −0 images/nav/comical/navstyle.css
  133. BIN images/nav/comical/next-in.png
  134. BIN images/nav/comical/next.png
  135. BIN images/nav/comical/nextchap.png
  136. BIN images/nav/comical/prev-in.png
  137. BIN images/nav/comical/prev.png
  138. BIN images/nav/comical/prevchap.png
  139. BIN images/nav/comical/random.png
  140. BIN images/nav/comical/share.png
  141. BIN images/nav/comical/sharebox.png
  142. BIN images/nav/comical/subscribe.png
  143. +123 −0 images/nav/default/navstyle.css
  144. BIN images/nav/default/sharebox.png
  145. BIN images/nav/scifi/archive.png
  146. BIN images/nav/scifi/buyprint.png
  147. BIN images/nav/scifi/comments.png
  148. BIN images/nav/scifi/first.png
  149. BIN images/nav/scifi/last.png
  150. +162 −0 images/nav/scifi/navstyle.css
  151. BIN images/nav/scifi/next-in.png
  152. BIN images/nav/scifi/next.png
  153. BIN images/nav/scifi/nextchap.png
  154. BIN images/nav/scifi/prev-in.png
  155. BIN images/nav/scifi/prev.png
  156. BIN images/nav/scifi/prevchap.png
  157. BIN images/nav/scifi/random.png
  158. BIN images/nav/scifi/share.png
  159. BIN images/nav/scifi/sharebox.png
  160. BIN images/nav/scifi/subscribe.png
  161. BIN images/nav/silver/archive.png
  162. BIN images/nav/silver/buyprint.png
  163. BIN images/nav/silver/comments.png
  164. BIN images/nav/silver/first.png
  165. BIN images/nav/silver/last.png
  166. +160 −0 images/nav/silver/navstyle.css
  167. BIN images/nav/silver/next-in.png
  168. BIN images/nav/silver/next.png
  169. BIN images/nav/silver/nextchap.png
  170. BIN images/nav/silver/prev-in.png
  171. BIN images/nav/silver/prev.png
  172. BIN images/nav/silver/prevchap.png
  173. BIN images/nav/silver/random.png
  174. BIN images/nav/silver/sharebox.png
  175. BIN images/notavailable.png
  176. BIN images/notfound.png
  177. BIN images/nothumbnail.png
  178. BIN images/options/3c.png
  179. BIN images/options/3c2r.png
  180. BIN images/options/comicpress_icon.png
  181. BIN images/options/gn.png
  182. BIN images/options/rgn.png
  183. BIN images/options/standard.png
  184. BIN images/options/v.png
  185. BIN images/options/v3c.png
  186. BIN images/options/v3cr.png
  187. BIN images/outofstock.png
  188. BIN images/paypal.png
  189. BIN images/pingback.png
  190. BIN images/right.gif
  191. BIN images/sold.png
  192. BIN images/trackback.png
  193. +42 −0 index.php
  194. +99 −0 js/bookmark.js
  195. +157 −0 js/cookiejar.js
  196. +142 −0 js/ddsmoothmenu.js
  197. +15 −0 js/equalheight.js
  198. +6 −0 js/googletranslate.js
  199. +14 −0 js/ie6submenus.js
  200. +7 −0 js/menubar.js
  201. +33 −0 js/multicomic.js
  202. +20 −0 js/pre.js
  203. +28 −0 js/scroll.js
  204. +2,278 −0 lang/comicpress.pot
  205. +25 −0 layout-foot.php
  206. +59 −0 layout-head.php
  207. +27 −0 links.php
  208. +33 −0 members-blog.php
  209. +234 −0 options/addonoptions.php
  210. +111 −0 options/archivesearchoptions.php
  211. +175 −0 options/configoptions.php
  212. +32 −0 options/debug.php
  213. +291 −0 options/generaloptions.php
  214. +110 −0 options/indexoptions.php
  215. +75 −0 options/menubaroptions.php
  216. +240 −0 options/options.css
  217. +307 −0 options/postoptions.php
  218. +115 −0 options/themestyle.php
  219. +34 −0 page.php
  220. +51 −0 readme.txt
  221. BIN screenshot.png
  222. +47 −0 search.php
  223. +7 −0 searchform.php
  224. +3 −0 sidebar-above.php
  225. +3 −0 sidebar-blog.php
  226. +3 −0 sidebar-comicleft.php
  227. +3 −0 sidebar-comicright.php
  228. +3 −0 sidebar-footer.php
  229. +3 −0 sidebar-header.php
  230. +17 −0 sidebar-left.php
  231. +3 −0 sidebar-menubar.php
  232. +3 −0 sidebar-over.php
  233. +3 −0 sidebar-overblog.php
  234. +20 −0 sidebar-right.php
  235. +3 −0 sidebar-under.php
  236. +3 −0 sidebar-underblog.php
  237. +94 −0 single.php
  238. +1,731 −0 style.css
  239. +178 −0 widgets/archivedropdown.php
  240. +104 −0 widgets/calendar.php
  241. +58 −0 widgets/childrenpages.php
  242. +147 −0 widgets/classicbookmark.php
  243. +130 −0 widgets/classicmenubar.php
  244. +371 −0 widgets/comic-navigation.php
  245. +91 −0 widgets/comicblogpost.php
  246. +53 −0 widgets/comicdate.php
  247. +38 −0 widgets/comictitle.php
  248. +47 −0 widgets/comments.php
  249. +80 −0 widgets/controlpanel.php
  250. +159 −0 widgets/jquerybookmark.php
  251. +47 −0 widgets/latestcomiclink.php
  252. +52 −0 widgets/latestcomics.php
  253. +69 −0 widgets/latestexcerpt.php
  254. +87 −0 widgets/latesthumbnail.php
  255. +96 −0 widgets/menubar.php
  256. +58 −0 widgets/multisite-list.php
  257. +49 −0 widgets/nonmembertext.php
  258. +50 −0 widgets/permalink.php
  259. +48 −0 widgets/randomcomic.php
  260. +48 −0 widgets/randompostlink.php
  261. +56 −0 widgets/scheduledposts.php
  262. +88 −0 widgets/social.php
  263. +94 −0 widgets/transcript.php
  264. +51 −0 widgets/translator.php
  265. +161 −0 wpmu/comicpress_manager_wpmu.php
13 404.php
@@ -0,0 +1,13 @@
+<?php get_header(); ?>
+
+<div class="post 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('url') ?>"><?php _e('Click here to return to the home page','comicpress'); ?></a> <?php _e('or try a search:','comicpress'); ?></p>
+ <p><?php the_widget('WP_Widget_Search'); ?></p>
+ </div>
+ <div class="post-foot"></div>
+</div>
+
+<?php get_footer() ?>
50 addons/custom-image-header.php
@@ -0,0 +1,50 @@
+<?php
+
+// Custom Image Header Defaults
+// define('HEADER_TEXTCOLOR', '000');
+// define('HEADER_IMAGE', ''); // %s is theme dir
+define('HEADER_IMAGE_WIDTH', comicpress_themeinfo('custom_image_header_width'));
+define('HEADER_IMAGE_HEIGHT', comicpress_themeinfo('custom_image_header_height'));
+define( 'NO_HEADER_TEXT', true );
+
+function theme_admin_header_style() { ?>
+<style type="text/css">
+#headimg {
+ width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
+ height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
+ background: url(<?php header_image(); ?>) no-repeat center;
+}
+
+#headimg h1, #headimg .description {
+ text-decoration: none;
+<?php if (get_header_textcolor() == 'blank') { ?>
+ display: none;
+<?php } else { ?>
+ color: #<?php header_textcolor();?>;
+<?php } ?>
+}
+</style>
+ <?php
+}
+
+function theme_header_style() {
+ if (get_header_image()) { ?>
+<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 if ( 'blank' == get_header_textcolor() ) { ?>
+#header h1, #header .description { display: none; }
+ <?php } else { ?>
+#header * { color: #<?php header_textcolor();?>; }
+ <?php } ?>
+ </style>
+
+ <?php }
+}
+
+add_custom_image_header('theme_header_style', 'theme_admin_header_style');
+
+?>
99 addons/ipn.php
@@ -0,0 +1,99 @@
+<?php
+
+define('WP_USE_THEMES', false);
+require('../../../../wp-load.php');
+
+$logging = true;
+
+if ($logging) {
+ $myFile = "transactions.txt";
+ $fh = fopen($myFile, 'w');
+ fwrite ( $fh, "--------------------------------------------------\n" );
+ fwrite ( $fh, "Begin Instant Payment Notification\n" );
+}
+
+// read the post from PayPal system and add 'cmd'
+$req = 'cmd=_notify-validate';
+// Get each element of IPN request
+foreach ($_POST as $key => $value) {
+ $value = urlencode(stripslashes($value));
+ $req .= "&$key=$value";
+ if ($logging) {
+ fwrite ( $fh, "$key = $value \n" );
+ }
+}
+// post back to PayPal system to validate
+$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
+$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
+$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
+$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
+// assign posted variables to local variables
+$item_name = $_POST['item_name'];
+$item_number = $_POST['item_number'];
+$payment_status = $_POST['payment_status'];
+$payment_amount = $_POST['mc_gross'];
+$payment_currency = $_POST['mc_currency'];
+$txn_id = $_POST['txn_id'];
+$receiver_email = $_POST['receiver_email'];
+$payer_email = $_POST['payer_email'];
+
+if (!$fp) {
+ if ($logging) {
+ fwrite ( $fh, "HTTP ERROR\n" );
+ }
+ // HTTP ERROR
+} else {
+ if ($logging) {
+ fwrite ( $fh, "NO HTTP ERROR\n" );
+ }
+ fputs ($fp, $header . $req);
+ while (!feof($fp)) {
+ $res = fgets ($fp, 1024);
+ if (strcmp ($res, "VERIFIED") == 0) {
+ if ($logging) {
+ fwrite ( $fh, "VERIFIED = 0\n" );
+ }
+ // check the payment_status is Completed
+ // check that txn_id has not been previously processed
+ // check that receiver_email is your Primary PayPal email
+ $comicpress_options = get_option('comicpress_options');
+ if ( strtolower ( urldecode ( $receiver_email ) ) != strtolower ( $comicpress_options['buy_print_email'] ) ) {
+ if ($logging) {
+ fwrite ( $fh, "RECEIVER EMAILS DONT MATCH\n" );
+ }
+ exit;
+ }
+ // check that payment_amount/payment_currency are correct
+ // process payment
+ // Mark as sold!
+ $post_id = (int)$item_number;
+ if ($logging) {
+ fwrite ( $fh, "Setting Post $post_id from Available to Sold..." );
+ }
+ // Make whatever update here to the what you need updated. /\
+ update_post_meta($post_id, 'buyorig-status', 'Sold');
+ if ($logging) {
+ fwrite ( $fh, "done\n" );
+ }
+ // Flush the cache on the item in question.
+ if (defined('WP_CACHE') && WP_CACHE == true) {
+ wp_cache_no_postid($item_number);
+ }
+
+ }
+ else if (strcmp ($res, "INVALID") == 0) {
+ if ($logging) {
+ fwrite ( $fh, "INVALID = 0\n" );
+ }
+ // log for manual investigation
+ }
+ }
+ fclose ($fp);
+}
+if ($logging) {
+ fwrite ( $fh, "End Instant Payment Notification\n" );
+ fwrite ( $fh, "--------------------------------------------------\n" );
+ fclose ( $fh );
+}
+
+?>
134 addons/membersonly.php
@@ -0,0 +1,134 @@
+<?php
+/**
+ * Members Only
+ * by Philip M. Hofer (Frumph)
+ * http://frumph.net/
+ *
+ * Displays content that only registered users that are marked members can see.
+ *
+ * example: [members]Only members can read this.[/members]
+ *
+ *
+ */
+
+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_themeinfo('members_post_category') && comicpress_themeinfo('disable_showing_members_category'))
+ add_filter('pre_get_posts','comicpress_members_filter');
+
+function comicpress_members_filter($query) {
+ global $current_user;
+ $members_post_category = comicpress_themeinfo('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_user_meta($current_user->ID,'comicpress-is-member', true);
+ }
+ if (!$is_member || 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) && !empty($content) ) {
+ $is_member = get_user_meta($current_user->ID,'comicpress-is-member', true);
+ if ($is_member || current_user_can('manage_options')) {
+ $content = str_replace('<p>', '', $content);
+ $content = str_replace('</p>', '', $content);
+ $returninfo = "<div class=\"members-only\">$content</div>\r\n";
+ }
+ }
+ return $returninfo;
+}
+
+function comicpress_profile_members_only() {
+ global $profileuser, $current_user, $errormsg;
+ $comicpress_is_member = get_user_meta($profileuser->ID,'comicpress-is-member', true);
+ if (empty($comicpress_is_member)) $comicpress_is_member = 0;
+ ?>
+ <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')) { ?>
+ <input id="comicpress-is-member" name="comicpress-is-member" type="checkbox" value="1" <?php checked(true, get_user_meta($profileuser->ID,'comicpress-is-member', true)); ?> />
+ <?php } else {
+ if ($comicpress_is_member) {
+ echo 'Is Member';
+ } else {
+ echo 'Not a Member';
+ }
+ }
+ ?>
+ </td>
+ </tr>
+ </table>
+<?php }
+
+
+function comicpress_profile_members_only_save() {
+ $id = (int)$_POST['user_id'];
+ $is_member = (int)$_POST['comicpress-is-member'];
+ $comicpress_is_member = (bool)( $is_member == 1 ? 1 : 0 );
+ 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;
+ $members_post_category = comicpress_themeinfo('members_post_category');
+ $members_post_category_array = array();
+ $members_post_category_array = explode(',',$members_post_category);
+ $thecats = array();
+ $category = get_the_category($post->ID);
+ $thecats[] = $category[0]->cat_ID;
+ return (count(array_intersect($members_post_category_array, $thecats)) > 0);
+}
+
+function comicpress_is_member() {
+ global $user_ID;
+ if (!empty($user_ID)) {
+ $is_member = get_user_meta($user_ID,'comicpress-is-member', true);
+ if ($is_member || current_user_can('manage_options')) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function comicpress_members_comment_filter($content) {
+ global $post;
+ if (comicpress_themeinfo('enable_members_only_post_comments') && in_members_category()) {
+ if ( is_user_logged_in() && comicpress_is_member() ) {
+ return $content;
+ } else {
+ 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>';
+ }
+ }
+ return $content;
+}
+
+add_filter('comment_text', 'comicpress_members_comment_filter');
+
+
+?>
69 addons/relatedcomics.php
@@ -0,0 +1,69 @@
+<?php
+/**
+ * Related comics
+ * Displays a list of comic links that are related to this current one using shortcode.
+ *
+ * Usage: [related_comics]
+ *
+ */
+
+function comicpress_related_comics_shortcode( $atts = '' ) {
+ extract(shortcode_atts(array(
+ 'limit' => '5',
+ ), $atts));
+
+ global $wpdb, $post, $table_prefix;
+
+ 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 RAND() DESC, p.post_date_gmt DESC
+ LIMIT $limit;";
+
+ $related = $wpdb->get_results($q);
+ $retval = '';
+ if ( $related ) {
+ $retval = '
+ <div class="related_comics">
+ <h4>Related Comics &not;</h4>';
+ $retval .= '
+ <ul>';
+ $in_comic_cat = 0;
+ $retval .= '
+ <table class="month-table">';
+ foreach($related as $r) :
+ $thecats = array();
+ $categories = get_the_category($r->ID);
+ $thecats[] = $categories[0]->cat_ID;
+ if (count(array_intersect(comicpress_all_comic_categories_array(), $thecats)) > 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>';
+ $retval .= '
+ </ul>';
+ $retval .= '
+</div>';
+ }
+ return $retval;
+ }
+ return;
+}
+add_shortcode('related_comics', 'comicpress_related_comics_shortcode');
+
+
+?>
111 addons/relatedposts.php
@@ -0,0 +1,111 @@
+<?php
+/**
+ * Related posts
+ * Displays a list of blog links that are related to this current one using shortcode.
+ *
+ * Usage: [related_posts]
+ *
+ */
+
+function comicpress_related_posts_shortcode( $atts = '' ) {
+ extract(shortcode_atts(array(
+ 'limit' => '5',
+ ), $atts));
+
+ global $wpdb, $post, $table_prefix;
+ 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 RAND() DESC, p.post_date_gmt DESC
+ LIMIT $limit;";
+
+ $related = $wpdb->get_results($q);
+ $retval = '';
+ $goodtogo = false;
+ if ( $related ) {
+ $retval = '
+ <div class="related_posts">
+ <h4>Related Posts &not;</h4>';
+ $retval .= '
+ <ul>';
+ $in_comic_cat = 0;
+ $counter = 0;
+ $retval .= '
+ <table class="month-table">';
+ foreach($related as $r) :
+ $thecats = array();
+ $categories = get_the_category($r->ID);
+ $thecats[] = $categories[0]->cat_ID;
+ if (count(array_intersect(comicpress_all_comic_categories_array(), $thecats)) == 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>';
+ $goodtogo = true;
+ }
+ endforeach;
+ $retval .= '
+ </table>';
+ $retval .= '
+ </ul>';
+ $retval .= '
+</div>';
+ }
+ if ($goodtogo) return $retval;
+ }
+ return;
+}
+/*
+function related_posts_shortcode( $atts = '' ) {
+ extract(shortcode_atts(array(
+ 'limit' => '5',
+ ), $atts));
+
+ global $wp_query, $wpdb, $post, $non_comic_categories;
+ if ($post->ID) {
+ if (empty($limit)) $limit = 5;
+
+ //for use in the loop, list 5 post titles related to first tag on current post
+ $tags = wp_get_post_tags($post->ID);
+ $tagIDs = array();
+ if ($tags) {
+ $tagcount = count($tags);
+ for ($i = 0; $i < $tagcount; $i++) {
+ $tagIDs[$i] = $tags[$i]->term_id;
+ }
+ $args=array(
+ 'category__in' => array(1,3,31),
+ 'tag__and' => $tagIDs,
+ 'showposts'=>5,
+ 'post__not_in' => array($post->ID),
+ 'caller_get_posts'=>1
+ );
+ $my_query = new WP_Query($args);
+ $temp_query = $wp_query;
+ $wp_query->in_the_loop = true;
+ if( $my_query->have_posts() ) {
+ while ($my_query->have_posts()) : $my_query->the_post(); ?>
+ <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
+ <?php endwhile;
+ }
+ $wp_query = $temp_query;
+ $temp_query = null;
+ }
+
+ }
+}
+*/
+add_shortcode('related_posts', 'comicpress_related_posts_shortcode');
+
+?>
165 archive-comic-calendar.php
@@ -0,0 +1,165 @@
+<?php
+/*
+Template Name: Comic Calendar Archive
+*/
+get_header();
+remove_filter('pre_get_posts','comicpress_members_filter');
+
+$cpdayWidth = 22; //set to .cpcal-day total width in pixels including: width, left & right border, left & right margin, left & right padding
+
+if (isset($_GET['archive_year'])) {
+ $archive_year = (int)$_GET['archive_year'];
+} else {
+ if (comicpress_themeinfo('archive_start_latest_year')) {
+ $latest_comic = comicpress_get_terminal_post_in_category(comicpress_all_comic_categories_string(),false);
+ } else {
+ $latest_comic = comicpress_get_terminal_post_in_category(comicpress_all_comic_categories_string(),true);
+ }
+ $archive_year = get_post_time('Y', false, $latest_comic, true);
+}
+if (empty($archive_year)) $archive_year = date('Y');
+
+$firstDayMargins = array();
+for ($i = 1; $i <= 12; ++$i) {
+ $dateInfo = getdate(mktime(0,0,0,$i,1,$archive_year));
+ $firstDayMargins[$i] = $dateInfo['wday'] * $cpdayWidth;
+}
+
+$tempPost = $post;
+$comicArchive = new WP_Query();
+if (comicpress_themeinfo('template-comic-year-all-cats')) {
+ $comicArchive->query('showposts=-1&posts_per_page=-1&year='.$archive_year);
+} else {
+ $comicArchive->query('showposts=-1&posts_per_page=-1&cat='.comicpress_all_comic_categories_string().'&year='.$archive_year);
+}
+while ($comicArchive->have_posts()) : $comicArchive->the_post();
+ $calTitle = get_the_title();
+ $calLink = get_permalink();
+ $calDay = get_the_time('j');
+ $calMonth = get_the_time('F');
+ $calComic[$calMonth.$calDay] = array('link' => $calLink, 'title' => $calTitle);
+endwhile;
+$post = $tempPost;
+
+function leapYear($yr) {
+ if ($yr % 4 != 0) {
+ return 28;
+ } else {
+ if ($yr % 100 != 0) {
+ return 29;
+ } else {
+ if ($yr % 400 != 0) {
+ return 28;
+ } else {
+ return 29;
+ }
+ }
+ }
+}
+$leapYear = leapYear($archive_year);
+
+$cpmonth['1'] = array('month' => __('January','comicpress'), 'days' => '31');
+$cpmonth['2'] = array('month' => __('February','comicpress'), 'days' => $leapYear);
+$cpmonth['3'] = array('month' => __('March','comicpress'), 'days' => '31');
+$cpmonth['4'] = array('month' => __('April','comicpress'), 'days' => '30');
+$cpmonth['5'] = array('month' => __('May','comicpress'), 'days' => '31');
+$cpmonth['6'] = array('month' => __('June','comicpress'), 'days' => '30');
+$cpmonth['7'] = array('month' => __('July','comicpress'), 'days' => '31');
+$cpmonth['8'] = array('month' => __('August','comicpress'), 'days' => '31');
+$cpmonth['9'] = array('month' => __('September','comicpress'), 'days' => '30');
+$cpmonth['10'] = array('month' => __('October','comicpress'), 'days' => '31');
+$cpmonth['11'] = array('month' => __('November','comicpress'), 'days' => '30');
+$cpmonth['12'] = array('month' => __('December','comicpress'), 'days' => '31');
+
+?>
+<div <?php post_class(); ?>>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <div class="post-info">
+ <div class="post-text">
+ <h2 class="page-title"><?php the_title(); ?> <?php echo $archive_year; ?></h2>
+ </div>
+ </div>
+ <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 ) {
+ if ($year != (0) ) { ?>
+ <a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> |
+ <?php } } ?>
+ </div>
+ <div class="cpcal-cals">
+ <?php $i=1; while($i<=12) {
+ $calendar_directory = comicpress_themeinfo('calendar_directory');
+ if (!empty($calendar_directory) && $calendar_directory != 'none') { ?>
+ <div class="cpcal-month" style="height: 257px;" id="<?php echo $cpmonth[$i]['month'] ?>">
+ <?php if (file_exists(get_stylesheet_directory() . '/images/cal') && $calendar_directory != 'default') { ?>
+
+ <?php if (file_exists(get_stylesheet_directory().'/images/cal/'.$calendar_directory.'/'.$archive_year)) { ?>
+ <?php if (count($cpmonthfile = glob(get_stylesheet_directory().'/images/cal/'.$calendar_directory.'/'.$archive_year.'/'.strtolower($cpmonth[$i]['month']).'.*')) > 0) {
+ if (is_array($cpmonthfile)) $cpmonthfile = reset($cpmonthfile); ?>
+ <img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo $archive_year; ?>/<?php echo basename($cpmonthfile); ?>" alt="<?php echo $cpmonth[$i]['month'] ?>" title="<?php echo $cpmonth[$i]['month'] ?>" />
+ <?php } else { ?>
+ <img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/images/cal/default.png" alt="<?php echo $cpmonth[$i]['month'] ?>" title="<?php echo $cpmonth[$i]['month'] ?>" />
+ <?php } ?>
+ <?php } else { ?>
+ <?php if (count($cpmonthfile = glob(get_stylesheet_directory().'/images/cal/'.$calendar_directory.'/'.strtolower($cpmonth[$i]['month']).'.*')) > 0) {
+ if (is_array($cpmonthfile)) $cpmonthfile = reset($cpmonthfile); ?>
+ <img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo basename($cpmonthfile); ?>" alt="<?php echo $cpmonth[$i]['month'] ?>" title="<?php echo $cpmonth[$i]['month'] ?>" />
+ <?php } else { ?>
+ <img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/images/cal/default.png" alt="<?php echo $cpmonth[$i]['month'] ?>" title="<?php echo $cpmonth[$i]['month'] ?>" />
+ <?php } ?>
+ <?php } ?>
+
+ <?php } else { ?>
+
+
+ <?php if (file_exists(get_template_directory().'/images/cal/'.$calendar_directory.'/'.$archive_year)) { ?>
+ <?php if (count($cpmonthfile = glob(get_template_directory().'/images/cal/'.$calendar_directory.'/'.$archive_year.'/'.strtolower($cpmonth[$i]['month']).'.*')) > 0) {
+ if (is_array($cpmonthfile)) $cpmonthfile = reset($cpmonthfile); ?>
+ <img class="cpcal-image" src="<?php echo get_template_directory_uri(); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo $archive_year; ?>/<?php echo basename($cpmonthfile); ?>" alt="<?php echo $cpmonth[$i]['month'] ?>" title="<?php echo $cpmonth[$i]['month'] ?>" />
+ <?php } else { ?>
+ <img class="cpcal-image" src="<?php echo get_template_directory_uri(); ?>/images/cal/default.png" alt="<?php echo $cpmonth[$i]['month'] ?>" title="<?php echo $cpmonth[$i]['month'] ?>" />
+ <?php } ?>
+ <?php } else { ?>
+ <?php if (count($cpmonthfile = glob(get_template_directory().'/images/cal/'.$calendar_directory.'/'.strtolower($cpmonth[$i]['month']).'.*')) > 0) {
+ if (is_array($cpmonthfile)) $cpmonthfile = reset($cpmonthfile); ?>
+ <img class="cpcal-image" src="<?php echo get_template_directory_uri(); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo basename($cpmonthfile); ?>" alt="<?php echo $cpmonth[$i]['month'] ?>" title="<?php echo $cpmonth[$i]['month'] ?>" />
+ <?php } else { ?>
+ <img class="cpcal-image" src="<?php echo get_template_directory_uri(); ?>/images/cal/default.png" alt="<?php echo $cpmonth[$i]['month'] ?>" title="<?php echo $cpmonth[$i]['month'] ?>" />
+ <?php } ?>
+ <?php } ?>
+
+ <?php } ?>
+
+ <?php } else { ?>
+ <div class="cpcal-month" style="height: 137px;" id="<?php echo $cpmonth[$i]['month'] ?>">
+
+ <?php } ?>
+ <div class="cpcal-monthtitle"><?php echo $cpmonth[$i]['month']." ".$archive_year ?></div>
+ <?php foreach(array("S", "M", "T", "W", "T", "F", "S") as $dow) { ?>
+ <div class="cpcal-dayletter"><?php echo $dow ?></div>
+ <?php } ?>
+ <div class="clear"></div>
+ <?php $cpday=1; while($cpday<=$cpmonth[$i]['days']) {
+ if ($cpday == 1) { ?>
+ <div style="width:<?php echo $firstDayMargins[$i]; ?>px;height:15px;float:left;"></div>
+ <?php } ?>
+ <div class="cpcal-day">
+ <?php if (isset($calComic[$cpmonth[$i]['month'].$cpday])) { ?>
+ <a href="<?php echo $calComic[$cpmonth[$i]['month'].$cpday]['link'] ?>" title="<?php echo $calComic[$cpmonth[$i]['month'].$cpday]['title'] ?>"><?php echo $cpday ?></a>
+ <?php } else {
+ echo $cpday." ";
+ } ?>
+ </div>
+ <?php ++$cpday;
+ }
+ ++$i ?>
+ </div>
+ <?php } ?>
+ </div>
+ <div class="clear"></div>
+ </div>
+ <div class="post-foot"></div>
+</div>
+
+<?php get_footer() ?>
44 archive-comic-month.php
@@ -0,0 +1,44 @@
+<?php
+/*
+Template Name: This Month of Comics
+*/
+get_header();
+
+//based on Austin Matzko's code from wp-hackers email list
+function filter_where($where = '') {
+ //posts in the last 30 days
+ $where .= " AND post_date > '" . date('Y-m-d', strtotime('-30 days')) . "'";
+ // $where .= " AND post_date >= '2009-03-01' AND post_date < '2009-03-16'";
+ return $where;
+}
+add_filter('posts_where', 'filter_where');
+
+
+$wp_query->in_the_loop = true;
+$archiveQuery = new WP_Query();
+$archiveQuery->query('show_posts=-1&posts_per_page=-1&cat='.comicpress_all_comic_categories_string());
+
+?>
+<div <?php post_class(); ?>>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <div class="post-info">
+ <div class="post-text">
+ <h2 class="page-title"><?php the_title(); ?></h2>
+ </div>
+ </div>
+<?php if ($archiveQuery->have_posts()) : while ($archiveQuery->have_posts()) : $archiveQuery->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; ?>
+ <div class="clear"></div>
+ </div>
+ <div class="post-foot"></div>
+</div>
+
+<?php get_footer() ?>
68 archive-comic-storyline-thumbs.php
@@ -0,0 +1,68 @@
+<?php
+/*
+Template Name: Comic Storyline with Thumbs
+*/
+get_header();
+?>
+<div <?php post_class(); ?>>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <div class="post-info">
+ <div class="post-text">
+ <h2 class="page-title"><?php the_title(); ?></h2>
+ </div>
+ </div>
+ <ul id="storyline" class="level-0">
+<?php if (comicpress_themeinfo('enable-storyline-support') == 1) {
+ if (($result = comicpress_themeinfo('storyline-category-order')) !== false) {
+ $categories_by_id = comicpress_get_comic_category_objects_by_id();
+ $current_depth = 0;
+ $storyline_root = " class=\"storyline-root\"";
+ foreach (explode(",", $result) as $node) {
+ $parts = explode("/", $node);
+ $target_depth = count($parts) - 2;
+ $category_id = end($parts);
+ $category = $categories_by_id[$category_id];
+ $description = $category->description;
+ $first_comic_in_category = comicpress_get_terminal_post_in_category($category_id);
+ $first_comic_permalink = get_permalink($first_comic_in_category->ID);
+ $archive_image = get_comic_url('mini', $first_comic_in_category);
+ $post_title = $first_comic_in_category->post_title;
+ if (!empty($archive_image) && is_array($archive_image)) $archive_image = reset($archive_image);
+ if ($target_depth < $current_depth) {
+ echo str_repeat("</ul></li>", ($current_depth - $target_depth));
+ }
+ if ($target_depth > $current_depth) {
+ for ($i = $current_depth; $i < $target_depth; ++$i) {
+ $next_i = $i + 1;
+ echo "<li><ul class=\"level-${next_i}\">";
+ }
+ } ?>
+
+ <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 get_category_link($category_id); ?>" title="<?php echo $category->cat_name ?>."><img src="<?php echo $archive_image ?>" alt="<?php echo $post_title; ?>" /></a>
+ <?php } ?>
+ <a href="<?php echo $first_comic_permalink; ?>" class="storyline-title" title="First Comic"><?php echo $category->cat_name ?></a>
+ <?php if (!empty($description)) { ?>
+ <div class="storyline-description"><?php echo $description ?></div>
+ <?php } ?>
+ <div class="storyline-foot"></div>
+ </li>
+
+ <?php $current_depth = $target_depth;
+ }
+ if ($current_depth > 0) {
+ echo str_repeat("</ul></li>", $current_depth);
+ }
+ }
+ } else { ?>
+ <li><h3>Storyline Support is not currently enabled on this site.</h3><br /><br /><strong>Note to the Administrator:</strong><br /> To enable storyline support and manage storyline categories make sure you are running the latest version of the <a href="http://wordpress.org/extend/plugins/comicpress-manager/">ComicPress Manager</a> plugin and check your storyline settings from it's administration menu.</h3></li>
+ <?php } ?>
+ </ul>
+ <div class="clear"></div>
+ </div>
+ <div class="post-foot"></div>
+</div>
+
+<?php get_footer() ?>
67 archive-comic-storyline.php
@@ -0,0 +1,67 @@
+<?php
+/*
+Template Name: Comic Storyline Archive
+*/
+get_header();
+?>
+<div <?php post_class(); ?>>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <div class="post-info">
+ <div class="post-text">
+ <h2 class="page-title"><?php the_title(); ?></h2>
+ </div>
+ </div>
+ <ul id="storyline" class="level-0">
+ <?php if (comicpress_themeinfo('enable-storyline-support') == 1) {
+ if (($result = comicpress_themeinfo('storyline-category-order')) !== false) {
+ $categories_by_id = comicpress_get_comic_category_objects_by_id();
+ $current_depth = 0;
+ $storyline_root = " class=\"storyline-root\"";
+ foreach (explode(",", $result) as $node) {
+ $parts = explode("/", $node);
+ $target_depth = count($parts) - 2;
+ $category_id = end($parts);
+ $category = $categories_by_id[$category_id];
+ $description = $category->description;
+ $first_comic_in_category = comicpress_get_terminal_post_in_category($category_id);
+ $first_comic_permalink = get_permalink($first_comic_in_category->ID);
+ if ($target_depth < $current_depth) {
+ echo str_repeat("</ul></li>", ($current_depth - $target_depth));
+ }
+ if ($target_depth > $current_depth) {
+ for ($i = $current_depth; $i < $target_depth; ++$i) {
+ $next_i = $i + 1;
+ echo "<li><ul class=\"level-${next_i}\">";
+ }
+ } ?>
+
+ <li id="storyline-<?php echo $category->category_nicename ?>"<?php echo $storyline_root; $storyline_root = null ?>>
+ <a href="<?php echo get_category_link($category_id) ?>" class="storyline-title"><?php echo $category->cat_name ?></a>
+ <div class="storyline-description">
+ <?php if (!empty($description)) { ?>
+ <?php echo $description ?>
+ <?php } ?>
+ <?php if (!empty($first_comic_in_category)) { ?>
+ <?php _e('Begins with &ldquo;','comicpress'); ?><a href="<?php echo $first_comic_permalink ?>"><?php echo $first_comic_in_category->post_title ?></a><?php _e('&rdquo;','comicpress'); ?>
+ <?php } ?>
+ </div>
+ <div class="storyline-foot"></div>
+ </li>
+
+ <?php $current_depth = $target_depth;
+ }
+ if ($current_depth > 0) {
+ echo str_repeat("</ul></li>", $current_depth);
+ }
+ }
+ } else { ?>
+ <li><h3><?php _e('Storyline Support is not currently enabled on this site.','comicpress'); ?></h3><br /><br /><strong><?php _e('Note to the Administrator:','comicpress'); ?></strong><br /> <?php _e('To enable storyline support and manage storyline categories make sure you are running the latest version of the ','comicpress'); ?><a href="http://wordpress.org/extend/plugins/comicpress-manager/">ComicPress Manager</a> <?php _e('plugin and check your storyline settings from it\'s administration menu.','comicpress'); ?></h3></li>
+ <?php } ?>
+ </ul>
+ <div class="clear"></div>
+ </div>
+ <div class="post-foot"></div>
+</div>
+
+<?php get_footer() ?>
71 archive-comic-year.php
@@ -0,0 +1,71 @@
+<?php
+/*
+Template Name: Comic Year Archive
+*/
+get_header();
+
+if (isset($_GET['archive_year'])) {
+ $archive_year = (int)$_GET['archive_year'];
+} else {
+ if (comicpress_themeinfo('archive_start_latest_year')) {
+ $latest_comic = comicpress_get_terminal_post_in_category(comicpress_all_comic_categories_string(),false);
+ } else {
+ $latest_comic = comicpress_get_terminal_post_in_category(comicpress_all_comic_categories_string(),true);
+ }
+ $archive_year = get_post_time('Y', false, $latest_comic, true);
+}
+if (empty($archive_year)) $archive_year = date('Y');
+
+$is_comic = false;
+while (have_posts()) : the_post();
+?>
+
+<div <?php post_class(); ?>>
+ <?php comicpress_display_post_thumbnail($is_comic); ?>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <div class="post-info">
+ <div class="post-text">
+ <h2 class="page-title"><?php the_title(); ?> <?php echo $archive_year; ?></h2>
+ </div>
+ </div>
+ <div class="clear"></div>
+ <div class="entry">
+ <?php the_content(); ?>
+ <div class="clear"></div>
+ </div>
+ <?php wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">'.__('Pages:','comicpress').'</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
+ <?php edit_post_link(__('Edit this page.','comicpress'), '', ''); ?>
+ </div>
+ <div class="post-foot"></div>
+</div>
+
+<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 ) {
+ if ($year != (0) ) { ?>
+ <a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> |
+ <?php } } ?>
+ </div>
+ <div class="clear"></div>
+ <table class="month-table">
+ <?php
+ if (comicpress_themeinfo('template-comic-year-all-cats')) {
+ $posts = &query_posts('showposts=-1&year='.(int)$archive_year);
+ } else {
+ $posts = &query_posts('showposts=-1&cat='.comicpress_all_comic_categories_string().'&year='.(int)$archive_year);
+ }
+ while (have_posts()) : 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>
+ <div class="clear"></div>
+ </div>
+ <div class="post-foot"></div>
+</div>
+<?php endwhile; ?>
+<?php get_footer() ?>
43 archive-comic.php
@@ -0,0 +1,43 @@
+<?php
+/*
+Template Name: Comic Archive
+*/
+get_header();
+?>
+<div <?php post_class(); ?>>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <div class="post-info">
+ <div class="post-text">
+ <h2 class="page-title"><?php the_title(); ?></h2>
+ </div>
+ </div>
+ </div>
+</div>
+<?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">
+ <div class="post-info">
+ <div class="post-text">
+ <h3><?php echo $year ?></h3>
+ </div>
+ </div>
+ <table class="month-table">
+ <?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.comicpress_all_comic_categories_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>
+ <div class="clear"></div>
+ </div>
+ <div class="post-foot"></div>
+</div>
+ <?php }
+} ?>
+
+<?php get_footer() ?>
104 archive.php
@@ -0,0 +1,104 @@
+<?php
+get_header();
+$category_thumbnail_postcount = comicpress_themeinfo('category_thumbnail_postcount');
+$archive_display_order = comicpress_themeinfo('archive_display_order');
+
+// Get the total count no matter what type of archive
+$tmp_search = new WP_Query($query_string.'&show_posts=-1&posts_per_page=-1');
+$count = $tmp_search->post_count;
+if (!$count) $count = "no";
+
+if (is_category()) {
+ $theCatId = get_term_by( 'slug', $wp_query->query_vars['category_name'], 'category' );
+ $theCatId = $theCatId->term_id;
+}
+
+if (is_category() && comicpress_in_comic_category($theCatId) && comicpress_themeinfo('archive_display_comic_thumbs_in_order')) {
+ $posts = &query_posts($query_string.'&showposts='.$category_thumbnail_postcount.'&order='.$archive_display_order);
+} else {
+ $posts = &query_posts($query_string.'&order='.$archive_display_order);
+}
+
+if (have_posts()) :
+?>
+ <?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 &#8216;','comicpress'); ?><?php single_cat_title() ?>&#8217;</h2>
+ <?php /* Tag Archive */ } elseif( is_tag() ) { ?>
+ <h2 class="pagetitle"><?php _e('Posts Tagged &#8216;','comicpress'); ?><?php single_tag_title() ?>&#8217;</h2>
+ <?php /* Daily Archive */ } elseif (is_day()) { ?>
+ <h2 class="pagetitle"><?php _e('Archive for','comicpress'); ?> <?php the_time('F jS, Y') ?></h2>
+ <?php /* Monthly Archive */ } elseif (is_month()) { ?>
+ <h2 class="pagetitle"><?php _e('Archive for','comicpress'); ?> <?php the_time('F, Y') ?></h2>
+ <?php /* Yearly Archive */ } elseif (is_year()) { ?>
+ <h2 class="pagetitle"><?php _e('Archive for','comicpress'); ?> <?php the_time('Y') ?></h2>
+ <?php /* Author Archive */ } elseif (is_author()) { ?>
+ <h2 class="pagetitle"><?php _e('Author Archive','comicpress'); ?></h2>
+ <?php /* Paged Archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
+ <h2 class="pagetitle"><?php _e('Archives','comicpress'); ?></h2>
+ <?php /* taxonomy */ } elseif (taxonomy_exists($wp_query->query_vars['taxonomy'])) {
+ if (term_exists($wp_query->query_vars['term'])) { ?>
+ <h2 class="pagetitle"><?php _e('Archive for','comicpress'); ?> <?php echo $wp_query->query_vars['taxonomy']; ?> - <?php echo $wp_query->query_vars['term']; ?></h2>
+ <?php } else { ?>
+ <h2 class="pagetitle"><?php _e('Archive for','comicpress'); ?> <?php echo $wp_query->query_vars['taxonomy']; ?></h2>
+ <?php } ?>
+ <?php /* Post Type */ } elseif ($post->post_type !== 'post') { ?>
+ <h2 class="pagetitle"><?php echo $post->post_type; ?></h2>
+ <?php } ?>
+ <div class="searchresults"><?php printf(_n("%d item.", "%d items.", $count,'comicpress'),$count); ?></div>
+ <div class="clear"></div>
+
+ <?php if (comicpress_themeinfo('archive_display_comic_thumbs_in_order')) { ?>
+ <?php if (is_category() && comicpress_in_comic_category($theCatId)) { ?>
+
+ <div <?php post_class(); ?>>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <?php } ?>
+
+ <?php while (have_posts()) : the_post();
+
+ if (is_category() && comicpress_in_comic_category($theCatId)) { ?>
+ <div class="comicthumbwrap">
+ <?php global $mini_comic_width; ?>
+ <div class="comicthumbdate"><?php echo get_the_time('M jS, Y'); ?></div>
+ <div class="comicarchiveframe" style="width: <?php echo $mini_comic_width; ?>px;">
+ <a href="<?php the_permalink() ?>" title="<?php echo the_title(); ?>"><?php echo comicpress_display_comic_thumbnail('mini', $post, true); ?></a><br />
+ </div>
+ </div>
+ <?php } else {
+ comicpress_display_post();
+ }
+
+ endwhile;
+
+ if (is_category() && comicpress_in_comic_category($theCatId)) { ?>
+ <div class="clear"></div>
+ </div>
+ <div class="post-foot"></div>
+ </div>
+
+ <?php } ?>
+ <?php } else { ?>
+ <?php
+ while (have_posts()) : the_post();
+ comicpress_display_post();
+ endwhile;
+ ?>
+ <?php } ?>
+ <div class="clear"></div>
+ <?php comicpress_pagination(); ?>
+
+ <?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 get_footer() ?>
37 archives.php
@@ -0,0 +1,37 @@
+<?php
+/*
+Template Name: Archives
+*/
+get_header();
+?>
+
+<div <?php post_class(); ?>>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <div class="post-info">
+ <div class="post-text">
+ <h2 class="page-title"><?php the_title(); ?></h2>
+ </div>
+ </div>
+ <div id="archivepage">
+ <h2><?php _e('Archives by Month:','comicpress'); ?></h2>
+ <ul><?php wp_get_archives('type=monthly') ?></ul>
+ </div>
+ <div class="clear"></div>
+ </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>
+ <div class="clear"></div>
+ </div>
+ <div class="post-foot"></div>
+</div>
+
+<?php get_footer() ?>
67 author.php
@@ -0,0 +1,67 @@
+<?php get_header(); ?>
+
+<?php
+ if(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 <?php post_class(); ?>>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <div class="userpage-avatar">
+ <?php echo str_replace('photo', 'photo instant nocorner itxtalt', get_avatar($curauth->user_email, 64, comicpress_random_default_avatar($curauth->user_email), esc_attr($curauth->display_name, 1))); ?>
+ </div>
+ <div class="userpage-info">
+ <div class="userpage-bio">
+ <?php
+ if($curauth->display_name)
+ $authorname = $curauth->display_name;
+ elseif($curauth->user_nickname)
+ $authorname = $curauth->nickname;
+ elseif($curauth->user_nicename)
+ $authorname = $curauth->user_nicename;
+ else
+ $authorname = $curauth->user_login;
+ ?>
+ <cite><?php echo $authorname; ?></cite><br />
+ <?php _e('Registered on','comicpress'); ?> <?php echo date('l \\t\h\e jS \o\f M, Y',strtotime($curauth->user_registered)); ?><br />
+ <br />
+ <?php if (!empty($curauth->user_url)) { ?><?php _e('Website:','comicpress'); ?> <a href="<?php echo $curauth->user_url; ?>" target="_blank"><?php echo $curauth->user_url; ?></a><br /><?php } ?>
+ <?php if (!empty($curauth->aim)) { ?><?php _e('AIM:','comicpress'); ?> <a href="<?php echo $curauth->user_aim; ?>" target="_blank"><?php echo $curauth->aim; ?></a><br /><?php } ?>
+ <?php if (!empty($curauth->jabber)) { ?><?php _e('Jabber/Google Talk:','comicpress'); ?> <a href="<?php echo $curauth->jabber; ?>" target="_blank"><?php echo $curauth->jabber; ?></a><br /><?php } ?>
+ <?php if (!empty($curauth->yim)) { ?><?php _e('Yahoo IM:','comicpress'); ?> <a href="<?php echo $curauth->jabber; ?>" target="_blank"><?php echo $curauth->jabber; ?></a><br /><?php } ?>
+ </div>
+ <?php if (!empty($curauth->description)) { ?>
+ <div class="userpage-desc">
+ <?php echo $curauth->description; ?>
+ </div>
+ <?php } ?>
+ </div>
+ <div class="clear"></div>
+ <div class="userpage-posts">
+ <?php if (have_posts()) { ?>
+ <h3><?php _e('Posts by','comicpress'); ?> <?php echo $authorname; ?> (<?php echo count_user_posts($curauth->ID); ?>) &not;</h3>
+ <?php // this area is a loop that shows what posts the person has done. ?>
+ <ol>
+ <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></li>
+ </ol>
+
+ <?php comicpress_pagination(); ?>
+
+ <?php } ?>
+ </div>
+ </div>
+ <div class="post-foot"></div>
+ </div>
+ <?php } ?>
+
+<?php get_footer() ?>
31 blog.php
@@ -0,0 +1,31 @@
+<?php
+/*
+Template Name: Blog
+*/
+get_header();
+
+$temp_query = $wp_query;
+
+if (!comicpress_themeinfo('split_column_in_two')) {
+ $paged = get_query_var('paged');
+ $blog_query = 'cat='.comicpress_exclude_comic_categories().'&paged='.$paged;
+ $posts = &query_posts($blog_query);
+ if (have_posts()) { ?>
+ <div class="blogindex-head"></div>
+ <div class="blogindex">
+ <?php while (have_posts()) : the_post();
+ comicpress_display_post();
+ endwhile; ?>
+ </div>
+ <div class="blogindex-foot"></div>
+<?php }
+ comicpress_pagination();
+} else {
+ comicpress_dual_columns();
+}
+
+$wp_query = $temp_query; $temp_query = null;
+
+if (is_active_sidebar('under-blog')) get_sidebar('underblog');
+get_footer();
+ ?>
178 buystrip.php
@@ -0,0 +1,178 @@
+<?php
+/*
+Template Name: Buy Print
+Template Author: Philip M. Hofer (Frumph)
+Template URL: http://frumph.net
+Template Author Email: philip@frumph.net
+Template Version: 2.35
+*/
+get_header();
+if (isset($_REQUEST['comic'])) $comicnum = intval($_REQUEST['comic']);
+
+if (isset($_REQUEST['action'])) {
+ $action = esc_attr($_REQUEST['action']);
+ switch ($action) {
+ case 'thankyou': ?>
+ <div class="buyprint-thankyou">
+ Thanks for the purchase!
+ </div>
+ <?php
+ break;
+ case 'cancelled': ?>
+ <div class="buyprint-cancelled">
+ You have cancelled your transaction.
+ </div>
+ <?php
+ break;
+ }
+}
+
+if (isset($comicnum)) {
+
+ $buy_print_orig_amount = get_post_meta($comicnum , 'buy_print_orig_amount', true);
+ if (empty($buy_print_orig_amount)) $buy_print_orig_amount = comicpress_themeinfo('buy_print_orig_amount');
+
+ $buy_print_amount = get_post_meta($comicnum , 'buy_print_amount', true);
+ if (empty($buy_print_amount)) $buy_print_amount = comicpress_themeinfo('buy_print_amount');
+
+ $buyprint_status = get_post_meta($comicnum , 'buyprint-status', true);
+ if (empty($buyprint_status)) $buyprint_status = 'Available';
+
+ $buyorig_status = get_post_meta($comicnum , 'buyorig-status', true);
+ if (empty($buyorig_status)) $buyorig_status = 'Available';
+
+
+
+ $post = & get_post( $comicnum );
+ if (!empty($post))
+ setup_postdata($post);
+?>
+ <div <?php post_class(); ?>>
+ <?php comicpress_display_post_thumbnail(); ?>
+ <div class="post-head"></div>
+ <div class="post-content">
+ <div class="post-url-back">
+ <a href="<?php echo $post->guid; ?>">&lt;-- Return to Comic</a>
+ </div>
+ <div class="clear"></div>
+ <?php _e('Comic ID','comicpress'); ?> #<?php echo $comicnum; ?><br />
+ <?php _e('Title: ','comicpress'); ?><?php echo get_the_title($post); ?><br />
+ <?php _e('Print Status: ','comicpress'); ?><?php echo $buyprint_status; ?><br />
+ <?php if (comicpress_themeinfo('buy_print_sell_original')) {
+ _e('Original Status: ','comicpress'); echo $buyorig_status."<br />\r\n";
+ } ?>
+ <br />
+ <div class="print-thumbnail">
+ <?php
+ echo comicpress_display_comic_thumbnail('archive', $post);
+ ?>
+ </div>
+ <table class="buystriptable">
+ <tr>
+ <td align="left" valign="top">
+ <div class="buyprint-us-form">
+ <h4 class="buyprint-title">Print</h4>
+ $<?php echo $buy_print_amount; ?><br />
+ <?php if ($buyprint_status == 'Available') { ?>
+
+ <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'); ?> - <?php echo get_the_title($post); ?> - <?php echo $this_post->guid; ?>" />
+ <input type="hidden" name="return" value="<?php echo comicpress_themeinfo('buy_print_url'); ?>?action=thankyou&comic=<?php echo $comicnum; ?>" /> <!-- send to buyprint template, trigger thank you -->
+ <input type="hidden" name="amount" value="<?php echo $buy_print_amount;?>" />
+ <input type="hidden" name="item_number" value="<?php echo $comicnum; ?>" />
+ <input type="hidden" name="business" value="<?php echo comicpress_themeinfo('buy_print_email'); ?>" />
+ <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'); ?>" />
+ </form>
+
+ <?php } ?>
+ <?php if ($buyprint_status == 'Sold') { ?>
+ <img src="<?php echo get_template_directory_uri().'/images/sold.png'; ?>" alt="Sold" />
+ <?php } ?>
+ <?php if ($buyprint_status == 'Out Of Stock') { ?>
+ <img src="<?php echo get_template_directory_uri().'/images/outofstock.png'; ?>" alt="Out Of Stock" />
+ <?php } ?>
+ <?php if ($buyprint_status == 'Not Available') { ?>
+ <img src="<?php echo get_template_directory_uri().'/images/notavailable.png'; ?>" alt="Not Available" />
+ <?php } ?>
+ </div>
+ </td>
+ <?php if (comicpress_themeinfo('buy_print_sell_original')) { ?>
+ <td width="40">
+ </td>
+ <td align="left" valign="top">
+ <div class="buyprint-us-form">
+ <h4 class="buyprint-orig-title">Original</h4>
+ $<?php echo $buy_print_orig_amount; ?><br />
+ <?php if ($buyorig_status == 'Available') { ?>
+
+ <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="quantity" value="1" />
+ <input type="hidden" name="notify_url" value="<?php echo get_template_directory_uri().'/addons/ipn.php'; ?>" /> <!-- send to the ipn.php file -->
+ <input type="hidden" name="return" value="<?php echo comicpress_themeinfo('buy_print_url'); ?>?action=thankyou&comic=<?php echo $comicnum; ?>" /> <!-- send to buyprint template, trigger thank you -->
+ <input type="hidden" name="cancel_return" value="<?php echo comicpress_themeinfo('buy_print_url'); ?>?action=cancel&comic=<?php echo $comicnum; ?>" /> <!-- send to the buyprint template, trigger cancel info -->
+ <input type="hidden" name="item_name" value="<?php _e('Original','comicpress'); ?> - <?php echo get_the_title($post); ?> - <?php echo $this_post->guid; ?>" />
+ <input type="hidden" name="amount" value="<?php echo $buy_print_orig_amount;?>" />
+ <input type="hidden" name="item_number" value="<?php echo $comicnum; ?>" />
+ <input type="hidden" name="business" value="<?php echo comicpress_themeinfo('buy_print_email'); ?>" />
+ <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'); ?>" />
+ </form>
+
+ <?php } ?>
+ <?php if ($buyorig_status == 'Sold') { ?>
+ <img src="<?php echo get_template_directory_uri().'/images/sold.png'; ?>" alt="Sold" />
+ <?php } ?>
+ <?php if ($buyorig_status == 'Out Of Stock') { ?>
+ <img src="<?php echo get_template_directory_uri().'/images/outofstock.png'; ?>" alt="Out Of Stock" />
+ <?php } ?>
+ <?php if ($buyorig_status == 'Not Available') { ?>
+ <img src="<?php echo get_template_directory_uri().'/images/notavailable.png'; ?>" alt="Not Available" />
+ <?php } ?>
+ </div>
+ </td>
+ <?php } ?>
+ </tr>
+ </table>
+ <br />
+ <div class="print-text">
+ <?php echo comicpress_themeinfo('buy_print_text'); ?>
+ </div>
+ <div class="clear"></div>
+ </div>
+ <div class="post-foot"></div>
+ </div>
+
+<?php
+ }
+
+if (comicpress_themeinfo('enable_buystrip_post') || empty($comicnum)) {
+ 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_themeinfo('disable_page_titles')) { ?>
+ <h2 class="pagetitle"><?php the_title() ?></h2>
+ <?php } ?>
+ <div class="entry">
+ <?php the_content(); ?>
+ </div>
+ <div class="clear"></div>
+ <?php edit_post_link(__('Edit this page.','comicpress'), '', '') ?>
+ </div>
+ <div class="post-foot"></div>
+</div>
+
+<?php
+ if ('open' == $post->comment_status) { comments_template('', true); }
+
+ endwhile;
+}
+
+get_footer()
+?>
6 changelog.txt
@@ -0,0 +1,6 @@
+2.9.2.22
+
+Added ?latestcomic=# where # = category #
+So you can do ?latestcomic and it will redirect to the latest comic of all categories
+or latestcomic = 3 will redirect to the latestcomic of category ID #3
+
308 comicpress-admin.php
@@ -0,0 +1,308 @@
+<?php
+
+add_action('admin_menu', 'comicpress_options_setup');
+
+function comicpress_options_setup() {
+ $options_title = __('ComicPress Options','comicpress');
+/* if (!function_exists('ceo_pluginfo')) {
+ $admin_title = __("Comic Easel Manager", 'comicpress');
+ $pagehook = add_menu_page($admin_title, __('ComicPress', 'comicpress'), 10, 'comicpress-options', 'comicpress_admin_options', get_template_directory_uri() . '/images/comicpress-icon.png', 9);
+ $pagehook = add_submenu_page('comicpress-options', $admin_title, $options_title, 10, 'comicpress-options', 'comicpress_admin_options');
+ } else { */
+ $pagehook = add_submenu_page('themes.php', $options_title, $options_title, 'edit_themes', 'comicpress-options', 'comicpress_admin_options');
+// }
+ 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-style', get_template_directory_uri() . '/options/options.css');
+}
+
+function comicpress_admin_page_head() { ?>
+ <!--[if lt ie 8]> <style> div.show { position: static; margin-top: 1px; } #cpadmin div.off { height: 22px; } </style> <![endif]-->
+<?php }
+
+
+function comicpress_admin_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=