Talks Uncategorized

Using Prezi to give a tech talk

On Thursday, I gave my first talk about Drupal! Fito Kahn organizes the Austin Drupal Newbies Meetup, and we had lunch with him at the Southwest Drupal Summit in Houston last month. I was feeling pretty inspired from watching the speakers at the Summit, so I thought I might try to give a talk myself on Displaying Recent Tweets with Drupal using the twitter_pull module.

I didn’t want to have a set of boring slides with bullet points out of PowerPoint, so I thought I’d look at a few other options – most of the speakers at the Drupal Summit had great presentations and were well prepared! Browsing through the top presentations at SlideShare is a great way to see what’s effective without having to give up your Saturday to a conference.

I was pretty excited about 280 Slides, from what I read online. Unfortunately, when I loaded it, it looked exactly like PowerPoint! Scratch that. My next thought was to use Apple’s Keynote, but then after some searching on Hacker News, I saw a few references to Prezi.

Prezi is a completely different type of tool – not slide based, instead it relies on spatial organization and relative size for your presentation. This makes organizing your presentation much easier than trying to lay it out on slides. I’m always interested in information design, and Prezi totally changes the way your presentation is organized. You can drill down into different segments of your presentation and then pop back up – everything is in context.

It’s kind of hard to explain why Prezi is so great – I made my tech talk “I’ve got Twitter in my Drupal” presentation in Prezi. I certainly don’t have everything down with Prezi just yet – there’s a lot of tweaking you can do to make your presentations pop, but I’m very satisfied with what I could accomplish in a few hours.

Drupal Planet

Displaying Recent Tweets in Drupal 6 with twitter_pull

I’m writing this blog post for the Austin Drupal Newbies February Meetup to go along with my presentation about Drupal and Twitter.

Drupal sites can display the most recent tweets for a Twitter @username with the twitter_pull module for Drupal 6 and 7. The twitter_pull module is one of many Twitter-related modules for Drupal – a quick search on revealed 151 matches for Twitter modules.

Twitter_pull solves one problem, and one problem only – retrieving recent tweets and displaying them in Drupal.

The module was written for developers to use with PHP – it isn’t configurable from the Admin menu like most other modules, at least in the most recent Drupal 6 release. This means you will have to do a few extra steps to get the twitter_pull module running on a stock Drupal 6 installation.

I’m going to give directions on how to show your recent tweets in a block in the right hand sidebar of a stock, out of the box Drupal 6.20 installation on a UNIX host that you have shell access to – for instance, a VPS or a shared host like PHPWebhosting. You can also install the twitter_pull module using drush or anything else you’re already comfortable with.

Downloading and Installing the Twitter Pull Module

The first step is to login and change directories on your host to your Drupal directory.

cd drupal
Next, create your sites/all/modules directory if it doesn’t already exist. Change your working directory to the modules directory.
 cd sites/all
 mkdir modules
 cd modules
Once you are in the modules directory, use the wget command to download the Drupal 6 version of Twitter_pull into your modules.
Now, uncompress the twitter_pull module
tar fxzv twitter_pull-6.x-1.2.tar.gz
We can log out of the Unix shell now. With Drupal 7, it’s much easier to install modules through the administration interface.

Enabling the Twitter Pull and PHP Filter Modules

The next step is to go to our Drupal Administration modules page. Login as the administrator to your Drupal site, and go to Site Building->Modules. We need to enable two modules.

The two modules we need to enable are “PHP Filter” and “Twitter Pull”. Twitter Pull is the module we just downloaded, so it makes sense that we need to enable it.

Why do we need to enable “PHP Filter”? The reason is that the Twitter Pull module requires a small amount of PHP code to make it work. We are going to put that PHP code into a Drupal block. A fresh, clean, new Drupal 6 installation doesn’t let you use PHP code in a block – you will need to enable the “PHP Filter” module that comes with Drupal 6 for this to work.

After checking the boxes next to “PHP Filter” and “Twitter Pull”, click the “Save Configuration” button at the bottom of the modules page.

Creating the Recent Tweets Block

Now, we need to configure a Drupal block to display our recent Tweets. Start at the Blocks Administration page:

Now, add a block from that page
Set the block description to Recent Tweets, and the block title to Recent Tweets as well. Next, inside the block body, we will have to use some PHP code. Don’t worry if you aren’t familiar with PHP, this is a great way to get your feet wet. We only have to change one thing to customize this for your site! Copy and paste the following into your block body.
<?php if (function_exists('twitter_pull_render')) { print twitter_pull_render('@jefflinwood', '', 10); } ?>
What we are doing in the above PHP code is first, checking to see if the Twitter Pull module is enabled. If it is, we are making a call to the twitter_pull_render PHP method from the Twitter Pull module with three arguments: the Twitter search, the title to use, and the number of Tweets to show. In our case, we are using @jefflinwood as the Twitter search term, no title, as the title is provided by the block, and we are going to show up to 10 recent Tweets.

Now, change @jefflinwood to your Twitter username – @racetothealtar, for instance.

To make Drupal execute the PHP code in your block, you need to set the Input Format on the block to be PHP Code. If you didn’t enable the PHP Filter module earlier, you will not see this option here.

The defaults for the rest of the block should be okay. Save the block. Your block is now configured and ready to display.

Displaying the Block

Under disabled, change the drop-down for Recent Tweets from <none> to Right Sidebar. Now click the Save Blocks button – you should see the Recent Tweets in your right sidebar! Go to your front page, and they should be there as well.