By popular demand, the caption author and caption comments are now hidden until voted on.

Many of you on DailyCaption asked, and it is now finally here - pulling Flickr photos with multiple tags. For now, you can add Comma separate tags for AND searches. So for example, if you wanted to generate a photo that had the tags crazy AND sexy AND cool, you can add “crazy, sexy, cool” as a single tag. Sort of ghetto for now but it is one way to have more control over the generated Flickr photos. I may change it so that it uses all of your tags in your tag pool to generate a photo. Thoughts? Suggestions?

Additionally, when DailyCaption goes out to Flickr to find a new photo, it is now sorting the photos by ‘most interesting’ on Flickr, so hopefully this will pull some interesting photos and not Pis Spamcilar again.

New Features on DailyCaption

September 24th, 2007

Based off of a few suggestions made by the DailyCaption community, I’ve made a few updates to DailyCaption!

New tie breaker rules The old tie breaker system had a loophole. A suggestion by zyxtcba resolved this. Here are the new rules: If another caption has the same amount of caption points, DailyCaption will settle the tie by comparing the total votes. If there is still a tie, total number comments on the captions are compared, then the caption author points, then finally if everything is STILL equal, the tie goes to whichever user joined DailyCaption first.

Icons in users listing Suggested by dbc, there are no avatar icons in the user listing. So if you haven’t already, add your profile avatar(must be logged in)!

Comment E-Mail Notifications Suggested by Ian, Leah, and KarateRobot, you will now get an e-mail if somebody (other than yourself) posts a comment on your caption. If you are not a fan of e-mail notifications, you can easily opt-out by changing your e-mail notification settings on your account.

More Captions Per Page Lastly, as suggested by McQDew there are now 15 captions per page instead of 8.

If you have any questions/comments/suggestions for DailyCaption, please either reply to this blog post or post on the feedback form.

See you on DailyCaption!

New DailyCaption Google "Gadget"!

September 15th, 2007

You can now see the daily photo along with the #1 caption on your iGoogle homepage! Just add the DailyCaption gadget to your iGoogle!

Ads on DailyCaption?!?

September 13th, 2007

No your eyes are not deceiving you, there are indeed ads on DailyCaption as of earlier tonight. As you may know or may have heard from some geek on the streets, servers and bandwidth aren’t free! Hopefully these ads will raise enough money to pay for the servers and I’m also hoping to raise enough money to have monthly or even weekly contests in the near future! So please help support DailyCaption by clicking on the ads! :D I hope they don’t get in the way of your captioning too much!

See you on DailyCaption! As always, please use the suggestion form or reply to this post if you have any comments or suggestions.

Better RSS Feeds for DailyCaption!

September 12th, 2007

Based off of your suggestions, I’ve added new and better RSS Feeds! You can now see the daily photos along with your captions! You can now subscribe to:

Recent photos with the number 1 caption for each photo

Today’s Captions

Recent Captions

If you have a suggestion or if you found a bug on DailyCaption, please let me know!

See you on DailyCaption!

Share your captions!

September 10th, 2007

You can now easily share you captions on DailyCaption! Send your captions to your friends or even send them to your rivals to rub it in their face. Just click the “Share” link next to the comments link on each caption. From there you can post your caption (or captions that you like) on the your Facebook profile, Twitter account, Delicious bookmarks, Digg, or Reddit. I’ll be adding the ability to send captions to your friends through email sometime soon :D

Good luck on Today’s Daily Caption contest! Start sharing your captions!

Mobile DailyCaption!

September 8th, 2007

If you are a mobile internet (PDA/Cell Phone), you are in for a treat! Although it has very very limited functionality, II just put together a mobile version of DailyCaption!. It is a read only version of today’s photo and captions. I created it so that I can keep track of the contest while I’m out and about! Check it out: http://www.dailycaption.com/mobile

New Functionality

blush_response submitted a suggestion on the suggestion form to add website/blog URLs and Flickr URLs to user profiles. Ask and you shall receive (sometimes :D). You can now add your URLs and Flickr URLs to your profile so we can all stalk you!

New Press

Also, DailyCaption got a little bit more press!:

Emily Chang’s E-hub (thanks for the heads up Barbez) along with Web2Null

Front page on CSSMania! Please vote DailyCaption up!

DailyCaption Stats

DailyCaption stats within the past 48 hours (since the public launch):

2,308 Visits 8,266 Pageviews

Help DailyCaption

Don’t forget to Digg DailyCaption and tell your friends!! Thanks :D

Yay! DailyCaption got it’s first write up! Check it out on Mashable!

Update: Another writeup on KillerStartups

Setting up a marketing campaign!

September 5th, 2007

Watch out for DailyCaption ads! I just started a marketing campaign through AdBrite! Please help spread the word! Please vote it up on CSSReboot and add a review on SimpleSpark

Thanks for the help!!

I apologize for sending double activation e-mails on DailyCaption! That was my bad - seeing as how I can’t really blame anyone else ;) Thanks to whomever submitted the bug in the suggestion/feedback box!! I would have sent you an email directly, however, you weren’t logged in at the time so all I see is “Guest”. :(

To anyone that is reading, please help spread the word on Digg and Reddit

See you on DailyCaption!

DailyCaption.com Released!

September 4th, 2007

My DailyCaption project is ready for public use!! DailyCaption is a community that takes Flickr photos out of context. Each night, a new Flickr photo is generated for members to contribute new captions and rate others.

Think you’re clever? Post captions on Flickr photos at http://www.dailycaption.com !

See you there!

Problem

You are having a hard time figuring out the bus system in Seattle or interpreting the MetroKC Trip Planner.

Solution

Quick pro tip with Google Maps and King County Metro Transit. I may be an Amateur at Ruby on Rails but I am a pro Seattle bus rider.

First off, check out Google Transit if you haven’t already. Google Transit is basically the Google Maps version of MetroKC Trip Planner. So instead of just seeing point A bus stop and point B bus stop in text, Google Transit presents the data in map form. Pro tip: Keep in mind that at times Google Transit Data is wrong. When in doubt or if it is a new route you are taking, be sure to double check with MetroKC - especially if you are riding on a holiday!

Now onto something that I recently discovered. If you zoom into Google Maps..err… zoom way in. You will see small bus icons representing bus stops. Click on one of those bus icons to see which buses stop at that bus stop including upcoming arrival times. This is very very useful if you already know what bus you are going to take and just need to know when it is coming next.

Although wait, what’s missing here? On busmonster.com, which also used to map MetroKC Transit data, it used to show a line on the map showing the exact route of the bus and even the location of where the bus should be at the given time. This is a great feature for those whom haven’t ridden the route before. Anyone know why the Google Map on Busmonster has been down for months?

Lastly, maybe this is a pipe dream (or a future project of mine), but I wish Google maps could be used for figuring out trips by bike. To do this they would not only have to exclude highways but it would have to incorporate topology data to help weigh results - along, of course, with a bunch of other criteria (ie. bike paths, bike lanes, congestion, etc.). This way I would know before I ride that going from Western to 4th in the Financial District is a heck of a lot harder than going from Western to 4th in Belltown. You’ll just have to believe me on that one :) Anyone know of some sort of Mashup that is already doing this?

Go GIS, make me proud!

Problem

Your view code in your Ruby on Rails app is getting messy with duplicate code and ugly conditional statements. For example, maybe you have something in your view that displays the user’s avatar (that is, if the user has uploaded one already) such as:

<% if current_user.avatar %>
    <%= image_tag(current_user.avatar.public_filename(:thumb) %>
<% else %>
    <%= image_tag("avatar_thumb.png") %>
<% end %>

Solution

Create custom helper tags. An easy way to get into this is to look at the source of built in helpers and piggy back on them. Don’t get too scared, the built in helpers are ones you already use like link_to, image_tag, etc. For this example, let’s build on the image_tag to write a custom “avatar_tag” helper.

With this call from the view we want to trigger an “avatar_tag” helper method in our rails_app/helpers/application_helper.rb that we will create. You can also put it in your one of your controller specific helper modules if you don’t want this helper available system wide.

Let’s first look at the “image_tag” helper that is built in to rails:

# File src/rails-1.2.1/actionpack/lib/action_view/helpers/asset_tag_helper.rb, line 185
def image_tag(source, options = {})
  options.symbolize_keys!

  options[:src] = image_path(source)
  options[:alt] ||= File.basename(options[:src], '.*').split('.').first.capitalize

  if options[:size]
      options[:width], options[:height] = options[:size].split("x") if options[:size] =~ %r{^\d+x\d+$}
      options.delete(:size)
  end

  tag("img", options)
 end

Let’s dissect this a bit…

  • First, the method is accepting a source location and a hash of HTML options (options={}) that we can pass in to override the default values. (such as :alt, :width, etc)
  • Inside the image_tag method, options.symbolize_keys! is going to turn our options hash into a new hash with all the keys converted to symbols.
  • Next it is going to assign the HTML src option to the source that we pass in.
  • Same goes to any other options if we passed them in to override any defaults. For example, if we called image_tag(“logo.png”, {:alt=>”This is a temp logo”}), it would override the default alt value that image_tag provides (the src of the image).
  • Finally, it is going to use the tag method to create the actual HTML tag.

Now let’s create our own “avatar_tag” helper - which, as we can see, doesn’t look too different:

def avatar_tag(asset, options = {})
        options.symbolize_keys!

        options[:class] ||= :thumb
        options[:alt] ||= (asset) ? asset.public_filename : "No Avatar Found"

        #buddyicon_tiny.png and buddyicon_thumb.png should be in app directory
        options[:src] = (asset) ? asset.public_filename(options[:class]) : "/images/buddyicon_#{options[:class].to_s}.png"

        tag(:img, options)
    end

What’s new here?

  • First of all we are calling our new method “avatar_tag” - which we will then be able to call from any of our views (since we put it in the application helper).
  • We are using the attribute “class” to define the type of avatar to use. We also set it so that it is :thumb by default.
  • For the alt attribute, we set the default to the filename when the source is not nil and set it to “No Avatar Found” if it is nil.
  • Finally, we set the source to be the avatar source if source is not nil and if it is nil we set it to our default avatar image. Note that we are also passing in options[:class] in the filename so we will need to name our default images - avatar_thumb.png and avatar_tiny.png

Now rather than those conditionals clogging up our view template, we can simply render our :tiny version of our user’s avatar icon by calling:

<%= avatar_tag(current_user.avatar, :class=>:tiny) %>

or the :thumb version by just calling:

<%= avatar_tag(current_user.avatar) %>

Mmm..much cleaner…..

Good luck and as always, please post in the comments if you know/found a better way to do this!