Archive for category Tech

WordPress Post-Notification – Show the author in email subject

I was trying to fix a WordPress Post Notification plugin to include the post author in the emails subject. Instead of inserting the author name it was leaving the @@author in the subject.

A little digging around found me the solution -

In sendmail.php->post_notification_create_email(), find -

$subject = get_option('post_notification_subject');

and add a new line after that -

$subject = str_replace('@@author', $post_author, $subject);

Ref – Post Notification forum

Tags: , ,

Moving a WordPress blog to new domain

Wordpress documentation does a pretty good job of explaining the steps you have to take if you are moving your wordpress blog to a new domain.

See Changing The Site URL – Domain Name Change

Even after you update the guid in your WordPress database’s posts table by following the instructions there, you may find that some of the images do not show up, and the image and other links are broken.

Run this command to see if the problem is in the post contents in the WordPress database’s posts table -

select id, post_title from wp_posts where post_content like '%exampleoldsiteurl%';

(Replace exampleoldsiteurl with the old url of your blog)

If this shows posts that are using the old url, you need to replace that url in the post_content just as you did for guid -

UPDATE wp_posts SET post_content = replace(post_content, 'exampleoldsiteurl','examplenewsiteurl');

Make sure to carefully read the instructions on the WordPress Codex link above, and absolutely make certain that you have a back-up of your database before you run these sql commands on it.

Tags: , ,

Manually resuming a download in Safari

Sometimes you need to manually resume a download in Safari, but you can’t, because the download url was part of a session that has expired.
Mac OS X hints has a handy tip on how to resume a download after Safari crashes – Resuming a download after Safari crashes.

With a slight modification to that process, you can manually resume a download that requires a session, for example by requiring you to log in to a website.

Follow the same steps as in the hint above, and after starting and stopping the download, copy the following two items (substitute the urls from the info.plist in the new download file) to the info.plist in the old download that you want to resume -

<key>NSURLDownloadURL</key>
<string>http://www.mypatchsite.com/patch.sit</string>

<key>DownloadEntryURL</key>
<string>http://www.mypatchsite.com/patch.sit</string>

Now open the old download package in Safari, and it should be able to continue the download from where you left it.

Tags:

Google Chrome on Mac

Google Chrome developer release on Mac -

Google Chrome on Mac

Google Chrome on Mac

Being a developer release, it is incomplete.
How incomplete? You can’t run YouTube videos for example, a bunch of other plugins don’t work, and lots of other good stuff missing.
GMail works though, that is what I will be using it for now.

Download it here – Chrome developer release, if you can’t wait to see Chrome running on your Mac.

Tags:

Google Wave – the successor to GMail

GMail changed the way we use email. It gave us conversations. We started using labels and searches instead of trying to manage folders. It spoilt us by giving us extensions (labs) and themes. It integrated chat and video into the email. And, we started to expect a lot more from web applications.

Google has just unveiled the next big thing they have been working on – Google Wave, and I can safely bet that it is going to have a much bigger impact on how we communicate than GMail did.

I just finished watching the Google Wave Developer Preview at Google I/O 2009.
It is absolutely mind blowing. Not only in how completely it changes the way we think about online conversations, but also in how much the Google team managed to do in the browser. Amaazing!!!

Go watch it now. It is an hour and twenty minutes, but it is time well spent :) .

Tags: , ,