Suggestion: Show support author buttons for locked chapter posts + Global password note for all chapters under specific story #22

Closed
opened 2024-02-22 09:53:52 +08:00 by myramel · 4 comments
myramel commented 2024-02-22 09:53:52 +08:00 (Migrated from github.com)

Just like how we have those support buttons on regular posts, it would be cool to see them on protected posts too.

Plus, instead of just having a password note for each post, how about a global one that works for all chapters under the same story? I get that there's already a way to add a note for each chapter, but it's a bit of a hassle to repeat the same note for all my protected posts, especially since I'm juggling a tiered membership thing. Is this something you'd think about adding?

Anyway, great work as always!

Just like how we have those support buttons on regular posts, it would be cool to see them on protected posts too. Plus, instead of just having a password note for each post, how about a global one that works for all chapters under the same story? I get that there's already a way to add a note for each chapter, but it's a bit of a hassle to repeat the same note for all my protected posts, especially since I'm juggling a tiered membership thing. Is this something you'd think about adding? Anyway, great work as always!
Tetrakern commented 2024-02-23 06:00:55 +08:00 (Migrated from github.com)

The first one is reasonable, I suppose. Might be a bit weird asking for support on a post you cannot see, but depends on the message. Will be in the next update, which is still a bit off, though. It literally just removing a guard clause. 5465f8091d

As for the story-wide notes... I'll think about it. I can see the utility. It's just I need to be a bit conservative with new fields, because one becomes two becomes twenty, bloating the database. Well, this one would technically save fields since one per story is significantly less than one per chapter. We will see.

The first one is reasonable, I suppose. Might be a bit weird asking for support on a post you cannot see, but depends on the message. Will be in the next update, which is still a bit off, though. It literally just removing a guard clause. https://github.com/Tetrakern/fictioneer/commit/5465f8091d24caf473e2cdee4eb00a4ec214c855 As for the story-wide notes... I'll think about it. I can see the utility. It's just I need to be a bit conservative with new fields, because one becomes two becomes twenty, bloating the database. Well, this one would technically save fields since one per story is significantly less than one per chapter. We will see.
Tetrakern commented 2024-02-23 07:00:17 +08:00 (Migrated from github.com)

Next version will include a new field for global notes on stories. This one is displayed on protected chapters as well, but this can be turned off by adding the "[!password]" substring anywhere in the note (will be filtered out). a03e396b90

Next version will include a new field for global notes on stories. This one is displayed on protected chapters as well, but this can be turned off by adding the "[!password]" substring anywhere in the note (will be filtered out). https://github.com/Tetrakern/fictioneer/commit/a03e396b90d66e9528eec01f9d44915598050810
Tetrakern commented 2024-03-03 19:34:43 +08:00 (Migrated from github.com)

I just noticed that this didn't quite meet your requirements, namely being only shown as password note. Whelp. I will address this in the next update, but for now you can add it yourself in the template file editor. This will be overwritten with the update, so no worries. Be careful, though.

Add this after line 155 in the single-fcn_chapter.php template:

if ( post_password_required() && empty( $password_note ) ) {
  $password_note = fictioneer_get_content_field( 'fictioneer_story_password_note', $story_id );

  if ( $story_post && ! empty( $password_note ) && strpos( $password_note, '[!global]' ) !== false ) {
    $password_note = str_replace( '[!global]', '', $password_note );
  } else {
    $password_note = '';
  }
}

It should look similar to this (colors excluded):

image

You can make a story password note global by adding "[!global]" first in the content area. Close this issue if it works.

I just noticed that this didn't quite meet your requirements, namely being only shown as password note. Whelp. I will address this in the next update, but for now you can add it yourself in the template file editor. This will be overwritten with the update, so no worries. Be careful, though. Add this after line 155 in the **single-fcn_chapter.php** template: ```php if ( post_password_required() && empty( $password_note ) ) { $password_note = fictioneer_get_content_field( 'fictioneer_story_password_note', $story_id ); if ( $story_post && ! empty( $password_note ) && strpos( $password_note, '[!global]' ) !== false ) { $password_note = str_replace( '[!global]', '', $password_note ); } else { $password_note = ''; } } ``` It should look similar to this (colors excluded): <img width="886" alt="image" src="https://github.com/Tetrakern/fictioneer/assets/26898880/d1a79219-57f8-4dc0-a12a-aaacafa2653c"> You can make a story password note global by adding "[!global]" first in the content area. Close this issue if it works.
Tetrakern commented 2024-03-06 06:33:50 +08:00 (Migrated from github.com)

Resolved with 5.12.1.

Resolved with [5.12.1](https://github.com/Tetrakern/fictioneer/releases/tag/v5.12.1).
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: malhuda/fictioneer#22
No description provided.