10.13.2012

Fixed: All Disqus Comments have the Same Author Name

I recently decided to use Disqus to handle comments on my new Wordpress site. I installed the Disqus Wordpress plugin and imported my comments. After I did this, I found that all the comments on each of my posts had the same author name. I spent the last few days fixing this problem. Here is how I did it.

The problem stemmed from the fact that all the commenters on my blog had the same email address. This was because I originally imported my posts from a Blogger blog using the Blogger Importer Wordpress plugin. Blogger sets the email addresses for all its comments to "noreply@blogger.com." When Disqus reads this, it interprets each comment as coming from the same person, and displays the first commenter's name for all the comments on a given post. It doesn't appear this way in the Disqus admin panel, but stupidly, it does on the site where you embed your comments.

Here are the steps I took to fix this:

1. Exported all my Wordpress content under Wordpress admin > Tools > Export. This will generate a WXR file (with an "xml" file extension).

2. Downloaded a text editor called Emacs. I was using Windows XP, so I downloaded this: http://ftp.gnu.org/pub/gnu/emacs/windows/emacs-24.2-bin-i386.zip

3. Extracted the Emacs zip file to a folder. Launched \bin\runemacs.exe and opened my WXR file from Step 1. Went to Edit > Replace > Replace Regexp. For the query to replace I typed in "noreply@blogger.com" and hit Enter. For what to replace it with I typed in "noreply\#@blogger.com" and hit Enter. Then I typed "!" to tell Emacs to make the change for the entire file.

This code, "\#", tells Emacs to search and replace each result it finds with a number, starting at 1, that increments with each replace. After Emacs was done I had a file that instead of "noreply@blogger.com," was filled with "noreply1@blogger.com," "noreply2@blogger.com," "noreply3@blogger.com," etc. Presto! A file full of Wordpress comments where all the commenters have unique email addresses (I learned how to do this here). I saved the file.

4. The next step was to create a new forum on Disqus (Disqus.com > Dashboard > Add+). Once it was created I went to Tools > Import > Upload WXR and uploaded my new WXR file.

5. I periodically checked import.disqus.com until it reported that my import was complete (this took about 24 hours). Then I went into Wordpress admin > Comments > Advanced Options and changed my Disqus shortname to the shortname of my new forum. Saved changes and I was done!

I think it would be very easy for Disqus to prevent its users from having to go through all these hoops. Since they don't I figured I would do my part to prevent others from having to go through the same frustration I did.

One last tip: make sure you don't change any of your post URLs between the time you export your Wordpress site and when you import it into Disqus. If you do, you will have to use Disqus' Migrate Threads tool to fix your URLs. 

1.30.2012

How to Convert PDFs to Word Documents for Free with Google Docs

Anyone who does a moderate amount of word-processing has at one time or another needed to convert a pdf into an editable format, such as a Microsoft Word document. For $449, Adobe Acrobat will give you all the tools you need. If you're like me, that's about $444 too steep. Luckily Google Docs offers a completely free solution. The formatting in the end product won't be perfect, but at the very least it will keep you from having to type your pdf into Word by hand.

Here's how to do it.

1. Go to docs.google.com. If you don't have a Google account, create one. Log in.

2. Click on the red button at the upper-left that has a picture of a hard drive with an arrow pointing up. Select "Files...."


3. Browse to the pdf you would like to convert and click "Open."

4. Your pdf will be uploaded to Google Docs. Once the upload is finished, it will appear first in your list of Google Docs documents, under the word "TITLE." Select it by clicking the check-box to the left of your pdf's name.


5. Click on the "More" button at the top of the page and select "Make a Google Docs Copy."


6. While the copy is being made, a message will pop up saying "Making a copy in Google Docs format..." When it is finished, a new Google Docs version of your pdf will appear at the top of your documents list. Click on the title to open it up and take a look.


7. To download your document in Microsoft Word format, click on "File" in the upper left, click "Download as," and then "Word."


And you're done!

Image: amy allcock