it bothers me that sometimes i sit in front of my computer, and i don’t have anything to do. yet i can’t unglue myself from the computer. i check my gmail account and my unc email. i check bloglines and boingboing and blogdex. i check my blog for new comments. i go to news.google.com. i check my referrer page, i check my extreme tracking stats. i check my tada list.
maybe something from above will trigger me to post a neatlink or forward someone a link or leave a comment or reply to an email.
but a lot of times i just sit there. and repeat the cycle. check my blog again for comments. reread my most recent post. i liken the experience to channel surfing. and feeling like a deer in headlights. the very psychosis i wanted to avoid by not owning a tv i’ve recreated with my laptop.
i presume the popularity of getting things done and 43things and tadalist suggests i’m not alone. but here’s the thing. i don’t care about getting things done. that’s not my problem. i just want to prevent my computer from turning me into a zombie. here are two things i’ve discovered so far.
lcd screens are too bright, especially at night. so i need to remember to turn down the brightness. i’m not sure what the connection is between the glowing liquid crystals and my ability to think, but turning it down immediately puts me at ease. it’s as if the brightness demands more of my cognitive attention, and leaves me powerless to play an active role in actually using the computer.
different postures are suited to different tasks. there’s something i really like about laying down with my laptop in front of me and a pillow under my chest, propping me up. i do this on couches, on the floor, in bed. it’s cozy, it’s like cuddling up with a book. i like laying down that way to read email or blogs, respond to personal emails, basically doing all of the things i listed at the top. but it tends to be a very bad position for getting things done. or having ideas or solving problems.
i guess because laying down is a passive position, whereas sitting upright, in an ergonomic chair at a desk is a much more active, alert position. if i’m sitting up, i can more easily access things around me, and i can more easily step away from the computer. when i’m laying down, i’m probably going to stay laying down, whether i’ve got something to do or not.
Update, please read this first!
The instructions below only worked for WordPress 1.5, 2.0, 2.1, and 2.2 before Google released a new version of Blogger—which broke the WordPress importer. Since that time, these instructions have ceased to be useful. However, if you’ve recently imported your Blogger blog into WordPress 2.3 (or are planning to) and need to import your Haloscan comments, check out my new post created specifically for you: Importing Haloscan comments into WordPress 2.3 from Blogger. I’m leaving this post here for posterity, but since it’s no longer doing anybody any good, I’ve closed the comments.
Background
Judging by the response to my original moving from blogger to wordpress post, this is a popular topic. However, I only meant for that post to be useful to the next hacker down the line and not so much for the faint of heart. This post seeks to remedy that oversight with an improved script for importing Haloscan comments into WordPress.
This was made possible after Haloscan fixed their comment export feature so that html is no longer stripped from the comment text. The other night I looked back at some code I had pieced together based on Phil Ringnalda’s code from his post, Importing YACCS comments in Movable Type, and I was able to finish the Haloscan importer the way I had originally intended: without screen scraping! If you have any problems or suggestions, feel free to leave a comment. Enjoy.
Step 1: Upgrade Haloscan
Only “premium” customers have access to Haloscan’s export comments feature. Bah! The only way to get around this limitation and get access to your comments for export is by donating $12 to Haloscan. If you do make the donation, the instructions and code below (for versions 1.5.x and 2.x of WordPress) should work for you.
Step 2: Import Blogger posts into WordPress 2.x
If you’ve already imported your Blogger posts using WordPress 2’s importer without the modification below, you will need to delete the posts you’ve imported, make the modification described in step 2, and rerun the importer. Luckily I’ve created a plugin to make deleting all of your blog posts a snap.
- Open /path/to/wordpress/wp-admin/import/blogger.php in a text editor
- Find the following line (line 404 in v2.0.2)
$post_content = $postinfo[2];
and change it to this:
$post_content = "<!--" . $postinfo[3] . "-->" . $postinfo[2];
Explanation: This stores each blogger post id as an html comment at the beginning of the post, which is used later to associate the post with the appropriate Haloscan comments.
- Save the file and then return to a web broswer
- Log in to the WordPress administrative interface and select the “Import” option from the top menu, and then select “Blogger” and follow the instuctions for importing your posts
- Continue with Step 3: Importing your Haloscan comments below
Update: If you’re interested in maintaining the permalinks to your posts, I’ve written a post called Maintain permalinks moving from Blogger to WordPress that requires three additional changes to the blogger.php script, which need to be made before you run the import. (17-Oct-2006)
Step 2B: Import Blogger posts into WordPress 1.5.x
Note: This step is left here for historical purposes. WordPress 2 comes with a significantly more advanced importer for Blogger which should be used instead of the instructions below. If you’re importing into WordPress 2.x, skip to Step 3.
The instructions marked with an asterisk (*) below are slightly different from the instructions that come with the import-blogger.php script provided by WordPress. In particular, step 7 is crucial in order to import comments from Haloscan.
If you’ve already imported your Blogger posts into WordPress using the provided import-blogger.php script and you can’t or don’t want to delete the posts that you’ve already imported, I’ve written a script to insert the Blogger post IDs into your WordPress posts so that you’ll be able to successfully import your Haloscan comments.
Just download insert-blogger-post-ids.zip, unzip it, and upload insert-blogger-post-ids.php to your wp-admin directory. Then run it in your browser like you did import-blogger.php. Now you can skip down to the section entitled “Importing your Haloscan comments”.
- log in to Blogger
- go to Settings > Publishing and set FTP Path to your WordPress install e. g.
/path/to/wordpress/
- *change Blog Filename to
wordpress.html
explanation: prevents creating an index.html file in wordpress directory—this file can be deleted later
- go to Settings > Formatting and change Timestamp Format to mm/dd/yyy hh:mm:ss tt (the first option) and set Enable float alignment to “No”
explanation: the second change prevents Blogger from inserting unnecessary formatting markup at the beginning and end of each post
- go to Settings > Archiving and set Archive Frequency to “Monthly”, set Archive File name to
wordpress.php
, and set Archive Path to your WordPress install e. g. /path/to/wordpress/
(should be the same as above)
- *set Enable Post Pages to “No”
explanation: prevents creating post pages filed under directories named 2004, 2005, etc in your WordPress directory which would eventually collide with permalink rewrites
- *go to Template > Edit Current and replace your template with the following line of code
<Blogger><wordpresspost><$BlogItemDateTime$>|||<$BlogItemAuthorNickname$>|||<!--<$BlogItemNumber$>--><$BlogItemBody$>|||<$BlogItemNumber$>|||<$BlogItemSubject$></Blogger>
explanation: includes the unique blogger post id within an HTML comment in the body of each post
- Click “Save Template Changes” and then click “Republish” to republish your blog
- goto http://example.com/wordpress/wp-admin/import-blogger.php where
example.com/wordpress
is replaced with the domain name and path to your WordPress install
- click OK at the bottom of the page to import your Blogger posts
Step 3: Importing your Haloscan comments
import-haloscan.php has be revised for WordPress 2.x so that comment counts are now automatically incremented.
- Download and unzip import-haloscan-2.0.zip (v2.0)
- Upload import-haloscan.php to your wp-admin directory
/path/to/wordpress/wp-admin/
- log in to Haloscan
- go to Manage Comments > Export
Note: only “premium members” have access to export their comments, but if you’re really serious about leaving Haloscan, you might be willing to donate the $12 necessary to gain access to your comments for exporting.
- There will be an export link for every thousand comments you have. Clicking one of the export links will prompt you to save the file as “export.xml”. If there is more than one link (i.e. if you have more than 1000 comments), rename the first file to export1.xml, the second file to export2.xml, and so on. Save the files to your desktop and upload them to your WordPress directory
/path/to/wordpress/
- Go to http://example.com/wordpress/wp-admin/import-haloscan.php where
example.com/wordpress
is replaced with the domain name and path to your WordPress install
- Click OK at the bottom of the page to import your Haloscan comments
in may’s issue of wired they included a short feature that resonated with me when i read it. the monthly cost of living in the digital age. and apparently, i’m not the only one.
even though i admit at times to being proud of the obligations i’ve avoided paying for (e.g. cable tv, landline), a hefty amount of money still flows out of my pockets each month so that i stay “connected.”
cell phone service |
$60.00 |
Sprint PCS Fair and Flexible (fluctuates) |
cable internet |
$66.95 |
Comcast 6.0Mbit |
web hosting |
$9.95 |
Dreamhost 2400MB disk space, 120GB bandwidth |
total |
$136.90 |
|
i’ve been considering netflix ($9.95/month), but first i’d have to get a tv. and a dvd player. and some speakers…
update, this is pretty scary:
Already, televisions account for about 4 percent of annual residential electricity use in the United States – enough to power all of the homes in the state of New York for a year, according to a new NRDC study. Today there are about 266 million TVs, and that number is growing by 3.5 million per year. (As TVs grow, so do electric bills, The Christian Science Monitor)
though they call it fair and flexible, my cell phone bill for the month of may was $98. since a lot was going on in may, i’m willing to stick it out and see what the trend is. the $60 figure above is really just an rough average. i’d rather it be more like $40/month. but that may not be possible given my probable west coast usage patterns.
cingular’s plans are nothing to call home about, but i’d consider them just to get a sweet looking moto razr. it seems like t-mobile has far and away the best plans, with 1000 “whenever minutes” per month for $39.99. i’m just wondering, “what’s the catch?”
I would like a Firefox Extension that allows me to:
- View Source in New Tab (View Rendered Sources comes close, but I don’t need all the rendered gunk)
- Toggle between whether a tab renders the HTML source or displays the raw HTML source. Presumably with a right-click “View Source in Tab” option. Then something like “View Rendered HTML in Tab” to toggle back. An ability to see the rendered JavaScript would be nice too.
This post first appeared on From the Belly of the Beasts, a weblog from some of the people who build O’Reilly websites.
unfortunately this took me a long time to get around to. i got the following request in response to my monthchunks for wordpress post:
So is there any way that someone still on Blogger (waves hand in the air with earnest and pleading look on face) could wangle the original javascript to turn the ‘standard archive link into something a little more compact’? I assume this would be code that goes into my custom template in place of the month-by-month links I’ve got there now? Short of a real calendar, the less vertical space used up by my archive links list, the happier a camper I am. Many thanks, I hope! —Leeeny
i developed the monthchunks archive format originally in javascript to modify the display of the links to my blogger archive pages. but since i moved my blog over to wordpress and replaced the javascript with a plugin written in php, i thought the javascript was gone.
of course it completely skipped my mind that my neatlinks sidebar blog is blogger driven, and the monthchunks-style archive links at the bottom of the column are indeed generated by javascript on the client. here’s how to do it.
- get the javascript monthchunks-1.0.js into your blog in one of two ways:
- if you have the ability to upload files to your web host, grab the the monthchunks javascript above and upload it to your web directory (i put my javascript files in a folder called “scripts”), then add the following line of code before the
</head>
tag at the top of your current blogger template
<script type="text/javascript" src="/scripts/monthchunks-1.0.js"></script>
note: the src
attribute assumes the script lives inside a folder called “scripts”—if this is not the case, change it appropriately
- if you cannot upload the javascript file to your web host (for instance if you’re using blogspot), add the following lines of code before the
</head>
tag at the top of your current blogger template
<script type="text/javascript">
// paste function here
</script>
then left-click the “monthchunks” link above, copy the javascript, then paste it where it says // paste function here
- update your current template’s archive links output. it may look something like this:
<BloggerArchives>
<a href='<$BlogArchiveURL$>'><$BlogArchiveName$></a>
</BloggerArchives>
replace it with this:
<script type="text/javascript">
var archives = new Array();
<BloggerArchives>archives[archives.length] = new Array('<$BlogArchiveURL$>', '<$BlogArchiveName$>');</BloggerArchives>
monthchunks(archives);
</script>
<noscript><BloggerArchives><a href='<$BlogArchiveURL$>'><$BlogArchiveName$></a> </BloggerArchives></noscript>
- finally change your archive date settings in blogger (under settings > formatting > archive index date format to the mm/dd setting
and of course, if you run into any problems or have questions, please leave a comment. enjoy.