Man, just ascend already.

Willow ,'Chosen'


Buffistas Building a Better Board ++

Do you have problems, concerns, or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.


Aims - Oct 03, 2005 2:39:55 pm PDT #590 of 4671
Shit's all sorts of different now.

Hey! Quit breaking stuff!


DXMachina - Oct 03, 2005 2:40:57 pm PDT #591 of 4671
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

It was an accident...


Lee - Oct 03, 2005 3:28:39 pm PDT #592 of 4671
The feeling you get when your brain finally lets your heart get in its pants.

Uh huh.


Eddie - Oct 03, 2005 4:11:36 pm PDT #593 of 4671
Your tag here.

I had to go out, but I gave this some thought. As interesting as it would be to solve this problem, I think there's a more practical solution. I understand trying to limit the choices to possible values, but you're almost always going to end up with invalid choices, particularly with the month and day fields. My recommendation would be as follows:

Year: Continue with the way it is now. It's fairly inexpensive performance-wise to find the minimum and maximum dates in a thread and extract the year from those dates.

Month: List all months, Jan - Dec (you can keep the digits behind the scenes with the html 'value' tag if that's more convenient... humans tend to understand three digit months faster than translating a digit).

Day: List all days, 1 - 31.

The worst that will happen if the user selects an invalid date (i.e. a date not within the thread's time frame) is no posts are returned. You can clue the user into valid dates by printing the first post date nearby, if you want. Hmm... not sure what the behavior would be if a user selected Feb 31, 2005 (for example). I suppose you're going to need some date validation code before using the supplied date in a query.

This way, you save yourself a couple of queries per page view and it simplifies things which is usually a good thing.


DXMachina - Oct 03, 2005 4:33:59 pm PDT #594 of 4671
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

The worst that will happen if the user selects an invalid date (i.e. a date not within the thread's time frame) is no posts are returned.

That's not what happens. Currently, if you enter a date for which there are no posts, it sends you to the next date for which there are posts. So if you pick a date before the thread was started, then it goes to the first post, e.g., if you enter the date 8/1/2005 in the boxes for Natter 38, it takes you to the first post in the thread, bon bon "Natter .38 Special" Aug 21, 2005 7:59:15 pm PDT.

If you enter 7/14/2003 in the Sang Sacre thread, you get shifted to the next date for which there are posts, Elena's Husband "Sang Sacré 1: It's a Blood, Blood, Blood, Blood World" Jul 18, 2003 8:30:55 pm PDT.

That part of the system works fine. What doesn't seem to work is the months box once posts are made in October of this year, and I don't see how what you're proposing would fix that..


Eddie - Oct 03, 2005 4:41:17 pm PDT #595 of 4671
Your tag here.

It appears that there is code that inspects the thread and determines the months in use in that thread. This code limits the months available in the month box. In some threads, the available months are 6, 7, 8... others, it's the full 1 through 12.

Example, this thread only has months 2 and 3 because the thread began in February and ends in March Topic!Cindy "Natter 33 1/3" Feb 22, 2005 12:45:04 pm PST

I'm suggesting that we do away with this code and always present months 1-12 Jan-Dec and days 1-31 as options.


DXMachina - Oct 03, 2005 5:12:05 pm PDT #596 of 4671
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

Except the code was working up until October 1, so why not try to fix what may be a simple problem rather than scrapping it and going to a much less elegant solution?


Eddie - Oct 03, 2005 5:24:57 pm PDT #597 of 4671
Your tag here.

I'm advocating scrapping because the code in place doesn't do what it attempts. It's trying to limit entered dates to ones within the thread's timeframe. The way it's structured, it's still possible to enter dates outside of the timeframe (in some cases).

Secondly, I don't see the value of doing a couple of extra queries on every page view, especially when that control is used relatively infrequently (granted, assumption), for little gain.

Listing all of the months and all of the days is quite straightforward and it doesn't appear that things will go poof if invalid dates are supplied by the user.


§ ita § - Oct 03, 2005 5:26:14 pm PDT #598 of 4671
Well not canonically, no, but this is transformative fiction.

There are no extra queries on the page view, but thanks for looking out, Eddie.

I'll try debugging the code before I throw it out. I apologise to anyone who's had their browsing broken by this, but I'm unlikely to get to it before this coming Sunday.


Eddie - Oct 04, 2005 4:50:47 pm PDT #599 of 4671
Your tag here.

Suggestion for the Request Queue:

Sometimes in this thread and Buffistechnology, it would be helpful to upload a text file with code (for example) rather than try to format the code so that B.org parses it correctly. There could be a hyperlink next to Mark and Block... possibly View or File? that would display the attached text (unformatted) in another browser window when clicked.

We'd probably want to limit the uploaded file size to maybe 50k. I imagine there are bandwidth and file space and security considerations.

Thoughts?