You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/migration/wsc54/forum_subscriptions.md
+14-17Lines changed: 14 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,12 @@
2
2
3
3
## Subscriptions
4
4
5
-
With WoltLab Suite Forum 5.5 we introduced a new system to subscribe threads and boards including the possibility to ignore threads and boards.
6
-
[You can read more about this feature in our blog](https://www.woltlab.com/article/260-new-features-in-woltlab-suite-5-5-revision-of-buttons-and-ignoring-threads/).
7
-
The new system uses an own system to manage the subscribed forums as well as the subscribed threads.
8
-
This has made the previously used object type `com.woltlab.wcf.user.objectWatch` obsolete, as it no longer meets the requirements we need for the new more flexible system.
9
-
In addition, having our own implementation also makes it much easier to use, as we work with our own tables and we can thus create correct foreign keys.
10
-
Therefore, we had to create a new API to manage subscriptions.
5
+
With WoltLab Suite Forum 5.5 we have introduced a new system for subscribing to threads and boards, which also offers the possibility to ignore threads and boards.
6
+
[You can learn more about this feature in our blog](https://www.woltlab.com/article/260-new-features-in-woltlab-suite-5-5-revision-of-buttons-and-ignoring-threads/).
7
+
The new system uses a separate mechanism to track the subscribed forums as well as the subscribed threads.
8
+
The previously used object type `com.woltlab.wcf.user.objectWatch` is now discontinued, because the object watch system turned out to be too limited for the complex logic behind thread and forum subscriptions.
To filter ignored threads from a given `ThreadList`, you can use the method `ThreadStatusHandler::addFilterForIgnoredThreads()` to append the filter for ignored threads.
37
-
The `ViewableThreadList` filters ignored threads by default.
35
+
The `ViewableThreadList` filters out ignored threads by default.
38
36
39
-
As an example:
37
+
Example:
40
38
41
39
```php
40
+
$user = new User(123);
42
41
$threadList = new ThreadList();
43
42
ThreadStatusHandler::addFilterForIgnoredThreads(
44
43
$threadList,
45
-
// This parameter is optional. If null, the current user will be used. Otherwise, the filter is executed
46
-
// for the given user.
47
-
WCF::getUser()
44
+
// This parameter specifies the target user. Defaults to the current user if the parameter
45
+
// is omitted or `null`.
46
+
$user
48
47
);
49
48
$threadList->readObjects();
50
49
```
51
50
52
51
### Filter Ignored Users
53
52
54
-
Ignoring threads should surpress the notifications for the user.
55
-
Therefore we ship also a method, which can filter the `userIDs`, which are ignoring a specific thread.
53
+
Avoid issuing notifications to users that have ignored the target thread by filtering those out.
0 commit comments