Web Development

Change the Author of Multiple WordPress Posts

Disclaimer: This idea requires access to the shell on your webserver.

This is the SQL query you’ll use:

UPDATE wp_posts 
SET post_author='[NEW ID]' 
WHERE post_author='[EXISTING ID]';

I had posts that were assigned to Admin (which by default is user ID 1), and I wanted to assign them all to my user (which in this case is user ID 2).

My query looked like this:

UPDATE wp_posts 
SET post_author='2' 
WHERE post_author='1';

That will go through the posts database and update the author for all of them.

Continue reading “Change the Author of Multiple WordPress Posts”

CMS Switchover

After using Drupal for almost 2 years I decided that it’s time for me to try out something different. As you can see I decided on WordPress.

I used the guide at spindrup.us to convert my database from drupal to be used with wordpress.
You can still see my drupal installation here if you want to, but there won’t be any more updates there.

Enjoy,

Jon Howe

Drupal 4.7.0 Released

From the Drupal Homepage:

After more than a year of development we are ready to release Drupal 4.7.0 to the world. More than five years, 13 major releases, 30+ servicing firms employing 100+ Drupal professionals, 300+ third party modules, and over 55,000+ Drupal powered sites later, Drupal 4.7.0 is finally here and it rocks!

Needless to say, I’m going to be updating this version very quickly, aka as soon as my laptop starts up. Look for the next post to be from Drupal 4.7.0!

Continue reading “Drupal 4.7.0 Released”

AJAX Based MySql Live Search

This is a little something that I made up this afternoon at school.

It’s an implementation of a search app with out a celing. In other words , there’s no submit button. With each keystoke that you type, the query get’s more accurate.

If you just want to check it out (with source, and an example) then Click Here
The code is commented pretty well.

If you want a little explanation read on.

Continue reading “AJAX Based MySql Live Search”

Howto: AJAX Regular Expression Email Verifier

It’s important to do form validation for obvious reasons. This is an implementation of an email checker that uses php regular expressions, and a little bet if pizzaz with asynchronous javascript and xml, or AJAX.

Here’s the example.

A quick rundown of how this works is:

  1. You type in a string
  2. You hit submit
  3. The data is transfered asynchronously (without refreshing the page) to the server
  4. The server checks to see if the email is valid or invalid
  5. If it’s valid it tells you so, as well as if it’s not

The guts of the script are here:
if (eregi("^[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-_.]+$",$email)) { //return confirmation that it worked } else { //return that it didn't work }

Continue reading “Howto: AJAX Regular Expression Email Verifier”

HOWTO: Create a Logging Redirection Page using PHP and MYSql

Since I’ve already been on the topic of doing small beginner PHP tutorials, here’s another one. This one is pretty self explanitory.

You can see it here.

Basically what this does is let you enter a domain or page or whatever and it redirects you to the page. On top of just redirecting you, it logs all of the redirections along with the request date, and requester ip address.

If you have a need for this, you’ll most likely know how to implement it. If not, feel free, as always, to email me (howe -dot- jon -at- gmail -dot- com), and I’d be happy to help you out to the best of my abilities.

Continue reading “HOWTO: Create a Logging Redirection Page using PHP and MYSql”

Howto: PHP Secure Download Script

I’ve been wanting to make a script in PHP that handles downloads for a while. Last night I was bored, so I made one.

DISCLAIMER:
This is a very basic example, but if you have any use for this, I’m sure that you can figure out how to use it. If not, I’ll probably work more with it in the future anyways.

This system works with two PHP files.

If you just want to see the script work, go Here.

Continue reading “Howto: PHP Secure Download Script”

Useful Web Tool from Microsoft

I’ve been working on a couple of new projects that are really javascript intensive, and have been banging my head because of problems with getting scripts working in all browsers.

The odds of me finding a tool to help by Microsoft of all companies is astounding to me, because of my feelings towards them.

I found a tool, which works only in internet explorer (Located Here) that is helping me out a lot.

Continue reading “Useful Web Tool from Microsoft”

New Idea

I just got a new book on Ajax, which is an exploding method of creating code using a combination of Javascript, CSS, DOM, and xhtmlrequest.

That’s a bunch of technical junk I guess. The main point is that it allows you to do really cool things on a webpage without refreshing the whole page.

I’m going to try to read a chapter in it each day, if not one day then every two days, and post comments and maybe code examples (if I feel creative) as well.

Continue reading “New Idea”