Thread Ban [Paid] [Deleted]

  • Thread starter Thread starter Syndol
  • Start date Start date
I've already added a check to ensure the thread index is set and will now also add the instanceof check as well although I usually use it to check for redirects as they are less common.
I'm all for reducing potential conflict but there is always going to be an add-on that does things differently by design or otherwise and so I draw the line at 3 checks for an obvious response from a parent function.

I've added quite a few new options to this add-on and so a new version will be out soon.
 
Syndol updated Thread Ban with a new update entry:

Version 1.0.8

What's new:
  • Added option to display thread bans via a profile page tab. This tab can be seen by the banned member, administrators, and moderators only.
  • Added option to display thread ban count and link on the member card overlay (profile page tab option must be enabled). This tab can be seen by the banned member, administrators, and moderators only.
  • Added a list of current thread banned users to the thread tools menu. You may also ban a user from there.
  • Added option to...

Read the rest of this update entry...
 
Code:
ErrorException: Undefined index: isThreadBanned - library/ThreadBan/Model/Forum.php:75
Сгенерирована пользователем: Полный, Сегодня, в 19:34
Трассировка стэка

#0 /home/s/sm42/forum.x.su/public_html/library/ThreadBan/Model/Forum.php(75): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/s/sm42/fo...', 75, Array)
#1 /home/s/sm42/forum.x.su/public_html/library/XenForo/NodeHandler/Forum.php(85): ThreadBan_Model_Forum->getExtraForumDataForNodes(Array, Array)
#2 /home/s/sm42/forum.x.su/public_html/library/XenForo/Model/Node.php(571): XenForo_NodeHandler_Forum->getExtraDataForNodes(Array)
#3 /home/s/sm42/forum.x.su/public_html/library/XenForo/Model/Node.php(773): XenForo_Model_Node->mergeExtraNodeDataIntoNodeList(Array, Array)
#4 /home/s/sm42/forum.x.su/public_html/library/XenForo/Model/Node.php(745): XenForo_Model_Node->getNodeListDisplayData(Array, 0, 0, NULL)
#5 /home/s/sm42/forum.x.su/public_html/library/Nobita/IgnoreThread/Model/Node.php(7): XenForo_Model_Node->getNodeDataForListDisplay(false, 0, NULL)
#6 /home/s/sm42/forum.x.su/public_html/library/XenForo/ControllerPublic/Forum.php(40): Nobita_IgnoreThread_Model_Node->getNodeDataForListDisplay(false, 0)
#7 /home/s/sm42/forum.x.su/public_html/library/EWRporta/ControllerPublic/Forum.php(9): XenForo_ControllerPublic_Forum->actionIndex()
#8 /home/s/sm42/forum.x.su/public_html/library/WidgetFramework/XenForo/ControllerPublic/Forum.php(13): EWRporta_ControllerPublic_Forum->actionIndex()
#9 /home/s/sm42/forum.x.su/public_html/library/AttachStats/ControllerPublic/AttachStats.php(7): WidgetFramework_XenForo_ControllerPublic_Forum->actionIndex()
#10 /home/s/sm42/forum.x.su/public_html/library/*******/MetadataEssential/ControllerPublic/Forum.php(34): AttachStats_ControllerPublic_AttachStats->actionIndex()
#11 /home/s/sm42/forum.x.su/public_html/library/CTA/FeaturedThreads/ControllerPublic/Forum.php(7): *******_MetadataEssential_ControllerPublic_Forum->actionIndex()
#12 /home/s/sm42/forum.xa.su/public_html/library/Andy/Calendar/ControllerPublic/Forum.php(12): CTA_FeaturedThreads_ControllerPublic_Forum->actionIndex()
#13 /home/s/sm42/forum.x.su/public_html/library/Andy/Statistics/ControllerPublic/Forum.php(8): Andy_Calendar_ControllerPublic_Forum->actionIndex()
#14 /home/s/sm42/forum.x.su/public_html/library/XenForo/FrontController.php(347): Andy_Statistics_ControllerPublic_Forum->actionIndex()
#15 /home/s/sm42/forumx.su/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#16 /home/s/sm42/forum.x.su/public_html/index.php(13): XenForo_FrontController->run()
#17 {main}

Содержимое запроса

array(3) {
  ["url"] => string(29) "http://www.forum.xa.su/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
@santamo - The error is caused by a compatibility issue with the add-on Ignore Threads.
That add-on overwrites the function getThreadsByIds() and does not call the parent therefore the expected info is not returned.

While I can easily suppress the error in my code, both the overlay ban notice and thread ban alerts (for ignored threads), will no longer work.
I will update my code to suppress the error but just keep the above in mind if you decide to keep both add-ons installed.
 
Mate, I'm no longer seeing the image come up in 1.3.1 with 1.0.9. I've checked the image location on server, got it under default, got it under my actual style directory... thread banned a member and not even seeing it when inspecting the element.

Never had this issue before.
 
@Anthony Parsons - please ensure that all the template modifications show up with a green indicator (ACP->Appearance->Template Modification).
If they do not then you will need to adjust those templates to work with your edited template(s).
 
Hmmm... thanks, I forgot about that one. Weird... nearly ever add-on isn't using my actual template, though most work correctly nonetheless. I will have to go digging and do some changes, I guess.
 
Excellent add-on.

A couple suggestions:

1. If you a user with thread ban permissions doesn't have permission to permanently ban someone, the Permanent option should not be visible in the select drop down box (it's currently visible, but grayed out).

2. In addition to "Default View Thread", there should be a "View Thread Selectable" (Yes/No), where No would prevent a moderator (or someone with thread ban perms) from selecting an option different than what I set the default to
 
@thedude - thanks for your feedback.
In regards to your comments:
1). The same controls are used to edit a ban and therefore the permanent selection is grayed out. I figured it would be a little confusing to sometimes have that option displayed and other times not. You could easily modify the 'threadban' template to suit your personal preference.
2). If enough people are interested in having this option globally restricted via the options page then I'd be happy to look into it.
 
Small issue, not sure who's add-on causes it. When using Lukes best post add-on, the pages create a lot of queries from this add-on as per below (20+ queries of this instance on best post pages):

Screen Shot 2014-06-06 at 7.17.00 pm.webp
 
I seem to be calling this through the canViewAttachmentsInThread() function which is usually called when viewing a thread.
From your example above, it would seem that function is being called for a list of threads?! Not sure.
Since it is a paid add-on I'm unable to check it out.
Please start a conversation with me and Luke as I'll need his permission to look at his code to see where/how the function is being called.
 
Top Bottom