Only see topic posters
4 posters
Page 1 of 1
Only see topic posters
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

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

Thanks to every admin for suggestions and solutions.
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

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

Thanks to every admin for suggestions and solutions.

Last edited by Winging on April 26th 2023, 3:02 pm; edited 1 time in total
Re: Only see topic posters
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

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


Winging likes this post
Re: Only see topic posters
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
)
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

Last edited by Winging on April 26th 2023, 10:09 am; edited 2 times in total
Re: Only see topic posters
@Winging I will work on it and be back to you as soon as it's ready

Winging likes this post
Re: Only see topic posters
Lets give it a try 
Go to ACP > Modules > HTML & Javascript > Javascript management and create a new code with these settings:
The button is displayed here:

And here you can see the two views:
Before

After


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:

And here you can see the two views:
Before

After

Ape, SarkZKalie and Razor12345 like this post
Re: Only see topic posters
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.
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.
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.

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.

Niko likes this post
Re: Only see topic posters
Add this to your CSS 
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

- 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

Ape and Winging like this post
Re: Only see topic posters
OH yeah, it turned into the button I wanted.

@Niko
Thank you very much for the JS you helped to add, and thank you for your reminder.
I hope people in need can also use this code.
Thank you again!
ps.In addition, I would like to ask, if I use [mobile phone board], I seem to need to add another code?

@Niko
Thank you very much for the JS you helped to add, and thank you for your reminder.

I hope people in need can also use this code.

Thank you again!

ps.In addition, I would like to ask, if I use [mobile phone board], I seem to need to add another code?
Re: Only see topic posters
@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

Ape likes this post
Re: Only see topic posters
Hi @Winging is this now solved ?
If yes please press the mark solved button found at the top of this topic.
If yes please press the mark solved button found at the top of this topic.
Niko likes this post
Re: Only see topic posters
Problem solved & topic archived.
|
Niko likes this post

» How to show the last topic and top posters in footer of forum?
» New : display who has participated in a topic and the number of posters
» Newest Topic, News Post & weekly top posters
» Avatar in: Top posters, all Top posting and Most active topic starters Widget
» Help needed with "Today's top 20 posters" - "Overall top 20 posters links" ??
» New : display who has participated in a topic and the number of posters
» Newest Topic, News Post & weekly top posters
» Avatar in: Top posters, all Top posting and Most active topic starters Widget
» Help needed with "Today's top 20 posters" - "Overall top 20 posters links" ??
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum