Results 1 to 6 of 6

Need help: Excluding Forums from search when searching for 0 reply threads

This is a discussion on Need help: Excluding Forums from search when searching for 0 reply threads within the Off-Topic & Chit Chat forums, part of the Focus on Members category; Hi Since 4.0.4 the ability to search for threads with 0 replies was added again. However for this search the ...

  1. #1
    Senior Member StarBuG's Avatar
    Real Name
    StarBuG
    Join Date
    Jul 2007
    Posts
    480
    Liked
    15 times

    Unhappy Need help: Excluding Forums from search when searching for 0 reply threads

    Hi

    Since 4.0.4 the ability to search for threads with 0 replies was added again.
    However for this search the exclusion of forums parameter does not work.

    this url should work but the exclusion does not:

    Code:
    search.php?do=process&contenttype=vBForum_Post&replyless=1&replylimit=0&exclude=10,15
    Bug Issued: klick

    If anyone can tell me how to fix this that would really be appreciated.
    Waiting another 2+ month for a fix would be painful.

    This is THE most needed feature in my medical help forum that is broken since the upgrade to the 4 series

    Please help me

    StarBuG

  2. #2
    Junior Member
    Real Name
    Lee Rain
    Join Date
    Jun 2010
    Posts
    3
    Liked
    0 times
    Hey StarBuG
    I can't access http://tracker.vbulletin.com/browse/VBIV-7593,so i can't help you
    Last edited by Ceri May; 06-25-2010 at 01:27 PM.

  3. #3
    Senior Member
    Real Name
    Ceri May
    Join Date
    Jul 2009
    Location
    United Kingdom
    Posts
    1,726
    Liked
    15 times
    Blog Entries
    1
    Hey Starbug,

    The correct URL would be

    Code:
    /search.php?do=process&contenttypeid=1&replyless=1&replylimit=0&exclude=10,15
    You need to use contenttypeid=1 instead of contenttype for more complex searches like these.

    In case it help also

    Code:
    '^search\.php\?do=process&contenttypeid=1&replyless=1&replylimit=0&exclude=10,15$' => '/search/noreply/'
    would be an example CRR for this and similar to what I use.

    Ceri
    Last edited by Ceri May; 06-25-2010 at 01:54 PM.

  4. #4
    Senior Member StarBuG's Avatar
    Real Name
    StarBuG
    Join Date
    Jul 2007
    Posts
    480
    Liked
    15 times
    what is the difference between "contenttypeid=1" and "contenttype=vBForum_Post"

    Returns exactly the same result ?

  5. #5
    Senior Member
    Real Name
    Ceri May
    Join Date
    Jul 2009
    Location
    United Kingdom
    Posts
    1,726
    Liked
    15 times
    Blog Entries
    1
    I don't know that would be a question for vB... I simply found the correct code by inspecting the search form and checking the fields used on the "Search Single Content Type" and it uses contenttypeid where as contenttype is used on "Search Multiple Content Types" and doesn't work for what you are trying to do.

    Ceri

  6. #6
    Senior Member StarBuG's Avatar
    Real Name
    StarBuG
    Join Date
    Jul 2007
    Posts
    480
    Liked
    15 times
    Both work and return exactly the same result

    by the way for whom it is interesting:

    The fix for the exclusion bug is:

    edit the file search.php and find:
    Code:
    $search_type->add_advanced_search_filters($criteria, $vbulletin);
    Add below:
    Code:
    $vbulletin->input->clean_array_gpc('r', array(
            'exclude'    => TYPE_NOHTML,
            'include'    => TYPE_NOHTML
        ));
        if ($vbulletin->GPC['include'])
        {
            $list = explode(',', $vbulletin->GPC['include']);
            if (is_array($list))
            {
                $list = array_map('intval', $list);
                $criteria->add_forumid_filter($list, false);
            }
        }
        if ($vbulletin->GPC['exclude'])
        {
            $list = explode(',', $vbulletin->GPC['exclude']);
            if (is_array($list))
            {
                $list = array_map('intval', $list);
                $criteria->add_excludeforumid_filter($list);
            }
        }
    (you have to add this two times, for do=process and for do=finduser)

    Bug: http://tracker.vbulletin.com/browse/VBIV-7789

Similar Threads

  1. If condition for excluding forums
    By jbartle in forum General Discussion
    Replies: 2
    Last Post: 03-16-2009, 10:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •