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.

Is there a way to show a single author's response in a topic?

3 posters

Page 2 of 2 Previous  1, 2

Go down

Solved Is there a way to show a single author's response in a topic?

Post by Sin_Ger June 12th 2020, 11:34 am

First topic message reminder :

In other forums, I've seen it possible to display only one author's message in a topic post. Are there any mod that can do that?
Sin_Ger
Sin_Ger
New Member

Posts : 16
Reputation : 1
Language : Chinese

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

Back to top Go down


Solved Re: Is there a way to show a single author's response in a topic?

Post by Sin_Ger June 12th 2020, 2:55 pm

Sin_Ger
Sin_Ger
New Member

Posts : 16
Reputation : 1
Language : Chinese

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

Back to top Go down

Solved Re: Is there a way to show a single author's response in a topic?

Post by tikky June 12th 2020, 3:27 pm

So hide all comments less the author. Create a new JavaScript page with investment in the topics (go to Adminstration Panel > Modules > HTML & JAVASCRIPT > Javascript codes management) with the following code:
Code:
(function ($) {
  'use strict';
 
  $(function () {
   
  var $author = $('.post').first().find('.postprofile-name').text();
   
    $('.post:not(:first)').each(function () {
      var $this = $(this);
     
      var $pauthor = $this.find('.postprofile-name').text();
     
      if(new RegExp($author, 'i').test($pauthor)) return;
     
        $this.fadeOut();
     
      });
    });
})(jQuery);
tikky
tikky
Forumember

Posts : 899
Reputation : 157
Language : 🇵🇹

https://www.forumotion.com/create-forum/modernbb

Back to top Go down

Solved Re: Is there a way to show a single author's response in a topic?

Post by skouliki June 12th 2020, 8:11 pm

Sin_Ger since you are using pedxz's code can't mark this as solved?

thank you @Pedxz for your help
skouliki
skouliki
Manager
Manager

Female Posts : 15246
Reputation : 1703
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Is there a way to show a single author's response in a topic?

Post by skouliki June 15th 2020, 9:32 am

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

Female Posts : 15246
Reputation : 1703
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

- Similar topics

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