WordPress Wednesday: Import HTML Pages

Published on Aug 5, 2009   //  WordPress

So, you’ve got a beautiful website all coded up in regular HTML, but you want to transport these static HTML pages into a WordPress installation. The process can seem daunting to some, but it’s made a lot easier with a clever plug-in from Stephanie Leary of Sillybean.net. The plugin, appropriately enough, is called Import HTML pages.

Using the configurable settings in the plugin, you can import a directory of files as either WordPress pages or WordPress posts. With the content that is being imported, you can define the HTML tag that will contain this content (like <body> or <div id=”content”>) or you can base the imported content on the Dreamwaver template region. For the importation of pages, the directory hierarchy is preserved.

But what about visitors who arrive at the old URLs? The Import HTML Pages plug-in will also provide a list of Apache redirects that can be inserted into your .htaccess file. This will transfer visitors from the old file locations to their new WordPress locations. Other options include the ability to remove a common phrase from imported titles, to specify directories to exclude, to choose the author and timestamp, and to use meta descriptions as excerpts.

Check out Sillybean.net for the download link and more information on the Import HTML Pages WordPress plugin.

Everything PHP: SQL: DELETE

Published on Aug 5, 2009   //  Development
Off

Everything PHP

The delete query will allow you to delete one or more rows from one or more tables.

A basic delete query looks like this:

[sql]DELETE FROM [table_name] WHERE [field] = ‘[value]‘[/sql]

Which will delete all rows in [table_name] that match your where clause. Additionally, you may use a limit clause to limit the number of rows to delete.

If you need to delete rows from multiple tables, you can do so using the following syntax:

[sql]DELETE [table1_reference], [table2_reference] FROM [table1], [table2] WHERE [table1].id = ‘[value]‘ OR [table2.id] = ‘[value]‘[/sql]

The “table references” before FROM are the actual tables to delete from. This allows you to use other tables in your query, with deleting from them as well.

That pretty much sums up this post. Next week we’ll be going over how to integrate this into PHP, then we’ll be talking about some advanced SQL stuff.

Business 101: Regular Business Hours

Published on Aug 4, 2009   //  Business Topics

When you go to a brick and mortar store, you expect that the store will have regular business hours. These business hours are usually posted on the door, letting customers know when they will have an opportunity to come in and shop. Similarly, customers assume that the phone will likely only be answered at these stores during the posted business hours. This much seems obvious and to be expected. For home-based businesses with no official storefront, the picture isn’t quite as clear.

For consultants, graphic designers, freelance writers and other people who run their businesses from home, having official business hours does not appear to be the norm. In this way, all potential and current customers assume that these businesses can be contacted at any hour of the day on any given day. Sending an email to these businesses at 9am on a Monday is exactly the same as sending one at 10pm on a Saturday evening. Is this really the right course of action though? Should home-based businesses have set business hours as well?

There are certainly advantages for the person who is running the home-based business. By having set business hours, it is easier to separate work hours from leisure hours, since customers don’t expect you to answer the phone outside of your regular business hours. This also helps to keep your focused during the work day, because you know when “quitting time” is at the end of the day. It also provides an extra air of legitimacy and authenticity to the business.

On the other hand, having set business hours can be very restricting as well. If you are telling customers that you are open between 9am and 5pm, but you want to take care of some errands during the middle of the day, this can be more of a challenge than if you do not have set business hours. By not having set business hours, it is easier to offset working hours to a later time, giving time in the middle of the day to take care of tasks and other responsibilities, work-related or otherwise.

What’s your take? Should home-based businesses have set hours like brick and mortar stores?

Web Development: Sliding Away

Published on Aug 3, 2009   //  Development

Web Development

Continuing on with our “jQuery effects” mini-series, today we’ll be talking about “sliding away” objects. “Sliding” is actually simply animating the height of the object being reduced to 0.

We’ll be taking a look at three functions: slideUp(), slideDown and slideToggle(). slideUp() will cause the object to slide (upwards) out of sight. While slideDown() will cause the object to slide (downwards) into sight. Lastly, slideToggle() will toggle between the two.

The syntax of all three of these functions is identical. Here’s a look at the syntax of one of these functions:

[javascript]slideToggle( speed, [callback] );[/javascript]

speed is the speed of the animation. Possible values are slow, normal, fast or the number of milliseconds you want the animation to run for. [callback] is a callback function to be executed upon the completion of the animations.

Let’s take a look at a quick example:

[javascript]$("a").click(function() {
$("p").slideToggle( "1500" );
});[/javascript]

Great Gadgets: Kensington Wireless Mouse and Keypad

Published on Aug 3, 2009   //  Gadgets

Great Gadgets

If you’re going to be a mobile professional, you really can’t leave home (or the office) without your trusty notebook computer. This is your mobile workstation and it’s what you’re going to use to fire off those important emails, edit those important documents, and show off those important presentations. However, most laptops are lacking in two rather important departments: a mouse and a numeric keypad.

Some larger laptops, like those with 17″ and bigger widescreen displays, may have a numeric keypad as part of the keyboard, but just about every notebook smaller than that will not have this portion of an otherwise standard keyboard. Even with 17-inch laptops, they don’t come with a conventional mouse, forcing you to use that trackpad. Some people don’t mind this, but many others still prefer the relative precision and comfort of a regular mouse. What is a mobile professional to do?

Rather than rely on two separate solutions, it may be more prudent to consider the Kensington Wireless Notebook Keypad/Calculator and Mouse Set. This unified solution comes in three parts and really helps to solidify your mobile workstation.

First, there is a wireless optical mouse here. It’s not the fanciest mouse in the world, but it gets the job done and it’s wireless. Second, there is a separate wireless numeric keypad that can also pull double duty as a standalone calculator, thanks to the integrated single-line display. Third, there is a USB dongle that acts as a wireless receiver for both the keypad and the mouse, eliminating the need for two separate receivers. That’s pretty convenient! Kensington has also included a free travel bag to carry these three components conveniently.

The Kensington Wireless Mouse and Keypad Combo (model number K72273US) is available on Amazon.ca for $59.99.

Weekend Projects: Link Check

Published on Aug 1, 2009   //  Weekend Projects

Weekend Project

This week we will focus on checking links on your site to ensure that there are no broken links. Any broken link an be a reason for Google to penalize your site and may cause confusion for visitors who click on links and end up at a 404 page.

I found a great free tool for checking links on your site and it is really easy to use. To get started…

  1. Download the Free Link Checker software*. Save it to your desktop and then double click on the Setup file. Follow the on screen setup by clicking next several times.
  2. Open the Free Link Checker software and choose File > New Project.
  3. Enter your domain name http://www.yourdomain.ca/ and click start.

It will run and then ask you if you want to output a report. Choose yes and then Cancel. This will open the report in your local browser.

If you have any errors go through and fix them this weekend.

If you get stuck let me know in the comments.

* Note: Due to the sensative nature of the previous linked software we have replaced it with another free checker. Our appologies if the software offended anyone it was not our intention.

Page 7 of 7« First...34567