Integrating Twitter and WordPress

I’ve known about WordPress for a long time, and this is the first time I’m really playing with it in order to integrate a blog into my online presence. Like many these days, I have a Twitter account, so I made this my first target for integration.  There were four primary goals here:

  1. Make it so that when I post a blog entry have it automatically posted to Twitter.
  2. Show my recent tweets.
  3. Show my favorite tweets.
  4. Show the photos I’ve tied to my Twitter account using Twitpic.

Continue reading “Integrating Twitter and WordPress”

Blogs A’Movin’

So part of what’s going on here is that my “grand plan”TM included moving from a few single site installs of WordPress to instead using WordPress MU.  This step is now officially complete.  It’s not that I’m hosting a lot of blogs here, but rather that I’m more the sort who prefers “one stop shopping” – especially for maintenance.  If there’s too many steps to a thing I’ll avoid doing it.

Moving a WordPress blog isn’t rocket science, but there are some considerations to be made.  And I recommend 3 precursor steps to any WP blog move:

  1. Use FTP to back up your WP Install.  This way you’ll pick up themes, plugins, and media that have been uploaded.
  2. Use something like phpMyAdmin to do an export of your Blog’s database.
  3. Use the WordPress “Export” function to export your blog data to an XML file.

Then assuming the old site is still active, and once you have the new site set up, you can just use the WordPress “Import” function to read everything back in.  When the old site is active all media will be copied into the new install.   I highly recommend that you install any themes and plugins that were in use before you do the “Import” – it’ll make life easier.

Now, what if you’re moving a domain along with the blog?

Well that is a sticky situation because the old site will not be available for the import – which means media will not be available for the import process.  This leaves you with two choices:

  1. Suck it up.  The old media is in your FTP backup.  So do the import, ignore all the errors because the media was not found, and then manually add the media back.  If you have no media – this is always the right choice.
  2. Stage the blog at an intermediary first.  Before shutting down the old site, import it into a temporary blog.  Shut down the old domain site, and then move the temporary blog (Export & Import) to it’s final resting place.

Last night, I was moving two blogs (one belonging to a friend, and the other belonging to a relative) along with their domains.  Because they were small and under-utilized, I went the suck it up route – there were only 3 media files to be found between the two blogs.

Minor Changes

Didn’t have time to do much here today, so I kept it small and focused.

  • Changed tweet image name from twitter_16.png to tweet.png
  • Realized I was missing the RSS feed link for the blog, so I created a new icon pair (for the social icons), and added it in.  This is a bit involved for a lot of reasons based on how web pages function and render in conjunction with CSS.  I’ll write up a how to on this soonish.
  • Shrunk the logo image slightly to make some room.  The logo image comes courtesy of Twitlogo.
  • Moved boiler plate (aka header) items to use absolute positioning – makes some things cleaner.
  • Removed some extra markup and CSS that really wasn’t needed as a result of the absolute positioning.

Recent Tweets CSS Makeover

Played a bit with styles for the Recent Tweets widget from Twitter Tools.  I just wanted to give it some pizazz.  To do this I made the Tweets it shows look/behave somewhat like they do on on the Twitter home page.  First you’ll notice that I replaced the bullets with a smaller version of the social media icon I used (see the top right of the blog).  Then I placed a very grey one pixel line above list item in the widget.  And finally I set each Tweet so that when the mouse hovers over it it gets a darker grey background.

The CSS code looks like this:

/* Twitter Tools */
.aktt_tweets ul li { font-size: 85%; list-style-image: url(tweet.png); border-width: 0; border-top: 1px solid #EEEEEE; }
.aktt_tweets ul li:hover { background-color: #F7F7F7; }
.aktt_tweets .aktt_more_updates { list-style-image: none; list-style-type: none; font-size: 75%; font-weight: bold; font-variant: small-caps; }
.aktt_tweets .aktt_more_updates:hover { background-color: transparent; }

Edit: Forgot to mention how the syntax highlighting block above works.  This is done using the WP-Syntax plugin which uses GeSHi style syntax highlighting.  Basically it involves specifying a language in your <pre> block. For example the block above is using <pre lang=”css”>.

Blog Tweets… Yeah Yeah

Well, I bailed on Su.pr fairly quickly.  It simply would not work, and I don’t have a high degree of tolerance for things that are not well documented.  Don’t get me wrong I have no beef with StumbleUpon – they are a great site.  I just think the Su.pr service requires better documentation.  That’s all.

That had be head to the plugin directory at the WordPress site.  Didn’t take long to find something that seems like it will do the job for me: Twitter Tools.

While the plugin can do cross polination (meaning Tweets go to the Blog, and Blog posts go to Twitter), for my needs I really only want a one way trail.  The way I have things now my Tweets already go to Facebook (again see social links on the top right of the blog).  This means that when the plugin posts to Twitter, I’ll also get that reflected on Facebook.  For me that works.

It also has some other features: Daily and Weeky Digests.  I’ve went with Weekly.  I simply don’t feel that I’m a prolific enough Tweeter to need a Daily Digest, but that a Weekly one makes sense.  I’ve set it to post at 6pm every Friday night when Shabbat starts.  This works for me because normally I don’t Tweet or post on Facebook during Shabbat since this marks the end of my week.

The final feature I turned on is the visible one with the widget on the right hand side.  It needs some CSS work still, but it’s ok for now.  I have it showing my last 3 tweets.  I’m not entirely clear how often this updates – I’ll have to keep an eye out.

Plugging in the new Blog

So here it is, my new fangled blog. It’s WordPress – mostly for simplicty / ease of use.  Oh sure I’ve played with more complex CMS/blogging software before like Drupal – but I hadn’t really played much with WordPress before, and wanted to give it a shot.  So far me like.

As I set up my blog, I’m deciding which WordPress plugins to use or not use.  Taking it slow, don’t want to overwhelm.  Right now the main goal is to connect this blog with the rest of my online persona (see top right of the blog).

My first choice was Sociable in order to allow people who visit to reference anything they find here of interest with their social media accounts (Twitter, Facebook, etc.).  The interface for the settings for this plugin is great, you just pick which icons you want to show, and where in your blog you want to show them (pages, posts, etc.), and they show up.  You can change their order with ease.  You can theme it with CSS which is fantastic – it visually has a lot of fat in the CSS by default, very easy to trim down.  The creators of this plugin did a fantastic job with customization.  Worst icon choice: Print – not sure why it doesn’t use the browser’s print function.

I’ve also giving Su.pr a shot too.  Not choosing the toolbar as I feel that’s a little invasive, but I also understand and respect the reasons for why it exists.  In theory this post should get shot to both Twitter and Facebook.  It might show up on Facebook twice.  If it does I’ll fix that tomorrow, and sorry for any confusion.

Edit: Looks like the Su.pr thing didn’t work.  Will try to sort it out tomorrow.