May 24th, 2010
For several months now I’ve been triggering functions in my CakePHP controllers using crontabs. It’s especially handy for summarizing data and sending out reports via email. I’m about to change jobs and I’m trying to set up as many systems as I can to help staff manage our data after I leave. Part of that means writing a few more crons to send out more emails. Today while trying to do just that, I ran into something unexpected that held me up for an hour or so until I had an epiphany on my way home. For the purposes of this post, I’m assuming you’ve already set up a cron dispatcher and know how to trigger cron jobs.
For one more week I’m working in a research clinic. One of the things we need to keep track of is who is late in getting us a sample. We need to check for blood and throat samples (which come from swishing some saline around in the mouth). This can be done by hand, but soon the study will grow and the number of participants will make that hard to manage. So I just want to check to see who is late and send out an email to staff to let them know.
This function exists in my Patient controller: Read the rest of this entry »
Tags: CakePHP, email elements, PHP
Posted in CakePHP, PHP, email elements | No Comments »
March 22nd, 2010
I’ve uploaded a new version of the Baseline theme for Wordpress development. The only change this time around is that I’m using wp_enqueue_script() to include Wordpress’ existing copy of JQuery. (Hat tip to Chris Coyier.) This seems like a significant enough change to merit a small version bump.
I used the Baseline theme as a launching pad for this website. At least for me, it serves as a good starting point when you begin developing a brand new theme.
If you find this useful, you might be interested in checking out Jeff Star’s functions.php template.
Tags: baseline theme, development, jquery, wordpress
Posted in Baseline Theme, JQuery, JavaScript, web development, wordpress | No Comments »
March 20th, 2010
I just added a pretty sweet bit of eye candy to my nav menu using strictly CSS & JQuery. The method is here. The code is here.
You do need to have a either a webKit or Mozilla browser for it to work properly. The point is that there are fewer and fewer things that Flash can do that can’t be done with HTML, JavaScript and CSS. In fact, just about every single bit of animation I’ve had done in Flash over the last couple of years could be recreated with JQuery & CSS3.
UPDATE
Since I couldn’t get the z-index to function properly in Internet Explorer, I used JQuery’s .browser property so the function only runs in supported browsers–namely, Mozilla or WebKit. The function actually degraded fairly well, except for Internet Explorer’s buggy handling of z-index. For reference, I’ve included my version of the plug-in because it has this and other subtle variations. Read the rest of this entry »
Tags: css, JavaScript, jquery, web develop
Posted in JQuery, JavaScript, css, web development | No Comments »
March 14th, 2010
This is a simple method of showing and hiding form elements based on the user’s selection. It’s based on this article with a couple of very minor changes. (Dare I say, improvements?) I’m going to assume you’ve already included the JQuery library so I won’t cover that here. I want to go straight to the code. (View the example page here.) Read the rest of this entry »
Tags: html forms jquery
Posted in JQuery, JavaScript, web development | No Comments »
February 18th, 2010
When it comes to optimizing your CakePHP queries, you need to abandon Recursive and adopt Containable.
In the example below I have the following models:
- Patient
- Specimen
- Result
- ResultType
The associations in the model are:
- Result
- belongsTo
- ResultType
- Patient
- Specimen
Read the rest of this entry »
Tags: behaviors, CakePHP, containable, optimization, PHP, SQL
Posted in CakePHP, PHP, containable behavior, web development | No Comments »
February 16th, 2010
There is a new version of the Baseline Theme. In the last few days of tinkering with it and modifying it for use with this website, I noticed a small bug. The Blueprint IE reset was acting funny in conjunction with the IE8 JavaScript. I chose to make IE8.js the default with the option of including Blueprint’s reset instead. Read the rest of this entry »
Tags: baseline theme, web development, wordpress
Posted in web development, wordpress | No Comments »
February 15th, 2010
The Baseline Development Wordpress Theme has Blueprint plugged in already. There are some optional Blueprint plugins you can take advantage of. We’ll take a look at the fancy-type plug-in. Read the rest of this entry »
Tags: baseline theme, Blueprint Framework, css, wordpress
Posted in Blueprint Framework, css, web development, wordpress | No Comments »
February 14th, 2010
An Inventory of Blueprint’s Style Resets and Useful Classes
A friend contacted me about using the Baseline Wordpress theme, but asked why I included both Blueprint and the 960 Grid System. The short answer is that Blueprint has a number of browser resets that I like to take advantage of and 960 GS offers greater flexibility in terms of the width of columns and their gutter widths. Especially if you want to adhere to the Golden Ratio for design. 960 pixels divides very neatly into 3.
Let’s take a look at what Blueprint does to reset some things to establish a cross-browser baseline. Read the rest of this entry »
Tags: 960 Grid System, Blueprint Framework, css, wordpress
Posted in Blueprint Framework, css, web development, wordpress | No Comments »
February 8th, 2010
I’ve come up with some habits that I’ve developed from building themes for Wordpress over the years. One, is to start with a nearly blank style sheet. I also like to hook in several JavaScript libraries and CSS frameworks from the start to take advantage of things like JQuery, Blueprint’s CSS reset and Superfish menus. Read the rest of this entry »
Tags: themes, wordpress
Posted in Blueprint Framework, JavaScript, css, web development, wordpress | No Comments »
January 8th, 2010
I’ve been using mind mapping software recently to work out data models, with some success. The Mindmeister example below is a simple database of a few related tables. Read the rest of this entry »
Tags: data, data modeling, databases, mind mapping
Posted in data modeling, databases, mind mapping | No Comments »