Daniel Sato

My first wordpress theme

Okay, technically it is a child theme of the popular TwentyTen theme, but, as you can see from the before and after above, they bear little resemblance to each other. Creating a photoblog here at The News Journal has been on the to-do list for myself, the assistant new media editor Andre Smith and our photo editor Suchat Pederson for some time now, but it wasn’t until the new iPhone initiative came through that Andre and Ashley Barnas brainstormed the format as seen above (previous iterations all took the form of a more traditional photoblog, similar to The Big Picture).

While a typical photoblog would have been nice, because we lack a traditional photo editor (Suchat does far more shooting than photo editing, and would not have the time to scour the wire to put together photo packages) and with the increasing focus on breaking news and sending images from the field, we decided to create a frontpage that displayed the latest photographs from all of our photographers. To make things easier, each photographers is his/her own category, and thumbnails are automatically created from images inserted into a post, for use on the frontpage, archives and category pages. While most photographers will update their images once they are done with a shoot and back in the office, the blog is set up in a way that it can receive images via email from a smartphone (that they will all now have) or pull in from Flickr directly to the appropriate category (the first, thanks to Postie, and the latter thanks to ifttt).

In keeping with the focus on social media, photographers will all have a Twitter follow button next to their name. On posts and category pages, custom sidebars feature content for each photographer … a headshot, short bio, set of thumbnails (currently set to random, but possible latest), latest tweets, etc. Some of this content is hard-coded to “photographer proof” it, but below the hard-coded area is a widgetized sidebar that each photograph can personalize. Also, because we have a strong focus on video, if the most recent post in a category is a YouTube video, it will be playable on the front. When it moves from that latest post spot to the recent post on the front (there are three smaller thumbnails below each main image) it reverts to a thumbnail. Initially, I had that playable as well, but it just seemed too small to be worthwhile. If the embedded video isn’t from YouTube, it will still create a thumbnail for use in both the main and secondary slots on the frontpage.

Plugins used:

As with anything I’ve done on my own time, from my first Vuvox timeline of Drake basketball to the small jQuery project I worked on in November, I have no idea where this will end up. If anything, it was good practice and gave me a better understanding of what makes up a WordPress theme and how to manipulate it. What do you think? Not bad for a first effort? What features would you look for in a newspaper photoblog?

Live demo

Scratching away at code

Learning how to code has been on my to-do list ever since I started this blog back in 2005. In those six years I have learned enough html and css to put together a standard website from scratch, and just enough jQuery and JavaScript to take other people’s code and alter it for my use (as can be seen on my new landing page) … but I have yet to fully grasp programming languages such as Ruby and Python. I bought all of the books and have watched countless tutorials, and of course everything makes sense as you follow along. It is the point when it is then my turn to create a project that I run into trouble.

Enter Scratch. Scratch is a visual programming language developed by MIT to teach children the basics of coding. It utilizes commands in the form of puzzle pieces that fit together with descriptions on them in plain English, as opposed to syntax that may be difficult to understand for the true beginner. Scratch serves as the bridge between a general understanding of concepts such as loops, conditionals and variables, and the ability to write code in a text-based editor. It has already helped me to understand concepts in other languages that gave me trouble when I was simply reading them in a book. For example, I was attempting to create a basic slideshow using play, pause, next and previous buttons, but kept running into a problem of the buttons not responding to commands. After some trial and error, I realized that the background on the stage was independent of the code I was writing in the function for the button. Instead, I had to return out something when that button was clicked that the stage could hear, and then, once that occurred, I could then change the background to the next image. I think (but am not sure) that this is the same as having global and local variables and what takes place in a function is independent of other functions so you would need to return out a value in order to use it elsewhere.

As a photographer, I process many things visually. In this respect, Scratch is perfect … all of my commands and actions sit in a library on the left, and I can drag and drop them around to see changes in real time. Just how far Scratch will take me, I do not know, but the idea of visual programming has been catching on, and services such as Yahoo Pipes (scraping/aggregating data) and Waterbear (Javascript) will only continue to grow.

Screen shot 2011-06-20 at 2.53.36 AM

Scratch Project

,