Skip to content

@drewcrawford /gist:509280
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Below is a list of the hacks in this diff:
1. The IE PNG hack causes errors in Safari, so I've hacked it to only be enabled on IE. In my case, this was causing FF and Safari users not to be tracked in Google Analytics since my tracking code was below the IE PNG hack. Fixed.
2. There is a script tag in header.php, I have no idea what it does, seems to be named something to do with the slider, but nothing to do with the slider involves header.php, so that makes no sense. It was causing an error in Safari so I removed it.
2. Support for pages on the homepage slider was introduced in 1.3. However, the properties that 1.3 checks for to decide if something goes on the slider are prefixed with "billboard_". In my case, the WP Page Editor had dropdowns for properties prefixed with "GB_". The diff includes hacks to drop support for the billboard_ prefix and add support for the GB_ prefix.
3. Billboard Pages, Products and Services are now sorted by menu order (not date) which, IMHO, is the right way to do it.
4. On the Products / Services pages, the posts are "excerpted" by a crappy parser that puts periods at the end of the excerpt, even in the middle of a sentence. This makes no sense whatsoever. I should really remap this to WP's excerpt function, but what I did for now is replace the "." with an elipsis (…) which makes more sense in English.
My biggest (unfixed) outstanding issues are currently:
1. Search doesn't work. I have no idea why. Probably some WP "common knowledge" thing that I just don't happen to know. Not a big deal for me. It does render funny on IE7, so I might get around to removing it eventually.
2. index.php has no include to header.php. This is frustrating because whenever I have to make a global-level change, I have to make it in two places. I took a look at trying to have index.php include header.php, but the code just got way too convoluted. What I should probably do is make a real_header.php that both include, but I haven't gotten around to it yet.
3. Lightbox 2 doesn't work. Not really worth investigating why, since slimbox is better anyway.
Diff below this line:
Only in /Volumes/y/drew/Downloads/GoodBusinessArchive/good-business/functions: .DS_Store
Only in /Volumes/y/drew/Downloads/2.0-current-mirror/wp-content/themes/good-business/functions: functions.php
diff -cwr /Volumes/y/drew/Downloads/GoodBusinessArchive/good-business/header.php /Volumes/y/drew/Downloads/2.0-current-mirror/wp-content/themes/good-business/header.php
*** /Volumes/y/drew/Downloads/GoodBusinessArchive/good-business/header.php 2010-08-04 14:10:20.000000000 -0500
--- /Volumes/y/drew/Downloads/2.0-current-mirror/wp-content/themes/good-business/header.php 2010-08-04 23:14:08.000000000 -0500
***************
*** 36,43 ****
<!--script src="<?php bloginfo('template_url'); ?>/js/jquery.js" type="text/javascript"></script-->
<script src="<?php bloginfo('template_url'); ?>/js/jquery-1.3.2.min.js" type="text/javascript"></script>
! <!--Fixing IE6PNG -->
<script src="<?php bloginfo('template_url'); ?>/js/unitpngfix.js" type="text/javascript"></script>
<script type="text/javascript">
--- 45,53 ----
<!--script src="<?php bloginfo('template_url'); ?>/js/jquery.js" type="text/javascript"></script-->
<script src="<?php bloginfo('template_url'); ?>/js/jquery-1.3.2.min.js" type="text/javascript"></script>
! <!--[if IE]>
<script src="<?php bloginfo('template_url'); ?>/js/unitpngfix.js" type="text/javascript"></script>
+ <![endif]-->
<script type="text/javascript">
***************
*** 49,62 ****
});
});
</script>
! <script type="text/javascript">
! $(window).load(function() {
! $('#sliderholder').nivoSlider({
! effect:'random',
! slices:20
! });
! });
! </script>
<?php wp_head(); ?>
--- 59,65 ----
});
});
</script>
!
<?php wp_head(); ?>
diff -cwr /Volumes/y/drew/Downloads/GoodBusinessArchive/good-business/index.php /Volumes/y/drew/Downloads/2.0-current-mirror/wp-content/themes/good-business/index.php
*** /Volumes/y/drew/Downloads/GoodBusinessArchive/good-business/index.php 2010-08-04 14:54:44.000000000 -0500
--- /Volumes/y/drew/Downloads/2.0-current-mirror/wp-content/themes/good-business/index.php 2010-08-04 23:52:16.000000000 -0500
***************
*** 31,38 ****
<link href="<?php bloginfo('template_url'); ?>/style.css" type="text/css" rel="stylesheet" media="screen" />
! <!--Fixing IE6PNG -->
<script src="<?php bloginfo('template_url'); ?>/js/unitpngfix.js" type="text/javascript"></script>
<!--featured slider -->
<script src="<?php bloginfo('template_url'); ?>/js/jquery-1.3.2.min.js" type="text/javascript"></script>
--- 40,48 ----
<link href="<?php bloginfo('template_url'); ?>/style.css" type="text/css" rel="stylesheet" media="screen" />
! <!--[if IE]>
<script src="<?php bloginfo('template_url'); ?>/js/unitpngfix.js" type="text/javascript"></script>
+ <![endif]-->
<!--featured slider -->
<script src="<?php bloginfo('template_url'); ?>/js/jquery-1.3.2.min.js" type="text/javascript"></script>
***************
*** 135,154 ****
<?php
// get items to Billboard from pages
! $mypages = get_pages('sort_column=post_date&sort_order=desc');
$slider_count = 0;
foreach($mypages as $page)
{
! if (get_post_meta($page->ID, 'homepage_billboard_title',true)) {
$slider_count++;
?>
<div class="panel" title="<?php the_title(); ?>">
<!--start featured_info -->
<div class="featured_info">
! <h1><span><?php echo get_post_meta($page->ID, 'homepage_billboard_title',true); ?></span></h1>
! <p><?php echo get_post_meta($page->ID, 'homepage_billboard_description',true); ?></p>
<?php
$contact_page = get_option( $shortname.'_display_contact_content');
--- 145,165 ----
<?php
// get items to Billboard from pages
! $mypages = get_pages('sort_column=menu_order&sort_order=asc');
$slider_count = 0;
foreach($mypages as $page)
{
! if (get_post_meta($page->ID, 'GB_billboard_title',true)) {
$slider_count++;
+
?>
<div class="panel" title="<?php the_title(); ?>">
<!--start featured_info -->
<div class="featured_info">
! <h1><span><?php echo get_post_meta($page->ID, 'GB_billboard_title',true); ?></span></h1>
! <p><?php echo get_post_meta($page->ID, 'GB_billboard_description',true); ?></p>
<?php
$contact_page = get_option( $shortname.'_display_contact_content');
***************
*** 160,166 ****
<div class="featured_image">
<span class="ribbon"></span>
<div class="img">
! <img src="<?php echo get_post_meta($page->ID, 'homepage_billboard_image_url',true); ?>" alt="<?php the_title(); ?>" />
</div>
</div>
</div>
--- 171,185 ----
<div class="featured_image">
<span class="ribbon"></span>
<div class="img">
! <![if !IE]>
! <a href="<?php echo get_permalink($page->ID) ?>">
! <![endif]>
!
! <img src="<?php echo get_post_meta($page->ID, 'GB_billboard_image_418x244',true); ?>" alt="<?php the_title(); ?>" />
! <![if !IE]>
! </a>
! <![endif]>
!
</div>
</div>
</div>
diff -cwr /Volumes/y/drew/Downloads/GoodBusinessArchive/good-business/template-products.php /Volumes/y/drew/Downloads/2.0-current-mirror/wp-content/themes/good-business/template-products.php
*** /Volumes/y/drew/Downloads/GoodBusinessArchive/good-business/template-products.php 2010-08-04 14:59:46.000000000 -0500
--- /Volumes/y/drew/Downloads/2.0-current-mirror/wp-content/themes/good-business/template-products.php 2010-08-04 23:06:12.000000000 -0500
***************
*** 65,72 ****
$pageid = $page->ID;
// Get a list of pages
! $children = get_children('depth=1&post_type=page&echo=0&post_parent='.$post->ID);
! if ($root_page_id) { $children = get_children('depth=1&post_type=page&echo=0&post_parent='.$root_page_id); }
//print_r($children);
$first_row = 0;
--- 65,72 ----
$pageid = $page->ID;
// Get a list of pages
! $children = get_children('orderby=menu_order&order=ASC&depth=1&post_type=page&echo=0&post_parent='.$post->ID);
! if ($root_page_id) { $children = get_children('orderby=menu_order&order=ASC&depth=1&post_type=page&echo=0&post_parent='.$root_page_id); }
//print_r($children);
$first_row = 0;
diff -cwr /Volumes/y/drew/Downloads/GoodBusinessArchive/good-business/template-services.php /Volumes/y/drew/Downloads/2.0-current-mirror/wp-content/themes/good-business/template-services.php
*** /Volumes/y/drew/Downloads/GoodBusinessArchive/good-business/template-services.php 2010-07-21 08:51:06.000000000 -0500
--- /Volumes/y/drew/Downloads/2.0-current-mirror/wp-content/themes/good-business/template-services.php 2010-08-04 23:06:35.000000000 -0500
***************
*** 32,39 ****
$pageid = $page->ID;
// Get a list of pages
! $children = get_children('depth=1&post_type=page&echo=0&post_parent='.$post->ID);
! if ($root_page_id) { $children = get_children('depth=1&post_type=page&echo=0&post_parent='.$root_page_id); }
//print_r($children);
$first_row = 0;
--- 32,39 ----
$pageid = $page->ID;
// Get a list of pages
! $children = get_children('orderby=menu_order&order=ASC&depth=1&post_type=page&echo=0&post_parent='.$post->ID);
! if ($root_page_id) { $children = get_children('orderby=menu_order&order=ASC&depth=1&post_type=page&echo=0&post_parent='.$root_page_id); }
//print_r($children);
$first_row = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.