Featured Posts

Supreme Court Rules Against FCC, Net Neutrality Not a good day for net neutrality... A federal court threw the future of Internet regulations into doubt Tuesday with a far-reaching decision that went against the Federal...

Read More »

The Fog Machine has Arrived My Chauvet Hurricane 1300 arrived today. First thing's first--immediately unpack it, add some fog juice, and play! [caption id="attachment_81" align="aligncenter" width="225"...

Read More »

Realestate Manager 2.0 Picture Preview Since Real Estate Manager 2.0 is now almost ready for release, I figured I would share the differences between the current version (1.1) and 2.0. To start things off, the...

Read More »

Automotive Manager Photo Update It's been less than 2 months since I started on Automotive Manager. In that time, I've taken the thing from next to nothing to an almost complete product. I'm not sure how...

Read More »

The New GreeneCountyIndiana.com Since about March I have been working (rather slowly) on a new content management system for GreeneCountyIndiana.com. Along with it comes a new layout and many new features. The...

Read More »

Chuck’s Blog Rss A scary bee!!!

Changes over the years…

Posted on : 28-05-2009 | By : Chuck | In : HTML/CSS, MySQL, PHP, Programming

0

Never has a random IRC quote been so true…

<@Logan> I spent a minute looking at my own code by accident.
<@Logan> I was thinking “What the hell is this guy doing?”

Me and Kegan (well, mostly Kegan) have been working on moving client sites over to our new web server. We’ve also taken the time to go through the old websites and ensure that the little blurb in the footer reflects our new name, New Deal Multimedia, LLC, instead of the old Kegans Kandy name.

During this, I have looked at quite a bit of my old code, both PHP and HTMl/CSS. I wont lie, on more than one occasion I found myself thinking “what in the world was I doing?”

Its really interesting looking at how my coding habits have changed over the past 3-4 years. I have seen more than my fair share of code that I am amazed still works.

Perhaps this is why when I go through and do updates for software (Realestate Manager, Automotive Manager, etc) I usually want to start from scratch.

I wonder if in a few years I will look back at what I am writing now and wonder “what in the world was I doing?”

Automotive Manager Photo Update

Posted on : 08-04-2009 | By : Chuck | In : HTML/CSS, MySQL, PHP, Programming

0

It’s been less than 2 months since I started on Automotive Manager. In that time, I’ve taken the thing from next to nothing to an almost complete product. I’m not sure how I did any coding without using frameworks before. It makes everything go so much quicker.

So, here’s the screenshots!

listingsindex

The listings index page. This shows all of the categories and the number of listings in each category.

view-all-listings

The listings view. This shows all of the listings, along with an image. The information that is shown can be modified by editing the view file.

view-listings

Viewing the details for a listing. Each picture can be clicked on to be enlarged in a Lightbox window.

admin-add-listing

Part of the Add Listing form. For added flexibility, listings can be placed in multiple categories.

admin-add-photos

The photo uploader. Multiple photos can be queued for upload by using the SWFUpload library.  A description can be given to each picture before it is uploaded.

admin-delete-listing

Deleting a listing. If you have javascript enabled, you get this modal popup. Automotive Manager will be the first of my software to make use of modal delete windows. When you delete the listing it will be removed from the page using all of that fancy web two point oh ajax stuff.

That’s all the pictures for now. I’m still in the process of testing the software and adding the finishing touches. I have to have it ready to turn in as my class project in a couple weeks, so a live demo should be available around that time.

New GreeneCountyIndiana.com CMS: Modularity

Posted on : 08-07-2008 | By : Chuck | In : HTML/CSS, MySQL, PHP, Programming

0

Modularity is a very important part of writing software. A modular program will contain various ‘modules’ for different functions used throughout the projects.

The CakePHP framework (which the CMS is being built on) makes it easy to write modular code, by use of helpers, components, behaviors, and elements. For those unfamiliar with Cake, it is a MVC framework written for PHP. Helpers and elements are used for views, behaviors for models, and components for controllers.

The past few days have been spent writing various modules for the new CMS. The Tagging system makes use of the Tag Helper, which handles displaying tag lists and the adding/deleting of tags. The Basics Helper has convenience functions for pre-configured pagination and various dialog boxes.

The greatest advantage of helpers is the re-usability in code. For example, the following code:
<php
echo $basics->setupDeleteDialog(array('elementToDelete' => 'div.newsitem'));
?>

is all that is needed to handle the Delete Item dialog. I just add that to the view for each controller (News, Pages, Photos, etc), change the elementToDelete, and viola! I now have a functional delete dialog. If I want to make changes to the way the dialog functions, I merely have to edit the code in the helper file, as opposed to editing code in every single file that contains a delete dialog.

The current CMS makes little to no use of helpers, which makes it extremely difficult to update parts of the website. Fortunately, the new CMS is actually being built with modularity in mind.

Firefox and border-collapse

Posted on : 30-03-2008 | By : Chuck | In : HTML/CSS, Programming

17

2/8/12 Note: This was posted in 2008, when Firefox was around version 3. I no longer use this template, so this problem may be fixed with newer versions of the browsers.

While working on the new website for Kegan’s Kandy Web Services (the website development business me and my friend Kegan run), I ran across an interesting bug.

Firefox border-collapse bugFirefox seems to have some issues with the border-collapse CSS property where it will render the left border 1 pixel to the left of the table as seen in the image to your right. This can be solved by using border-spacing: 0; in place of border-collapse: collapse;

All is well right? It now works fine in Firefox and Safari, but guess which browser is all messed up now?

IE does not understand border-spacingInternet Explorer, as usual, renders it completely different. It doesn’t understand the border-spacing property, so it inserts spacing between the border and content area.

So, now Firefox is fine, Safari is fine, but Internet Explorer is broken. If you change border-collapse to “collapse” Firefox will be off by 1 pixel.

What’s the solution?

Use conditional comments to give IE border-collapse: collapse; while everything else gets border-collapse: separate;

In your main stylesheet file, give the table element the following properties:
border-spacing: 0;
border-collapse: separate;

Then, use conditional comments to give Internet Explorer border-collapse: collapse

<!--[if IE]>
<style type="text/css">
table#wrapper { border-collapse: collapse; }
</style>
<![endif]-->

Here is the resulting code I used to fix the problem for the new Kegan’s Kandy website

style.css
table#wrapper {
width: 800px;
margin: 0 auto;
border-left: 1px solid #ab9666;
border-right: 1px solid #ab9666;
border-top: 0;
border-bottom: 0;
border-spacing: 0px;
border-collapse: separate;
}

template.php
<!--[if IE]>
<style type="text/css">
table#wrapper { border-collapse: collapse; }
</style>
<![endif]-->