I'd like to remove the number of Unread Threads that displays on the forum tab and next to each board. Is this possible? I can't seem to find an option.
Disabling Unread Posts
-
DynamoGeek -
21. Januar 2017 um 19:30 -
Erledigt
-
-
-
I can, indeed, remove the counter with CSS, but that doesn't prevent the information from being calculated. I'm not sure how much work the system goes through to maintain that number, though; it could be minimal.
-
I'd like to remove the number of Unread Threads that displays on the forum tab and next to each board. Is this possible? I can't seem to find an option.
You can simply remove the menu item.
-
That removes the menu option, but not the little numerical indicator by all the boards.
-
I understand that you would need to remove both options.
In the menu and the ones presented at the boards.
Unfortunately, I do not know how to remove it for the boards besides the CSS option.
There must be a calculation in an php file maybe Alexander Ebert or @marcel_wer
can assist
-
- Offizieller Beitrag
I'm not sure how much work the system goes through to maintain that number, though; it could be minimal.
The impact should be fairly low, as it uses a series of shortcuts to reduce the impact:
- Items older than 1 week are automatically assumed to be read
- Querying the database uses timestamps from a secondary table, all timestamps will fall inside the 1 week window
By scoping the possible results to the past 7 weeks only, the database can easily apply the time filter first (there is an extra index for that), greatly reducing the number of rows it has to work with. Also it uses a single query to fetch the data for all boards at once.
If you want to get rid of this query, you'll need to provide a custom version of the boardNodeList template (please use the ACP and template groups, not manually editing of the file!) and remove all occurrences of getUnreadThreads() and getTotalUnreadThreads(). Because this data is lazy loaded, removing any call of these methods in the template will actually prevent it from fetching that data in the first place.
Hint: You can combine the debug mode with the benchmark, turning the benchmark into a clickable link that gives insight into the actual queries that were executed and what impact they had on load time. You could edit the index.php and insert something like that at the top:
Codeif ($_SERVER['REMOTE_ADDR'] === 'yourFancyIP') { define('ENABLE_DEBUG_MODE', 1); define('ENABLE_BENCHMARK', 1); }
Just keep in mind to get rid of that block again. It is basically abusing the fact, that the options.inc.php checks if the constant already exists before attempting to set it on this own.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!