Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2.9.2.27

added the silverii new footer-text.php code and a a bunch of new stuff, see changelog.txt

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
  • Loading branch information...
commit 659bccb8e9842e223da5072053b057a8b08cb47d 1 parent a93d9f2
Philip M. Hofer (Frumph) authored
View
4 changelog.txt
@@ -7,6 +7,10 @@ fixed a variable being passed in the latesthumbnail widget that was sending $tru
adding <div class="clear"></div> to the tipjar.php widget so it clears the internal floats properly
fixed the themestyle.php to handle the vertical double right sidebar properly
removed .ie #comic button {} from the css, it was hardsetting it to white text
+added the easel footer_text functionality and a new option in comicpress options to set the copyright name w/ modifiable information including URL to copyright holder (w/defaults)
+subcontent-wrapper is now available on *all* layout styles
+font-size for .footer-text is now 12px; as default (the generated info at the bottom)
+latest thumbnail widget you can now choose to show the first in the category as well as a random comic from that category, it will not display the same comic as the current comic thats being viewed.
2.9.2.26
changed all the bloginfo()'s to appropriate home_url() site_url() get_template_directory_uri()
View
4 comicpress-admin.php
@@ -80,7 +80,9 @@ function comicpress_admin_options() {
}
foreach (array(
- 'graphicnav_directory'
+ 'graphicnav_directory',
+ 'copyright_name',
+ 'copyright_url'
) as $key) {
if (isset($_REQUEST[$key]))
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
View
43 functions.php
@@ -57,6 +57,26 @@
@require_once($funcfile);
}
+function comicpress_config() {
+ global $comicpress_config;
+ if (empty($comicpress_config)) {
+ $comicpress_config = get_option('comicpress-config');
+ if (empty($comicpress_config)) {
+
+ foreach (array(
+ 'enable_equal_height_sidebars' => false,
+ 'prefab_design' => 'none'
+
+ ) as $field => $value) {
+ $comicpress_config[$field] = $value;
+ }
+
+ add_option('comicpress-config', $comicpress_config, '', true);
+ }
+ }
+ return $comicpress_config;
+}
+
// Load all the widgets.
foreach (glob(get_template_directory() . '/widgets/*.php') as $widgefile) {
@require_once($widgefile);
@@ -243,25 +263,6 @@ function storyline_category_list() {
}
}
-if (!function_exists('comicpress_footer_text')) {
- function comicpress_footer_text() {
- $output = "<p>\r\n";
- $output .= __('Powered by','comicpress') . " <a href=\"http://wordpress.org/\">WordPress</a> " . __('with','comicpress'). " <a href=\"http://comicpress.org/\">ComicPress</a>\r\n";
- $output .= "<span class=\"footer-subscribe\">";
- $output .= "<span class=\"footer-pipe\">|</span>";
- $output .= "Subscribe: <a href=\"" . get_bloginfo('rss2_url') ."\">RSS</a>\r\n";
- $output .= "</span>\r\n";
- if (comicpress_themeinfo('enable_scroll_to_top')) {
- $output .= "<span class=\"footer-uptotop\">";
- $output .= "<span class=\"footer-pipe\">|</span>";
- $output .= "<a href=\"#outside\" onclick=\"scrollup(); return false;\">".__('Back to Top &uarr;','comicpress')."</a>";
- $output .="</span>\r\n";
- }
- $output .= "</p>\r\n";
- return apply_filters('comicpress_footer_text',$output);
- }
-}
-
function comicpress_stripslashes($str_to_strip) {
$str_to_strip = str_replace("\'", "'", $str_to_strip);
return $str_to_strip;
@@ -472,7 +473,9 @@ function comicpress_load_options() {
'disable_showing_members_category' => true,
'enable_multicomic_jquery' => false,
'enable_equal_height_sidebars' => false,
- 'prefab_design' => 'none'
+ 'prefab_design' => 'none',
+ 'copyright_name' => '',
+ 'copyright_url' => ''
) as $field => $value) {
$comicpress_options[$field] = $value;
View
76 functions/footer-text.php
@@ -0,0 +1,76 @@
+<?php
+
+if (!function_exists('comicpress_footer_text')) {
+ function comicpress_footer_text() {
+ $output = "<p class=\"footer-text\">\r\n";
+ $output .= comicpress_copyright_info();
+ $output .= "<span class=\"footer-pipe\">|</span> ";
+ $output .= __('Powered by','comicpress') . " <a href=\"http://wordpress.org/\">WordPress</a> " . __('with','comicpress'). " <a href=\"http://comicpress.net/\">ComicPress</a>\r\n";
+ $output .= comicpress_hosted_on();
+ $output .= "<span class=\"footer-subscribe\">";
+ $output .= "<span class=\"footer-pipe\">|</span> ";
+ $output .= "Subscribe: <a href=\"" . get_bloginfo('rss2_url') ."\">RSS</a>\r\n";
+ $output .= "</span>\r\n";
+ if (!comicpress_themeinfo('disable_scroll_to_top')) {
+ $output .= "<span class=\"footer-uptotop\">";
+ $output .= "<span class=\"footer-pipe\">|</span> ";
+ $output .= "<a href=\"#outside\" onclick=\"scrollup(); return false;\">".__('Back to Top &uarr;','comicpress')."</a>";
+ $output .="</span>\r\n";
+ }
+ $output .= "</p>\r\n";
+ echo apply_filters('comicpress_footer_text', $output);
+ }
+}
+
+if (!function_exists('comicpress_hosted_on')) {
+ function comicpress_hosted_on() {
+ if (is_multisite()) {
+ $current_site = get_current_site();
+ if (!isset($current_site->site_name)) {
+ $site_name = ucfirst( $current_site->domain );
+ } else {
+ $site_name = $current_site->site_name;
+ }
+ $output = "<span class=\"footer-pipe\">|</span> ";
+ $output .= __('Hosted on','comicpress') . ' <a href="http://'. $current_site->domain. $current_site->path. '">'. $site_name. '</a> ';
+ return apply_filters('comicpress_hosted_on', $output);
+ }
+ }
+}
+
+if (!function_exists('comicpress_copyright_info')) {
+ function comicpress_copyright_info() {
+ $copyright_name = comicpress_themeinfo('copyright_name');
+ if (empty($copyright_name)) $copyright_name = get_bloginfo('name');
+ $copyright_url = comicpress_themeinfo('copyright_url');
+ if (empty($copyright_url)) $copyright_url = home_url();
+ $copyright = __('&copy;', 'comicpress'). comicpress_copyright_dates() . ' ' . apply_filters('comicpress_copyright_info_name', '<a href="'.$copyright_url.'">' . $copyright_name . '</a>') . ' ';
+ return apply_filters('comicpress_copyright_info', $copyright);
+ }
+}
+
+if (!function_exists('comicpress_copyright_dates')) {
+ function comicpress_copyright_dates() {
+ global $wpdb;
+ $copyright_dates = $wpdb->get_results("
+ SELECT
+ YEAR(min(post_date_gmt)) AS firstdate,
+ YEAR(max(post_date_gmt)) AS lastdate
+ FROM
+ $wpdb->posts
+ WHERE
+ post_status = 'publish'
+ ");
+ $output = '';
+ if ($copyright_dates) {
+ $copyright = $copyright_dates[0]->firstdate;
+ if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {
+ $copyright .= '-' . $copyright_dates[0]->lastdate;
+ }
+ $output = $copyright;
+ }
+ return apply_filters('comicpress_copyright_dates', $output);
+ }
+}
+
+?>
View
3  functions/global_vars.php
@@ -0,0 +1,3 @@
+<?php
+// Global Vars
+?>
View
BIN  images/screenshots/comicpress-silverii.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2  js/ddsmoothmenu.js
@@ -16,7 +16,7 @@
var ddsmoothmenu = {
//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
- arrowimages: { down: ['downarrowclass', '/wp-content/themes/easel/images/down.gif', 23], right: ['rightarrowclass', '/wp-content/themes/easel/images/right.gif'] },
+ arrowimages: { down: ['downarrowclass', '/wp-content/themes/comicpress/images/down.gif', 23], right: ['rightarrowclass', '/wp-content/themes/comicpress/images/right.gif'] },
transition: { overtime: 200, outtime: 200 }, //duration of slide in/ out animation, in milliseconds
shadow: { enable: false, offsetx: 2, offsety: 2 }, //enable shadow?
showhidedelay: { showdelay: 100, hidedelay: 200 }, //set delay in milliseconds before sub menus appear and disappear, respectively
View
1  layout-foot.php
@@ -2,7 +2,6 @@
</div>
<div class="clear"></div>
<div id="subcontent-wrapper-foot"></div>
- </div>
<?php } ?>
</div>
<?php if (is_cp_theme_layout('v3cr')) { ?>
View
16 options/generaloptions.php
@@ -230,6 +230,22 @@
<?php _e('When this link is clicked on long pages it will scroll back to the top.','comicpress'); ?>
</td>
</tr>
+ <tr>
+ <th scope="row"><label for="copyright_name"><?php _e('&copy; Copyright Name','comicpress'); ?></label>
+ <input type="text" size="20" name="copyright_name" id="copyright_name" value="<?php echo comicpress_themeinfo('copyright_name'); ?>" /><br />
+ </th>
+ <td colspan="2">
+ <?php _e('Set the name to which this site is &copy; Copyright to, leave blank to have the site name.','comicpress'); ?>
+ </td>
+ </tr>
+ <tr>
+ <th scope="row"><label for="copyright_url"><?php _e('Copyright Holder URL','comicpress'); ?></label>
+ <input type="text" size="30" name="copyright_url" id="copyright_url" value="<?php echo comicpress_themeinfo('copyright_url'); ?>" /><br />
+ </th>
+ <td colspan="2">
+ <?php _e('Set the URL to the owner of the &copy; Copyright if different then this website, leave blank for sites link.','comicpress'); ?>
+ </td>
+ </tr>
</table>
<table class="widefat">
View
5 style.css
@@ -394,6 +394,10 @@ h4, h4 a {
text-align: center;
}
+ .footer-text {
+ font-size: 12px;
+ }
+
#footer .footer-pipe {
padding: 0 2px;
}
@@ -503,6 +507,7 @@ h4, h4 a {
/* add 10px to smaller width layouts */
.layout-standard .narrowcolumn, .layout-v .narrowcolumn {
+ width: 560px;
}
.widecolumn {
View
25 widgets/latesthumbnail.php
@@ -11,8 +11,8 @@ class comicpress_latest_thumbnail_widget extends WP_Widget {
function comicpress_latest_thumbnail_widget($skip_widget_init = false) {
if (!$skip_widget_init) {
- $widget_ops = array('classname' => __CLASS__, 'description' => __('Display a thumbnail of the latest comic or post, clickable to go to the comic post.','comicpress') );
- $this->WP_Widget(__CLASS__, __('Display Latest Thumbnail','comicpress'), $widget_ops);
+ $widget_ops = array('classname' => __CLASS__, 'description' => __('Display a thumbnail of the latest (or first) comic or post in a category, clickable to go to the comic or post.','comicpress') );
+ $this->WP_Widget(__CLASS__, __('Thumbnail','comicpress'), $widget_ops);
}
}
@@ -20,12 +20,16 @@ function widget($args, $instance) {
global $wp_query, $post;
Protect();
extract($args, EXTR_SKIP);
-
+ $this_post_id = $post->ID;
// Check if the category is a comic category.
$in_comic_cat = false;
if (comicpress_in_comic_category(array($instance['thumbcat'])) > 0) $in_comic_cat = true;
-
- $comic_query = 'showposts=1&cat='.$instance['thumbcat'];
+
+ if ($instance['first']) { $order = 'ASC'; } else { $order = 'DESC'; }
+ $comic_query = 'showposts=1&order='.$order.'&cat='.$instance['thumbcat'];
+ if ($instance['random']) $comic_query .= '&orderby=rand';
+ if (!empty($post)) $comic_query .= '&exclude='.$post->ID;
+
$found_posts = &get_posts($comic_query);
$archive_image = null;
foreach($found_posts as $post) {
@@ -59,14 +63,18 @@ function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['thumbcat'] = strip_tags($new_instance['thumbcat']);
+ $instance['first'] = (bool)( $new_instance['first'] == 1 ? true : false );
+ $instance['random'] = (bool)( $new_instance['random'] == 1 ? true : false );
return $instance;
}
function form($instance) {
- $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'thumbcat' => '' ) );
+ $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'thumbcat' => '', 'first' => false, 'random' => false ) );
$title = strip_tags($instance['title']);
$thumbcat = $instance['thumbcat'];
if (empty($thumbcat)) $thumbcat = comicpress_themeinfo('comiccat');
+ $first = $instance['first'];
+ $random = $instance['random'];
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>
<p><?php _e('Which Category?','comicpress'); ?><br />
@@ -76,7 +84,10 @@ function form($instance) {
echo $select;
?>
</p>
- <em><?php _e('*note: If it is a blog category it will search for the latest thumbnail attached to the image. If it is a comic it will search for the thumbnail attached to the post first, then check do the thumbnail for the comic.','comicpress'); ?></em><br />
+ <p><em><?php _e('*note: If it is a blog category it will search for the latest thumbnail attached to the image. If it is a comic it will search for the thumbnail attached to the post first, then check do the thumbnail for the comic.','comicpress'); ?></em></p>
+ <p><label for="<?php echo $this->get_field_id('first'); ?>"><?php _e('Get first in Category instead?','comicpress'); ?> <input id="<?php echo $this->get_field_id('first'); ?>" name="<?php echo $this->get_field_name('first'); ?>" type="checkbox" value="1" <?php checked(true, $first); ?> /></label></p>
+ <p><label for="<?php echo $this->get_field_id('random'); ?>"><?php _e('Display a random Thumbnail?','comicpress'); ?> <input id="<?php echo $this->get_field_id('random'); ?>" name="<?php echo $this->get_field_name('random'); ?>" type="checkbox" value="1" <?php checked(true, $random); ?> /></label></p>
+ <p><em><?php _e('*note: Random comic thumbnail overrides the get first in category option.','comicpress'); ?></em></p>
<br />
<?php
Please sign in to comment.
Something went wrong with that request. Please try again.