1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ignore More by Waindigo [Deleted]

Discussion in 'Add-on Releases' started by Jon W, Jun 30, 2014.

  1. Jon W

    Jon W Well-Known Member

    Waindigo submitted a new resource:

    Ignore More by Waindigo - Allow users to ignore threads and forums.

    Read more about this resource...
     
  2. lazy llama

    lazy llama Well-Known Member

    This looks really nice.

    I've hit a problem where a server error is thrown if there are no threads to show in the New Posts action:
    Code:
    ErrorException: Invalid argument supplied for foreach() - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php:15
    Generated By: Lazy Llama, 4 minutes ago
    Stack Trace
    #0 /usr/home/www/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php(15): XenForo_Application::handlePhpError(2, 'Invalid argumen...', '/usr/home/www/f...', 15, Array)
    #1 /usr/home/www/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_FindNew->actionPosts()
    #2 /usr/home/www/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #3 /usr/home/www/forums/index.php(13): XenForo_FrontController->run()
    #4 {main}
    Request State
    array(3) {
      ["url"] => string(41) "http://192.168.1.15/forums/find-new/posts"
      ["_GET"] => array(1) {
        ["/forums/find-new/posts"] => string(0) ""
      }
      ["_POST"] => array(0) {
      }
    }
     
  3. lazy llama

    lazy llama Well-Known Member

    Also getting a number of other errors which all look to be related.
    Code:
    ErrorException: Argument 1 passed to XenForo_ControllerPublic_Abstract::_getIgnoredContentUserNames() must be of the type array, null given, called in /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php on line 23 and defined - library/XenForo/ControllerPublic/Abstract.php:555
    Generated By: Lazy Llama, 22 minutes ago
    Stack Trace
    #0 /xxxx/forums/library/XenForo/ControllerPublic/Abstract.php(555): XenForo_Application::handlePhpError(4096, 'Argument 1 pass...', '/usr/home/www/v...', 555, Array)
    #1 /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php(23): XenForo_ControllerPublic_Abstract->_getIgnoredContentUserNames(NULL)
    #2 /xxxx/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_FindNew->actionPosts()
    #3 /xxxx/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #4 /xxxx/forums/index.php(13): XenForo_FrontController->run()
    #5 {main}
    Request State
    array(3) {
    ["url"] => string(44) "http://www.xxxx/forums/find-new/posts"
    ["_GET"] => array(1) {
    ["/forums/find-new/posts"] => string(0) ""
    }
    ["_POST"] => array(0) {
    }
    }
    
    Code:
    ErrorException: Undefined index: thread_ignore_forum_view - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php:25
    Generated By: Unknown Account, 4 minutes ago
    Stack Trace
    #0 /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php(25): XenForo_Application::handlePhpError(8, 'Undefined index...', '/usr/home/www/v...', 25, Array)
    #1 /xxxx/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_Forum->actionForum()
    #2 /usr/home/www/vhosts/www.urban75.net/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #3 /xxxx/forums/index.php(13): XenForo_FrontController->run()
    #4 {main}
    Request State
    array(3) {
      ["url"] => string(80) "http://www.xxxx/forums/forums/computers-web-and-general-tech.38/index.rss"
      ["_GET"] => array(1) {
        ["/forums/forums/computers-web-and-general-tech_38/index_rss"] => string(0) ""
      }
      ["_POST"] => array(0) {
      }
    }
    Code:
    ErrorException: Trying to get property of non-object - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php:23
    Generated By: Lazy Llama, 5 minutes ago
    Stack Trace
    #0 /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php(23): XenForo_Application::handlePhpError(8, 'Trying to get p...', '/usr/home/www/v...', 23, Array)
    #1 /xxxx/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_FindNew->actionPosts()
    #2 /xxxx/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #3 /xxxx/forums/index.php(13): XenForo_FrontController->run()
    #4 {main}
    Request State
    array(3) {
      ["url"] => string(44) "http://www.xxxx/forums/find-new/posts"
      ["_GET"] => array(1) {
        ["/forums/find-new/posts"] => string(0) ""
      }
      ["_POST"] => array(0) {
      }
    }
    Code:
    ErrorException: Undefined property: XenForo_ControllerResponse_Redirect::$subView - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php:23
    Generated By: Lazy Llama, 8 minutes ago
    Stack Trace
    #0 /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php(23): XenForo_Application::handlePhpError(8, 'Undefined prope...', '/usr/home/www/v...', 23, Array)
    #1 /xxxx/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_FindNew->actionPosts()
    #2 /xxxx/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #3 /xxxx/forums/index.php(13): XenForo_FrontController->run()
    #4 {main}
    Request State
    array(3) {
      ["url"] => string(44) "http://www.xxxx/forums/find-new/posts"
      ["_GET"] => array(1) {
        ["/forums/find-new/posts"] => string(0) ""
      }
      ["_POST"] => array(0) {
      }
    }
    This is with XenForo 1.3.3 and EnhancedSearch 1.1.0
     
    Last edited: Jul 1, 2014
    sinucello likes this.
  4. lazy llama

    lazy llama Well-Known Member

    Hi @Waindigo
    I think I've found the source of the problems listed above.

    In library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php there are two issues:
    1) if the parent action returns a redirect the code fails as it tries to fill in ignoredNames from threads that don't exist
    2) if the parent action returns an empty result the code fails as it tries to process the non-existent threads.

    I've changed this code in that file:
    PHP:
            $response parent::actionPosts();

            if (
    $response instanceof XenForo_ControllerResponse_View) {
                foreach (
    $response->subView->params['threads'] as &$thread) {
                    if (
    $thread['thread_ignore_new_posts'] || $thread['forum_ignore_new_posts']) {
                        
    $thread['isIgnored'] = true;
                    }
                }
            }

            
    $response->subView->params['ignoredNames'] = $this->_getIgnoredContentUserNames(
                
    $response->subView->params['threads']);

            return 
    $response;
    to
    PHP:
            $response parent::actionPosts();

            if (
    $response instanceof XenForo_ControllerResponse_View) {
                if (
    strcmp($response->subView->viewName,"XenForo_ViewPublic_FindNew_PostsNone") !==) {
                foreach (
    $response->subView->params['threads'] as &$thread) {
                    if (
    $thread['thread_ignore_new_posts'] || $thread['forum_ignore_new_posts']) {
                        
    $thread['isIgnored'] = true;
                    }
                }
             

                
    $response->subView->params['ignoredNames'] = $this->_getIgnoredContentUserNames(
                    
    $response->subView->params['threads']);
                }
            }
            return 
    $response;
    That seems to work.

    Basically, moved the "ignoredNames" processing inside the 'if' and check that the viewName isn't "...PostsNone". Probably not elegant but...

    Still getting unknown index for thread_ignore_new_posts and forum_ignore_new_posts though, so I'll keep looking.
     
    Last edited: Jul 1, 2014
  5. Jon W

    Jon W Well-Known Member

    Waindigo updated Ignore More by Waindigo with a new update entry:

    Version 1.0.0a released

    Read the rest of this update entry...
     
    lazy llama likes this.
  6. lazy llama

    lazy llama Well-Known Member

    Update has fixed all the errors, many thanks @Waindigo
     
  7. The Sandman

    The Sandman Well-Known Member

    Is there a way to remove the "Threads You Ignore" and "Forums You Ignore" links from the Navbar if you're not ignoring any threads/forums?
     
    tosiabunio likes this.
  8. The Sandman

    The Sandman Well-Known Member

    Moving the Threads You Ignore and Forums You Ignore links to the left of the New Posts links would be nice as well. :)
     
    tosiabunio likes this.
  9. lazy llama

    lazy llama Well-Known Member

    I just disabled that template mod and created a new one which adds the items to the navigation_visitor_tab instead.
     
    Jon W likes this.
  10. Jon W

    Jon W Well-Known Member

  11. Jon W

    Jon W Well-Known Member

    lazy llama likes this.
  12. Rambro

    Rambro Well-Known Member

    @Waindigo I installed this to try it out and it seems great, but the options on mobile are the first ones listed on the nav bar and have moved New Posts down to the dropdown menu. Any way to shuffle around the display order?
     
  13. Ludachris

    Ludachris Well-Known Member

    Suggestion for this plugin - ability to ignore an entire usergroup. Let's say you have a usergroup consisting of longtime members and they are annoyed with all of the duplicate questions they've seen hundreds/thousands of times before, which usually get posted by newer members that belong to an "entry level" usergroup. It would be really nice to allow them the ability to ignore that entire usergroup and not be subjected to their posts. Of course, there would need to be permissions built in to specify which usergroups can be ignored and which ones couldn't, as well as which usergroups have permission to use the feature.
     
  14. Ludachris

    Ludachris Well-Known Member

    Found this error in the server logs from last night:

    Code:
    ErrorException: Undefined index: thread_ignore_forum_view - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php:47
    Generated By: Unknown Account, Yesterday at 2:32 AM
    Stack Trace
    #0 /home/site/public_html/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php(47): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/dsmtuner/...', 47, Array)
    #1 /home/site/public_html/library/Waindigo/CustomFields/Extend/XenForo/ControllerPublic/Forum.php(29): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_Forum->actionForum()
    #2 /home/site/public_html/library/EWRporta/ControllerPublic/Forum.php(23): Waindigo_CustomFields_Extend_XenForo_ControllerPublic_Forum->actionForum()
    #3 /home/site/public_html/library/XenForo/FrontController.php(347): EWRporta_ControllerPublic_Forum->actionForum()
    #4 /home/site/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #5 /home/site/public_html/index.php(13): XenForo_FrontController->run()
    #6 {main}
    Request State
    array(3) {
    ["url"] => string(73) "http://www.dsmtuners.com/forum/articles-parts-feedback-reviews.47/page-13"
    ["_GET"] => array(0) {
    }
    ["_POST"] => array(0) {
    }
    }
    
    I tried using the Ignore feature on that page and had no issues. I couldn't reproduce the issue.
     
  15. dieketzer

    dieketzer Well-Known Member

    has anyone managed to modify this to also apply ignores to jaxels portal recent threads/news blocks?
     
  16. graham_w

    graham_w Active Member

    Does this work with Xenforo 1.4 ?
     
  17. lazy llama

    lazy llama Well-Known Member

    Yes, works fine on 1.4
     
  18. Ludachris

    Ludachris Well-Known Member

    Don't know that this plugin is causing the error, but I figured I'd ask here anyway... any ideas what the problem is?

    Code:
    Server Error Log
    Error Info
    ErrorException: Undefined index: thread_ignore_forum_view - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php:47
    Generated By: Unknown Account, Dec 2, 2014
    Stack Trace
    #0 /home/site/public_html/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php(47): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/site/...', 47, Array)
    #1 /home/site/public_html/library/Waindigo/CustomFields/Extend/XenForo/ControllerPublic/Forum.php(29): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_Forum->actionForum()
    #2 /home/site/public_html/library/EWRporta/ControllerPublic/Forum.php(23): Waindigo_CustomFields_Extend_XenForo_ControllerPublic_Forum->actionForum()
    #3 /home/site/public_html/library/NFLJ/Showcase/ControllerPublic/Forum.php(257): EWRporta_ControllerPublic_Forum->actionForum()
    #4 /home/site/public_html/library/XenForo/FrontController.php(347): NFLJ_Showcase_ControllerPublic_Forum->actionForum()
    #5 /home/site/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /home/site/public_html/index.php(13): XenForo_FrontController->run()
    #7 {main}
    Request State
    array(3) {
    ["url"] => string(73) "http://www.dsmtuners.com/forum/articles-parts-feedback-reviews.47/page-11"
    ["_GET"] => array(0) {
    }
    ["_POST"] => array(0) {
    }
    }
    I checked the page and can't find anything wrong with it.
     
  19. Jon W

    Jon W Well-Known Member

    Jon W updated Ignore More by Waindigo with a new update entry:

    Version 1.1.0 released

    Read the rest of this update entry...
     
  20. StarArmy

    StarArmy Active Member

    Thanks for the updates! I had disabled the plugin before due to the space its links took on the navigation bar, but now I can enable it again.
     
    Jon W likes this.

Share This Page