First of all: phpBB uses flat view. It's not threaded and as such doesn't have threads, nor thread topics (whatever that is).tahiti wrote: Sat Jan 04, 2025 1:43 am ...
Where we originally came from (not a phpbb forum), there was a feature to block another user. If blocked, that user's threads and posts were completely hidden from sight for the user who blocked them, allowing them to have a true out of sight, out of mind experience. As it is, threads and thread topics are still visible and posts are just hidden behind the "show post" option, which clutters the screen for these users. If I could at least hide the thread topics and make them something generic, this would probably be an ok workaround in combination with the friend/foe list, but still not optimal for what we're used to.
It's common for people to refer to topics as "threads", even in flat view. I often do it myself.warmweer wrote: Sat Jan 04, 2025 6:28 amFirst of all: phpBB uses flat view. It's not threaded and as such doesn't have threads, nor thread topics (whatever that is).
I made a similar request a while back: Comprehensive (everywhere) ignore systemtahiti wrote: Sat Jan 04, 2025 1:43 am I am wondering if it is possible to create an extension that would allow my users to fully ignore other users. The friend/foe list is not sufficient for our needs.
This forum isn't like that. I'm not looking for suggestions on how a forum should be run or operated. I'm trying to find out if this is an extension that is possible.warmweer wrote: Sat Jan 04, 2025 6:28 amFirst of all: phpBB uses flat view. It's not threaded and as such doesn't have threads, nor thread topics (whatever that is).tahiti wrote: Sat Jan 04, 2025 1:43 am ...
Where we originally came from (not a phpbb forum), there was a feature to block another user. If blocked, that user's threads and posts were completely hidden from sight for the user who blocked them, allowing them to have a true out of sight, out of mind experience. As it is, threads and thread topics are still visible and posts are just hidden behind the "show post" option, which clutters the screen for these users. If I could at least hide the thread topics and make them something generic, this would probably be an ok workaround in combination with the friend/foe list, but still not optimal for what we're used to.
The issue with post/topic hiding is that it can easily break the flow/continuity. e.g. someone quotes a "foe" or responds to a post made by a foe and others add to that. It take only 3 or 4 replies to create an apparently nonsensical stream of seemingly unrelated posts.
Also a foe could start a topic in which other users post valuable info.
The "show post" option may seem clutter but effectively allows the reader to restore sanity with a simple click.
For the record: there nothing wrong with the extension request but IMHO there should always be a quick way to view the hidden/obscured posts.
Bummer. Those would be some nice additions to what I'm looking for, as well. Maybe one day. Apparently it was available on older versions. Unfortunately, I'm not a web dev and just started with phpbb a couple months ago.Gumboots wrote: Sat Jan 04, 2025 8:53 pmI made a similar request a while back: Comprehensive (everywhere) ignore systemtahiti wrote: Sat Jan 04, 2025 1:43 am I am wondering if it is possible to create an extension that would allow my users to fully ignore other users. The friend/foe list is not sufficient for our needs.
No takers so far.
Code: Select all
<div id="p{postrow.POST_ID}" class="post has-profile <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF --><!-- IF postrow.POSTER_WARNINGS --> warned<!-- ENDIF -->">
Code: Select all
<div id="p{postrow.POST_ID}" class="post has-profile <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF --><!-- IF postrow.POSTER_WARNINGS --> warned<!-- ENDIF --><!-- IF postrow.S_IGNORE_POST --> ignored_post<!-- ENDIF -->">
Code: Select all
.ignored_post {
display: none;
}
Thanks for your help. It looks like this would give my users the ability to ignore posts but would they have to ignore each one manually? or would this allow them to ignore all posts from a certain user (anyone on their foe list, for instance)?Anișor wrote: Sun Jan 05, 2025 8:01 am EDIT: Sorry, I was a bit confused. I will come back with a reply later today.
Edit2:
This edits will affect posts in the topic only.
Open yourstyle/template/viewtopic_body.html, look for:Replace with:Code: Select all
<div id="p{postrow.POST_ID}" class="post has-profile <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF --><!-- IF postrow.POSTER_WARNINGS --> warned<!-- ENDIF -->">
Open yourstyle/theme/common.css and somewhere at the bottom add:Code: Select all
<div id="p{postrow.POST_ID}" class="post has-profile <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF --><!-- IF postrow.POSTER_WARNINGS --> warned<!-- ENDIF --><!-- IF postrow.S_IGNORE_POST --> ignored_post<!-- ENDIF -->">
Code: Select all
.ignored_post { display: none; }
This will hide the posts made by those who are in your foe list. After you add a user as your foe their posts will be hidden for you only.tahiti wrote: Mon Jan 06, 2025 1:29 am Thanks for your help. It looks like this would give my users the ability to ignore posts but would they have to ignore each one manually? or would this allow them to ignore all posts from a certain user (anyone on their foe list, for instance)?
Awesome, thank you! I'll try this out.Anișor wrote: Mon Jan 06, 2025 8:23 amThis will hide the posts made by those who are in your foe list. After you add a user as your foe their posts will be hidden for you only.tahiti wrote: Mon Jan 06, 2025 1:29 am Thanks for your help. It looks like this would give my users the ability to ignore posts but would they have to ignore each one manually? or would this allow them to ignore all posts from a certain user (anyone on their foe list, for instance)?
All posts will be hidden (posts in a topic not the entire topic).
Code: Select all
<script>
function removeAnnoyingQuotes(foes)
{
var count = 0;
for (var userInd = 0; userInd < foes.length; userInd ++) {
let userLink = "./memberlist.php?mode=viewprofile&u=" + foes[userInd][0]
var quoteNodes = document.evaluate(
"//a[@href='" + userLink + "']",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < quoteNodes.snapshotLength; i++) {
var authorElement = quoteNodes.snapshotItem(i);
let p1 = authorElement.parentElement;
if (p1 && p1.nodeName === "CITE") {
let p2 = p1.parentElement;
if (p2) {
p2.innerHTML = blockedUserQuoteText(p2, foes[userInd][1]);
count++;
}
}
}
}
return count;
}
function removeAnnoyingFuzzyQuotes(foes)
{
var count = 0;
var quoteNodes = document.evaluate(
"//cite",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < quoteNodes.snapshotLength; i++) {
var el = quoteNodes.snapshotItem(i);
if (el.parentElement.nodeName === "DIV" && el.parentElement.parentElement.nodeName === "BLOCKQUOTE") {
var title = el.textContent
for (var userInd = 0; userInd < foes.length; userInd ++) {
if (title.startsWith(foes[userInd][1] + " ")) {
var foeBlock = el.parentElement;
foeBlock.innerHTML = blockedUserQuoteText(foeBlock, foes[userInd][1]);
count++;
break;
}
}
}
}
return count;
}
var ignoreQuoteId = 0;
function blockedUserQuoteText(parent, foeName) {
ignoreQuoteId = ignoreQuoteId + 1;
var result = '<div id="quote_hidden' + ignoreQuoteId + '">The author of <a class="display_hidden_quote" data-quote-id="' + ignoreQuoteId + '" href="./viewtopic.php">message</a> является <b>' + foeName + '</b>, is in your foe list.</div><div id="quote_content' + ignoreQuoteId + '" style="display: none;">' + parent.innerHTML + '</div>';
return result;
}
(function() {
'use strict';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
let text = this.responseText;
let ind1 = text.indexOf("<select name=\"usernames[]\"");
if (ind1 != -1) {
let optSearch = "<option value=\"";
let ind2 = text.indexOf("</select>", ind1);
let foeBlob = text.substring(ind1, ind2);
// console.log("FOE " + foeBlob);
var ind = 0;
var foes = Array();
while (true) {
ind = foeBlob.indexOf(optSearch, ind);
if (ind == -1) {
break;
}
var endIdInd = foeBlob.indexOf("\">", ind);
var foeId = foeBlob.substring(ind + optSearch.length, endIdInd);
var endNameInd = foeBlob.indexOf("</option>", endIdInd)
var foeName = foeBlob.substring(endIdInd + 2, endNameInd);
foes.push([foeId, foeName]);
ind = endNameInd;
}
if (foes.length > 0) {
var count = removeAnnoyingQuotes(foes);
count = count + removeAnnoyingFuzzyQuotes(foes);
if(count) {
$('.display_hidden_quote').on('click', function(e) {
e.preventDefault();
var quoteId = $(this).attr('data-quote-id');
$('#quote_content' + quoteId).show();
$('#quote_hidden' + quoteId).hide();
});
}
}
}
}
};
// 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();
})();
</script>
Hey, join my forum and give a try to what we have there, if you like I can help you to add it to your board or perhaps turn it into proper plugin.Gumboots wrote: Sat Jan 04, 2025 8:53 pmI made a similar request a while back: Comprehensive (everywhere) ignore systemtahiti wrote: Sat Jan 04, 2025 1:43 am I am wondering if it is possible to create an extension that would allow my users to fully ignore other users. The friend/foe list is not sufficient for our needs.
No takers so far.
Hi. Looks interesting. Basic posts within topics is not an issue. I've already used custom CSS to change the default presentation of those, and everyone is happy with the result (you're welcome to a look at that if you want). My solution is to minimise what is visible by default, so that all anyone sees is "Ignored post" (in place of the thread title, foe name, blurb, etc) and the "View post" link. This looks clean and takes up minimal space without screwing any functionality. Deleted posts are handled the same way.privet.fun wrote: Wed Jan 08, 2025 11:58 pmHey, join my forum and give a try to what we have there, if you like I can help you to add it to your board or perhaps turn it into proper plugin.Gumboots wrote: Sat Jan 04, 2025 8:53 pm
I made a similar request a while back: Comprehensive (everywhere) ignore system
No takers so far.
Quotes are saved in the POST_TEXT column in the phpbb_posts table as plain text which are eventually parsed.Gumboots wrote: Thu Jan 09, 2025 9:25 pm ...
But your way of dealing with quotes is inventive, and we still get a few grumbles about those. I can't help thinking though that it should be possible to deal with quotes via PHP on the back end. You'd just need to assign some sort of IS_FOE tag to the quote parent element so it could be dealt with by the same classes that handle normal ignored posts.
That seems to me to be the cleanest way of doing it. Arguably it should even be a default feature (maybe in phpBB 73.2.98). It's already done for posts, so doing it for quotes should not be particularly difficult. You'd still be stuck with replies to the hidden quotes being visible, but that should be acceptable to any sane members. The insane ones can go rot.
I haven't looked at the code for your topic hiding extension yet, but I assume it does something similar.