Is there a way to filter forums?

Discuss technical problems and features here
Ari
Yellow Belt
Posts: 54
Joined: Tue Feb 09, 2016 10:37 am
Location: Gothenburg, Sweden
Languages: Swedish (native), English (loads), French (much), Spanish (much), Cantonese (fair), Mandarin (fair), Portuguese (a lot), German (mostly passive), Italian (mostly passive), Japanese (beginner).
x 159

Is there a way to filter forums?

Postby Ari » Mon Feb 15, 2016 3:57 pm

On some forums I've been on there have been ways of marking some subforums as "favorites" and display the latest posts from these, or choosing not to display posts from certain forums in lists of active topics. I don't have a language learning log and I have no interest in reading those of others, but they take up a LOT of the posts, making it difficult for me to spot the topics I'm interested in. Am I missing a functionality or is this something that's not possible on the site today?

Great work on this place, by the way. I was away from HTLAL for a long time and returning I found this place and it's great. My hat is off to those who have put down the hours to build it!
0 x

User avatar
AlexTG
Green Belt
Posts: 299
Joined: Sat Jul 18, 2015 12:14 pm
Location: Tasmania, Australia
Languages: Easy to Read: English(N), French, Spanish
Able to Read: German, Latin
Learning to Read: Japanese, Hindi/Urdu
x 537

Re: Is there a way to filter forums?

Postby AlexTG » Tue Feb 16, 2016 8:25 am

There's no way to do it right now. And there's no phpbb plugins that do it that I could find. But I hacked up a user script which does. If you've never used userscripts before, install tampermonkey on your browser, then click "new script" and past the code in there. It filters out both log threads and challenge threads. There's a tick box next to the search so you can flick them back on temporarily.

Code: Select all

// ==UserScript==
// @name       Hide Language Logs from Active Topics on Language Leaners Forum
// @version    1.0
// @description  Hide Language Logs from Active Topics on Language Leaners Forum
// @match     http://forum.language-learners.org/search.php?*search_id=active_topics*
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js
// ==/UserScript==

var showLogs = false;

function toggleLogs() {
    $('.row').each( function () {
       if($("[href*='./viewtopic.php?f=15']", this).length > 0 || $("[href*='./viewtopic.php?f=21']", this).length > 0) {
               $(this).toggle();
       }
    });
}

toggleLogs();

var showLogs = $("<form><input type='checkbox' name='showlogs' value='false'></input></form>");

$('.search-box').after(showLogs);
showLogs.find("input").change(function () {
    toggleLogs();
});
2 x


Return to “Technical Support and Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests