Fixing flickrRSS 5.0

If you are having difficulty displaying photos using the WordPress plugin flickrRSS 5.0 you can make a quick change. Change line 144 which reads

[sourcecode language='php']
if(!preg_match(‘‘, $item['description'], $imgUrlMatches)) {
[/sourcecode]

to

[sourcecode language='php']
if(!preg_match(‘/src=["]?(http:\/\/.*\/.*)_m\.jpg["]?/’, $item['description'], $imgUrlMatches)) {
[/sourcecode]

Source: Via chaosmaker at Google Groups

Continue reading » · Rating: · Written on: 03-29-09 · No Comments »

Math / Computers / Bicycles

More things to be thankful for.

  1. Mathematics: Strangely enough my entire life has revolved around the field of mathematics. Although some people might see this as a bad thing I would have to admit I enjoy doing maths for a living. Not only does it force me to think logically but it will open up many career opportunities in the future. I can only hope that something I do in the future will contribute to society (or at least have some application).
  2. Computers: Without one I couldn’t make these blog posts! If I have to explain why I’m thankful that there are computers you clearly have not met me.
  3. Bicycles: In a crunch a car is a great way to get from one place to another but bikes, although slower, are just as reliable and great for the environment. My aunt recently provided me with a “new” Fuji Palisade. I say “new” because it is 20 years old but still in great condition.
Continue reading » · Rating: · Written on: 03-24-09 · No Comments »

301 Redirects

Some sites like Myspace allow for the use of vanity URLs. For example, my page is located at http://www.myspace.com/jamesrohal. Although not all sites allow for the use of vanity URLs (like Facebook), you can make up your own using 301 redirects in the .htaccess file. For example, I can now link to my Myspace profile using the vanity URL: http://www.jamesrohal.com/myspace. Typically 301 redirects are more efficient than meta, CNAME, and Javascript redirects because the server checks the .htaccess file first before fetching any pages.

To create a vanity URL http://www.yoursite.com/vanityurl that links to http://www.somesite.com add the following to your .htaccess file.

[sourcecode language='plain']
Redirect 301 /vanityurl http://www.somesite.com
[/sourcecode]

For example, I have the following in my .htaccess file.

[sourcecode language='plain']
Redirect 301 /facebook http://www.facebook.com/people/James-Rohal/43202602
Redirect 301 /myspace http://www.myspace.com/jamesrohal
Redirect 301 /diigo http://www.diigo.com/user/jjrohal
Redirect 301 /googlereader http://www.google.com/reader/shared/14670748227574963949
Redirect 301 /citeulike http://www.citeulike.org/user/jjrohal
Redirect 301 /lastfm http://www.last.fm/user/jjrohal
Redirect 301 /flickr http://www.flickr.com/photos/jjrohal
Redirect 301 /linkedin http://www.linkedin.com/in/jjrohal
Redirect 301 /thesixtyone http://www.thesixtyone.com/jjrohal/
Redirect 301 /youtube http://www.youtube.com/jjrohal
Redirect 301 /twitter http://twitter.com/jamesrohal
[/sourcecode]

Continue reading » · Rating: · Written on: 03-16-09 · 1 Comment »

Pets / Family / Shelter

Each Friday I am going to write about three things that I am thankful for. It is so easy to overlook even the simplest things in life that we all take for granted. Even when you have the worst day, there is still something you have that many other people might not. I try to be an optimist and the best way to live life is to count your blessings; there is always something to appreciate in life.

  1. Pets: Last Saturday, my dog Laddie passed away after almost 15 years. Although I was raised as an only child, I considered Laddie as a type of brother. Laddie is someone that would listen to me no matter what and would always be there to comfort me. He asked for little and lived life to the fullest. My parents gave me an article about what your pet can teach you. The article inspired me to write these weekly blog posts and to live a less stressful life. Being in the house alone without Laddie has been torture for the past week but I am finally coming to terms with it. I will miss him but he will live on in our thoughts.
  2. Family: This seems like the easiest thing to write about because there are so many things my family does for me on a daily basis. Simple things like calling to see how I am feeling and inviting me over to keep my company are all things I am thankful for. My family is an integral part of my life and I am blessed to have such wonderful people near me.
  3. Shelter: Days where it is blistering cold out make you realize how nice it is to have a roof over your head. Even being able to afford to have an apartment is something to be thankful for too!
Continue reading » · Rating: · Written on: 03-14-09 · No Comments »

Testing Tweetbacks

I installed the Tweetbacks plugin and wanted to test it out on my blog since I recently upgraded to WordPress 2.7.

Continue reading » · Rating: · Written on: 03-13-09 · 1 Comment »