Filtering Active Topics

Discussion related to board management, suggestions for improvement, and formal announcements.
Post Reply
ricks03
Orc
Posts: 30
Joined: Sun Sep 21, 2014 8:29 pm
Gender: male
Contact:

Filtering Active Topics

Post by ricks03 »

I usually use Active Topics as a quick way to see recent posts.

If there a way to see Active Topics, but also quickly filtering them for a particular subforum?

Thanks.

User avatar
Big Mac
Giant Space Hamster
Posts: 26511
Joined: Sun Jun 15, 2008 3:52 pm
Gender: male
Location: London UK
Contact:

Re: Filtering Active Topics

Post by Big Mac »

I don't think so, but that's a good question.

Maybe it's possible to hack the URL from a "Search this forum" search and the URL that "Active topics" generates to get a URL that does both things.

EDIT: So Active topics uses this URL:

Code: Select all

http://www.thepiazza.org.uk/bb/search.php?search_id=active_topics
It's the "search_id=active_topics" doing the work there.

And here is a search for a random word ("Greyspace") in a random forum ("Greyhawk"):

Code: Select all

http://www.thepiazza.org.uk/bb/search.php?keywords=Greyspace&terms=all&author=&fid%5B%5D=11&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search
Now I just happen to know that Greyhawk is forum number 11 so the "&fid%5B%5D=11" must be the bit filtering that type of search for just Greyhawk results.

Sticking those two attributes together (the first one gets a "?" and the rest get a "&" we get this:

Code: Select all

http://www.thepiazza.org.uk/bb/search.php?search_id=active_topics&fid%5B%5D=11
So here is a link to search for active Greyhawk topics. It only seems to return one result, sadly. ;(

A search for active Mystara topics gives you 20 results, while a search for active Spelljammmer topics gives you 5 results.

Those numbers are probably going to go up and down over time.

You will have to hack your own URLs. If you want to work out the forum IDs, hover over the name of the forum, and look at the "f=??" bit in the URL.

Quicklinks also gives us a search for "Unanswered topics" (Where you can find 40 pages of Piazza members who need your replies.)

Let's see if we can do a search for unanswered Mystara topics or a search for unanswered Spelljammmer topics, by using the same URL hacking method.

PRE-POST EDIT: Nope. I can't get that to work. It only seems to work with Active topics. But the forum names do come up and you can do a CTRL+F search (CMD+F on a Mac) to jump directly to all the topics on each page that are from one specific forum (if you wanted to trawl through 40 pages of unloved topics and help all the fans of one specific thing that you are a fan of).
David "Big Mac" Shepheard
Please join The Piazza's Facebook group, The Piazza's Facebook page and follow The Piazza's Twitter feed so that you can stay in touch.
Spelljammer 3E Conversion Project - Spelljammer Wiki - The Spelljammer Image Group.
Moderator of the Spelljammer forum (and administrator). My moderator voice is green.

User avatar
Ashtagon
Hierarch
Posts: 3909
Joined: Thu May 22, 2008 5:45 pm
Gender: female
Location: Hillvale, Isle of Dawn
Contact:

Re: Filtering Active Topics

Post by Ashtagon »

If you want to see active topics for a single board (eg "Mystara"), it's as simple as clicking over to that board.

If you want to see a list of all active topics for a board and every board underneath that board in the 'tree', well, that's a non-trivial problem.
Emma Rome, otherwise known as Ashtagon
Image
Overall site admin for The Piazza. My moderator colour is pink!

User avatar
Tim Baker
Axe Beak
Posts: 3410
Joined: Tue Jan 19, 2016 7:51 am
Gender: male
Location: United States
Contact:

Re: Filtering Active Topics

Post by Tim Baker »

I understand that there are limitations to the forum software that we're using, but there are definitely some quality of life improvements that I'd enjoy if you're ever considering an evaluation of replacement systems/upgrades. In the meantime, I've been pleased with the ability of GreaseMonkey to do some browser-side filtering. I still have to navigate page by page, but it makes the process more efficient.

User avatar
Tim Baker
Axe Beak
Posts: 3410
Joined: Tue Jan 19, 2016 7:51 am
Gender: male
Location: United States
Contact:

Re: Filtering Active Topics

Post by Tim Baker »

Big Mac wrote:
Wed Jun 03, 2020 9:48 pm
Quicklinks also gives us a search for "Unanswered topics" (Where you can find 40 pages of Piazza members who need your replies.)

Let's see if we can do a search for unanswered Mystara topics or a search for unanswered Spelljammmer topics, by using the same URL hacking method.

PRE-POST EDIT: Nope. I can't get that to work. It only seems to work with Active topics. But the forum names do come up and you can do a CTRL+F search (CMD+F on a Mac) to jump directly to all the topics on each page that are from one specific forum (if you wanted to trawl through 40 pages of unloved topics and help all the fans of one specific thing that you are a fan of).
I was able to get this method to work for Greyhawk. Interestingly, it includes the sub-forums of Greyhawk as well, whereas the Active Topics filter did not.

Looks like it works for Mystara and Spelljammer, too.

User avatar
Tim Baker
Axe Beak
Posts: 3410
Joined: Tue Jan 19, 2016 7:51 am
Gender: male
Location: United States
Contact:

Re: Filtering Active Topics

Post by Tim Baker »

Ashtagon wrote:
Wed Jun 03, 2020 10:11 pm
If you want to see a list of all active topics for a board and every board underneath that board in the 'tree', well, that's a non-trivial problem.
I was able to get that to work using the 'sc=1' parameter. Thus for Mystara and its sub-forums, you can get the Active Topics.

ricks03
Orc
Posts: 30
Joined: Sun Sep 21, 2014 8:29 pm
Gender: male
Contact:

Re: Filtering Active Topics

Post by ricks03 »

No, the reverse. I want to see active topics EXCEPT a particular forum(s).

User avatar
Big Mac
Giant Space Hamster
Posts: 26511
Joined: Sun Jun 15, 2008 3:52 pm
Gender: male
Location: London UK
Contact:

Re: Filtering Active Topics

Post by Big Mac »

Tim Baker wrote:
Sat Jun 06, 2020 1:22 am
I understand that there are limitations to the forum software that we're using, but there are definitely some quality of life improvements that I'd enjoy if you're ever considering an evaluation of replacement systems/upgrades. In the meantime, I've been pleased with the ability of GreaseMonkey to do some browser-side filtering. I still have to navigate page by page, but it makes the process more efficient.
There are a few server-side script creators (including a company that built an interface that allows searching of multiple phpBB forums), but we only install things that come from developers who submit their modifications to phpBB for testing and approval.

(Maybe one day, I'll learn enough php programming to be able to create and support my own code modules.)
David "Big Mac" Shepheard
Please join The Piazza's Facebook group, The Piazza's Facebook page and follow The Piazza's Twitter feed so that you can stay in touch.
Spelljammer 3E Conversion Project - Spelljammer Wiki - The Spelljammer Image Group.
Moderator of the Spelljammer forum (and administrator). My moderator voice is green.

User avatar
Big Mac
Giant Space Hamster
Posts: 26511
Joined: Sun Jun 15, 2008 3:52 pm
Gender: male
Location: London UK
Contact:

Re: Filtering Active Topics

Post by Big Mac »

Tim Baker wrote:
Sat Jun 06, 2020 1:26 am
Big Mac wrote:
Wed Jun 03, 2020 9:48 pm
Quicklinks also gives us a search for "Unanswered topics" (Where you can find 40 pages of Piazza members who need your replies.)

Let's see if we can do a search for unanswered Mystara topics or a search for unanswered Spelljammmer topics, by using the same URL hacking method.

PRE-POST EDIT: Nope. I can't get that to work. It only seems to work with Active topics. But the forum names do come up and you can do a CTRL+F search (CMD+F on a Mac) to jump directly to all the topics on each page that are from one specific forum (if you wanted to trawl through 40 pages of unloved topics and help all the fans of one specific thing that you are a fan of).
I was able to get this method to work for Greyhawk. Interestingly, it includes the sub-forums of Greyhawk as well, whereas the Active Topics filter did not.

Looks like it works for Mystara and Spelljammer, too.
Nice!

I wonder why it wouldn't work for me before. Maybe I made a copy and paste error with the URL I was trying to hack.

If I ever get caught up with admin stuff here, and my personal projects, and have nothing better to do, I might go looking for unloved topics to bump. ;)
David "Big Mac" Shepheard
Please join The Piazza's Facebook group, The Piazza's Facebook page and follow The Piazza's Twitter feed so that you can stay in touch.
Spelljammer 3E Conversion Project - Spelljammer Wiki - The Spelljammer Image Group.
Moderator of the Spelljammer forum (and administrator). My moderator voice is green.

User avatar
Big Mac
Giant Space Hamster
Posts: 26511
Joined: Sun Jun 15, 2008 3:52 pm
Gender: male
Location: London UK
Contact:

Re: Filtering Active Topics

Post by Big Mac »

ricks03 wrote:
Mon Jun 08, 2020 7:13 am
No, the reverse. I want to see active topics EXCEPT a particular forum(s).
Go to Advanced Search, hold down your shift button, and click all the forums you are interested in searching.

Do a search there.

Then copy out the bit of the URL you have generated to search all the forums you are interested in, and hack that part of the URL into the place where the active forum is added onto the example URLs above.

Let us know if it worked.

Post the URLs you are getting, and creating, if you get stuck.
David "Big Mac" Shepheard
Please join The Piazza's Facebook group, The Piazza's Facebook page and follow The Piazza's Twitter feed so that you can stay in touch.
Spelljammer 3E Conversion Project - Spelljammer Wiki - The Spelljammer Image Group.
Moderator of the Spelljammer forum (and administrator). My moderator voice is green.

User avatar
shesheyan
Cardboard Hero
Posts: 3038
Joined: Tue Feb 23, 2010 3:58 pm
Gender: male
Location: Montreal

Re: Filtering Active Topics

Post by shesheyan »

TORG has been getting a lot of activity lately, which is great, but it does make using the one button Active Topic menu less useful if you have no interest in that specific game. Forum growing pains! :lol: :lol: :lol:

ricks03
Orc
Posts: 30
Joined: Sun Sep 21, 2014 8:29 pm
Gender: male
Contact:

Re: Filtering Active Topics

Post by ricks03 »

Big Mac wrote:
Mon Jun 08, 2020 2:42 pm
ricks03 wrote:
Mon Jun 08, 2020 7:13 am
No, the reverse. I want to see active topics EXCEPT a particular forum(s).
Go to Advanced Search, hold down your shift button, and click all the forums you are interested in searching.

Do a search there.

Then copy out the bit of the URL you have generated to search all the forums you are interested in, and hack that part of the URL into the place where the active forum is added onto the example URLs above.

Let us know if it worked.

Post the URLs you are getting, and creating, if you get stuck.
That's clever, so I tried that. I get nothing back because keyword and author are blank. A "*" doesn't work because it requires 3 characters. (and yes, tried "***" :-)

User avatar
Tim Baker
Axe Beak
Posts: 3410
Joined: Tue Jan 19, 2016 7:51 am
Gender: male
Location: United States
Contact:

Re: Filtering Active Topics

Post by Tim Baker »

Here's a TamperMonkey script that I wrote for exactly this use case.

Code: Select all

// ==UserScript==
// @name         UNWANTED Blocker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Filter rows from The Piazza's Active Topics, based on the name of a particular forum ("UNWANTED" below).
// @author       Tim Baker
// @match        http://www.thepiazza.org.uk/bb/search.php?search_id=active_topics*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // One line is all you need.
    $("a[href='./viewforum.php?f=XX']:contains('UNWANTED')").parents(".row-item").hide();

})();
I intentionally wrote it to only apply to the first page of the Active Topics. I generally check these out daily, so if I was scrolling to subsequent pages, I didn't mind seeing the complete results. This allowed me to easily go back a page and then return to the first page (using the "Next" and "Previous" links) to see what I'd filtered out. You can modify the "@match" parameter to be more inclusive if you'd prefer to always filter a particular forum.

Also note that I only wanted to filter a single forum, so I kept the script super simple. In my example above, I'm calling it "UNWANTED" to avoid actually using a forum's name. You'll need to replace that term with the name of the forum. You'd need to do a little work to filter out more than one.

You'll need to install the TamperMonkey browser extension for your browser of choice (e.g., Chrome or Firefox).

UPDATE: I forgot to mention that you'll also need to replace the "XX" above with the forum ID for the forum you want to filter. I added both to make sure I didn't filter any future forums that might contain the forum name as a substring or something unexpected like that.
Last edited by Tim Baker on Mon Jun 22, 2020 4:24 am, edited 1 time in total.

User avatar
Big Mac
Giant Space Hamster
Posts: 26511
Joined: Sun Jun 15, 2008 3:52 pm
Gender: male
Location: London UK
Contact:

Re: Filtering Active Topics

Post by Big Mac »

ricks03 wrote:
Mon Jun 08, 2020 5:59 pm
Big Mac wrote:
Mon Jun 08, 2020 2:42 pm
ricks03 wrote:
Mon Jun 08, 2020 7:13 am
No, the reverse. I want to see active topics EXCEPT a particular forum(s).
Go to Advanced Search, hold down your shift button, and click all the forums you are interested in searching.

Do a search there.

Then copy out the bit of the URL you have generated to search all the forums you are interested in, and hack that part of the URL into the place where the active forum is added onto the example URLs above.

Let us know if it worked.

Post the URLs you are getting, and creating, if you get stuck.
That's clever, so I tried that. I get nothing back because keyword and author are blank. A "*" doesn't work because it requires 3 characters. (and yes, tried "***" :-)
Just stick some random garbage in there.

Here is a search for "getridofthis" in all the subforums of the Forgotten Realms forum:

Code: Select all

http://www.thepiazza.org.uk/bb/search.php?keywords=getridofthis&terms=all&author=&fid%5B%5D=7&fid%5B%5D=38&fid%5B%5D=39&fid%5B%5D=50&fid%5B%5D=74&fid%5B%5D=109&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search
So the bit out of there, that we need to copy out is all the "fid" stuff. ("fid" = "forum ID")

So if I take the hacked link, from before for unanswered Spelljammer topics, I have this:

Code: Select all

http://www.thepiazza.org.uk/bb/search.php?search_id=unanswered&fid%5B%5D=2
If I throw away the Spelljammer bit ("&fid%5B%5D=2") and copy in those various "fid" bits from the garbage search I did, I get this:

Code: Select all

http://www.thepiazza.org.uk/bb/search.php?search_id=unanswered&fid%5B%5D=7&fid%5B%5D=38&fid%5B%5D=39&fid%5B%5D=50&fid%5B%5D=74&fid%5B%5D=109
So this new hacked together link should be a search for unanswered Al-Qadim, Kara-Tur, Maztica, Arcane Age, The Horde and Malatra: The Living Jungle topics. :)
David "Big Mac" Shepheard
Please join The Piazza's Facebook group, The Piazza's Facebook page and follow The Piazza's Twitter feed so that you can stay in touch.
Spelljammer 3E Conversion Project - Spelljammer Wiki - The Spelljammer Image Group.
Moderator of the Spelljammer forum (and administrator). My moderator voice is green.

ricks03
Orc
Posts: 30
Joined: Sun Sep 21, 2014 8:29 pm
Gender: male
Contact:

Re: Filtering Active Topics

Post by ricks03 »

The solution bonus goes to Tim Baker - thanks! Based filtering OUT things, inside of filtering IN things. Solves exactly what I need to solve, in the way I'd like to solve it.

thanks to everyone else for the assist.

ricks03
Orc
Posts: 30
Joined: Sun Sep 21, 2014 8:29 pm
Gender: male
Contact:

Re: Filtering Active Topics

Post by ricks03 »

One note - it doesn't appear to work when the page first load, but works on a manual refresh. Close enough.

Updating the @match value to: search.php?*search_id=active_topics* makes it work on all the Active Topics pages instead of just the first one, which is what I prefer.

Great soln.
Last edited by ricks03 on Wed Jun 24, 2020 3:05 pm, edited 1 time in total.

User avatar
Tim Baker
Axe Beak
Posts: 3410
Joined: Tue Jan 19, 2016 7:51 am
Gender: male
Location: United States
Contact:

Re: Filtering Active Topics

Post by Tim Baker »

ricks03 wrote:
Tue Jun 23, 2020 4:36 pm
Updating the @match value to: search.php?*search_id=active_topics* makes it work on all the Active Topics pages instead of just the first one, which is what I prefer.

Great soln.
Thanks! I'm so glad this was helpful to someone else. :)

ricks03
Orc
Posts: 30
Joined: Sun Sep 21, 2014 8:29 pm
Gender: male
Contact:

Re: Filtering Active Topics

Post by ricks03 »

since I just had to reimplement my mods due to a browser crash, I figured I'd store my full code here for anyone else who might want it (It removes all the TORG posts from the display). It still (for some reason) requires a page refresh.

Code: Select all

// ==UserScript==
// @name         UNWANTED Blocker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Filter rows from The Piazza's Active Topics, based on the name of a particular forum ("UNWANTED" below).
// @author       Tim Baker
// @match        http://www.thepiazza.org.uk/bb/search.php?*search_id=active_topics*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // One line is all you need.
    $("a[href='./viewforum.php?f=112']:contains('TORG')").parents(".row-item").hide();

})();

Post Reply

Return to “The Kippin' Griffin”