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.
The forum of the forums
4 posters

    anyway to restrict what appears in the latest topics

    Flappypaddles
    Flappypaddles
    Forumember


    Posts : 261
    Reputation : 1
    Language : english

    anyway to restrict what appears in the latest topics Empty anyway to restrict what appears in the latest topics

    Post by Flappypaddles Mon 31 Oct - 13:06

    I have a member who creates endless threads which barely get a reply but more or less ensure no one else's threads appear in the scrolling new topics widget.
    Is there anyway to restrict a members posts or threads appearing in the latest posts.
    the easiest way I suppose would be to kick him out, but he hasnt broken any rules and its not something I want to do.

    about 1 in 10 of his threads are interesting.

    there must be some sort of way to do it via CSS or java script.

    someone please help
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by skouliki Mon 31 Oct - 13:09

    hello

    i think iam not sure iam not home to check it right now but i think there is an option
    AP...General...Messages & Emails...Configuration...Post edit duration limit for a member


    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Ace 1 Mon 31 Oct - 15:50

    @Flappypaddles Go to the ACP > Modules > HTML & JS > Javascript codes management > Create new javascript

    Code:
    $(function() {
      var filteredMembers = [ '/u1' ],

        i = 0,
        j = filteredMembers.length;

      for (; i < j; i++) {
        $('#recent_topic_list .topic_row').each(function() {
          if ( $(this).find('a[href="' + filteredMembers[i] + '"]').html() ) $(this).remove();
        });
      }
    });

    Set it to work in all the pages.

    If you want to change the person, then look at this line in the code:

    Code:
      var filteredMembers = [ '/u1' ],

    Change the
    Code:
    '/u1'
    to the account URL of the person you want to remove from the Latest topics widget.
    Flappypaddles
    Flappypaddles
    Forumember


    Posts : 261
    Reputation : 1
    Language : english

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Flappypaddles Mon 31 Oct - 16:44

    Ace 1 wrote:@Flappypaddles Go to the ACP > Modules > HTML & JS > Javascript codes management > Create new javascript

    Code:
    $(function() {
      var filteredMembers = [ '/u1' ],

        i = 0,
        j = filteredMembers.length;

      for (; i < j; i++) {
        $('#recent_topic_list .topic_row').each(function() {
          if ( $(this).find('a[href="' + filteredMembers[i] + '"]').html() ) $(this).remove();
        });
      }
    });

    Set it to work in all the pages.

    If you want to change the person, then look at this line in the code:

    Code:
      var filteredMembers = [ '/u1' ],

    Change the
    Code:
    '/u1'
    to the account URL of the person you want to remove from the Latest topics widget.

    cheers for that it sort of works, when logged in as an admin it doesnt seem to block him but when logged in as a normal user it blocks most of them, still seems to a be a couple in the list of 15 topics.

    although it may be he is not online at the moment and not creating endless threads.
    I will get back to you when he has been posting some more

    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Ace 1 Mon 31 Oct - 16:52

    Yeah but are you trying to get rid of the topics that he created? Because that little script gets rid of the topics where he was the most recent poster.
    Flappypaddles
    Flappypaddles
    Forumember


    Posts : 261
    Reputation : 1
    Language : english

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Flappypaddles Mon 31 Oct - 17:41

    Ace 1 wrote:Yeah but are you trying to get rid of the topics that he created? Because that little script gets rid of the topics where he was the most recent poster.
    I am trying to get it so that his posts do not show in the recent topics. Whether he created the thread or not.
    He is a very prolific poster and few others get a look in on the scrolling topics when he is in full flow.

    I have checked with a new user I created and it does not seem to be working at all. both threads and reply's still show in the scrolling list
    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Ace 1 Mon 31 Oct - 18:32

    I'm going to need your forum URL. And a test account, if you'd please.
    Flappypaddles
    Flappypaddles
    Forumember


    Posts : 261
    Reputation : 1
    Language : english

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Flappypaddles Mon 31 Oct - 19:37

    Ace 1 wrote:I'm going to need your forum URL. And a test account, if you'd please.
    ok I will send you a pm

    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Ace 1 Wed 2 Nov - 22:23

    @Flappypaddles I looked at your forum and I got this script to work:

    Code:
    $(function() {
      var filteredMembers = [ '/u81' ],
     
        i = 0,
        j = filteredMembers.length;
     
      for (; i < j; i++) {
        $('#comments_scroll_div .js-marquee > a').each(function() {
          if ( $(this).attr('href') == filteredMembers[i] ) {
            $(this.previousSibling, this.nextSibling).remove();
            $(this).prevUntil('a').prev().andSelf().remove();
            $(this.previousSibling).remove();
            $(this.previousSibling).remove();
            $(this.nextSibling).remove();
            $(this).remove();
          }
        });
      }
    });

    Add this either as a Javascript code enabled in all the pages or within
    Code:
    <script></script>
    tags within the widget HTML.
    Flappypaddles
    Flappypaddles
    Forumember


    Posts : 261
    Reputation : 1
    Language : english

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Flappypaddles Fri 4 Nov - 15:35

    Ace 1 wrote:@Flappypaddles I looked at your forum and I got this script to work:

    Code:
    $(function() {
      var filteredMembers = [ '/u81' ],
     
        i = 0,
        j = filteredMembers.length;
     
      for (; i < j; i++) {
        $('#comments_scroll_div .js-marquee > a').each(function() {
          if ( $(this).attr('href') == filteredMembers[i] ) {
            $(this.previousSibling, this.nextSibling).remove();
            $(this).prevUntil('a').prev().andSelf().remove();
            $(this.previousSibling).remove();
            $(this.previousSibling).remove();
            $(this.nextSibling).remove();
            $(this).remove();
          }
        });
      }
    });

    Add this either as a Javascript code enabled in all the pages or within
    Code:
    <script></script>
    tags within the widget HTML.


    well I tried it and the users posts still appear in the scrolling latest topics
    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Ace 1 Sat 5 Nov - 8:04

    Try this code:

    Code:
    $(function() {
      var filteredMembers = [ '/u81' ],
     
        i = 0,
        j = filteredMembers.length;
     
      for (; i < j; i++) {
        $('#comments_scroll_div .js-marquee > a').each(function() {
          if ( $(this).attr('href').indexOf(filteredMembers[i]) != -1 ) {
            $(this.previousSibling, this.nextSibling).remove();
            $(this).prevUntil('a').prev().andSelf().remove();
            $(this.previousSibling).remove();
            $(this.previousSibling).remove();
            $(this.nextSibling).remove();
            $(this).remove();
          }
        });
      }
    });

    And btw, where are you putting this?
    Flappypaddles
    Flappypaddles
    Forumember


    Posts : 261
    Reputation : 1
    Language : english

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Flappypaddles Sun 6 Nov - 19:32

    Ace 1 wrote:Try this code:

    Code:
    $(function() {
      var filteredMembers = [ '/u81' ],
     
        i = 0,
        j = filteredMembers.length;
     
      for (; i < j; i++) {
        $('#comments_scroll_div .js-marquee > a').each(function() {
          if ( $(this).attr('href').indexOf(filteredMembers[i]) != -1 ) {
            $(this.previousSibling, this.nextSibling).remove();
            $(this).prevUntil('a').prev().andSelf().remove();
            $(this.previousSibling).remove();
            $(this.previousSibling).remove();
            $(this.nextSibling).remove();
            $(this).remove();
          }
        });
      }
    });

    And btw, where are you putting this?
    in a java script module
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by SLGray Sun 6 Nov - 21:10

    Flappypaddles wrote:
    Ace 1 wrote:Try this code:

    Code:
    $(function() {
     Â var filteredMembers = [ '/u81' ],
     
     Â   i = 0,
     Â   j = filteredMembers.length;
     
     Â for (; i < j; i++) {
     Â   $('#comments_scroll_div .js-marquee > a').each(function() {
     Â     if ( $(this).attr('href').indexOf(filteredMembers[i]) != -1 ) {
     Â       $(this.previousSibling, this.nextSibling).remove();
     Â       $(this).prevUntil('a').prev().andSelf().remove();
     Â       $(this.previousSibling).remove();
     Â       $(this.previousSibling).remove();
     Â       $(this.nextSibling).remove();
     Â       $(this).remove();
     Â     }
     Â   });
     Â }
    });

    And btw, where are you putting this?
    in a java script module
    Yes



    anyway to restrict what appears in the latest topics Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Ace 1 Mon 7 Nov - 11:27

    @flappypaddles Then replace the script with this:

    Code:
      var filteredMembers = ['/u81'],

          i = 0,
          j = filteredMembers.length;

      for (; i < j; i++) {
          $('#comments_scroll_div .js-marquee > a').each(function() {
              if ($(this).attr('href').indexOf(filteredMembers[i]) != -1) {
                  $(this.previousSibling, this.nextSibling).remove();
                  $(this).prevUntil('a').prev().andSelf().remove();
                  $(this.previousSibling).remove();
                  $(this.previousSibling).remove();
                  $(this.nextSibling).remove();
                  $(this).remove();
              }
          });
      }
    Flappypaddles
    Flappypaddles
    Forumember


    Posts : 261
    Reputation : 1
    Language : english

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Flappypaddles Sat 12 Nov - 8:37

    Ace 1 wrote:@flappypaddles Then replace the script with this:

    Code:
      var filteredMembers = ['/u81'],

          i = 0,
          j = filteredMembers.length;

      for (; i < j; i++) {
          $('#comments_scroll_div .js-marquee > a').each(function() {
              if ($(this).attr('href').indexOf(filteredMembers[i]) != -1) {
                  $(this.previousSibling, this.nextSibling).remove();
                  $(this).prevUntil('a').prev().andSelf().remove();
                  $(this.previousSibling).remove();
                  $(this.previousSibling).remove();
                  $(this.nextSibling).remove();
                  $(this).remove();
              }
          });
      }
    Hi just seen it is working, however not quite as I wished. when he posts a lot they get removed, but it essentially restricts the scrolling topics to making his posts invisible.
    it's supposed to show the last 15, if he posts 10 then it only shows 5, I was rather hoping it would show the other 10 previous posts by other people before he posted not just make his invisible. I guess that may be a little harder to do though.
    does that make sense to you?
    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Ace 1 Mon 14 Nov - 15:37

    Yeah, essentially, I would have to make a script that searches for all recent topics (in chronologically descending order). That would be more of a long-term project. You could honestly just change the number of shown posts to about 25 or 30.
    Flappypaddles
    Flappypaddles
    Forumember


    Posts : 261
    Reputation : 1
    Language : english

    anyway to restrict what appears in the latest topics Empty Re: anyway to restrict what appears in the latest topics

    Post by Flappypaddles Wed 16 Nov - 18:38

    Ace 1 wrote:Yeah, essentially, I would have to make a script that searches for all recent topics (in chronologically descending order). That would be more of a long-term project. You could honestly just change the number of shown posts to about 25 or 30.
    no probs as I have found a workaround for now, I just merge all his inane topics into one thread.
    thanks for trying though.

    would it be possible to exclude a specific section from the latest topics or would that also have similar results as I though I might banish him to his own section for creating threads.

      Current date/time is Wed 13 Nov - 17:28