Post by iRobot on Oct 29, 2020 15:18:05 GMT
If, like me, you primarily monitor your P2P platforms via the 'Recent-P' (Recent Posts) link, then you might, like me, wish to filter out those threads which are of no interest to you.
The forum software (ProBoards) doesn't natively offer that feature so it was necessary to get a little creative. My browser of choice on PC (where I do 90% of my browsing) is Google's Chrome so I went looking for a Chrome Extension that might help. I'm by no means a programmer or web designer, but I am just about familiar enough with web-page construction to know that pages are constructed with 'blobs' of code referred to as 'elements' and, if identified correctly, these can be targeted and manipulated - including being hidden. A number of options presented themselves but, so far, I've only found one which allows for elements to be variably selected when keywords are matched: CustomBlocker
Here's what I did on my setup - latest version of Chrome on a Windows 10 PC.
1. Install the CustomBlocker extension from the Chrome web store
2. Pin the extension's shortcut to the extensions area of the toolbar - click on the jigsaw icon toward the top right corner of Chrome and then click on the pin for CustomBlocker to turn it blue.

3. Go to the Recent Posts page and click on the dark-grey funnel symbol for CustomBlocker in the extensions area and then click on the 'New Rule for this Site' text.

4a Change the rule's name to some thing meaningful - I chose P2PIF Blocked Threads
4b Ensure the 'Target Sites' URL section is as below - you may need to enter the box and scroll to the end to see the full URL
4c In 'Elements to Hide, click on the XPath option and copy / paste the text from below into the available box. If successful, you should see the number to the left change from 0 to 15 (there are 15 posts on a page) and all the posts will turn grey-ish.
4d In the Conditions section, ensure 'Filter with Keywords' is selected and enter an appropriate key word or phrase. For example, I have chosen "covid" and "brexit" (the quotes aren't needed) so any threads including those words in the thread's title will be hidden on the page. NB: remember to click 'Add' to ensure each keyword is captured.
4e In the Search Range area, ensure the CSS option is selected and enter the text from below into the box. As above, the number to the left of the box should change to 15.
4f The completed form should look like this:

5. Click on 'Test' and any posts matching a keyword should turn a darker grey.
6. Click on 'Save'. A yellowy confirmation box should appear at the bottom of the form
7. Click on 'Close' and the form should disappear. The CustomBlocker's funnel icon should now appear in colour as there is an active rule relating to that webpage.
8. Refresh the page and the posts from any unwanted threads will be hidden; a value showing the number of posts which have been hidden will appear against the funnel icon.
It can make quite a difference. Below are side-by-side 'before' and 'after' pics from when I first started playing around with this.

It's probably possible to replicate the above using different combinations of browser and whatever the equivalent extension / addin might be. Happy to take a look if anyone has a particular (Windows 10) browser they want investigating or answer any questions about the solution above.
I find it useful but appreciate not everyone wants or needs it.
The forum software (ProBoards) doesn't natively offer that feature so it was necessary to get a little creative. My browser of choice on PC (where I do 90% of my browsing) is Google's Chrome so I went looking for a Chrome Extension that might help. I'm by no means a programmer or web designer, but I am just about familiar enough with web-page construction to know that pages are constructed with 'blobs' of code referred to as 'elements' and, if identified correctly, these can be targeted and manipulated - including being hidden. A number of options presented themselves but, so far, I've only found one which allows for elements to be variably selected when keywords are matched: CustomBlocker
Here's what I did on my setup - latest version of Chrome on a Windows 10 PC.
1. Install the CustomBlocker extension from the Chrome web store
2. Pin the extension's shortcut to the extensions area of the toolbar - click on the jigsaw icon toward the top right corner of Chrome and then click on the pin for CustomBlocker to turn it blue.

3. Go to the Recent Posts page and click on the dark-grey funnel symbol for CustomBlocker in the extensions area and then click on the 'New Rule for this Site' text.

4a Change the rule's name to some thing meaningful - I chose P2PIF Blocked Threads
4b Ensure the 'Target Sites' URL section is as below - you may need to enter the box and scroll to the end to see the full URL
https://p2pindependentforum.com/posts/recent
4c In 'Elements to Hide, click on the XPath option and copy / paste the text from below into the available box. If successful, you should see the number to the left change from 0 to 15 (there are 15 posts on a page) and all the posts will turn grey-ish.
//TD[contains(concat(" ",normalize-space(@class)," "),"unblocked")]
4d In the Conditions section, ensure 'Filter with Keywords' is selected and enter an appropriate key word or phrase. For example, I have chosen "covid" and "brexit" (the quotes aren't needed) so any threads including those words in the thread's title will be hidden on the page. NB: remember to click 'Add' to ensure each keyword is captured.
4e In the Search Range area, ensure the CSS option is selected and enter the text from below into the box. As above, the number to the left of the box should change to 15.
A.thread-link
4f The completed form should look like this:

5. Click on 'Test' and any posts matching a keyword should turn a darker grey.
6. Click on 'Save'. A yellowy confirmation box should appear at the bottom of the form
7. Click on 'Close' and the form should disappear. The CustomBlocker's funnel icon should now appear in colour as there is an active rule relating to that webpage.
8. Refresh the page and the posts from any unwanted threads will be hidden; a value showing the number of posts which have been hidden will appear against the funnel icon.
It can make quite a difference. Below are side-by-side 'before' and 'after' pics from when I first started playing around with this.

It's probably possible to replicate the above using different combinations of browser and whatever the equivalent extension / addin might be. Happy to take a look if anyone has a particular (Windows 10) browser they want investigating or answer any questions about the solution above.
I find it useful but appreciate not everyone wants or needs it.