www.ptscoffee.com: without the love, it's just coffee

Ignore This Thread

Postby cafeIKE on Fri Mar 23, 2007 8:15 pm

Would be most useful to exclude some threads from View Unread
User avatar
cafeIKE
 
Posts: 2905
Joined: Jun 27, 2006
Location: Woodland Hills, CA

Postby HB on Sat Mar 24, 2007 8:34 am

I didn't find any previously coded phpBB mods for ignoring threads. Ignoring selected users, yes. I've thought of adding forum-based filtering, would that help?
Dan Kehn
User avatar
HB
 
Posts: 12666
Joined: Apr 29, 2005
Location: Cary, NC

Postby cafeIKE on Sun Mar 25, 2007 8:02 pm

I've thought of adding forum-based filtering, would that help?

Dunno...

The previous solution, del.icio.us, you recommended to my request is so brilliant that I'm sure you'll provide something equally stunning.

Thanks for the great forum.
User avatar
cafeIKE
 
Posts: 2905
Joined: Jun 27, 2006
Location: Woodland Hills, CA

Postby HB on Sun Mar 25, 2007 9:17 pm

In terms of filtering, I think along the lines of filtering entire forums (e.g., if you're not a homeroaster, you may choose to skip all posts in that forum), or filtering/highlighting particular users. phpBB 3.0 has the notion of "friends and foes"; you can select board members whose posts will have special highlighting so you won't miss them, and others whose posts will not be shown (the same feature prevents said persons from sending you PMs).

I really like the remembered unread topics because I can never read all posts in one sitting (before this modification, all topics were marked as read on logout). One drawback is that you must explicitly request topics be marked unread, which can be tiresome if there's an entire forum you wish to "ignore".

I'll keep this one in mind while I follow how well phpBB V3's release candidates progress.
Dan Kehn
User avatar
HB
 
Posts: 12666
Joined: Apr 29, 2005
Location: Cary, NC

Postby cafeIKE on Wed Jan 20, 2010 1:26 am

Bump. :x :evil: :twisted:

Would be most useful to exclude some threads from View EVER !!!

Top current candidate How many tampers do you own?
User avatar
cafeIKE
 
Posts: 2905
Joined: Jun 27, 2006
Location: Woodland Hills, CA

Postby geoffbeier on Wed Jan 20, 2010 6:41 pm

I've considered this before, but never been so annoyed as to act. Seeing this thread made me think of it again, and it's actually not too hard to address this in your browser, assuming you're using firefox with greasemonkey or some compatible way of running userscripts. (I've heard that there are compatible things for other browsers but I've never investigated.)

To start with, here's my script:
// ==UserScript==
// @name           H-B Helper
// @namespace      geoff.mollyandgeoff.com
// @description    Topic ignore feature for home-barista. Based on PhpBB enhancer from Alekc (http://userscripts.org/scripts/show/57924)
// @author         geoff@mollyandgeoff.com
// @version        1.0.1
// @include        http://www.home-barista.com/*
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==

var phpbb_prefs;
var debug = false;

debugLog("Begin userscript execution");

jQuery(document).ready(function() {
   try{
   debugLog("Ready");
    if (jQuery("body#phpbb").length != 1){
      debugLog("This isn't even a phpBB forum.");
        return false;
    }
   
   debugLog("Initializing JQuery");
    var $j = jQuery.noConflict();
    var regex = /t=(\d+)/g;

   debugLog("Loading blocked thread list");
    phpbb_prefs = eval(GM_getValue("hb_helper_prefs" + jQuery(document).attr("domain"),{hiddenTopics:{}}));
    GM_log(phpbb_prefs.toSource());

   debugLog("Searching for threads");
    $j("li.row").each(function(){
        var topicId = $j(this).find("a.topictitle").attr("href").match(/t=(\d+)/);
        if(topicId == null) {
           topicId = $j(this).find("a.topictitle").attr("href").match(/-t(\d+)\.html/);
      }
        debugLog(topicId);
        if (phpbb_prefs.hiddenTopics[topicId[1]] == true){           
            $j(this).hide();
        } else {
            $j(this).find("dt").css("position","relative").append("<div style='position:absolute;top:0px;right:0px;'><a class='pbe' href='" + topicId[1] + "' title=\"Ignore this thread\">[x]</a></div>");
        }
    });

    $j("a.pbe").click(function(e){
        try{
            $j(this).parents("li").hide("slow");

            phpbb_prefs.hiddenTopics[$j(this).attr("href")] = true;
            GM_setValue("hb_helper_prefs" + jQuery(document).attr("domain"), phpbb_prefs.toSource());
        } catch (err){GM_log(err.toSource());}
        return false;
    });
   } catch (err){GM_log("Fatal exception inspecting topic:" + err.toSource());}
});

function debugLog(msg){
   if (debug){
      GM_log("H-B Helper: " + msg);
   }
}

Edit: minor revision to make description/credit clearer, add tooltip to "x" on topics

It's completely derived from this script, with a few changes. Main changes: accommodate specific differences between the author's target and H-B, a couple changes to help me understand the script, log messages -> english, and not require an image from some 3rd party server in order to run. I also chose a new namespace so anyone running this and the original won't see a conflict and changed the authorship info (leaving in a credit) so anyone who looks for help won't bother the original author with my changes.

For ease of installation, I've placed a copy of the above on my server. Users with greasemonkey installed can click here to install the script. Obviously, inspect the source. It's the same as what I posted in this post. You can also copy and paste that into a file that ends in .user.js then open it in firefox to install from a local source if that makes you more comfortable. (Dan, if you want to host a copy locally, let me know and I'll edit this post to point to your copy instead.)

Once installed, topic listings will look like this:
Image
Clicking that new little X will cause the topic to disappear and prevent it from being listed in future visits (from the same browser, anyway).

Hidden topics are stored locally in your user preferences for Firefox. If you've hidden one in error, or just want to clear out your list, you can enter "about:config" in your location bar, click through the warning about voiding your warranty, filter on hb_helper and edit the list.
Image

It's also completely safe to right-click that value and choose "reset" to unblock all topics.

Let me know if you find this useful, think it's a terrible idea, see any bugs or just have any suggestions. And please report don't bother the original author about anything; it's practically certain that any bugs here are mine, not his 8)
geoffbeier
 
Posts: 141
Joined: Apr 08, 2009
Location: Arlington, VA

Postby cafeIKE on Thu Jan 21, 2010 12:52 pm

Awesome !!!

When I get back to LA, going to implement ASAP

10^6 thanks
User avatar
cafeIKE
 
Posts: 2905
Joined: Jun 27, 2006
Location: Woodland Hills, CA

Postby jannar85 on Wed Aug 04, 2010 2:41 pm

Hi. Just wanted to say thanks for that script. It works good on other forums too. But you know why some boards don't have the x ? Is there anything wrong with the script?

For the bumping, sorry. I just wanted to show some appreciation.
jannar85
 
Posts: 1
Joined: Aug 04, 2010
Location: Norway

Postby miKe mcKoffee on Sun Aug 08, 2010 5:51 pm

Nothing to add, just NOT Ignoring This Thread! :D (While taking a break from taste testing some new espresso blends under development....)
Mike McGinness, Head Bean (Owner/Roast Master)
http://www.CompassCoffeeRoasting.com
miKe mcKoffee
 
Posts: 1356
Joined: Jun 03, 2005
Location: Vancouver, WA, USA

Postby geoffbeier on Thu Aug 12, 2010 9:42 pm

jannar85 wrote:Hi. Just wanted to say thanks for that script. It works good on other forums too. But you know why some boards don't have the x ? Is there anything wrong with the script?

For the bumping, sorry. I just wanted to show some appreciation.


Glad you like it. I'll send you a PM about the other boards so we don't keep bumping this thread with offtopic discussion :)
geoffbeier
 
Posts: 141
Joined: Apr 08, 2009
Location: Arlington, VA


Return to News and Suggestion Box