Page 18 of 23
Re: Glowfic platform
Posted: Mon Feb 22, 2016 8:44 pm
by rockeye_stonetoe
I would be interested to see the schema and queries.
Re: Glowfic platform
Posted: Mon Feb 22, 2016 8:59 pm
by Marri
Old query was this:
Code: Select all
SELECT "posts".* FROM "posts" LEFT JOIN post_views ON post_views.post_id = posts.id LEFT JOIN board_views on board_views.board_id = posts.board_id WHERE (post_views.user_id IS NULL OR (post_views.user_id = 1 AND post_views.updated_at < posts.updated_at AND post_views.ignored = '0')) AND (board_views.user_id IS NULL OR (board_views.user_id = 1 AND board_views.updated_at < posts.updated_at AND post_views.ignored = '0')) ORDER BY updated_at desc
New query is this:
Code: Select all
SELECT "posts".* FROM "posts" LEFT JOIN post_views ON post_views.post_id = posts.id AND post_views.user_id = 1 LEFT JOIN board_views on board_views.board_id = posts.board_id AND board_views.user_id = 1 WHERE (post_views.user_id IS NULL OR (post_views.updated_at < posts.updated_at AND post_views.ignored = '0')) AND (board_views.user_id IS NULL OR (board_views.updated_at < posts.updated_at AND post_views.ignored = '0')) ORDER BY updated_at desc
User ID changes per user, and '0' is a stand-in for boolean false. (Thank you for asking; running these queries locally has taught me that unlike MySQL Postgres has an actual boolean type, and therefore I can actually swap out that '0' with false for readability, though they should work the same functionally. Today I learned!)
Re: Glowfic platform
Posted: Mon Feb 22, 2016 9:38 pm
by jalapeno_dude
Marri wrote:@jalapeno_dude I have pushed a modification to how the Unread page selects by user id (for the technical, I'm putting the condition in the JOIN instead of in the WHERE). Does it look more accurate now?
Looks good to me. Thanks!
Re: Glowfic platform
Posted: Tue Feb 23, 2016 4:03 am
by Atelos
Seems to me the most straightforward non-jumpy solution to the problem of the drop down boxes would be to make them appear above the anchor instead of below it if they're sufficiently near the bottom of the page. Like this forum does.
Re: Glowfic platform
Posted: Tue Feb 23, 2016 12:52 pm
by Timepoof
I can't log in. It just takes me to the same page or another page.
Re: Glowfic platform
Posted: Tue Feb 23, 2016 1:22 pm
by Moriwen
Okay, another tiny thing. The character for new posts defaults to whichever you most recently posted with. Would it be easy enough to instead have it default to whichever you most recently posted with in that thread? It would be slightly more convenient for switching between two threads.
(And it's still taking me back to the first page of multi-page threads every time I post.)
Re: Glowfic platform
Posted: Tue Feb 23, 2016 1:31 pm
by Marri
@jalapeno_dude yay, glad it worked!
@Atelos good suggestion, thanks! I will test it out on the icons selector. (I didn't code the fancy javascript dropdown for the character selector myself so that would take more work and thus comes second xD)
@Timepoof just tested it and mine's working okay. Are you seeing an error of any kind? Do you have cookies or javascript disabled?
@Moriwen That is in fact easy, Throne3d is wonderful and is graciously looking at it since I am at work. This week has been deeply horrid so far but I'll try to get the page jumping thing fixed tonight.
Re: Glowfic platform
Posted: Tue Feb 23, 2016 2:05 pm
by Throne3d
Moriwen wrote:Okay, another tiny thing. The character for new posts defaults to whichever you most recently posted with. Would it be easy enough to instead have it default to whichever you most recently posted with in that thread? It would be slightly more convenient for switching between two threads.
Marri wrote:@Moriwen That is in fact easy, Throne3d is wonderful and is graciously looking at it since I am at work. This week has been deeply horrid so far but I'll try to get the page jumping thing fixed tonight.
Okay, I think I've done that, so I guess it should be available soon.
I hope your week gets better! :(
Re: Glowfic platform
Posted: Tue Feb 23, 2016 2:46 pm
by Timepoof
Uh, nvm, it worked.
Re: Glowfic platform
Posted: Tue Feb 23, 2016 4:43 pm
by Ezra
What will be the default character if you've never posted in that thread?