Threadmarks Pro

Threadmarks Pro [Paid] 2.21.1

No permission to buy ($40.00)

Xon

Well-known member
Xon submitted a new resource:

Threadmarks Pro - Tag specific posts in a thread so they can be easily navigated to.

Tagging specific posts in a thread so they can be easily navigated to

This is useful for long threads discussing a topic over a lengthy period of time and many pages. A threadmark allows a user to quickly jump to a specific post which is related to a certain event, date, or whatever is relevant to the thread.

Optionally this allows building an 'index' of posts and allows easy next/previous navigation between marked posts. A threadmark index can then be attached to a threadmark list for...

Read more about this resource...
 
Xon updated Threadmarks Pro with a new update entry:

2.0.1 - Bugfix update

Changes:
  • Only display threadmarks to the user if they can see them
  • Allow a user to add a threadmark over the top of a soft-deleted threadmark
  • Cleanup linked records on hard delete
  • Feature flag for enabling/disabling the threadmark index icon
  • Show threadmark index on thread preview
  • Improve threadmark widget usage on side-bar, new option for widget "simple" or "full"
  • Threadmark index linked content, can now remove linked content and sort ordering.
  • Collaborative...

Read the rest of this update entry...
 
@Xon, how do this correctly?
Create a database backup, copy the add-on files, and then run installer. I recommend using the CLI installer if you can;
Code:
php cmd.php -v xf-addon:upgrade SV/Threadmarks
The -v flag means I get stack traces if anything goes wrong, which the GUI doesn't do reliably IIRC :(

Please ensure you have a database backup first just to be safe.
 
@Xon - looks very interesting and useful.

How is the performance impact on a large forum with 2k+ concurrent users and a big database?
 
I haven't done any indepth testing with XF2 version, but it looks quite reasonable and it has been a design consideration. Generally, the per-page impact is quite low. A few extra low complexity queries, but nothing unreasonable.

At the very least; it'll handle super-large threadmark lists better. Since it only renders them in chunks of 50 by default rather than try doing thousands at a time.

The biggest potential performance impact is the "recent threadmark" limit. This causes up to the limit * category threadmarks to be considered to be loaded. Worse it needs to fetch posts/content which aren't loaded to ensure it can render links and do view checks. Due to XF2 Finder limitations; the threadmarks can't directly load posts at the same time :( (posts can load threadmark tho)

Note; the recent threadmark's feature is smart enough to only load threadmarks + posts which haven't been loaded already. The embedded threadmark list/index isn't as smart, but is smart enough to only load posts which aren't already loaded.

Read tracking may need a feature flag; and while the queries look complex they are very low cost due to indexing and how little data they touch.
 
Thank you for your reply, Xon!

The biggest potential performance impact is the "recent threadmark" limit
Does this mean the list of Threadmarks above the posts list inside the thread?

Bildschirmfoto 2018-08-26 um 21.02.30.webp

And if I click the 3 dots it loads 50 more threadmarks?
 
Thank you for your reply, Xon!


Does this mean the list of Threadmarks above the posts list inside the thread?
The menu on the right;
1535311918708.webp

It is controlled by the user group permission; "Maximum threadmarks in menu".

View attachment 182403

And if I click the 3 dots it loads 50 more threadmarks?
The default is actually 25, and can be configured by adjusting the "Threadmark load chunk size " option.
 
I just purchased this addon :)

There's a wrong information in the explain text for option "threadmarkIndexText": The phrase is called svThreadmarks_index, but the text says: "Instead of using the phrase threadmark_index_nav, the category name is used."

When I edit a TM index and add an "Additional URL", I get this error:
Code:
An exception occurred: [TypeError] Argument 3 passed to SV\Threadmarks\Service\ThreadmarkIndex\Preparer::__construct() must implement interface SV\Threadmarks\Entity\ThreadmarkContainerInterface, null given, called in /Library/WebServer/Documents/xf2/src/XF/Container.php on line 275 in src/addons/SV/Threadmarks/Service/ThreadmarkIndex/Preparer.php on line 37
#0 src/XF/Container.php(275): SV\Threadmarks\Service\ThreadmarkIndex\Preparer->__construct(Object(XF\Pub\App), Object(SV\Threadmarks\Entity\ThreadmarkIndex), NULL)
#1 src/XF/App.php(1359): XF\Container->createObject('SV\\Threadmarks\\...', Array)
#2 src/XF/Container.php(228): XF\App->XF\{closure}('SV\\Threadmarks\\...', Array, Object(XF\Container))
#3 src/XF/App.php(2508): XF\Container->create('service', 'SV\\Threadmarks:...', Array)
#4 [internal function]: XF\App->service('SV\\Threadmarks:...', Object(SV\Threadmarks\Entity\ThreadmarkIndex), NULL)
#5 src/XF/Service/AbstractService.php(77): call_user_func_array(Array, Array)
#6 src/addons/SV/Threadmarks/Service/ThreadmarkIndex/Editor.php(76): XF\Service\AbstractService->service('SV\\Threadmarks:...', Object(SV\Threadmarks\Entity\ThreadmarkIndex), NULL)
#7 src/addons/SV/Threadmarks/Service/ThreadmarkIndex/Editor.php(55): SV\Threadmarks\Service\ThreadmarkIndex\Editor->setThreadmarkIndex(Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#8 src/XF/Container.php(275): SV\Threadmarks\Service\ThreadmarkIndex\Editor->__construct(Object(XF\Pub\App), Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#9 src/XF/App.php(1359): XF\Container->createObject('SV\\Threadmarks\\...', Array)
#10 src/XF/Container.php(228): XF\App->XF\{closure}('SV\\Threadmarks\\...', Array, Object(XF\Container))
#11 src/XF/App.php(2508): XF\Container->create('service', 'SV\\Threadmarks:...', Array)
#12 [internal function]: XF\App->service('SV\\Threadmarks:...', Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#13 src/XF/Mvc/Controller.php(717): call_user_func_array(Array, Array)
#14 src/addons/SV/Threadmarks/Pub/Controller/ThreadmarkIndex.php(197): XF\Mvc\Controller->service('SV\\Threadmarks:...', Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#15 src/addons/SV/Threadmarks/Pub/Controller/ThreadmarkIndex.php(166): SV\Threadmarks\Pub\Controller\ThreadmarkIndex->setupThreadmarkIndexEdit(Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#16 src/XF/Mvc/Dispatcher.php(249): SV\Threadmarks\Pub\Controller\ThreadmarkIndex->actionEdit(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('SV\\Threadmarks:...', 'Edit', 'json', Object(XF\Mvc\ParameterBag), 'forums', Object(SV\Threadmarks\Pub\Controller\ThreadmarkIndex), Object(XF\Mvc\Reply\Reroute))
#18 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#19 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#20 src/XF.php(328): XF\App->run()
#21 index.php(13): XF::runApp('XF\\Pub\\App')
#22 {main}
btw: What are "additional urls" for? :D

It would be fine, if I could disable the "Index progress" field.

In the AdminCP I can setup TM categories. Where can I find them in frontend?
 
Last edited:
There's this setting on a per forum basis:
Bildschirmfoto 2018-08-26 um 22.54.12.webp

A global setting for this would be cool.

Another bug, when I try to undelete a threadmark index:
Code:
An exception occurred: [TypeError] Argument 2 passed to SV\Threadmarks\XF\Entity\Thread::getLinkToThreadmarkIndexAction() must be of the type array, null given in src/addons/SV/Threadmarks/XF/Entity/Thread.php on line 236
#0 [internal function]: SV\Threadmarks\XF\Entity\Thread->getLinkToThreadmarkIndexAction('undelete', NULL)
#1 src/XF/Template/Templater.php(939): call_user_func_array(Array, Array)
#2 internal_data/code_cache/templates/l1/s2/public/svThreadmarks_undelete_threadmark_index.php(30): XF\Template\Templater->method(Object(SV\Threadmarks\XF\Entity\Thread), 'getLinkToThread...', Array)
#3 src/XF/Template/Templater.php(1249): XF\Template\Templater->{closure}(Object(SV\Threadmarks\XF\Template\Templater), Array)
#4 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('svThreadmarks_u...', Array)
#5 src/XF/Mvc/Renderer/Json.php(81): XF\Template\Template->render()
#6 src/XF/Mvc/Renderer/Json.php(65): XF\Mvc\Renderer\Json->renderHtmlFallback('SV\\Threadmarks:...', 'public:svThread...', Array)
#7 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Json->renderView('SV\\Threadmarks:...', 'public:svThread...', Array)
#8 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#10 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#11 src/XF.php(328): XF\App->run()
#12 index.php(13): XF::runApp('XF\\Pub\\App')
#13 {main}

Also a bug: Even guests can see this, also members who have not the appropriate rights. It seems the rights are not checked correctly in the template. When you click on Remove contents, you get an permission error tough, if you have not the appropriate rights.
Bildschirmfoto 2018-08-26 um 23.50.50.webp

This phrase is missing: svThreadmarks_sort_linked_content
 
Last edited:
A couple of those bugs have already been fixed in the next build I've been working on, but a couple I will need to test the bugfix for.

I just purchased this addon :)
:D

There's a wrong information in the explain text for option "threadmarkIndexText": The phrase is called svThreadmarks_index, but the text says: "Instead of using the phrase threadmark_index_nav, the category name is used."
Missed during the rename. Fixed for the next version.

When I edit a TM index and add an "Additional URL", I get this error:
Code:
An exception occurred: [TypeError] Argument 3 passed to SV\Threadmarks\Service\ThreadmarkIndex\Preparer::__construct() must implement interface SV\Threadmarks\Entity\ThreadmarkContainerInterface, null given, called in /Library/WebServer/Documents/xf2/src/XF/Container.php on line 275 in src/addons/SV/Threadmarks/Service/ThreadmarkIndex/Preparer.php on line 37
#0 src/XF/Container.php(275): SV\Threadmarks\Service\ThreadmarkIndex\Preparer->__construct(Object(XF\Pub\App), Object(SV\Threadmarks\Entity\ThreadmarkIndex), NULL)
#1 src/XF/App.php(1359): XF\Container->createObject('SV\\Threadmarks\\...', Array)
#2 src/XF/Container.php(228): XF\App->XF\{closure}('SV\\Threadmarks\\...', Array, Object(XF\Container))
#3 src/XF/App.php(2508): XF\Container->create('service', 'SV\\Threadmarks:...', Array)
#4 [internal function]: XF\App->service('SV\\Threadmarks:...', Object(SV\Threadmarks\Entity\ThreadmarkIndex), NULL)
#5 src/XF/Service/AbstractService.php(77): call_user_func_array(Array, Array)
#6 src/addons/SV/Threadmarks/Service/ThreadmarkIndex/Editor.php(76): XF\Service\AbstractService->service('SV\\Threadmarks:...', Object(SV\Threadmarks\Entity\ThreadmarkIndex), NULL)
#7 src/addons/SV/Threadmarks/Service/ThreadmarkIndex/Editor.php(55): SV\Threadmarks\Service\ThreadmarkIndex\Editor->setThreadmarkIndex(Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#8 src/XF/Container.php(275): SV\Threadmarks\Service\ThreadmarkIndex\Editor->__construct(Object(XF\Pub\App), Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#9 src/XF/App.php(1359): XF\Container->createObject('SV\\Threadmarks\\...', Array)
#10 src/XF/Container.php(228): XF\App->XF\{closure}('SV\\Threadmarks\\...', Array, Object(XF\Container))
#11 src/XF/App.php(2508): XF\Container->create('service', 'SV\\Threadmarks:...', Array)
#12 [internal function]: XF\App->service('SV\\Threadmarks:...', Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#13 src/XF/Mvc/Controller.php(717): call_user_func_array(Array, Array)
#14 src/addons/SV/Threadmarks/Pub/Controller/ThreadmarkIndex.php(197): XF\Mvc\Controller->service('SV\\Threadmarks:...', Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#15 src/addons/SV/Threadmarks/Pub/Controller/ThreadmarkIndex.php(166): SV\Threadmarks\Pub\Controller\ThreadmarkIndex->setupThreadmarkIndexEdit(Object(SV\Threadmarks\Entity\ThreadmarkIndex), Object(SV\Threadmarks\XF\Entity\Thread))
#16 src/XF/Mvc/Dispatcher.php(249): SV\Threadmarks\Pub\Controller\ThreadmarkIndex->actionEdit(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('SV\\Threadmarks:...', 'Edit', 'json', Object(XF\Mvc\ParameterBag), 'forums', Object(SV\Threadmarks\Pub\Controller\ThreadmarkIndex), Object(XF\Mvc\Reply\Reroute))
#18 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#19 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#20 src/XF.php(328): XF\App->run()
#21 index.php(13): XF::runApp('XF\\Pub\\App')
#22 {main}
Already fixed in the next version (I fixed it as part of other threadmark index icon bits).

btw: What are "additional urls" for? :D
The idea is a white listed list of URL's is added to the side of the description like so;
threadmark-list-with-index-png.182164

They can enter a description and then a link.

It needs additional work to communicate what sort of URLs they can add.

It would be fine, if I could disable the "Index progress" field.
Added a global option for the next version

In the AdminCP I can setup TM categories. Where can I find them in frontend?
When you add or edit a threadmark. When there is only a single category, the UI option disappears.

There's this setting on a per forum basis:
View attachment 182420

A global setting for this would be cool.
There is some SQL in the FAQ on how to bulk enable/disable this.

Another bug, when I try to undelete a threadmark index:
Code:
An exception occurred: [TypeError] Argument 2 passed to SV\Threadmarks\XF\Entity\Thread::getLinkToThreadmarkIndexAction() must be of the type array, null given in src/addons/SV/Threadmarks/XF/Entity/Thread.php on line 236
#0 [internal function]: SV\Threadmarks\XF\Entity\Thread->getLinkToThreadmarkIndexAction('undelete', NULL)
#1 src/XF/Template/Templater.php(939): call_user_func_array(Array, Array)
#2 internal_data/code_cache/templates/l1/s2/public/svThreadmarks_undelete_threadmark_index.php(30): XF\Template\Templater->method(Object(SV\Threadmarks\XF\Entity\Thread), 'getLinkToThread...', Array)
#3 src/XF/Template/Templater.php(1249): XF\Template\Templater->{closure}(Object(SV\Threadmarks\XF\Template\Templater), Array)
#4 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('svThreadmarks_u...', Array)
#5 src/XF/Mvc/Renderer/Json.php(81): XF\Template\Template->render()
#6 src/XF/Mvc/Renderer/Json.php(65): XF\Mvc\Renderer\Json->renderHtmlFallback('SV\\Threadmarks:...', 'public:svThread...', Array)
#7 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Json->renderView('SV\\Threadmarks:...', 'public:svThread...', Array)
#8 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#10 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#11 src/XF.php(328): XF\App->run()
#12 index.php(13): XF::runApp('XF\\Pub\\App')
#13 {main}
Fixed, got missed in a clean up pass

Also a bug: Even guests can see this, also members who have not the appropriate rights. It seems the rights are not checked correctly in the template. When you click on Remove contents, you get an permission error tough, if you have not the appropriate rights.
View attachment 182421
Fixed in the next version.

This phrase is missing: svThreadmarks_sort_linked_content
Fixed in the next version.
 
Xon updated Threadmarks Pro with a new update entry:

2.0.3 - Bugfix update

  • Add global option to disable the "Index progress" field on a threadmark index
  • Fix deleting/unapproving threadmarks could damage position ordering
  • Fix 'hidden range' loader for threadmarks list could fail and load the threadmark index into a row
  • Fix error when editing threadmark index
  • Fix error on undelete/unapprove/approve threadmark index pages
  • Fix explain text for "Use threadmark category text for Index label on post" option
  • Fix missing...

Read the rest of this update entry...
 
Thank you for the quick update!
They can enter a description and then a link.

It needs additional work to communicate what sort of URLs they can add.
o.k. So just a small list of (external) sites under the TM description. If I don't want to restrict this (because just staff members can edit TM indexes), I could use #.*# as regex. :)

I could also use some regex from here: https://mathiasbynens.be/demo/url-regex - but it would be cool, if you would implement a basic XF Core URL validation.
When you add or edit a threadmark. When there is only a single category, the UI option disappears.
Ah, now I see the problem: The "All user groups" option for "Usable by user groups" does not get saved. So it saves "Selected user groups" with none selected.

New Bug: The index icon update link does not work.
The requested page could not be found. (Code: invalid_action, controller: XF:Thread, action: UpdateThreadmarkIndexIconThreadmarkIndex)

Suggestion: An option to display username and/or avatar next to the TM title in lists.
 
Thank you for the quick update!
If you can, leave a review as it helps the add-on visibility.

o.k. So just a small list of (external) sites under the TM description. If I don't want to restrict this (because just staff members can edit TM indexes), I could use #.*# as regex. :)

I could also use some regex from here: https://mathiasbynens.be/demo/url-regex - but it would be cool, if you would implement a basic XF Core URL validation.
As a feature, the url validation bits are a bit sharp edged and difficult to work with. Not sure how to make that easier given the design limits of XF options where it lives.

I think I'll add some descriptive phrases to the front-end side to automatically listing what URLs are permitted (by title).

Suggestion: An option to display username and/or avatar next to the TM title in lists.
Yeah, a username/avatar in the threadmark index would definitely help. Shouldn't be too hard, but I'll need to think about it a bit
 
@Xon, I can't merge posts in my forum if your addon enable.
When I disable your addon - merge posts works excellent. Version of trademarks - 2.0.4.
This is very very bad! Fix it, please! ;)
 
Top Bottom