Glowfic platform
- rockeye_stonetoe
- Posts: 381
- Joined: Thu Aug 27, 2015 1:57 pm
- Pronouns: He
Re: Glowfic platform
I would be interested to see the schema and queries.
Re: Glowfic platform
Old query was this:
New query is this:
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!)
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
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
- jalapeno_dude
- Posts: 1184
- Joined: Sat Mar 22, 2014 2:57 pm
- Pronouns: He
Re: Glowfic platform
Looks good to me. Thanks!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?
- Atelos
- Posts: 17
- Joined: Thu Aug 07, 2014 10:48 pm
- Pronouns: he/him/his
- Location: Adjacent to L-space
Re: Glowfic platform
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.
- Timepoof
- Posts: 488
- Joined: Sun Nov 29, 2015 6:16 pm
- Pronouns: she/her/hers
- Location: On a sparkly throne with soft fluffy cushions
- Contact:
Re: Glowfic platform
I can't log in. It just takes me to the same page or another page.
The WAFFLES will submit to this indignity.
Re: Glowfic platform
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.)
(And it's still taking me back to the first page of multi-page threads every time I post.)
Re: Glowfic platform
@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.
@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
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.
Okay, I think I've done that, so I guess it should be available soon.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.
I hope your week gets better! :(
Re: Glowfic platform
What will be the default character if you've never posted in that thread?