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 October 31st 2016, 2:06 pm

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 October 31st 2016, 2:09 pm

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 : 15399
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 October 31st 2016, 4:50 pm

@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 October 31st 2016, 5:44 pm

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 October 31st 2016, 5:52 pm

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 October 31st 2016, 6:41 pm

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 October 31st 2016, 7:32 pm

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 October 31st 2016, 8:37 pm

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 November 2nd 2016, 11:23 pm

@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 November 4th 2016, 4:35 pm

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 November 5th 2016, 9:04 am

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 November 6th 2016, 8:32 pm

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 November 6th 2016, 10:10 pm

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 : 51576
Reputation : 3525
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 November 7th 2016, 12:27 pm

@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 November 12th 2016, 9:37 am

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 November 14th 2016, 4:37 pm

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 November 16th 2016, 7:38 pm

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