[EAE Add-ons] Thread Count [Deleted]

Lawrence

Well-known member
Lawrence submitted a new resource:

[EAE Add-ons] Thread Count - Displays the number of threads started by members, and adds four permissions based on thread counts.

This add-on keeps track of the number of view-able threads your members created and displays their started thread totals in various sections of your forums. It also adds four new permissions based on thread counts, to be set per node if you choose.

After installation, be sure to go to AdminCP->Tools->Rebuild caches and select [EAE] Rebuild user thread counts.

Features:
  • respects forums that do not increase message counts for members. Threads moved in and out of these forums...

Read more about this resource...
 
@Lawrence You are forget add most major functionality for this add-on. Please note: This exmple image from my current Thread Count add-on.

Edit user > Profile info > Threads fields

ScreenShot00034.webp

Style properties > Messages > Total Threads option.

ScreenShot00035.webp
 
Hi, :) The add-on does add an option to display thread counts to the message user elements property. It is named Thread counts. You can see members thread counts being displayed with the posters info on my site, :)

I didn't add an option to change a members thread count when editing a user as when you decide to rebuild the members thread counts it will set the edited members total threads back to the correct count, so I didn't see the need to do this. If you strongly feel it should be added, I can add that in for the next update.

Lawrence
 
Hi, :) The add-on does add an option to display thread counts to the message user elements property. It is named Thread counts.

This should be named Total threads bacuse Xenforo Core add message for named Total message.

  • Total threads
  • Total message

I didn't add an option to change a members thread count when editing a user as when you decide to rebuild the members thread counts it will set the edited members total threads back to the correct count, so I didn't see the need to do this. If you strongly feel it should be added, I can add that in for the next update.

You should add this thread count fields because Xenforo Core also have Messages count fields. So this does not matter rebuild the members thread counts it will set the edited members total threads back to the correct count.
 
Last edited:
This should be named Total threads bacuse Xenforo Core add message for named Total message.

  • Total threads
  • Total message



You should add this thread count fields because Xenforo Core also have Messages count fields. So this does not matter rebuild the members thread counts it will set the edited members total threads back to the correct count.

Good morning. I changed the style property to read Total threads. I also added the option to edit a users thread count to the Edit user->Profile info pane.

I'm in the process of adding various warnings to display when a member does not have enough started threads to make a reply, create a new thread, view others content, or view node. When those are done I'll release the update.

Lawrence
 
Good morning. I changed the style property to read Total threads. I also added the option to edit a users thread count to the Edit user->Profile info pane.

I'm in the process of adding various warnings to display when a member does not have enough started threads to make a reply, create a new thread, view others content, or view node. When those are done I'll release the update.

Lawrence

Excellent improvement update! OK we will wait for this release then we will start using your add-on. Our old add-on developer @au lait no more available for development and support update.
 
Lawrence updated [EAE Add-ons] Thread Count with a new update entry:

New features added, and maintenance release.

New features:
  • admins can now adjust a users thread count from the edit user page.
  • messages are now displayed to a member displaying the total number of threads left for them to create to make a reply in a forum, view others threads, and create their own thread in the forum. Supports multiple messages if required, see screen shots.
Maintenance:
  • re-ordered the permissions to display them in a more meaningful way.
  • re-worded the message user info...

Read the rest of this update entry...
 
Get this Server error log after installed.

Code:
InvalidArgumentException: Accessed unknown getter 'eaetc_thread_count' on XF:User[409] src/XF/Mvc/Entity/Entity.php:194

Generated by: Unknown account Mar 2, 2020 at 7:47 PM

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(106): XF\Mvc\Entity\Entity->get('eaetc_thread_co...')
#1 internal_data/code_cache/templates/l1/s6/public/message_macros.php(206): XF\Mvc\Entity\Entity->offsetGet('eaetc_thread_co...')
#2 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array, Array)
#3 internal_data/code_cache/templates/l1/s6/public/post_macros.php(53): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#4 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array, Array)
#5 internal_data/code_cache/templates/l1/s6/public/thread_view.php(665): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#6 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array)
#7 src/addons/AddonsLab/LinkChecker/XF/Template/Templater.php(89): XF\Template\Templater->renderTemplate('thread_view', Array, true)
#8 src/XF/Template/Template.php(24): AddonsLab\LinkChecker\XF\Template\Templater->renderTemplate('public:thread_v...', Array)
#9 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#11 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#15 src/XF.php(391): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}

Request state

array(4) {
  ["url"] => string(35) "/threads/mix.64771/page-802"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Get this Server error log after installed.

Code:
InvalidArgumentException: Accessed unknown getter 'eaetc_thread_count' on XF:User[409] src/XF/Mvc/Entity/Entity.php:194

Generated by: Unknown account Mar 2, 2020 at 7:47 PM

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(106): XF\Mvc\Entity\Entity->get('eaetc_thread_co...')
#1 internal_data/code_cache/templates/l1/s6/public/message_macros.php(206): XF\Mvc\Entity\Entity->offsetGet('eaetc_thread_co...')
#2 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array, Array)
#3 internal_data/code_cache/templates/l1/s6/public/post_macros.php(53): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#4 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array, Array)
#5 internal_data/code_cache/templates/l1/s6/public/thread_view.php(665): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#6 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array)
#7 src/addons/AddonsLab/LinkChecker/XF/Template/Templater.php(89): XF\Template\Templater->renderTemplate('thread_view', Array, true)
#8 src/XF/Template/Template.php(24): AddonsLab\LinkChecker\XF\Template\Templater->renderTemplate('public:thread_v...', Array)
#9 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#11 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#15 src/XF.php(391): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}

Request state

array(4) {
  ["url"] => string(35) "/threads/mix.64771/page-802"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

I installed this add-on on a couple of sites and have not seen this error. Can you try disabling the paid registrations and link checker add-ons to see if that error goes away? Then re-enable each one to see if the error comes back.
 
I installed this add-on on a couple of sites and have not seen this error. Can you try disabling the paid registrations and link checker add-ons to see if that error goes away? Then re-enable each one to see if the error comes back.

I think this Server error log happened when add-on files uploaded but not installed completely. Now this Server error log not generated any more.
 
This Accessed unknown getter 'eaetc_thread_count' on XF:User Server error logs generated when add-on disabling.

Hi. I can not reproduce this on my dev install or my live install. I requested another user of this add-on to disable it, and they reported no issues. Do you have any add-ons installed that create's users or does something similar? I'll keep testing, though.
 
Good morning, @Nirjonadda. You are right, I just checked on my site and the thread count is not displayed where you have it highlighted. An oversight on my part, and I must apologise for that.

Thank you for letting me know, :)
 
After installation, be sure to go to AdminCP->Tools->Rebuild caches and select [EAE] Rebuild user thread counts.

May be worth to enqueue the rebuild job programatically at the end of the installation in the postInstall() method.
Could just do
Code:
public function postInstall() {
    \XF::app()->jobManager()->enqueue('My\Addon:My\Job');
}
 
May be worth to enqueue the rebuild job programatically at the end of the installation in the postInstall() method.
Could just do
Code:
public function postInstall() {
    \XF::app()->jobManager()->enqueue('My\Addon:My\Job');
}

No kidding. I didn't add it by my choice. No example required nor is it appreciated. A couple of my add-ons do call the jobManager after install.

@Nirjonadda new version will be released tomorrow.
 
Hi Lawrence I have a question I am not clear on from the screenshots. If I click on the total threads count will it bring me to a page that lists all of the threads started by that user, similar to the way all messages are listed as a search result?
 
Top Bottom