This article is for php coders who are familiar with the sprintf (and printf) functions but who haven’t yet figured out why, when, and how they should use them. Until recently, I was one of them. Although I’ve been coding in php since 2001, I could count on one hand the number of times I’ve […]
Instructions for displaying a tag cloud as a list in WordPress and WooCommerece.
Sometimes I want to see all the constants I have defined. Here is some diagnostic PHP I use for displaying all user-defined constants.
Sometimes I want to see all the user-defined functions that are in memory when a page loads. Maybe the page doesn’t need certain functions and I can realize performance improvements by removing them. And sometimes — I’m being candid here — I copy functions from one application into a library file for another and don’t need any of them for the current application. This function, offering some diagnostic PHP, helps.
Sometimes when developing, it’s helpful to echo some diagnostic information to the screen. Here’s some simple diagnostic PHP I use for displaying all included files.
Word-of-mouth referrals are still our favorite source of new business. One day no so long ago, I called a fellow (actually lady) Web developer after reading her humorous and all-too-familiar account of a “sales call from hell” on her Facebook timeline. After some commiserating, we shared highlights of recent projects and agreed to think of each other if and when opportunities to collaborate arise. Before we hung up (a soon-to-be-obsolete metaphor, I imagine), I had contact information for two prospects who might need my services. A little more than a month later, one of those prospects became a client. This article describes my first project with that client.
Forms are the engine that drive user interactivity on the Web. We see them everywhere — they are the meat of eCommerce Web sites and online surveys, and simple versions of forms are common on “Contact Us” pages. Some forms are easy to make, using basic HTML, online form builders, or plugins for platforms like WordPress. But there are other applications for Web forms — including some applications for which you might not initially think a form is the answer — that require a custom solution with custom programming. This article describes a project in which we created a form-based system for generating contracts for a private school’s Independent Study Program. This system, housed within the existing password-protected Intranet/Administrative area of the school’s Web site, automates and streamlines the process of generating contracts, minimizing the need for manual calculations and eliminating most, if not all, of the opportunities for user error.
Without question, the most common operation in the Web applications I build is retrieving gobs of structured data and displaying that data in some order. In most cases, the data comes from database tables. But not always. In this article, I share what I’ve found out about how one can use the array_multisort function to sort multidimensional arrays.
While WordPress has functions and template tags for displaying “About the Author” information on single blog post pages (in fact, many themes innately support this), there’s nothing similar for displaying “About Us” information. This article offers a simple method for adding an “About Us” blurb after the main text of every single blog post. And I hope it gets your wheels turning about ways to add customized content to your WordPress Web site.
Last night, while working on an online order form for a client, I faced the challenge of coding a validation routine for 30 free-form text fields that can only accept values that are measurements in inches and fractions of an inch. If this sounds geeky, I suppose it is. But this story is more about attitude than technology. Finding myself at a familiar crossroads (whether to stay in my comfort zone or step out — that is, whether to venture into the world of regular expressions), I bit the bullet and stepped out. I liked the taste. I don’t think you have to be a developer to find resonance in the moral of this story. At least I hope not.