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.

anyway to restrict what appears in the latest topics

4 posters

Go down

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 2016 - 14: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
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

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 2016 - 14: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

skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

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 2016 - 16: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.
Ace 1
Ace 1
Helper
Helper

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

https://help.forumotion.com

Back to top Go down

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 2016 - 17: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

Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

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 2016 - 17: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.
Ace 1
Ace 1
Helper
Helper

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

https://help.forumotion.com

Back to top Go down

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 2016 - 18: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
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

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 2016 - 19:32

I'm going to need your forum URL. And a test account, if you'd please.
Ace 1
Ace 1
Helper
Helper

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

https://help.forumotion.com

Back to top Go down

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 2016 - 20: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

Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

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 2016 - 23: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.
Ace 1
Ace 1
Helper
Helper

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

https://help.forumotion.com

Back to top Go down

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 2016 - 16: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
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

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 2016 - 9: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?
Ace 1
Ace 1
Helper
Helper

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

https://help.forumotion.com

Back to top Go down

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 2016 - 20: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
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

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 2016 - 22: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.
SLGray
SLGray
Administrator
Administrator

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

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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 2016 - 12: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();
          }
      });
  }
Ace 1
Ace 1
Helper
Helper

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

https://help.forumotion.com

Back to top Go down

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 2016 - 9: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?
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

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 2016 - 16: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.
Ace 1
Ace 1
Helper
Helper

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

https://help.forumotion.com

Back to top Go down

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 2016 - 19: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.
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Back to top

- Similar topics

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