Tuesday, July 19, 2011

Newest Traditional Boxes Widget

I took a break from fixing bugs from the Big Update--the worst of the bugs seem to have been fixed, but there are still a few issues I'm working out. So anyhow, I felt like taking a break from that part of AQ and decided to work on something a bit less ambitious.

You might have noticed that the Big Update tweaked the newest traditional letterboxes widget a bit--the full address of the locations started displaying rather than just the city. This was actually accidental. The update pretty much affected everything that touched traditional boxes. Anywhere and everywhere, if you saw the name of a letterbox someone listed on Atlas Quest, that code would have broke without any modifications, and the widgets were no exception. I fixed this particular widget, after doing a global search for a key function that I used to display locations, and replaced it with the new function call. In this case, however, I thoughtlessly typed the new function as "Display" instead of "DisplayCity." The difference being that the Display() function displays the full address of a location with the DisplayCity() function only displays the city portion of the address. It's a minor bug, as far as bugs go, and I rather liked it since it let me see what people trying as locations and spotting possible bugs in the listing of boxes, so I didn't fix it.

Wassa noticed that and suggested making that an option in the preferences and I thought, "Yeah, I can do that." So I did. =)

And while I was at it, I also added the option to specify a location that the widget will return new box listings for. Would you prefer the widget only show all newly listed letterboxes in Oregon? Done! Would you prefer to see all newly listed boxes within 50 miles of Seattle? Done! What about all newly listed letterboxes along I-5 between Sacramento and Portland? Done! That last one is pretty cool, don't you think? =) Any search that works on the Advanced Search page will work here as well. I doubt most people would have a need for a list of new boxes along a particular route, but the option is there. That's part of the flexibility this update provided--in the code, I just tell AQ to display and process a "location," and it can process any type of location. That box works exact the same, whether it's on the Advanced Search page or the newest boxes widget or from an app or anywhere!

Cool stuff. *nodding*

So go ahead and update your newest traditional boxes widget to suit your preferences. =)

Happy trails!


Wise Wanderer said...

Thanks Ryan . . . as always, you ROCK!!!

Okie Dog said...

This is great, Ryan! I was beginning to think it looked a little ugly with all those addresses fully written out, so now I have a choice. Thank you. Because you mentioned the pencil it made me look at other widgets and investigate what might be lurking there, as well, didn't know could change the widget for the Non-traditional, too. Yea!!!Thanks!!

momverf said...

If I specify a location in the widget, what will happen to they mystery boxes that are posted? I would like to still see them for surrounding states, as well as any worldwide "mystery, mystery" boxes.

Ryan said...

momverf: You'll have to leave it to show all boxes if you want all of the mysteries to show up in the widget. If you specify a state, mystery boxes from that state will still show up, but country-wide mysteries or world-wide mysteries will not. You could still get those covered with favorite searches and have notifications sent to yourself whenever new boxes are listed.

-- Ryan

momverf said...

Ok, that makes sense, but one more question. Since New England states are so small, if I put in my state for the widget with a 250 mile radius, will it show me the mysteries just for the state I enter, or for those states within the 250 mile radius. I live in NH, but box heavily in MA. Will I see the MA mysteries on the widget?

Goofy girl said...

That's cool ... only one new box within 250 miles of me in the last 9 days...

may have to change that... let me call Munchkin!

Ryan said...

momverf: You won't see MA mysteries for a NH area search--BUT!--you can do a 250-mile search for your town in NH which WILL catch mystery boxes in both NH and all of the nearby surrounding states (up to 250 miles away). The miles is ignored for an area search, though, so you need to run a search for a specific town--but the large will "catch" mysteries in both NH and nearby states since they're all much smaller than 250 miles.

momverf said...

Perfect! Thank you so much O Great Green one!
It is all clear to me now...(not a small feat let me tell you!)
~Cindy V of The V's