Glowfic platform

Do you have a setting, character, plot, art, or other notion that you wish to put on the Internet? This is the Internet! Whee!
User avatar
rockeye_stonetoe
Posts: 381
Joined: Thu Aug 27, 2015 1:57 pm
Pronouns: He

Re: Glowfic platform

Post by rockeye_stonetoe »

I would be interested to see the schema and queries.
Marri
Posts: 1026
Joined: Mon Mar 31, 2014 7:47 am

Re: Glowfic platform

Post 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!)
User avatar
jalapeno_dude
Posts: 1184
Joined: Sat Mar 22, 2014 2:57 pm
Pronouns: He

Re: Glowfic platform

Post 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!
User avatar
Atelos
Posts: 17
Joined: Thu Aug 07, 2014 10:48 pm
Pronouns: he/him/his
Location: Adjacent to L-space

Re: Glowfic platform

Post 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.
User avatar
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

Post by Timepoof »

I can't log in. It just takes me to the same page or another page.
The WAFFLES will submit to this indignity.
Moriwen
Posts: 479
Joined: Mon Oct 19, 2015 5:54 pm
Pronouns: she/her

Re: Glowfic platform

Post 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.)
Marri
Posts: 1026
Joined: Mon Mar 31, 2014 7:47 am

Re: Glowfic platform

Post 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.
Throne3d
Posts: 1282
Joined: Sat Oct 10, 2015 1:11 pm
Pronouns: He/him/his
Location: United Kingdom

Re: Glowfic platform

Post 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! :(
User avatar
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

Post by Timepoof »

Uh, nvm, it worked.
The WAFFLES will submit to this indignity.
User avatar
Ezra
Posts: 944
Joined: Tue Mar 25, 2014 11:15 am
Pronouns: he/him/his

Re: Glowfic platform

Post by Ezra »

What will be the default character if you've never posted in that thread?
Post Reply