The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Only see topic posters

4 posters

Go down

Solved Only see topic posters

Post by Winging April 26th 2023, 4:07 am

Forum version : #ModernBB
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
Forum link :https://ekin-ek.666forum.com
- - - - - - - -
Hello!

I have asked similar questions before,didn't get the solution I wanted most (thanks to the admins who suggested it at the time, there are easy alternatives) ↓

https://help.forumotion.com/t160489-how-to-see-the-members-post-in-topic 

I saw a similar code recently but not sure if it can be converted to HTML & JAVASCRIPT for this forumotion forum. ↓

https://www.twblogs.net/a/5b89f6e92b71775d1ce4b31f

Make the post allow all members to [decide independently] whether to [temporarily] hide the reply of [non-topic poster],and make the screen more tidy

Only see topic posters Iau10

It may be necessary to create a [Only look at the poster] button, you can choose on/off.

Only see topic posters Osi10


Thanks to every admin for suggestions and solutions. Only see topic posters 1f443


Last edited by Winging on April 26th 2023, 3:02 pm; edited 1 time in total
Winging
Winging
Forumember

Female Posts : 149
Reputation : 4
Language : traditional chinese

https://ekin-ek.666forum.com/

Back to top Go down

Solved Re: Only see topic posters

Post by Niko April 26th 2023, 9:56 am

Coucou @Winging

so you basically want a button that hides temporarily the posts that are not the ones by the author?
Is this what you mean? For sure it can be done, just confirm me before I start Wink

:rose:
Niko
Niko
Helper
Helper

Male Posts : 3112
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Winging likes this post

Back to top Go down

Solved Re: Only see topic posters

Post by Winging April 26th 2023, 10:06 am

Hi,@Niko !

Thanks for replying me

yes,I hope it can be as you said.
A newly added button.
Every member (not just admins) can [temporarily hides] other people's replies and only shows the person who posted the topic
(This requires the help of professionals as you Only see topic posters 1f60d )


Last edited by Winging on April 26th 2023, 10:09 am; edited 2 times in total
Winging
Winging
Forumember

Female Posts : 149
Reputation : 4
Language : traditional chinese

https://ekin-ek.666forum.com/

Back to top Go down

Solved Re: Only see topic posters

Post by Niko April 26th 2023, 10:07 am

@Winging I will work on it and be back to you as soon as it's ready bye
Niko
Niko
Helper
Helper

Male Posts : 3112
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Winging likes this post

Back to top Go down

Solved Re: Only see topic posters

Post by Niko April 26th 2023, 10:45 am

Lets give it a try Wink

Go to ACP > Modules > HTML & Javascript > Javascript management and create a new code with these settings:
  • Title: as you prefer
  • Where: In topics
  • Code

    Code:
    $(function() {
    var toggle_author_text = 'Toggle Author';
    var topic_author;
    $('.topic-actions-buttons').append('<a id="toggle_author" style="cursor: pointer;">'+toggle_author_text+'</a>');
    $('.post').each(function() {
        var author = $(this).find('.postprofile .postprofile-name').text();
        if(!topic_author) {
            topic_author = author;
            console.log('topic_author is '+topic_author);
        }
        $(this).addClass(author);
    });


    $("#toggle_author:not(.hiding)").live("click", function(){
        $('.post:not(.'+topic_author+')').hide();
        $(this).attr('class','hiding');
    });

    $("#toggle_author.hiding").live("click", function(){
        $('.post').show();
        $(this).attr('class','');
    });
    });


The button is displayed here:
Only see topic posters Scree107

And here you can see the two views:
Before
Only see topic posters Scree108

After
Only see topic posters Scree109
Niko
Niko
Helper
Helper

Male Posts : 3112
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Ape, SarkZKalie and Razor12345 like this post

Back to top Go down

Solved Re: Only see topic posters

Post by Winging April 26th 2023, 10:58 am

Wow,vwry very thanks @Niko

This works!that's what i want!
You solved a problem that has troubled me for a long time!

In addition, I would like to ask, if I want to change the style (color or button shape), how should my CSS be added.Only see topic posters 1f60a
People can clearly see the on/off mode.
It's like the mouse moves to change color, press the button to change color.
Maybe something like a Like or Dislike button?

Thanks again for your professionalism and kindness. Only see topic posters 1f499
Winging
Winging
Forumember

Female Posts : 149
Reputation : 4
Language : traditional chinese

https://ekin-ek.666forum.com/

Niko likes this post

Back to top Go down

Solved Re: Only see topic posters

Post by Niko April 26th 2023, 11:02 am

Add this to your CSS Wink

Code:
a#toggle_author {
    background-color: #2c353b;
    position: relative;
    display: inline-block;
    border: none;
    outline: none;
    margin: 6px 6px 0 0;
    cursor: pointer;
    padding: 4px 11px;
    border-radius: 3px;
    color: #FFF;
    font-family: inherit;
}

a#toggle_author.hiding {
    background-color: #4CAF50;
}

Just a side note - be sure that Always show the first post in the topics is set to yes, otherwise the code will not work when you go to a second page of the topic Wink

Only see topic posters Scree110
Niko
Niko
Helper
Helper

Male Posts : 3112
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Ape and Winging like this post

Back to top Go down

Solved Re: Only see topic posters

Post by Winging April 26th 2023, 11:32 am

OH yeah, it turned into the button I wanted.

Only see topic posters Uooos10

@Niko

Thank you very much for the JS you helped to add, and thank you for your reminder. Only see topic posters 1f600

I hope people in need can also use this code. Only see topic posters 1f60a

Thank you again! Only see topic posters 1f495

ps.In addition, I would like to ask, if I use [mobile phone board], I seem to need to add another code?
Winging
Winging
Forumember

Female Posts : 149
Reputation : 4
Language : traditional chinese

https://ekin-ek.666forum.com/

Back to top Go down

Solved Re: Only see topic posters

Post by Niko April 26th 2023, 2:15 pm

@Winging yes exactly, because the structure of the page changes - but I am afraid it would become too complex to be handled in mobile, so I wouldn't suggest it actually Embarassed
Niko
Niko
Helper
Helper

Male Posts : 3112
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Ape likes this post

Back to top Go down

Solved Re: Only see topic posters

Post by Ape April 26th 2023, 2:47 pm

Hi @Winging is this now solved ?
If yes please press the mark solved button found at the top of this topic.


Only see topic posters Left1212Only see topic posters Center11Only see topic posters Right112
Only see topic posters Ape_b110
Only see topic posters Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19182
Reputation : 1996
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Niko likes this post

Back to top Go down

Solved Re: Only see topic posters

Post by Winging April 26th 2023, 3:01 pm

Understood, thanks for your reply.
@Niko Only see topic posters 263a

Yes, it's solved, it's done. @Ape

Thank you very much for your help I love you
Winging
Winging
Forumember

Female Posts : 149
Reputation : 4
Language : traditional chinese

https://ekin-ek.666forum.com/

Ape and Niko like this post

Back to top Go down

Solved Re: Only see topic posters

Post by skouliki April 26th 2023, 3:04 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules
skouliki
skouliki
Manager
Manager

Female Posts : 15228
Reputation : 1700
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Niko likes this post

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum