Category Archives: Site related

Of / pertaining to p4p.com

The End of an Era

I have made an impulsive decision to migrate my personal blog/website to a new URL today.
PalmerForPresident.com has sort of become stale as a name. Really, it’s almost totally irrelevant considering the reason I initially registered the URL was to support the fictional character “David Palmer” from Fox’s show 24 who was killed off many years ago.

Bottom line is that the URL “www.palmerforpresident.com” is very long to type, and it’s just past it’s time.
I felt like it was time time to move on to something shorter and more “personal” to me.

There will be a migration period; but from this day forward my new website will be www.ericvb.com.

Anyone who follows me on any various outlets such as GoogleReader, if you would be so kind as to update your subscription URLs accordingly that would be a very good game.

WordPress Update

This morning I updated the site to use WordPress 2.8.
Looks like everything still works at this point, so I’m happy.

I am so glad that CSH pointed out using subversion to manage updates to WordPress awhile back. Can’t beat 1 line commands that update your wordpress install.

New Theme

Can’t really explain why – but today I felt like changing my “Look n’ Feel” again.

Oddly enough, I started using K2 on May 10th 2008 – so it’s been my theme of choice for about 1 year exactly. At the time, I said to myself that I would never change from K2. Just because it’s such a pain in the ass to take a theme and integrate it with my existing content and pages.

Enter this evening, where it’s currently 2:09 AM and I finally have things integrated for the most part.
I hate themes. I hate feeling the need to change them.

brb.

Updates

Decided to be active on a sunday morning…  I updated wordpress to version 2.6.5 and I also took the plunge from Gallery 2.2 to gallery 2.3.

The updates went smoothly as usual (which is good since I didn’t make a backup) – but it does look like I have some quirks to work out…

Clearly there is no visible difference to either application but I wanted to feel good about myself.

Blackberry and WordPress

I’ve had various Blackberry smartphones for a span of about 4 years.  In an ordered list, here is my past roster.

  1. Nextel 7510
  2. Nextel 7520
  3. Nextel 7100i
  4. Sprint 8830
  5. Sprint 8830 x2
  6. Verizon 8330 (Curve)

In the past I’ve used these devices for literally nothing besides work phone calls and email (well… and the occasional breaking of bricks) – but with my new Blackberry curve I wanted to do a lot more.  I set up facebook, twitterberry, Google maps/gmail/sync, and I got a 1 gig media card to hold pictures and music.

Still, that wasn’t quite enough…

It probably spawns from seeing the absolutely badass WordPress app used by the likes of Russellteee and Flo on their iPhones; but I wanted nothing more in the world than to be able to update my Blog from my Blackberry.  What follows is a story of genuine hardship and unwavering technical commitment.  A tale of camaraderie and brotherhood.  A multi-step scenario fully exhibiting one of my compulsive dives into forcing something new to work.

Step 1 – Information gathering.
Googling every string and combination I could think of, I scoured the ends of the internet looking for any possibility of Blackbery/Wordpress integration.  Minutes turn to hours, and I find little information regarding any sort of available application for blackberry devices.  I consider just using the built in web browser on the device, but after trying it a few times decide that is just not a workable scenario.  I am brought to the conclusion that no installable application exist for Blackberry devices allowing me to quickly and easily update WordPress.  Overall, failure sets in prematurely.

Step 2 – Regrouping.
No.. There has to be a way I can do this…  I brainstorm a bit and I think to myself: “Chouse has the same blackberry and I’m pretty sure he has updated from it”.  Consulting with said Chouse, he reveals his methods of posting via email and also twitterberry.  I didn’t really want my blog to update with twitter posts, so I decide to investigate posting via email.

Step 3 – Imlementation attempt 1.
I research the wordpress feature built in to check an email account via pop3.  Long story short, wordpress checks your email for you and uses the mail as a ‘post’ on your blog.  Sounds perfect!  I create a ‘secret’ gmail account and start trying it out.  It doesn’t work.

Why doesn’t it work?  Because Gmail uses pop3 over ssl.  WordPress only connects to regular pop3.

Shit.

Try Yahoo mail.  Find out yahoo requires “plus” email to allow pop3 access.  “plus” email costs money.  Ef yahoo.

Give up for time being.

Step 4 – Breath of fresh air.
Talking to Chouse online, asking how in the world he manages to update via email when I seem so unable to.  He relays information regarding “Postie“, a wordpress plugin that allows enhanced post-by-email functionality, and most importantly can connect to Pop3/SSL.  This plugin rings a bell for me, because I had seen it back in step 1 when googling my arse off.  But I recall seeing ‘doesnt work’  – ‘categories broken’ – ‘php errors’ etc.  Despite these, chouse confirms that it works.

Also chatted online with Russellteee at this point who decided to take step1 upon himself and try to find me a solution, but he arrived generally at my exact spot.

Step 5 – Implementation attempt 2.
I download and install postie, and I start configuring the options.  I then try a test run to which I am met with an “Unexpected ‘{‘  on line 70”.  Vi’ing the php file, clearly I can see that there was a missing parenthases in the function called “Get_Imap”.  I was slightly confused at why that function was being called when I am trying to check a pop3 over ssl account… But regardless I add the parens.

Now the plugin does run.  I send a test email to my ‘secret’ gmail account and it updates my blog.

However, I notice it goes in as ‘Uncategorized’.

Step 6 – Restrategize.
I start thinking to myself… “Am I ok with it posting into ‘uncategorized’?”  No, I am not.  So I decide to create a new category called mobile, and then I just hard code the php to  ALWAYS use that category regardless of which category I try to send the post to.  This meets me with moderate success, but bugs me that like 100 lines of php code are not working and I’m literally replacing it with 2 lines.

I consider dumping postie for this shortcoming.

Then I happen to stumble upon a linked fix for this plugin.  Some fine young good samaritan had taken it upon himself to update the category functions and published the code to fix it.  FIXXIIITTT!!

I update the php files with the re-written code, and BOOM – Postie works better than tough actin’ Tinactin.

Step 6 – Attach.
Having a camera phone, clearly one of the biggest/best hopes would be to be able to post pictures.  Postie can handle picture attachments, and put them at the top or bottom of your post depending on how you have it configured.

So, I email a post with an attachment picture, and I to my surprise, no update comes through.  I investigate for a few minutes, and come to find out that my blackberry is not sending the email out (even though it very clearly states ‘sent’ and has a blue check mark).  I grow frustrated at this, get into our BES server to look at policies.  I’m set in the default policy.  That doesn’t really have anything set up to block attachments…  hmm.  It’s now very late and I give up till morning.

Morning comes and I try again, still nothing.  Now I’m at work so I decide to wipe my blackberry.  I wipe my blackberry and re-activate it on the BES.

Shit.

Still cannot send attachments.

Other people try now… Turns out nobody can send attachments for whatever reason.  I am a pretty experienced BES administrator and I can only chock it up to the fact that our BES needs to get rebooted or something.  But, I’m not going to go that far just so I can update my blog when there are 100 other blackberry users that depend on this server – there has to be another way.

Step 7 – Gmail.
DUHHHH… Gmail!?!?!   I have a gmail account and I have the Gmail blackberry app on my phone.  I immediately open up gmail and try to send an email update to P4P here.  Just one problem, I can’t find any way within the Gmail app to add an attachment.  Hmm… I have to be missing something, right?  Gmail HAS to be able to send an attachment from my blackbery, RIGHT??

Google answers my question and query with vast and echoing “nope”.

Wow… are you kidding me.

Step 8 – Gmail Redux.
Wait a minute… I can send an attachment from the Gmail web interface – I’ll just do that!.

I open my blackberry browser, and I log into the Gmail website.  I start composing an email, and I click to add an attachment:  Blank.  I try again, same result.  Apparently, the built in web browser does not let gmail add an attachment even from the gmail.com website.  At this point I have one arm in a straight jacket and I am just ready to pound my face into my desk.

Then it hits me…  I can try the Opera mini browser!

I open Opera, I log into the gmail website, and I send a picture attachment and it works beautifully.
Finally, for the sake of all that is good in the world, I can update my blog and even include a picture.

Step 9 – Debrief
Let’s get this all straight here…  For a blackberry user, if you want to update your WordPress blog; you can use the regular browser based wordpress admin panel.  Or, you can set up postie, hack it, find some way to send an email from your blackberry WITH an attachment, and then it will update.

Now, I must issue a call to arms.

Will some loving and caring java developer out there please for the sake of all that is good in the entire universe,  PLEASE make a clean and simple wordpress application for the Blackberry.  It goes without saying that Blackberry users around the world would unite in electronic bliss and undoubtedly update their blogs more often.

Thank you in advance.

Introducing Netflix-X2

Ladies and gentlemen, I would like to introduce to you Netflix-X2, a plugin for WordPress that will allow you display content from your Netflix account into your WordPress website.

For a couple years, I’ve been using a plugin called “Netflix” – a very cool plugin written by Albert Banks. His plugin allowed WordPress users to display Netflix content in their blogs. I’ve always used it to show movies in my queue, the movies I have at home, and my recommended movies.

As I’ve used his plugin, I’ve grown very familiar with it. I’ve tweaked it to work with different themes, exercised and exhausted nearly every variable, modified every possible configuration option, and just overall have really enjoyed using the plugin. Mr. Albert Banks has genuinely written one of my favorite WordPress plugins ever.

However, Netflix has since offered a few new RSS feeds including a feed for the “Watch Instantly” queue; and in particular, the “Reviews” RSS feed that displays any reviews I’ve written within Netflix.

I emailed Albert a few months ago requesting that he add new functionality to support these new feeds – but it unfortunately seems like those requests have gone unanswered and the plugin is starting to fall behind. I don’t blame Albert – his plugin works great – It just needs a freshening up to catch up to the new options available to use.

With that, I decided to download his plugin and write these enhancements myself. Albert licensed his plugin under the GPL, so I took his PHP code as the base, wrote in support for the new Netflix feeds, and essentially split it into my own published plugin called Netflix-X2. The process has been harder than I would like to admit, because I would rate my PHP experience at a 4 out of 10. It took me about 4 hours to complete and I believe a seasoned PHP developer could have done it in about 45 minutes. Nevertheless, it does work and seems to work very well.

By no means do I intend to try and compete with Albert… after all, his hard work and impressive development skills have laid the foundation for my plugin. In fact, this emphasizes the very meaning and beauty of open source software.

I don’t want to call Netflix-X2 a ‘fork’ of Albert’s plugin… I’d like to call it an extension of an already great product. But, I will be taking on maintenance of this version, So I’ve decided to rename and reversion it as my own.

If Albert ever happens to read this, Thank you very much for contributing to the WordPress community. And, for everybody else – please check out the plugin! 🙂

I’m using it now on my site, and I’ve updated my ‘Movies’ page to use some of the new functionality I coded in. So, feel free to check out my movies page and check out the reviews I’ve written for some of my Netflix movies.