The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

anyway to restrict what appears in the latest topics

View previous topic View next topic Go down

anyway to restrict what appears in the latest topics

Post by Flappypaddles on Mon Oct 31, 2016 7:06 am

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
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by skouliki on Mon Oct 31, 2016 7:09 am

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

avatar
skouliki
Graphic Designer
Graphic Designer

Female Posts : 2428
Reputation : 377
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Ace 1 on Mon Oct 31, 2016 9:50 am

@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.
avatar
Ace 1
Helper
Helper

Male Posts : 804
Reputation : 53
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Flappypaddles on Mon Oct 31, 2016 10:44 am

@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

avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Ace 1 on Mon Oct 31, 2016 10:52 am

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.
avatar
Ace 1
Helper
Helper

Male Posts : 804
Reputation : 53
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Flappypaddles on Mon Oct 31, 2016 11:41 am

@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
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Ace 1 on Mon Oct 31, 2016 12:32 pm

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

Male Posts : 804
Reputation : 53
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Flappypaddles on Mon Oct 31, 2016 1: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

avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Ace 1 on Wed Nov 02, 2016 4: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.
avatar
Ace 1
Helper
Helper

Male Posts : 804
Reputation : 53
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Flappypaddles on Fri Nov 04, 2016 9:35 am

@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
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Ace 1 on Sat Nov 05, 2016 2: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?
avatar
Ace 1
Helper
Helper

Male Posts : 804
Reputation : 53
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Flappypaddles on Sun Nov 06, 2016 12: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
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by SLGray on Sun Nov 06, 2016 2: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


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

avatar
SLGray
Administrator
Administrator

Male Posts : 38500
Reputation : 2589
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Ace 1 on Mon Nov 07, 2016 4:27 am

@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();
          }
      });
  }
avatar
Ace 1
Helper
Helper

Male Posts : 804
Reputation : 53
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Flappypaddles on Sat Nov 12, 2016 1: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?
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Ace 1 on Mon Nov 14, 2016 8:37 am

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.
avatar
Ace 1
Helper
Helper

Male Posts : 804
Reputation : 53
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Re: anyway to restrict what appears in the latest topics

Post by Flappypaddles on Wed Nov 16, 2016 11:38 am

@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.
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

View previous topic View next topic Back to top


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