Permalink
Browse files

Added CDN URL option to comicpress for content delivery networks so t…

…hey can redirect to the proper location where they are stored. added the nocache=1 to the comic-navigation buttons randomcomic

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
  • Loading branch information...
1 parent 0bd327c commit db4ffd53c3ad59182a2be4b1efd0ebeb74db99c1 Philip M. Hofer (Frumph) committed Dec 21, 2010
Showing with 64 additions and 40 deletions.
  1. +2 −0 changelog.txt
  2. +6 −5 comicpress-admin.php
  3. +2 −1 functions.php
  4. +6 −1 functions/displaycomic.php
  5. +47 −1 options/addonoptions.php
  6. +0 −31 options/postoptions.php
  7. +1 −1 widgets/comic-navigation.php
View
@@ -37,6 +37,8 @@ alt-text/hovertext change in the displaypost.php file, it now outputs the hovert
and shows the alt-text whether Rascal is active or not
removed extra id="" in the textarea for the comment form, #comment-textarea no longer exists, its just #comment now
set $outputscript = ''; in the displaycomic.php so it doesn't give notice if it doesn't exist, which it doesn't anyways but oh well; future endeavors.
+missed the &nocache=1 on the comic navigation button, added it so that randomcomic button on the navi works
+
2.9.2.24
Removed the tabindex from the comments.php field for textarea
View
@@ -128,9 +128,7 @@ function comicpress_admin_options() {
'blogposts_with_comic',
'static_blog',
'disable_page_titles',
- 'disable_post_titles',
- 'facebook_like_blog_post',
- 'facebook_like_comic_post'
+ 'disable_post_titles'
) as $key) {
if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
@@ -197,7 +195,9 @@ function comicpress_admin_options() {
'enable_buy_print',
'buy_print_sell_original',
'enable_buystrip_post',
- 'disable_showing_members_category'
+ 'disable_showing_members_category',
+ 'facebook_like_blog_post',
+ 'facebook_like_comic_post'
) as $key) {
if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
@@ -210,7 +210,8 @@ function comicpress_admin_options() {
'buy_print_url',
'buy_print_amount',
'buy_print_orig_amount',
- 'buy_print_text'
+ 'buy_print_text',
+ 'cdn_url'
) as $key) {
if (isset($_REQUEST[$key])) {
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
View
@@ -474,7 +474,8 @@ function comicpress_load_options() {
'copyright_url' => '',
'facebook_like_blog_post' => false,
'facebook_like_comic_post' => false,
- 'enable_comic_lightbox' => false
+ 'enable_comic_lightbox' => false,
+ 'cdn_url' => ''
) as $field => $value) {
$comicpress_options[$field] = $value;
}
@@ -159,7 +159,12 @@ function comicpress_display_comic_thumbnail($type = 'mini', $override_post = nul
if (!function_exists('comicpress_display_comic_image')) {
function comicpress_display_comic_image($post, $comic) {
global $wp_query;
- $file_url = comicpress_themeinfo('baseurl') . comicpress_clean_filename($comic);
+ $cdn_url = comicpress_themeinfo('cdn_url');
+ if (!empty($cdn_url)) {
+ $file_url = trailingslashit($cdn_url) . comicpress_clean_filename($comic);
+ } else {
+ $file_url = comicpress_themeinfo('baseurl') . comicpress_clean_filename($comic);
+ }
$alt_text = comicpress_the_hovertext($post);
if (!is_search() && !is_archive() && !is_feed()) {
$ok = $oktoo = true;;
View
@@ -16,7 +16,7 @@
<td>
<?php _e('Width:','easel'); ?> <input type="text" size="5" name="custom_image_header_width" id="custom_image_header_width" value="<?php echo comicpress_themeinfo('custom_image_header_width'); ?>" />px &nbsp;
<?php _e('Height:','easel'); ?> <input type="text" size="5" name="custom_image_header_height" id="custom_image_header_height" value="<?php echo comicpress_themeinfo('custom_image_header_height'); ?>" />px<br />
- <?php _e('Modify the height and width of the custom header *if* you use Appearance - Header','easel'); ?>
+ <?php _e('Modify the height and width of the custom header *if* you use Appearance - Header - 780px is for standard and v layouts, the rest are wide at 980px.','easel'); ?>
</td>
</tr>
</table>
@@ -195,6 +195,52 @@
</tr>
<?php } ?>
</table>
+
+ <table class="widefat">
+ <thead>
+ <tr>
+ <th colspan="3"><?php _e('Facebook Like','comicpress'); ?></th>
+ </tr>
+ </thead>
+ <tr>
+ <td colspan="5">
+ *Note: There is a Facebook Like Widget that you can place in any of the comic sidebars.
+ </td>
+ </tr>
+ <tr class="alternate">
+ <th scope="row"><label for="facebook_like_blog_post"><?php _e('Enable the Facebook Like button in Blog Posts?','comicpress'); ?></label></th>
+ <td>
+ <input id="facebook_like_blog_post" name="facebook_like_blog_post" type="checkbox" value="1" <?php checked(true, comicpress_themeinfo('facebook_like_blog_post')); ?> />
+ </td>
+ <td>
+ <?php _e('When enabled this option will allow the Facebook like button to appear at the bottom of regular blog posts.','comicpress'); ?>
+ </td>
+ </tr>
+ <tr class="alternate">
+ <th scope="row"><label for="facebook_like_comic_post"><?php _e('Enable the Facebook Like button in Comic Posts?','comicpress'); ?></label></th>
+ <td>
+ <input id="facebook_like_comic_post" name="facebook_like_comic_post" type="checkbox" value="1" <?php checked(true, comicpress_themeinfo('facebook_like_comic_post')); ?> />
+ </td>
+ <td>
+ <?php _e('Enabling this option will allow the Facebook like button to appear at the bottom of comic posts.','comicpress'); ?>
+ </td>
+ </tr>
+ </table>
+
+ <table class="widefat">
+ <thead>
+ <tr>
+ <th colspan="5"><?php _e('CDN (Content Delivery Network)','easel'); ?></th>
+ </tr>
+ </thead>
+ <tr class="alternate">
+ <th scope="row"><label for="cdn_url"><?php _e('CDN URL','easel'); ?></label></th>
+ <td>
+ <?php _e('URL:','easel'); ?> <input type="text" size="40" name="cdn_url" id="cdn_url" value="<?php echo comicpress_themeinfo('cdn_url'); ?>" /><br />
+ <?php _e('If you are using a content delivery network, put the URL to where the comics are stored here. This will replace the url used in the img tag when outputting the comic.','easel'); ?>
+ </td>
+ </tr>
+ </table>
</div>
View
@@ -40,37 +40,6 @@
</tr>
</table>
- <table class="widefat">
- <thead>
- <tr>
- <th colspan="3"><?php _e('Facebook Like','comicpress'); ?></th>
- </tr>
- </thead>
- <tr>
- <td colspan="5">
- *Note: There is a Facebook Like Widget that you can place in any of the comic sidebars.
- </td>
- </tr>
- <tr class="alternate">
- <th scope="row"><label for="facebook_like_blog_post"><?php _e('Enable the Facebook Like button in Blog Posts?','comicpress'); ?></label></th>
- <td>
- <input id="facebook_like_blog_post" name="facebook_like_blog_post" type="checkbox" value="1" <?php checked(true, comicpress_themeinfo('facebook_like_blog_post')); ?> />
- </td>
- <td>
- <?php _e('When enabled this option will allow the Facebook like button to appear at the bottom of regular blog posts.','comicpress'); ?>
- </td>
- </tr>
- <tr class="alternate">
- <th scope="row"><label for="facebook_like_comic_post"><?php _e('Enable the Facebook Like button in Comic Posts?','comicpress'); ?></label></th>
- <td>
- <input id="facebook_like_comic_post" name="facebook_like_comic_post" type="checkbox" value="1" <?php checked(true, comicpress_themeinfo('facebook_like_comic_post')); ?> />
- </td>
- <td>
- <?php _e('Enabling this option will allow the Facebook like button to appear at the bottom of comic posts.','comicpress'); ?>
- </td>
- </tr>
- </table>
-
<table class="widefat">
<thead>
<tr>
@@ -88,7 +88,7 @@ function widget($args, $instance) {
<a href="<?php echo $instance['archive_path']; ?>" class="navi navi-archives navi-archive" title="<?php echo $instance['archives_title']; ?>"><?php echo $instance['archives_title']; ?></a>
<?php }
if ($instance['random']) { ?>
- <a href="<?php echo home_url(); ?>/?randomcomic" class="navi navi-random" title="<?php echo $instance['random_title']; ?>"><?php echo $instance['random_title']; ?></a>
+ <a href="<?php echo home_url(); ?>/?randomcomic&nocache=1" class="navi navi-random" title="<?php echo $instance['random_title']; ?>"><?php echo $instance['random_title']; ?></a>
<?php }
if ($instance['comictitle']) { ?>
<span class="navi-comictitle"><a href="<?php the_permalink(); ?>">"<?php the_title(); ?>"</a></span>

0 comments on commit db4ffd5

Please sign in to comment.