akirk / friends

A social network between WordPresses. Privacy focused, by itself a self-hosted RSS++ reader with notifications.
https://wpfriends.at/
GNU General Public License v2.0
81 stars 14 forks source link

Proposal: different format for boosts and reposts #179

Open alecmuffett opened 1 year ago

alecmuffett commented 1 year ago

Hi! I just changed this code because it was annoying me. I changed the way that boosts are annotated. I think it is nicer.

I am happy to make a PR but I wanted to open it to suggestion first, because maybe you don't like it.

Example:

Screenshot 2023-01-11 at 21 44 25

Diff (in case you really like this and can't wait)

diff --git a/templates/frontend/parts/header.php b/templates/frontend/parts/header.php
index 21ce346..754b21c 100644
--- a/templates/frontend/parts/header.php
+++ b/templates/frontend/parts/header.php
@@ -44,9 +44,10 @@ $override_author_name = apply_filters( 'friends_override_author_name', '', $auth
                <div class="author">
                        <?php if ( in_array( get_post_type(), Friends\Friends::get_frontend_post_types(), true ) ) : ?>
                                <a href="<?php echo esc_attr( $friend_user->get_local_friends_page_url() ); ?>">
-                                       <strong><?php the_author(); ?></strong>
                                        <?php if ( $override_author_name && trim( str_replace( $override_author_name, '', $author_name ) ) === $author_name ) : ?>
-                                               – <?php echo esc_html( $override_author_name ); ?>
+                                             <strong><?php echo esc_html( $override_author_name ); ?></strong> (via <?php the_author(); ?>)
+                                       <?php else: ?>
+                                             <strong><?php the_author(); ?></strong>
                                        <?php endif; ?>
                                </a>
                        <?php else : ?>

What do you think?

alecmuffett commented 1 year ago

It's useful / valuable when this sort of thing happens:

Screenshot 2023-01-11 at 21 49 18

alecmuffett commented 1 year ago

there's a bit of me which is wondering about putting 2x profile icons next to each other, but I cannot currently see it as being more important than finding out what @akirk thinks of this.

jeckman commented 1 year ago

Was just coming to file an issue about the way boosts/reposts are handled - for me the current process was quite confusing.

In your example is the person named after "via" the one doing the reposting and the Alex Stamos is the original author?

That feels right - and the link after "4 hours ago" points to the update on the originating server not the federated one?

alecmuffett commented 1 year ago

Indeed that is very much what I'm shooting for, although I am happy to take improvements on the general theme of "the person who actually wrote the toot, is the person first named".

akirk commented 4 months ago

In #309, I separated reblogging from boosting, the reblog post now gets CSS classes and it will open up an editor instead of just reblogging. I hope this can help with the experience here, what do you think?

akirk commented 4 months ago

Oh, I am sorry, I had this issue wrong in my mind. In that light, I would like to add that you can override single templates with your theme (or also a dedicated plugin if you want). So you don't have to patch the plugin if you would like to change this.