Entries from 2011

Managing Website Contact Information with E-mail Aliases

E-mail addresses change. Employees retire, switch jobs, etc. With that in mind, why would you list addresses that are tied to specific people on an organization's website? If your Contact Us page says "For questions or assistance, contact Bob@yahoo.com, Mary@gmail.com, or Scott@mywebsite.com". What happens if Bob quits? It may only take a few seconds to update the page, but things could be easier with e-mail aliases. [Continue reading]

Easy Way for Comment Spam to Bypass the WordPress Moderation Queue

Did you know that spammers could bypass the WordPress comment moderation feature? If your blog is set to automatically post comments from visitors who have previously approved comments, you could be at risk. However, there is a quick fix to the issue. [Continue reading]

Slicing Strings with PHP: Be Mindful of Output that Contains HTML Tags

When experimenting with strings that contain HTML code, be mindful of what you're getting for output. Especially if there is something unexpected about the results. That's what I learned the hard way when extracting an open anchor tag from the source code of a web page. The variables used to locate the anchor tag appeared to be working, but for some reason the extracted code wouldn't display to the screen. Let's take a look at where I went wrong. [Continue reading]

Reducing the Number of Clicks When Saving Files Deep within a Website’s Structure by Using Shortcuts

When receiving lots of files via e-mail to convert to PDF and post on the website, it can be a time consuming project. Especially when the files are saved to a folder deep within a website and the software used to create the PDF doesn't remember the last folder you're saving to. Instead of clicking folder after folder for each file, let's look at folder shortcuts. [Continue reading]

Excluding Website Traffic Based on an IP Address in Google Analytics

Tracking the usage of your website can be very insightful. It helps identify which pages are the most popular, shows where your visitors are from, what browsers they use, etc. However, if you're visiting the website all the time to verify things are working, updating pages, etc. it can throw off the stats. So unless you're trying to pad the numbers, let's look at filtering out results by IP address in Google Analytics. [Continue reading]

Sorting HTML Data Tables Part 2: Dynamically Sort in Ascending and Descending Order

In last week's post we looked at dynamically sorting HTML data tables. But we only talked about sorting the columns in either ascending or descending. If the user is looking for a last name that appears near the end of the alphabet and the column is sorted from A to Z, they may have a lot of names to go through before finding the one they want. Instead we could provide an option for sorting in both descending and ascending order. [Continue reading]

Sorting HTML Data Tables Using the Header Row with PHP

When displaying data tables, how do you usually sort the information? Do you sort by the field that you think is the most important to the visitor? For example, it's perfectly acceptable to list entries chronologically; where the newest is shown first. But what if the user wants the data organized differently? We could let them choose. [Continue reading]

Archiving Old Code after Major Updates

After making major changes to a web page what do you do with the previous version? The old code could be tossed in the trash since it's unlikely to be needed again. However, there may be a time where someone discovers a critical bug that slipped through the cracks. Until fixed, it may be better to revert back to a fully-functional version. With that in mind, let's take a look at archiving. [Continue reading]

Making Website Changes on a Copy of a File Instead of the Original

When making major changes to a website, working on the "live" version of the file may be problematic. For example, if you've been performing updates for a while only to discover that you're heading in the wrong direction. Having the original file provides a safeguard in case there's a need to go back to the drawing board. The original file is also useful for making those quick updates which crop up before the larger renovations are done. So let's look into duplicating pages for updates. [Continue reading]

Making Sure that Updates Were Applied to a Web Page with HTML Comments

When modifying a website, the effects to the page are usually apparent. But when the changes only affect the backend, how do you know you're not viewing the old page? A successful update results in the same content being displayed as before the changes. Maybe the updated page was uploaded to the wrong location. Let's see how HTML comments can help. [Continue reading]