Advertisement:
Advertise With Us!

Author Topic: Ignore Topics/Mark as Read all the time/Unsubscribe topic  (Read 47401 times)

Offline wynnyelle

  • SMF Hero
  • ******
  • Posts: 2,530
    • Warrior Cats RPG
Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
« Reply #100 on: December 05, 2011, 09:42:44 PM »
My members want this badly, as we are a forum with millions of posts.

Offline Superflu

  • Semi-Newbie
  • *
  • Posts: 27
Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
« Reply #101 on: October 23, 2012, 05:57:22 PM »
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.... 

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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 63,352
Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
« Reply #102 on: October 23, 2012, 06:10:45 PM »
Quote
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?

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.
And his eyes have all the seeming of a demon's that is dreaming,
And the lamp-light o'er him streaming throws his shadow on the floor

Offline Superflu

  • Semi-Newbie
  • *
  • Posts: 27
Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
« Reply #103 on: October 23, 2012, 06:24:06 PM »
I see.  I hadn't accounted for the log being pruned.  Hmm.


-T.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 63,352
Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
« Reply #104 on: October 23, 2012, 06:30:28 PM »
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.
And his eyes have all the seeming of a demon's that is dreaming,
And the lamp-light o'er him streaming throws his shadow on the floor