Ignore Topics/Mark as Read all the time/Unsubscribe topic

Started by Adish - (F.L.A.M.E.R), April 09, 2010, 10:35:23 PM

Previous topic - Next topic

wynnyelle

My members want this badly, as we are a forum with millions of posts.

thernlund

I've had users asking for this functionality, and happened upon Arantor's hack, and this thread.  I know I'm about a year late to this.  But some thoughts crossed my mind reading over this thread.

I don't think this is as inelegant as some think.  Sure, it's a retrofit, but it does the job with little fuss.  How many forums are going to have 2bill+ posts?  And besides, if that number is actually hit, you have other problems to contend with anyway, no?  Then, it seems to me that it'd be really easy to list these ignored topics by simply querying for 2147483646 in the log_topics table under the member id.

But I digress.... 

Quote from: (F.L.A.M.E.R) on September 19, 2011, 08:09:56 AM
Please feel free to provide us with your ideas so that the best possible way is implemented.

Now bear with me on this, as I haven't looked at ALL the code.  This is just conceptual (and may even have been mentioned already elsewhere and I haven't seen it)...

I read someone say that this hack assumes equivalence between ignored and unread, and described an example issue.  Alright then.  How about slightly different approach.  What about adding a column to log_topics?  A flag to ignore?  Default is off (or that could be a profile option).  Then if someone clicks ignore, that flag is set.  Then adjust the various queries involved to either account for or dismiss that flag as required by the given task?  This leaves the last unread post intact, but provides for an option to ignore depending on what is being queried for.

From the user's point of view, this is effectively "Unsubscribe".

Someone more familiar with the code can address this idea or shoot it down.  It'd take me some time to get up to speed on it and turn concept into practice (which I will do, but I won't be up on it any time soon).


-T.

Arantor

QuoteI read someone say that this hack assumes equivalence between ignored and unread, and described an example issue.  Alright then.  How about slightly different approach.  What about adding a column to log_topics?

You'd have to apply my hack on top anyway because log_topics is otherwise pruned when you mark a given board read, which means if you're already accepting the performance hit of doing that (which is one of the reasons it's a hack), you don't really want any further performance hit attached to querying which is where this will go.

I won't go into the exact details but suffice to say that you can't shove an index on a column that has two values, the actual performance effort on maintaining said index will outweigh the benefit you would get out of it.

The second problem is to understand exactly where this 'unsubscribe' is really needed. If it's primarily for unread replies, the solution is to gut how it's currently done, and instead make a log of 'I replied to this topic, log this for later', which would make unread replies faster than the current solution (even taking into account the participation index), plus allow for tracking people being unsubscribed by nature to a topic to which they have replied.

thernlund

I see.  I hadn't accounted for the log being pruned.  Hmm.


-T.

Arantor

Yup, that was one of the problems I encountered when figuring it out originally - and IIRC I put some code in the hack to avoid that purging having that exact effect but it's... been a while.

Advertisement: