public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
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;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.