how to

How to find your WordPress API key

Monday, March 2nd, 2009 | WordPress, blogging, how to | No Comments

I recently migrated a blog from being a free WordPress blog to being a self-hosted blog.

Today, I noticed that my WordPress.com Stats plugin wasn’t working and my dashboard was sporting a shiny new warning about needing an API key to activate the plugin.

I immediately turned to WordPress.com – unfortunately, the information regarding API keys has not been updated to include where to find it using the new dashboard for WordPress Version 2.7.

So, to save other WordPress users the frustration, I wrote these instructions based on the new dashboard:

How to find your API key

  1. Log in to your WordPress account.
  2. Click Users > Your Profile.
  3. Your API key is at the top of the screen:

wp-dashboard-api1

You can copy the API key from there and paste it into any field where it is required.

In my case, the API key wasn’t there when I looked, and after frantically searching Google I discovered the issue: I migrated my free WordPress blog (http://myblog.wordpress.com) to a hosted account (www.myblog.ca) – so my API key was still associated with my free WordPress blog.

And here’s the really important part: the API key that was assigned to your free blog is the API key you will use for all of your WordPress blogs – hosted or not – if you want to activate plugins requiring an API key.

Retreiving an API key from a free WordPress blog

  1. Login to your free WordPress account.
  2. Click Users > Your Profile.
  3. Your API key is at the top of the screen.

  4. Copy the API key.
  5. Paste the API key into the field where it is required on your hosted WordPress blog.
  6. Follow any remaining instructions laid out by the plugin or enhancement.

I found two great blog posts over at WordPress Max that go into even more detail than this post:

An API key is a useful thing to have to take full advantage of all the plugins and enhancements that WordPress offers – and there is a lot of great stuff!

Special thanks to WordPress Max for making API keys clearer!

Tags: , , , , , , , ,

PHP for Beginners: forms

Tuesday, October 21st, 2008 | continued education, how to, programming | 1 Comment

I finished the Introduction to Programming Basics course at UBC last Tuesday and began my Introduction to PHP Programming course on Friday.

I’m not sure the Introduction to Programming course really prepared me for putting the concepts I learned into action. Talking about programming is easy, actually doing it is a whole other issue.

For the first class we worked on building a PHP form. The forms we built are the same ones you use to buy things at Chapters.ca, or fill out a comment on someone’s blog or anything where a website needs you to give it some information about yourself.

The first thing I did was build an XHTML form to give the user something to type into. The form looked a little like this:

<html>
<head>
<title>
Untitled</title>
</head>

<body>
<form action=”form.php” method=”post”>
<!–FORM will send the users information and choices to the PHP form handler and bring back the results of the users input.–>

<!–An HTML table to organize and present the form to the user in a nice and orderly manner.–>
<table border=”0″ align=”center”>
<tr>
<td>
<h1>
Entry Form</h1>
</td>
</tr>
<tr>
<td
colspan=”3″ align=”left”>First Name: <input type=”Text” name=”Fname”><br />
</td>
</tr>

If you’d like to see the entire .html file, click here to download it.

Notice that <form> tag at the beginning of the file? The action=”form.php” is important. This allows the form to process all the users information using a .php file. Guess what I created next?

Yep, a .php file. It looked a little like this:

<?php

print “$Fname,
;

?>

If you’d like to see the entire .php file, click here to download it.

You might have noticed that in the .html file, I wrote: First Name: <input type=”Text” name=”Fname”>

and in the .php file I wrote: print “$Fname,

Essentially, in the .html form I was giving the user a place to enter their first name and in the .php file I told it to get the first name the user entered and display it back to the user once they clicked the submit button on the form.

That is all the PHP I know at the moment. I haven’t learned how to validate information, or tally up price totals and taxes or process credit card information yet. This Friday will begin covering that aspect of PHP.

I’m not sure yet whether programming is going to be something I’m good at, but if I can wrap my brain around the how the concepts are actually applied, then I’ll at least be on the right track.

Tags: , , , , , , ,

Installing your HP Photosmart C4250 with Vista

Tuesday, September 16th, 2008 | HP, Vista, computers, how to | 1 Comment

A few months ago I was fortunate enough to receive an HP Photosmart C4250 All-in-One printer and scanner as a gift from a friend. 

I had a few problems getting everything working including:

  • The scanner not detecting the alignment page
  • The printer not detecting the USB cable
  • Vista not playing nice with the printer drivers or the USB cable 

Here are the steps to get Vista to recognize your HP C4250 so you can actually start using it!

To save time, the first thing I recommend is turning off Vista’s User Access Control (UAC) to get rid of those “Cancel or Allow” messages. This will let you uninstall everything associated with your printer quickly without having to click “allow” every few seconds.

Turning off Vista’s User Access Control (UAC)

  1. Click Start > Control Panel  > User Accounts and Family Safety.
  2. From User Accounts, click Add or remove user accounts.
  3. Click Go to the main User Accounts page.
  4. Click Turn User Account Control on or off.
  5. Uncheck the ’Use User Account Control (UAC) to help protect your computer’ option.
  6. Click OK.
  7. In the Microsoft Windows dialog box, click Restart Now.

Follow these same steps to turn UAC back on when your printer is installed and working correctly.

Your printer should have come with a CD containing drivers that allow your computer and printer to recognize and talk to each other.

If you are running Vista and you got version 8.0 of the CD in the box, save yourself the headache and download HP Photosmart Full Feature Software and Drivers version 9.0.0 (the third option under Driver).

If Vista won’t allow you to complete the download of the updated driver, you will have to call HP Support and ask them to send you a copy of version 9.0.0.  HP Support will walk you through the installation if you find you need help, but the install wizard is pretty straightforward and it should not be difficult to install the drivers on your own.

Next steps?

  1. Plug your printer into a power source.
  2. DO NOT plug in the USB cable (that comes later).

As you follow the setup manual that came with your computer, ignore all messages telling you the scanner can’t detect the alignment sheet. The scanner isn’t broken, it’s just confused right now.

Carry on with whatever instructions are left in the guide. If you are asked to restart your computer go ahead and do it.

Now we are going to scan that page you printed earlier – even if the printer told you that wasn’t possible.

  1. From your desktop, click the HP Solution Center icon.
  2. From the HP Solution Center dialog box, click Scan Picture.
  3. The hp scanning dialog box will open and your page from earlier will appear in the dialog box.

This is the point where your All-in-One is saying “Oh! You wanted to scan something. Geez, why didn’t you say so?” Now you can pop stuff onto the scanner, and use the scan button directly from the printer/scanner itself!

And that’s it. You’re all done.

However, if you didn’t get a prompt from the printer or your PC to plug in the USB cable, I can tell you already you’ll have to uninstall the HP software and drivers, restart your computer and start over.

Uninstalling HP Software and Drivers

  1. Click Start > Control Panel > Programs.
  2. From Programs and Features, click Uninstall a program.
  3. Choose the HP feature you wish to unistall from the list.
  4. Click Uninstall/Change and follow any prompts that come up.

You will have to uninstall more than one item. These items may include the following:

  • HP Customer Participation Program 9.0
  • HP Imaging Device Functions 9.0
  • HP OCR Software 9.0
  • HP Photosmart All-in-One Software 9.0
  • HP Photosmart Essential 2.01
  • HP Smart Web Printing
  • HP Solution Centre 9.0
  • HP Update
  • HPSSupply

One last hint: if you get it all installed and then find that trying to copy text from the web results in a little pop-up giving you the option of copying as a picture – that’s just HP trying to do your thinking for you. Here is how to make it stop:

Disabling HP Add-ons

  1. Open Internet Explorer.
  2. Click Tools >  Manage Add-ons > Enable or Disable Add-ons…
  3. From the Manage Add-ons dialog box, click HP Clipbook in the list to highlight it.
  4. Choose the radio button for Disable in the Setting portion of the dialog box (lower left corner).
  5. Click OK.
  6. Repeat steps 4 to 6 for HP Print Clips and HP Smart Select.

You should now be able to print and scan. If you still have problems, call HP support. I was really lucky and got a very helpful support member who sent me the correct driver and software disc free of charge by courier!

Tags: , , , , ,