06-20-2010, 12:24 PM
This is a simple plugin which adds a new link, next to the "View New Posts" link in the header, which will show all new posts since the user's last visit, but only those in threads they have subscribed to.
This can be useful, say, when combined with setting the default subscription mode for threads, for users to view updates to threads they've posted in.
If you have a modified header_welcomeblock_member template, the plugin may not be able to perform the correct modifications, so you may need to edit that template yourself. The link for viewing new subscribed threads is:
Issues
This can be useful, say, when combined with setting the default subscription mode for threads, for users to view updates to threads they've posted in.
If you have a modified header_welcomeblock_member template, the plugin may not be able to perform the correct modifications, so you may need to edit that template yourself. The link for viewing new subscribed threads is:
Code:
|
(replace "&" with "&" if putting in template)
This plugin will actually also filter for today's posts as well (but won't put a link for it)
Code:
|
Issues
- Known problem with merging threads - see here for a solution
- Small issue: this plugin uses a nested sub-query to do its work, as it's much easier to develop than a complex hack to get a joined query. This may have a slight impact on performance, but I doubt it'll be much.
Googling "mysql sub-query vs join performance" seems to show some people condemning sub-queries, with others saying the difference is practically nothing.
The plugin uses a query similar to the following:
SQL CodeSELECT t.tid FROM mybb_threads t WHERE t.lastpost >='9999999' AND tid IN (SELECT tid FROM mybb_threadsubscriptions WHERE uid=1) AND t.visible>-1 AND t.closed NOT LIKE 'moved|%'
as opposed to something like
SQL CodeSELECT t.tid FROM mybb_threads t LEFT JOIN mybb_threadsubscriptions s ON s.tid=t.tid WHERE t.lastpost >='9999999' AND t.visible>-1 AND t.closed NOT LIKE 'moved|%' AND s.uid=1
- This plugin will add a unique index to the threadsubscriptions table, to try to help lessen the impact of the above mentioned speed reduction. Ideally, MyBB should've included this key for data integrity reasons, but they didn't. As such, the plugin needs to check for duplicates in the table before adding the index, and, if any are found, it will remove the duplicates. If you don't want this, you can stop it by opening up the plugin file and deleting the line:
PHP Code:define('LATESTSUBSCRIBE_ADD_INDEX', 1);
- Queries used in this plugin probably only with with MySQL(i)