Is there a way to show a single author's response in a topic? - Page 2 Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
3 posters

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

    Sin_Ger
    Sin_Ger
    New Member


    Posts : 16
    Reputation : 1
    Language : Chinese

    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

    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

    tikky
    tikky
    Forumember


    Posts : 922
    Reputation : 159
    Language : 🇵🇹

    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);
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    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 : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    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