Simple Machines Community Forum

SMF Development => Feature Requests => Next SMF Discussion => Topic started by: Adish - (F.L.A.M.E.R) on April 09, 2010, 10:35:23 PM

Title: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 09, 2010, 10:35:23 PM
With about a million topics arising at various SMF forums every day, not everyone likes to go back to the topics they have posted, everytime it gets updated. Once their job to look into it is done, they no longer wish to see it in their "Show new replies to your posts" or "Show new replies to your posts".

It becomes really annoying to look into a topic something related to reviews, suggestion or support topic again and again whenever it gets bumped after your own issue is sorted and the input is added.

Take an example of the modifications support topics in SMF. We keep on getting the links in our "Show new replies to your posts" and "Show new replies to your posts" every time a new user posts in. After we get our solution, we no longer are interested in what actually goes in there.

What I would like is any of these functionality that can do the job:

Is there anything as such in development? A modification that can be brought out by SMF or someone else? Maybe add it as a feature for SMF 2.1 ?

More Ideas are welcomed, I might modify the topic on timely basis so we can look into how much better can this feature get.

Edit: Fixed typos. Lots of mistakes in writing the content. I should have not written this topics when I was sleepy :P
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: flapjack on April 09, 2010, 10:43:02 PM
was asking about such thing the other day, but never made a proper request. consider this seconded :)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: ~DS~ on April 09, 2010, 11:02:45 PM
Was told it was alot of coding and database work. It's sad SMF doesn't have the Subscribe/Unsubscribe feature.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 09, 2010, 11:04:42 PM
Was told it was alot of coding and database work. It's sad SMF doesn't have the Subscribe/Unsubscribe feature.

It is quite essential to have one. It should be developed over the time if it is too much of coding and database work. Its not a bigger project then SMF of course. ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 05:08:56 AM
*whistles innocently*

http://custom.simplemachines.org/mods/index.php?action=search;basic_search=ignore+topics
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 10, 2010, 08:37:13 AM
*whistles innocently*

http://custom.simplemachines.org/mods/index.php?action=search;basic_search=ignore+topics

Can the mod be implemented in SMF please? (Like in this main site, it will be really helpful)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 02:09:05 PM
The reason it can't/won't be implemented here (and this was discussed at length in the team boards) is performance. The mod works but on larger forums (bear in mind, we have 240k or so users here, and best part of two and a half million posts) there starts to be a real performance penalty.

IIRC the mod had a limit by default of ignoring 10 topics. An alternative was posted by me to the mod's support topic.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 10, 2010, 02:18:14 PM
Lets think of an alternative here then. It is a good tool to be used by users who run around a million topics in the forum.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 02:19:46 PM
I DID think of an alternative, I even posted it in the mod's thread as an attachment.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 10, 2010, 02:35:35 PM
Can you like talk about it here? So if they haven't created something which you suggested, there might be other potential coders who might make the mod and it will help SMF implement it.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 02:40:12 PM
Not really, since everything you need to know is covered in the mod's thread and at far greater length in the team boards; trust me, the team KNOW about this and have been asking for it for a long time. karlbenson/vbgamer's mod won't be adopted because of the performance limitations it adds, my mod is a quick hack that solves the problem inelegantly but effectively.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 02:55:13 PM
Oddly enough, I asked for this in one of the team boards, a while back.


I'm sure I miss loads of stuff, wading through language-specific posts and the like.


Good shout, (F.L.A.M.E.R)!
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 02:58:08 PM
Kat, Karl wrote the mod for 2.0 b3, updated it for 2.0 RC1 and it sat in the team boards for ages after without anyone taking it any further because of the performance concerns with it.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 03:03:46 PM
Then get coding one that doesn't!!!  :P
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 03:04:30 PM
I DID think of an alternative, I even posted it in the mod's thread as an attachment.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 03:08:42 PM
Then code a new mod, from scratch!


Slacker!  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.augk18.dsl.pipex.com%2FSmileys%2Fc018.gif&hash=edd6f380fa0021e5ea63ea46e6452358)


No point... It won't be approved before 2012... ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 03:11:09 PM
The one I posted in the mod thread was from scratch, btw... :P
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 03:15:32 PM
Ah, yeah. Not submitted as a mod, in it's own right, though...


You can't fool me, I'm too stupid. ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 03:18:31 PM
No, because 1) it's not finished not that I can bothered to finish it, and 2) I planned it as a paid mod, but given vbgamer updated Karl's for 2.0 RC3, I didn't see the point anyway, hence released it as is.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 03:30:56 PM
See if I care...














(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.augk18.dsl.pipex.com%2FSmileys%2Fc021.gif&hash=d14dbba5bd05e3758a295f9bdb807d67)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 10, 2010, 03:32:47 PM
   (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.augk18.dsl.pipex.com%2FSmileys%2F2-bigerr.gif&hash=6dba9b87b68810eb597857fdbad580b4)

Who is making Kat cry huh!
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 03:34:51 PM
Heh. Don't get me wrong, this is a major feature I'd welcome here (since there are so many topics I no longer want in my unreadreplies, Ad Management mod, nneonneo's shoutbox for starters)

I just don't have any desire to write any more mods, really.


FLAMER: Me cuz I'm such a BAAAAD troll.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 03:36:38 PM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fstfu.jpg&hash=634e112eb3a7d195963183b2ecea941c)


(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.augk18.dsl.pipex.com%2FSmileys%2Frofl6.gif&hash=a10b4ab8776a6e802e88b17158e051ae)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 10, 2010, 03:38:52 PM
Whats the progress in the team board on the implementation of this mod though? Is it just sitting there doing nothing ? Someone should give it a start up. It is really needed!
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 03:43:02 PM
Someone's going to bring it up at the next team meeting, I believe. Not sure, but I think that's tonight, when I'm in bed.


Edit: Having checked at the top of the page, it's in a coupla days.


Ain't teknoligery wunnerful?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 10, 2010, 03:46:06 PM
Someone's going to bring it up at the next team meeting, I believe. Not sure, but I think that's tonight, when I'm in bed.


Edit: Having checked at the top of the page, it's in a coupla days.


Ain't teknoligery wunnerful?

I hope it is implemented soon. The amount of trolling is increasing day by day! :P
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 03:49:52 PM
Oh, we can cut that easily, at a stroke.


We just ban F.L.A.M.E.R.  ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 03:50:58 PM
Whats the progress in the team board on the implementation of this mod though? Is it just sitting there doing nothing ? Someone should give it a start up. It is really needed!

The team implementation is doubtless the one that is the currently available mod. That's been in the board since before I joined the team but no-one wanted to add it here because 1) it's not a core feature in SMF and isn't "vital" for providing support (while Topic Solved arguably is), and 2) the performance cost on a forum this size is immense, which is why my hack solution is actually a winner in its own little, special, way.


Banning FLAMER won't solve the problem, he's not a troll much. No, what you need to do is ban the current public enemy number 42, spam and troll king, user #53626 because he's such a d*ck and a pain and is abusive and never helps anyone and never tires of irritating people.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 10, 2010, 03:51:50 PM
If you ban me, I won't talk to you ever!! :D

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.augk18.dsl.pipex.com%2FSmileys%2Fscratzer.gif&hash=cd4fbdf83654357beef283365d782edc)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 03:55:13 PM
I believe VB updated the mod, for here, didn't he?




Heh... Just considered, for a brief nanosecond, changing my handle to F.A.N.N.Y.


I forgot the England-English meaning, though...
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 03:57:28 PM
He updated it for RC3, but the performance caveats that Karl originally spotlighted are just as apparent. Figuring it out for the board/message index isn't too bad, but on recent topics/unread/unread replies, it will punish a server.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 10, 2010, 03:59:49 PM
Whats the progress in the team board on the implementation of this mod though? Is it just sitting there doing nothing ? Someone should give it a start up. It is really needed!

The team implementation is doubtless the one that is the currently available mod. That's been in the board since before I joined the team but no-one wanted to add it here because 1) it's not a core feature in SMF and isn't "vital" for providing support (while Topic Solved arguably is), and 2) the performance cost on a forum this size is immense, which is why my hack solution is actually a winner in its own little, special, way.


Banning FLAMER won't solve the problem, he's not a troll much. No, what you need to do is ban the current public enemy number 42, spam and troll king, user #53626 because he's such a d*ck and a pain and is abusive and never helps anyone and never tires of irritating people.

There are soo many things that SMF has in its own private lab. It can be done the same way.

I suppose the advertisements it shows is coded for its own special needs. Its not a mod that is made public. Same way the mod site. It is like a download files mod which would be useful for the users in a certain way. Not everything that SMF main site has is made public. It won't need support after it is once made (hopefully) or might be some minor adjustments when the next version of SMF is out. The charter members though are contributing in a good enough amount, I suppose that amount can add in a few gig's of RAM and improve the performance with this mod implemented..
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: ~DS~ on April 10, 2010, 04:02:02 PM
Wait...are you guys talking about the subscribe/unsubscribe feature Vbullentin had?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 10, 2010, 04:03:48 PM
Wait...are you guys talking about the subscribe/unsubscribe feature Vbullentin had?

Somewhat similar as copying a feature from other CMS's is just not original. Doesn't make it one of a kind. ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 04:05:34 PM
Sorta. You know how once you reply in a topic, it's forever in your 'new replies to my posts' page? The mod we're talking about lets you remove a topic from that.

However due to performance limits it lets you only have 10 topics IIRC because of the suddenly scary extra workload involved in not matching topics.

I did a version as posted in that mod's thread that's a hack but allows you to ignore topics (never appear to have replies/never appear as new) without any extra performance cost, but it's ugly.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: ~DS~ on April 10, 2010, 04:08:40 PM
Ugly how?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 04:14:00 PM
Its whole premise is ugly.

When you read a topic, the id of the last message you read (if you're part way through a topic) or another suitably high message id (last posted forumwide) is used to track the 'last' one you've read.

All the mod does is enforce that the value that goes into that column is the highest possible message id, so it will never appear to have new posts since as far as SMF is concerned, the last post you read had id 2147000000 or so (largest number that can be safely used in 32 bit PHP)

Marking it unread will break this behaviour, too, because it'll reset the value of that column, however if you're marking it unread presumably you're unignoring it anyway.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 10, 2010, 05:37:04 PM
Just had a thought...


If I remove my posts from, say, the Highslide topic, will the "Show replies to your posts" thing stop?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 10, 2010, 05:38:55 PM
Yes, they will. I'd argue that unless they're really beneficial they should be left in place though.

Could always ask the admins to reassign them to someone else by resetting id_member from the messages table to 0.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on April 11, 2010, 04:45:56 AM
Oh, if they were a useful contribution, sure.


If it was just saying "Thanks" to a mod creator, it can go. Something like that.


I'll try that, when I can be arsed.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 11, 2010, 05:11:49 AM
/me reads that last post from him, thinks he got the negatives messed up. But yeah, if it's 'thanks' it can go.

Might have to look through that myself actually.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: 青山 素子 on April 11, 2010, 12:58:07 PM
Just had to get this in:

I suppose the advertisements it shows is coded for its own special needs. Its not a mod that is made public.

It's not even a mod. The advertising back end is OpenX (http://www.openx.org/) and the invocation code that it generates is added right into the template file. I believe the most complicated thing is there is a variable a site page can set to change the zone that ads are counted against.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 17, 2010, 07:40:33 AM
Just had to get this in:

I suppose the advertisements it shows is coded for its own special needs. Its not a mod that is made public.

It's not even a mod. The advertising back end is OpenX (http://www.openx.org/) and the invocation code that it generates is added right into the template file. I believe the most complicated thing is there is a variable a site page can set to change the zone that ads are counted against.

Never knew about it. Although I think they have the adverts switching from the personal adverts to the public adverts by OpenX. That is what is custom coded I suppose ?

- Can someone implement some feature like this please. I have my view unread replies flooded literally every day which I currently don't want to view. :(
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: 青山 素子 on April 17, 2010, 12:09:14 PM
Never knew about it. Although I think they have the adverts switching from the personal adverts to the public adverts by OpenX. That is what is custom coded I suppose ?

It's the install of OpenX, not the market. No custom code, even AdSense is delivered through OpenX. The banner on the bottom of each page is hardcoded AdSense code.

/me used to manage all the advertisements.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 17, 2010, 01:52:15 PM
ooohh!!!
I get it now...:)

Thanks for expanding my knowledge over this. Was it fun managing the advertising bit :P ?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: 青山 素子 on April 17, 2010, 11:32:49 PM
Thanks for expanding my knowledge over this. Was it fun managing the advertising bit :P ?

It was interesting at times.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 18, 2010, 12:26:47 PM
Maybe Liroy does it now... seems simple when it is once setup'ed
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Norv on April 19, 2010, 05:43:16 PM
Back to the OP: good idea, methinks.
I didn't see anything from previous implementations/discussions, yet. But it sounds like a very good idea and it'd be worth taking a look at what could be done, as soon as I have some time for this. (which cannot really be soon, I'm afraid)

/me marks the topic with this reply... to be forever in my list, heh.
(start za wars now, so I can hate it! ;D )
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 19, 2010, 06:28:20 PM
How about running Cron while every user logs in? Would that overload the server and burn it into ashes ? ;D
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 19, 2010, 06:53:12 PM
How does running cron when a user logs in come into it?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Norv on April 19, 2010, 07:12:41 PM
By making SMF write into its schedule files that it needs to run in the next minute. *sagenods*
(what I just said is a horrible idea for more reasons including security, btw, I am joking)

And the task to run will be to write into the database the former post as last read, hah. So no matter which is last, it will always magically become unread.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 19, 2010, 07:14:50 PM
I don't get why you need to invoke cron whatsoever. Y'all building a castle to put a coat hanger on.

In vbgamer/Karl's mod's thread I posted a hack that did the same thing with minimal performance pain by making sure the value injected into the last-read was 2147000000 or so ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on April 19, 2010, 07:15:17 PM
ehh, i thought over about it, it doesn't really work the way I thought.

Below is the idea:

Well, if we are implementing something like, 'Mark specific topics as read', users can put in topic ID in a field and every time the user logs in, a cron job is ran which would mark the topic as read if they are updated. But the bad thing is, if the topic gets updated after we login, it will then show up. There could be a way to mark it as read until they logout. (Maybe constant queries being ran in the background, but this will really burn the MySQL server into ashes) After they logout, the cron job will no longer run and the queries being ran in the background will stop.

The next time they login, the same cycle continues.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 19, 2010, 07:18:23 PM
Let me explain how SMF tracks new replies.

When you read a topic the id of the last message you read (or the highest msg id on the forum if it's the last page) is inserted into the log of read topics.

If you fudge that figure, it will remain set if you do it right (like I did in the hack I was kind enough to actually publish)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Norv on April 19, 2010, 07:24:19 PM
I don't get why you need to invoke cron whatsoever. Y'all building a castle to put a coat hanger on.
Arantor, I was joking.

Below is the idea:

Well, if we are implementing something like, 'Mark specific topics as read', users can put in topic ID in a field and every time the user logs in, a cron job is ran which would mark the topic as read if they are updated. But the bad thing is, if the topic gets updated after we login, it will then show up. There could be a way to mark it as read until they logout. (Maybe constant queries being ran in the background, but this will really burn the MySQL server into ashes) After they logout, the cron job will no longer run and the queries being ran in the background will stop.
Hmm. It could be done so that every time a post is made, the "ignoring ones" (members who unsubscribed) would be checked, and if you find people ignoring this, you  add this post as being the last read by them.  Just like it's currently checked who should be notified, and they are notified.
Just throwing out an idea, no more.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on April 19, 2010, 07:25:41 PM
*headdesk*

You're discussing how to reimplement what has already been done, proven to work and works quite successfully, without any of the extra overheads you're talking about.

When you get five minutes, check out http://www.simplemachines.org/community/index.php?topic=240146.msg2578173#msg2578173
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Norv on April 19, 2010, 07:28:11 PM
Leave the desk and the head apart, please. :)
They don't get along together, really.

Taking a look in a minute, then, thank you for the link.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Norv on April 19, 2010, 07:39:57 PM
Ah. Hah.
I can see why you say it's hackish (it's not orthodox IMO as well, to forcefully set the maximum possible value - that messages don't get to, as the last read of that user in the respective topic), but clearly the minimum performance penalty. Might even help overall, with its notifications clearing. (it also clears email notifications for that topic)
... On second thought, this may or not be wanted, tbh. There are cases when I prefer to read news on topics by email, but I might put them on ignore to not interfere with forum experience as they currently do.

Anyway, it seems a good solution to me. Thank you for sharing.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: wynnyelle on May 04, 2010, 01:26:22 PM
My members complain about this problem all the time. We have bookmarks, some just choose not to use them. We also have a few hundred topics and a couple thousand posts getting created daily. It doesn't make sorting through all the newly replied to stuff easy at all, the new replies thing has become virtually unusable. Considering that SMF is designed for small AND large boards I'm surprised there isn't a built in function for this already, or at least a mod.

I second the creation of this :)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 01:31:18 PM
I'm really impressed at how much work this thread has caused.

I am only going to say this one more time.

There are already two mods for this, one is on the mod site, currently maintained by vbgamer45, called Ignore Topics. In the "Support and comments for this mod", I propose a second method, it's unorthodox as mentioned above, but it does the job in an interesting and reasonably efficient way.

I even linked to my version, what... 4 posts up, and it's in the right thread right there...
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on May 04, 2010, 01:33:49 PM
Well, I suppose something officially for big boards can be done rather than using the hack every now and then ?

btw, I asked in to write in their input from one of their request. It is just something demanding and so I thought of letting user's put in their vote. Not a fault of the user. ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 01:39:46 PM
The problem is performance.

There are two basic ways you can do it, one is the way vbgamer/Karl's mod does it, and one is the way I do it. The way vbgamer/Karl's mod does it is clean, but due to the way it all ends up in SQL, woefully painful with large numbers of topics being ignored, and equally painful on large boards.

My way is by my own admission, inelegant and ugly, but has a much lower performance penalty.

I'd point out that this has been requested by the team for a year and hasn't happened yet, I don't see any official nod prior to 2.1, and even then I don't see this being implemented for a bit because there are no really good ways of doing it.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on May 04, 2010, 01:43:08 PM
I get your point dude, even if it in waiting, it is still worth having the user's post in their vote. This can gain some level of importance if it is in quite alot of demand. While it is already in discussion privately, maybe some other user might be able to kick in their ways to make it work better without any performance penalties. The more the interest of the users, the more it will be a priority and maybe someone (not necessarily the team) can make up a quite decent fix up which is not ugly and inelegant.. ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 02:02:36 PM
*sigh* There are only two basic ways of doing it, elegant and performance hurting, or inelegant and fast. These are not some random rules, they are certainties within the environment of a relational database like MySQL.

A user vote is somewhat pointless because we all KNOW it should be implemented but the two methods proposed have significant drawbacks and no way around them.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on May 04, 2010, 04:57:55 PM
The performance hit. Just how bad would it be, in reality?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 05:09:24 PM
Colossal, actually, and scales up at *best* directly in proportion to the size of the forum, worst case exponentially to the size of the forum. Let me explain the problem.

SQL works on relationships, joining tables together. As such, you build indexes, a list of what items are in a given table. And when you join, you look up against that table.

Which means, when you start from the topics table and link to the messages table, you've got a map as to where things are.

Now, this is where the butthurt begins. You build a list of the items you have, not a list of items you don't have.

So you build a list of topics and have to compare each one to the ignore list, looking for it not to exist. And since you don't have a list of what doesn't exist, every single topic has to be matched to the ignore list, one by one. IIRC the original version of Karl's mod limited you to 10 (yes, 10 TOTAL) topics to be ignored, simply because that limits how far the ignore list gets, which limits how much time is spent looking for non-matches.

If it wouldn't eat your disk insanely, it'd probably be quicker to build a list of every topic and every user and match against that.

Thing is, we already sort of have that list - in the form of the unread topics list, which my hack - well - hijacks in a not so good way.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on May 04, 2010, 05:17:23 PM
Would this affect everyone who uses the forum, Pete, or just those who use the feature, in some way?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 05:30:46 PM
Hmmm, interesting question. If you write the queries carefully enough you could I suppose limit it slightly differently... you know, if you do it carefully enough you limit the scope to whoever you give permission to.

Here, I expect it would be given to those who've been here long enough to warrant it (so, 1k post count groups and up), which would greatly cut it back, but it would still be a significant hit on the rest of folks who do have it enabled.

Hmm, I do have another idea, not sure it'll work out, and I need to benchmark it to prove or disprove whether its performance would be better or not, it's still basically the same methodology as vbgamer/Karl's mod though but with a twist that, if I'm right, will cut a lot of the performance hit - but may require MySQL 5 and disabling a security feature (ooo-er!)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on May 04, 2010, 05:43:09 PM
Without wishing to come-over as elitist, or anything, what about if it was restricted to, say, SMF team members?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 05:46:07 PM
The more you limit the scope of it, the better it gets in the scheme of things - the fewer people that have permission, the fewer queries you're doing where there's butt-hurt.

That said, remember that team members are likely to be among the more active members of the community and so it's more likely to be loading the server.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on May 04, 2010, 05:47:45 PM
I would guess that it's us that would use the "All unread posts" feature.


That's where all the alien stuff muddies the water and we miss stuff.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 05:49:06 PM
*nods* That's where it would *really* grind, bogging down one of the already heaviest processes with something moreso :S

The hack I published does the job, hackishly, but without any of the aforementioned performance penalties because it's just using a mechanism that's already there.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on May 04, 2010, 05:51:38 PM
Just out of pure curiosity, how difficult would it be to make team use of "Show unread posts since last visit" totally, completely, separate from other member's?


Impossible, I'd assume, as it'd all be using the same database...
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 05:53:12 PM
Pretty much impossible. The only alternative is to sync all the data to another database, which would likely be as punishing as not doing it in the first place.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on May 04, 2010, 05:56:04 PM
Poo.


/me wonders how much money Pete could make, if he invented a way of doing this, without the perofrmance hit, or hacking...
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 06:00:38 PM
If I could solve this problem, I'd be turning conventional relational databases on their head, because ultimately that's where the problem lies - databases are designed to structure data logically, and map the logical joins between them, i.e. topics -> messages. They're not designed for mapping joins where the join doesn't exist.

As I said I've got an idea that might *limit* the pain, cleanly, but it won't be as efficient as the hackish method I already proposed. I don't see how you can possibly do it any more efficiently, given that it doesn't add any tables, any rows or change any queries that are already present and optimised.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on May 04, 2010, 06:04:04 PM
If I could solve this problem, I'd be turning conventional relational databases on their head


Off you go, then. ;)


I, hereby, volunteer to be a beta tester. :)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 04, 2010, 06:15:45 PM
I'm good, but I'm not good enough to turn 40+ years of engineering and logic on their head. Not this year, anyway :P

I'm gonna unbreak SimpleDesk after all the changes I made today, then gonna go play with doing something about this, I have an idea, will experiment and see if hurts any less than the current plan...
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on May 05, 2010, 09:21:20 AM
Be done by this evening, then! ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on May 05, 2010, 10:55:23 AM
I love the way this topic sticks some new ideas in the head.. :P

/me smells lots of sarcasm in the air!
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: kat on May 05, 2010, 11:10:48 AM
As my sig says... ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on May 05, 2010, 01:10:46 PM
Nah, not finished unbreaking SimpleDesk by totally rewriting the permissions system to be more intuitive than SMF's ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on May 27, 2010, 04:51:28 PM
Any updates made over this? Any more thoughts ? I am gonna have a long list pretty soon :P
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Nao 尚 on June 02, 2010, 03:30:11 PM
I'd be oh-so-tempted to include Arantor's hack into SMF 2.0... I know, I know, 'feature-frozen'... But it's a really quick hack, it works because its functionality is small and crystal clear, and it doesn't have a performance cost. How better can you do it?

Norv, what do you think of this? We need to think of the people who'll be using v2.0x for the decades months to come until we release the following version... ;)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on June 02, 2010, 03:44:21 PM
I would give a big party to everyone if this really important is added in the gold! ;D
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Nao 尚 on June 02, 2010, 06:28:02 PM
http://dev.simplemachines.org/mantis/view.php?id=4314
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: ~DS~ on June 02, 2010, 06:37:37 PM
http://dev.simplemachines.org/mantis/view.php?id=4314
Nao...I am not sure if you missed Arantor's post about it being ugly:
http://www.simplemachines.org/community/index.php?topic=375491.msg2578924#msg2578924

Unless you found a way around it which Arantor said isn't
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Nao 尚 on June 03, 2010, 01:56:44 AM
No, I didn't.
Read what I said: "Which I personally find elegant, whatever he might himself say."

The only thing I don't find elegant here, is how SMF can only support 2 billion posts at most in a board... That's not a lot :P
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: ~DS~ on June 03, 2010, 02:00:02 AM
No, I didn't.
Read what I said: "Which I personally find elegant, whatever he might himself say."

The only thing I don't find elegant here, is how SMF can only support 2 billion posts at most in a board... That's not a lot :P
What about other user with cheap host? It might hurt the server...even with 2 billion posts :P ?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Nao 尚 on June 03, 2010, 02:02:23 AM
Well, obviously if you have more than 10k posts in the first place, you don't wanna be on a cheap host... I don't see your point.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Norv on June 03, 2010, 04:08:12 AM
I like the feature myself, and I can see it being useful indeed.

About the solution, well, without looking at all possible effects, personally I am not fully happy with this possible implementation, tbh. To enumerate quickly (might not be an exhaustive list): it smells like a clever hack to me (yes I know not everyone will agree with this), it has effects on usability because it assumes equivalence between read and ignored (for example, ignored boards doesn't behave this way, it still shows you topics as "New" when you look at the board index, this would remove the "New" mark from ignored threads; if this is how it seems to me, meaning inconsistent, then, well, inconsistency in UI is usually bad for the user IMHO - I can be wrong on this particular user expectation however), and I think the implementation needs to be a bit more complex in reality than it was done there (to deal with: the user reading the topic by chance, or the user marking as read/unread), meaning it can also be a little more risky than it looks at first sight.
(meaning ... not for 2.0: if features should be banished from 2.0 at this point, even a bit risky features more so :))

But, if the other devs agree with it, I won't be against. That's why I will put it for discussion.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on June 03, 2010, 06:42:16 AM
Well, maybe a few beta testers might be able to give in a hand if it is getting implemented for testing. You can either provide us with what is to be modified or add it in the SVN for the versions ahead and we'll check it out ?
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor on June 06, 2010, 07:40:49 PM
Quote
the user reading the topic by chance, or the user marking as read/unread

The first case should be deal with, since that's how it provides the Unignore option (and worked consistently for me). As for the second, if you're marking it unread, you're probably not ignoring it...
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: knightofdoom on June 10, 2010, 06:04:08 AM
what about a plugin package??
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Norv on June 10, 2010, 06:37:10 AM
http://custom.simplemachines.org/mods/index.php?mod=1193 :)
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Norv on November 20, 2010, 01:55:27 AM
This is a good candidate for a feature for next SMF versions, or at least an officially developed package.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: MrPhil on May 14, 2011, 09:13:28 PM
(I made a similar request about six months later in topic=405323, and have requested that it be merged into this one)

Quote from: (F.L.A.M.E.R)
Lets think of an alternative here then.
OK, if it's too much of a performance hit to "unsubscribe" a topic in other ways, how about keeping a new table of only "unsubscribes" per user. Once the list of "new replies" hits for a user is generated, could it be trimmed down at that point by throwing the "unsubscribe" table entries for that user at it? Assuming that the typical unsubscribe list wouldn't grow too long, as the "new replies" list is generated, each entry could be checked against the returned unsubscribe list and excluded if it is in it. That's one approach, anyway, and might be less costly than the other methods discussed.

Personally, all I'm looking for is to not see certain topics show up on the "new replies" page -- I don't care about changing any other SMF behavior. If that would do the job for others, fine.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Adish - (F.L.A.M.E.R) on September 19, 2011, 08:09:56 AM
So, after quite some discussion within this topic so far, we are still looking for alternatives to implement this feature in the core. Please feel free to provide us with your ideas so that the best possible way is implemented.

Some interesting posts to read through:
http://www.simplemachines.org/community/index.php?topic=375491.msg2578924#msg2578924
http://www.simplemachines.org/community/index.php?topic=375491.msg2591509#msg2591509
http://www.simplemachines.org/community/index.php?topic=375491.msg2613219#msg2613219
http://www.simplemachines.org/community/index.php?topic=375491.msg2613561#msg2613561
http://www.simplemachines.org/community/index.php?topic=375491.msg3044629#msg3044629

Mod useful for small sites currently present on the mod site: http://custom.simplemachines.org/mods/index.php?mod=1193
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: MrPhil on September 19, 2011, 11:41:19 AM
If there isn't already a table of explicit "follow" requests, why not? That would be sensible -- when you post, you would be automatically added to it (REPLACE, in case you're already there), and could "unfollow" when you tire of a topic, or explicitly "follow" if it interests you (without making a space-wasting post). You could even have a profile switch "don't automatically follow a topic I post to...", and perhaps a limit on the number of topics you could follow without having made a post (store a count of explicit "follow" requests in your personal data). The table could have the last time you read/posted to this topic, so that it could easily eliminate everything you've seen already.

Please tell me that SMF isn't searching through all posts for all topics you posted to each time you ask for "Show new replies to your posts."
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Matthew K. on September 20, 2011, 06:23:48 PM
Definitely has to be in the next version of SMF. Can't be too difficult to code, I could do it.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: wynnyelle on December 05, 2011, 09:42:44 PM
My members want this badly, as we are a forum with millions of posts.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: thernlund 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.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor 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.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: thernlund on October 23, 2012, 06:24:06 PM
I see.  I hadn't accounted for the log being pruned.  Hmm.


-T.
Title: Re: Ignore Topics/Mark as Read all the time/Unsubscribe topic
Post by: Arantor 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.