Skip to Content
Register · Login
About Theme

A Letterboxing Community

Search Edit

Read Thread: Minor quibble regarding PAL widget.

Minor quibble regarding PAL widget.
Board: Suggestion Box
May 24, 2019 6:36pm
Board
Map is great. It's great that when the state number of boxes found is clicked, that the boxes LISTED for PAL day from that state are listed on a search page. But PAL boxes LISTED on May 23rd and May 25th, but PLANTED on May 24th don't appear on that search page. Is it a quick and easy fix to switch that LISTED to PLANTED?
Re: Minor quibble regarding PAL widget.
Board: Suggestion Box
Reply to: #975462 by Wronghat
May 24, 2019 6:53pm
Board
Is it a quick and easy fix to switch that LISTED to PLANTED?

Not really. There's not a search option for the plant date, so there's basically a hack in the widget to limit the counts further. It not only limits boxes listed between May 23rd and May 25th, but also limits the creation date between the 17th and 25th, limits box counts to 20 per person, etc.

For the search page to show up with only PAL Day boxes, I'd have to add support for all those options--which isn't very trivial.

So... the widget just creates the best link that it can for a search, but admittedly, it's not the exact list that's being counted because of the limitations of the search options.

And it was a lot more fun making a map of the plants for PAL Day than adding new search options for the Advance Search page. =)

-- Ryan
Re: Minor quibble regarding PAL widget.
Board: Suggestion Box
Reply to: #975463 by Green Tortuga
May 24, 2019 6:56pm
Board
Too minor of a quibble to open a can of worms. It's amazing that it gets the count right with all those alternatives.
Re: Minor quibble regarding PAL widget.
Board: Suggestion Box
Reply to: #975464 by Wronghat
May 24, 2019 7:35pm
Board
It's amazing that it gets the count right with all those alternatives.

It's a total hack. If the code actually got used more than one day a year, I'd definitely put more time and effort into it. *nodding*

-- Ryan
Re: Minor quibble regarding PAL widget.
Board: Suggestion Box
Reply to: #975465 by Green Tortuga
May 24, 2019 7:37pm
Board
If the code actually got used more than one day a year, I'd definitely put more time and effort into it. *nodding*

I know. That's why I was surprised to see the map.
Re: Minor quibble regarding PAL widget.
Board: Suggestion Box
Reply to: #975466 by Wronghat
May 24, 2019 7:46pm
Board
That's why I was surprised to see the map.

Yeah, I spent all morning working on that and I probably had better things I could work on, but sometimes I just like to do stuff for fun and this was one of them.

And! I already had density maps available on profiles for premium members, so mostly I just refactored the code so it could be used in multiple places with any sort of data. There might come a day when I want to use those maps for other data, or use the code for a world map (or Canadian map), or use a density map on another website and now... I can add it pretty easily.

It's all in a fairly neat, portable package. I can switch out the maps easily. I can switch out the data easily. And I can switch out the website it's used on easily.

If it had already been factored into this neat little package, I could have added the PAL Day map in maybe 5 minutes? Super quick and easy! The refactoring took all morning, but I'm thinking I'll have other uses for it someday and now that work is already done. =)

And I had fun working on it. Work is supposed to be fun! *nodding*

-- Ryan
Re: Minor quibble regarding PAL widget.
Board: Suggestion Box
Reply to: #975464 by Wronghat
May 24, 2019 9:35pm
Board
I think I confused the widget.. Texas shows 2 boxes but click on it and it only brings up one. The box is connected to two AQ accounts so maybe its counting planters not plants? Or it's only showing me mine and there really is another PAL box in texas?
Re: Minor quibble regarding PAL widget.
Board: Suggestion Box
Reply to: #975469 by PurpleNic
May 24, 2019 10:29pm
Board
Texas shows 2 boxes but click on it and it only brings up one.

The search it brings up is only a close approximate of the actual boxes counted for PAL Day. There is, in fact, another box listed yesterday that's being counted for PAL Day.

-- Ryan