Author Archives: Mark Headrick

Blog has been upgraded to WordPress v2.7.1

I have updated my blog to WordPress v2.7.1 which was just released. This time I tried the auto upgrade option. It seems to have worked well. Even so, once again I did have to edit the /wp-includes/vars.php file to force $is_apache to true (see below) since the SERVER_SOFTWARE variable comes back as WebServerX instead of Apache.

// Server detection

/**
 * Whether the server software is Apache or something else
 * @global bool $is_apache
 */

//$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;
$is_apache = true;
/**
 * Whether the server software is IIS or something else
 * @global bool $is_IIS
 */

$is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) ? true : false;

I also had to reapply some code modifications, which I knew I would have to, related to the RSS Feed widget in /wp-includes/rss.php; however, I’ll make a separate post about why I modified it (didn’t I say that before?). Other than that the upgrade went smoothly. 🙂

As always, I did perform a complete database and file backup before upgrading! 🙂

Experimenting with daily Twitter digest on blog.

One of the options that Twitter Tools for WordPress has is for creating a daily post containing that day’s Tweets. This option is experimental; however, I thought I would try it out. Well, it sort of worked. It created a post of tweets dated 2-10-2009;  however, it contained the Tweets for the day before. It also did not create it in a format I liked. So, I was given the idea by @robmonroe to create my own scripts to achieve this.

Since Twitter Tools was already adding my tweets into the WordPress database, I figured I would use that data within my script. The first thing I needed to do was create a SQL statement that would grab the correct tweets out of the database. Then, use those records to construct a message that I can send to my blog via email for it to create a post. The post you see below is the result. I have added the scripts that achieve this to my PC’s scheduled tasks to run just after midnight.  I’ll know tonight if it works again.

I’ll see how it goes for a few days to see if I really want to do this as it does seem to be a bit much at first glance and if I want those posts to appear on the main page of my blog or only when viewing the Daily Tweets category. I have found a snippet of code that will achieve this. Once I know everything is functioning properly I will most likely create another post to share the code I used to achieve this for other Twitter and WordPress users. Stay tuned! 🙂

Latest NASCAR tweets added to NASCAR page.

NASCAR LogoIn addition to changing Tony Stewart’s graphics to reflect his new car number of 14 and sponsor, Office Depot, I have added a latest NASCAR tweets section to my NASCAR page using a PHP RSS parsing script I wrote. I did this more to just see if I could and educate myself more in working with Twitter’s RSS feeds. It’s the RSS feed version of this Twitter search which anyone can just view directly. There are also a few sites such as this NASCAR Twitter group site that follows NASCAR tweets. Even so, why not try something myself where I have more control? 🙂

Currently, I’ve put the tweet section within an IFrame. At the moment you have to manually refresh the list to grab new ones. I kept going back and forth between manual refreshing and automatic refreshing. I may add a form that will let you specify the refresh rate. What’s funny is that getting the RSS parsing working didn’t take that long. Getting the output to look how I wanted with some consistency between IE and Firefox took as long or longer (CSS stuff) 🙄 .

Since there is no 2009 driver standings available yet, I will have to wait until after the Daytona 500 and NASCAR creates a 2009 standings page to change mine. I have some other ideas for specific races as well, such as a specific page for each race with race results and a video playlist specific to that race. Another year of NASCAR has started. Woot! Stay tuned! 🙂

My continuing experiences and thoughts concerning Twitter, Twitpic, and Audiotwit.

After a few more days of using Twitter, I decided to try Twitpic and Audiotwit that I had noticed others using.

Twitpic

This just seems to be a basic service for storing and commenting on images that sends out a tweet when you add a new photograph or comment on one. It has no provisions for creating albums or anything like that. Since I have my own photo gallery, I have no real need to use this as a place to store images. Same reason I don’t store images at my MySpace page or using something like Flickr. I will admit that the main page that shows where new images are coming from is kind of cool. I did upload one picture and here’s my twitpic page.

Audiotwit

To use this relatively new service, it appears, you send a reply tweet to @listensto with the artist and song title of what you are listening to.  An example tweet would be “@listensto Metallica – One“. Then, it creates an Audiotwit page for you at (username).audiotwit.com.  In my case this was mrheadrick.audiotwit.com. It then adds a Lyrics link next to the song to look-up the song’s lyrics.

Winamp Now PlayingSince I was using the Winamp Now Playing Plug-In version 2.1.2 together with a PHP script I wrote to generate now-playing images and a song history on my entertainment page, I wondered if there was a Winamp Twitter plug-in and there was one to my amazement. While it did work, it had problems dealing with some characters, such as “&” where it would just chop-off everything after the “&”.  The RSS feed of the audiotwit page is also a bit buggy.  “&” causes problems with the feed and the feed itself does not validate with Feedvalidator.org.  During all this testing, I decided I better create another twitter account just for this purpose and keep all the “now listening to” spam out of my main twitter account.  (Update 8/11/2010: @mrheadrick_np was the account I made at the time; however, it got flagged to not show in searches and hasn’t been used in months and has been deleted. The audiotwit page at mrheadrick_np.audiotwit.com still exists for the time being.)

During this time I had also discovered that many others used the phrase “listening to” to announce what they were listening to. There’s even a search link at the Twitter search results page for this phrase. At this point I decided to stop using the Winamp Twitter plug-in which was a bit limiting and use my Winamp PHP script to send a tweet via the Twitter API using both “@listensto” and “listening to” methods.  After some searching around, I used the improved script by Scott Sloan I found here and adapted it to my own needs.

So now, mrheadrick_np.audiotwit.com and this “listening to” search will show what I am playing. The feed you see in my blog is the feed that the “listening to” search produces, which does not have problems with “&” and other characters being in the artist and song titles.

Twitter

I also added a Twitter widget to my main website. I used the HTML version and modified the CSS to create the appearance I wanted.

Having done all this, does anyone else really care what I’m doing or have been up to or what the most recent songs I’ve listened to are? Beyond family and close friends (most of which do not use Twitter), there might be a few, such as those from Surmunity, but I suspect most could care less. Several of the people that are following me on Twitter I think are doing so more to increase their own page ranks and points of entry for the various search bots to find their websites and content than to really follow what I am doing or saying. Some strangers that follow me, especially those with goobldygook usernames, are clearly doing so for spamming purposes. These I block when I come across them and many of these type of accounts are usually suspended by Twitter. Even so, I still think Twitter is kind of cool. 🙂