Easy Analytics

** EDIT – 02/08/13 **
I just committed a complete overhaul of my Easy Analytics plugin. It was in dire need of it and I am far happier with it. It is class based now with proper localization techniques, and a much better looking (albeit simple) interface. If you have it installed already, thanks and you should get the notification soon. If not, download it here.

 

** EDIT – 12/12/11**

I have just committed a slightly updated version of the plugin to the repository to allow for localization.

This is a very simple plug-in that allows any WordPress user to add the Google Analytics tracking code snippet to their site.

All you have to do is install the plugin, activate it and enter your UA-XXXXX number. It will output the snippet just before the </body> tag of your site.

For custom themes, be sure you call the wp_footer() function in your footer file as this plugin utilizes it to insert the code.

Download it here

Hello 2011

So 2011 is now upon us. I am very excited for all the things that are coming my way. Watching my little girl’s first year of life would top that list of course. I want to wish you all the best in ’11 and hopefully one day, someone will actually read this blog o’ mine.

Ryan

DVD Authoring and Adobe Encore

I am in the middle of working on a DVD for a client and there was a conversation about creating a Blu Ray disc as well.
So I did a little research and discovered that DVD Studio Pro does not author Blu Ray, only HD DVD. Well after a couple of clicks I found Adobe Encore and was simply amazed how easy it was to get building.
If you’re not familiar with it, Encore is Adobe’s DVD/Blu Ray authoring software and in my opinion is so easy to use you feel stupid for thinking that making a DVD was difficult at all.

I have some experience with creating DVD’s with custom menus in DVD Studio Pro and found the process to be not well documented.

The thing that I really love about the Adobe suites are how integrated the different programs are. In the case of Encore all the built in menu are built in Photoshop and there is even a button on the tool bar to edit the menu I Photoshop. That makes it so easy to edit a menu and learn the process on the go with the only prerequisites being knowledge of Photoshop and knowing the the naming conventions for creating buttons and replacement layers etc.

This next part is theoretical as I haven’t gone though this yet but it looks like I can create a Blu Ray disc and by simply changing a setting can use the same project to create a DVD. I would assume that the media would have to be transcoded to the correct size but Encore will take care of that for you. (please note that I haven’t taken into account the massive storage differences between the media so the content may have to change to accommodate)

The only hiccup in the process at this point is that I can’t burn Blu Ray discs on my Mac at home. I have been looking into the cost of a burner and they don’t seem that costly. If anyone has any experience with any particular models please let me know.

I’m working on a few personal projects to get more familiar with Encore and the overall process so I’ll let you know how it goes.

WordPress and Flash

Typically we have always created Flash sites from scratch and used XML or, in the case of Rush.com, a custom-made CMS as the content source

For the bulk of our clients having a custom-made CMS doesn’t work with their budget so we are left with XML. This is a great option for simple updates or if the user has some modicum of web savvy but for the average person it can be daunting to update.

I have dabbled in using Drupal and creating a DruFlash type of site but found that Drupal’s interface was not as user friendly as I would like for clients.

Personally I really like how WordPress is put together – it makes sense, is easy to use and the advanced features are there but not in the way. It also seems that people in the realm of marketing and PR have at least a little experience with it so in my opinion it was the obvious choice to tie into a Flash based site.

The Issues

The first issue I ran into was the most obvious – How do I get the content out of WordPress? The answer was much simpler than I was expecting. I found a pre-existing plug-in for WordPress called Flash API. It is not for the average user as it utilizes some custom PHP and a custom class in AS3 to pull the content out of WordPress.

This is a complete tangent but I learned a while ago that there are no gold stars for re-inventing the wheel when it comes to code. If someone else has taken the time to solve your problem for you – thank them (by giving credit where you can), expand on it if you can and move on.

The second issue I ran into was – getting around limited HTML tag support in Flash HTML textfields. This took a little bit of thinking. The first thing I did was figure out what WordPress used when making something bold, italics or a different colour and balance that with what options the client wanted.

Once I knew the code that WP created, I just used some basic regular expressions and string manipulations in Flash to change the tags to ones that Flash supported.

At that point I thought I was out of the woods as far as getting the content out of WP but after uploading to the testing server I found that there were times that the content didn’t load but it was very random.

I figured out that the issue lay in how often I was querying WP. The original plan was to pull the content for a given section only when I needed it and sometimes the Flash portion of the site was loading before the content was ready and due to the way the artwork and transitions worked I couldn’t drop an event listener in to wait for it. Long story short, the section would load without content. Which is not really good web design.

So after some thinking, I decided to revamp my AS3 class to pull all of the content at once in the root swf before the site loaded where I could control the load with event listeners and incorporate some error handling and fallback options.

The upside of doing this was that once the site pulled the content we were free of WP and any potential connection issues. The downside was that the whole site needed to be reloaded to see new content but that’s a small price to pay for the increased stability.

Overall I found the process to be great. There were times when I wanted to lose my sh*t over it but I can see the benefits of building a reusable code base for this use.