Allow users to fully ignore/hide other users

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Ideas Centre
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6518
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Allow users to fully ignore/hide other users

Post by thecoalman »

Gumb00ts wrote: It's already done for posts, so doing it for quotes should not be particularly difficult.
It's easy to do it for posts because you have direct reference for the user id. That's not the case for quotes since it's stored with the post data and I'll add easily manipulated. See the quote box above for reference.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6518
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Allow users to fully ignore/hide other users

Post by thecoalman »

privet.fun wrote: Wed Jan 08, 2025 11:57 pm I have these features implemented on my forum since mid-2023:

Code: Select all

    // workaround to get list of foes -- we fetch the entire page and parse it to get a list of foes
    xhttp.open("GET", "/ucp.php?i=ucp_zebra&mode=foes", true);
    xhttp.send();
That's pretty expensive to get list of foes. At some point there is probably an array of foes available while viewtopic is executing and you can just set it as template variable.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
danieltj
Infrastructure Team Member
Infrastructure Team Member
Posts: 666
Joined: Thu May 03, 2018 9:32 pm
Location: United Kingdom
Name: Daniel James

Re: Allow users to fully ignore/hide other users

Post by danieltj »

Based on what I've read so far, it's safe to assume that hacking together bits of JavaScript and CSS is clearly not the way to do this. If that works for you then power to you, but an extension that filters post content based on your foes is the only way to go about this. Quotes will be sort of tricky because some quotes might be modern (3.3 quotes for example have user IDs etc) but legacy quotes or 'basic' (like in 3.0) ones written by users that just have the username will be even trickier to filter out.
MY EXTENSIONS:
Verified Profiles | Awesome Payments: a phpBB shop

Available for paid extension work: PM me.
User avatar
Gumboots
Registered User
Posts: 812
Joined: Fri Oct 11, 2019 1:59 am

Re: Allow users to fully ignore/hide other users

Post by Gumboots »

thecoalman wrote: Fri Jan 10, 2025 8:04 am
Gumb00ts wrote: It's already done for posts, so doing it for quotes should not be particularly difficult.
It's easy to do it for posts because you have direct reference for the user id. That's not the case for quotes since it's stored with the post data and I'll add easily manipulated.
Good point. There's also the possibility of people splitting a quoted foe post to allow a more detailed reply.

See the quote box above for reference.
In which case you are totally screwed for hiding it.

So, can be done for foe quotes which contain user ID, but cannot be done (sanely) for foe quotes that lack user ID.
🇺🇦 Слава Україні! 🇺🇦 Героям слава! 🇺🇦
User avatar
Gumboots
Registered User
Posts: 812
Joined: Fri Oct 11, 2019 1:59 am

Re: Allow users to fully ignore/hide other users

Post by Gumboots »

danieltj wrote: Fri Jan 10, 2025 11:01 am Based on what I've read so far, it's safe to assume that hacking together bits of JavaScript and CSS is clearly not the way to do this. If that works for you then power to you...
I used custom CSS just to clean up the default presentation for ignored and deleted posts. IOW, not an addition to the default ignore system, just a way of making it less obtrusive and reducing the amount of scrolling required.

ignored_posts.png

This had been very popular, because people really do not want to read the default ignored posts blurb (including the username of their foes). They just want to know it's a post they're ignoring and can skip without worrying about it. As I said, deleted posts get the same treatment for the staff. The link to view the post is still functional if required. It's clean and effective. IMO this is a valid use of CSS.

Code: Select all

.postbody > .ignore {
	position: relative;
	overflow: hidden;
	height: 16px;
	padding: 2px 4px 0;
	font-size: 12px !important;
	line-height: 16px;
}
.postbody > .ignore::before {
	display: block;
	font-style: italic;
	content: 'Ignored post.';
}
.postbody > .ignore a {
	position: absolute;
	top: 0;
	right: 4px;
}
.postbody > .ignore a::before {
	display: block;
	padding: 2px 4px 0;
	content: 'Here be dragons.';
}

This is all on default markup. No template hacks are required.

Code: Select all

<div class="ignore" id="post_hidden138261">
	<strong>
		<a href="./memberlist.php?mode=viewprofile&amp;u=91" style="color: #BF8040;" class="username-coloured">
			Foe Name
		</a>
	</strong>, who is currently on your ignore list, made this post.
	<br>
	<a class="display_post" data-post-id="138261" href="./viewtopic.php?p=138261&amp;view=show#p138261">
		Display this post
	</a>
</div>

And yes, I added the CSS to an extension we were already running (one of mine) so it applies to all styles. ZOMG, Gumboots will actually use extensions sometimes. Don't tell anyone. :lol:
You do not have the required permissions to view the files attached to this post.
🇺🇦 Слава Україні! 🇺🇦 Героям слава! 🇺🇦

Return to “Extension Requests”