Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changes to rascal, comic clicks next and introducing a new option to …

…allow lightbox to control the image, with using a 'tag' named 'fullpage' on the comic.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
  • Loading branch information...
commit e3a7c52931d29655129c55e0c1d0ad0c989191bc 1 parent 4cb51f3
Philip M. Hofer (Frumph) authored
View
1  changelog.txt
@@ -5,6 +5,7 @@ added new widget, facebook like, that goes in any of the comic sidebars for bett
dual blog posts and checkmarked blog post stays with comic now works as properly designed
single blog posts and checkmarked blog posts stays with comic as well is now fixed (needs testing)
fixed thumbnail widget to *not* exclude the current page if its not set to random
+adjusting the option pages input button to hit the right location properly
2.9.2.27
Stylized the control panel and dropdown archive boxes
View
3  comicpress-admin.php
@@ -73,7 +73,8 @@ function comicpress_admin_options() {
'enable_scroll_to_top',
'enable_page_load_info',
'fix_for_index_paging',
- 'enable_multicomic_jquery'
+ 'enable_multicomic_jquery',
+ 'enable_comic_lightbox'
) as $key) {
if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
View
3  functions.php
@@ -477,7 +477,8 @@ function comicpress_load_options() {
'copyright_name' => '',
'copyright_url' => '',
'facebook_like_blog_post' => false,
- 'facebook_like_comic_post' => false
+ 'facebook_like_comic_post' => false,
+ 'enable_comic_lightbox' => false
) as $field => $value) {
$comicpress_options[$field] = $value;
View
52 functions/displaycomic.php
@@ -155,14 +155,50 @@ function comicpress_display_comic_thumbnail($type = 'mini', $override_post = nul
}
// TODO: Add the hovertext - rascal code and click to next INSIDE this.
-function comicpress_display_comic_image($post, $comic) {
- $file_url = comicpress_themeinfo('baseurl') . comicpress_clean_filename($comic);
- $alt_text = comicpress_the_hovertext($post);
- $output = '<img src="'.$file_url.'" alt="'.$alt_text.'" title="'.$alt_text.'" />';
- return apply_filters('comicpress_display_comic_image',$output);
+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);
+ $alt_text = comicpress_the_hovertext($post);
+ if (!is_search() && !is_archive() && !is_feed()) {
+ $ok = $oktoo = true;;
+ $href_to_use = $before_output = $add_href = $after_output = $add_tt_class = '';
+ if (comicpress_themeinfo('enable_comic_lightbox')) {
+ $tags = wp_get_post_tags($post->ID);
+ $tagsarray = array();
+ if (is_array($tags) && !empty($tags)) {
+ foreach ($tags as $tag) {
+ $tagsarray[] = $tag->slug;
+ }
+ if (in_array('fullpage', $tagsarray)) {
+ $add_href = '<a href="'.$file_url.'" title="'.$alt_text.'" rel="lightbox">';
+ $after_output = '</a>';
+ $ok = false;
+ }
+ }
+ }
+ if (comicpress_themeinfo('rascal_says') && !empty($alt_text) && $ok) {
+ $hovertext = get_post_meta( $post->ID, "hovertext", true );
+ $href_to_use = "#";
+ if (!empty($hovertext)) {
+ $before_output = '<span class="tooltip"><span class="top">&nbsp;</span><span class="middle">'.$alt_text.'</span><span class="bottom">&nbsp;</span></span>';
+ $add_href = '<a href="'.$href_to_use.'" class="tt" title="'.$post->post_title.'">';
+ $add_tt_class = ' class="tt"';
+ $after_output = '</a>';
+ $oktoo = false;
+ }
+ }
+ if (comicpress_themeinfo('comic_clicks_next') && $ok) {
+ $href_to_use = comicpress_get_next_comic_permalink();
+ $add_href = '<a href="'.$href_to_use.'" title="'.$alt_text.'"'.$add_tt_class.'>';
+ $after_output = '</a>';
+ }
+ }
+ $output = $add_href . $before_output . '<img src="'.$file_url.'" alt="'.$alt_text.'" title="'.$alt_text.'"/>' . $after_output;
+ return apply_filters('comicpress_display_comic_image', $output);
+ }
}
-
// jquery code image swap by @brianarn
function comicpress_display_comic() {
global $post;
@@ -251,6 +287,8 @@ function comicpress_rascal_says($output) {
return apply_filters('comicpress_rascal_says',$output);
}
+/*
+Old Method
if (comicpress_themeinfo('rascal_says')) {
add_filter('comicpress_display_comic_image', 'comicpress_rascal_says');
}
@@ -258,6 +296,8 @@ function comicpress_rascal_says($output) {
if (comicpress_themeinfo('comic_clicks_next') && !comicpress_themeinfo('rascal_says')) {
add_filter('comicpress_display_comic_image', 'comicpress_comic_clicks_next');
}
+*/
+
/**
* Find a comic file in the filesystem.
View
2  options/addonoptions.php
@@ -222,7 +222,7 @@
<div class="comicpress-options-save">
<div class="comicpress-major-publishing-actions">
<div class="comicpress-publishing-action">
- <input name="comicpress_save_customheader" type="submit" class="button-primary" value="Save Settings" />
+ <input name="comicpress_save_addons" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save_addons" />
</div>
<div class="clear"></div>
View
11 options/generaloptions.php
@@ -46,6 +46,15 @@
<td>
<?php _e('This is if you have uploaded multiple comics on the same date, it puts button navigation under the comic so you can navigate the comics that are on the same date.','comicpress'); ?>
</td>
+ </tr>
+ <tr class="alternate">
+ <th scope="row"><label for="enable_comic_lightbox"><?php _e('Enable lightbox support for the comic image.','comicpress'); ?></label></th>
+ <td>
+ <input id="enable_comic_lightbox" name="enable_comic_lightbox" type="checkbox" value="1" <?php checked(true, comicpress_themeinfo('enable_comic_lightbox')); ?> />
+ </td>
+ <td>
+ <?php _e('This will allow you to use lightbox with the comic so the comic expands when clicked. Will *not* work with rascal or comic clicks next options.','comicpress'); ?>
+ </td>
</tr>
</table>
@@ -230,7 +239,7 @@
<?php _e('When this link is clicked on long pages it will scroll back to the top.','comicpress'); ?>
</td>
</tr>
- <tr>
+ <tr class="alternate">
<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>
View
6 style.css
@@ -1564,8 +1564,8 @@ a.tt:hover span.top {
display: block;
width: 200px;
height: 35px;
- padding-top: 10px;
- margin-top: 59px;
+ padding-top: 2px;
+ margin-top: 25px;
margin-left: 25px;
background: url('images/bubble.png') 0 0 no-repeat;
z-index: 1000;
@@ -1574,7 +1574,7 @@ a.tt:hover span.middle {
/* different middle bg for stretch */
display: block;
width: 180px;
- margin-left: 25px;
+ margin: 0 0 0 25px;
padding: 0 10px;
background: url('images/bubble.png') -200px 0 repeat-y;
z-index: 1000;
Please sign in to comment.
Something went wrong with that request. Please try again.