• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Feature
    • Filter out templates in search results (or at least position them last)

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Filter out templates in search results (or at least position them last)

    • Issue Tools
      • View Changes
    1. issueid=4907 February 8, 2017 9:45 AM
      ACL ACL is offline
      Regular Member
      Filter out templates in search results (or at least position them last)

      As I understand from reading issue 3866, the VaultWiki search mechanism was rewritten so that attachment content types could be filtered out in search results.

      I'm wondering if it might be possible to also filter out template pages (or at least position them last after other search results)? Whilst searching for a specific template could be useful for certain wiki contributors it is a bit of a nuisance for non-contributors or when searching from the forum area/for content.

      I see the content type for a template shows as "Page" on the search page even when "Treat this page as a: Template" is checked. In the sidebar settings I don't see a template content type, only: page, area, feed, book, category, attach, redirect, special.


      Thanks for considering this change!
    Issue Details
    Issue Number 4907
    Issue Type Feature
    Project VaultWiki 4.x Series
    Category Search
    Status Implemented
    Priority 7 - Minor Features / Enhancements
    Suggested Version 4.0.16
    Implemented Version 4.1.0 RC 3
    Milestone (none)
    Software DependencyXenForo 1.x
    License TypePaid
    Votes for this feature 0
    Votes against this feature 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. February 8, 2017 10:30 AM
      pegasus pegasus is offline
      VaultWiki Team
      On the advanced search form, you will see a section like "Search by Page Type"
      If you select "Any" (the default) it will show you results of all types. If you select "Page" by itself, it should show you pages that don't also count as something else - so it will only show you templates if you select "Templates"

      However, I see on the wiki's sidebar search box that "Template" is not available as one of the filter choices. In this case, selecting "Page" in the sidebar probably shows templates in the drop-down too (but pressing enter returns search results that do not include templates). If anything, this is a jarring inconsistency; I will look into it.
      Reply Reply
    2. February 8, 2017 10:54 AM
      ACL ACL is offline
      Regular Member
      Thanks.

      I would expect a significant portion of users on my website probably only use the simple search (the same people who wouldn't regularly contribute to the wiki and hence have no need to view template pages). So is it possible to (by default) exclude Template pages from the standard non-advanced Xenforo search page too? Ideally when doing quick searches by typing in a query and pressing enter it would be great if Template pages were either filtered out altogether or placed after all other content types (including forum topics and posts).

      It is interesting that doing an advanced search using "Search Wiki Pages" (on Xenforo) filters out the Template pages but this is because I've given all the templates a prefix (of Template, to retain some familiarity with MediaWiki URLs) and the default advanced search setting for Prefix is " " (none/blank). So if the simple search also worked in the same way (ignore pages with prefixes) that would also address my issue ... but might not be as useful to others.
      Reply Reply
    3. February 8, 2017 12:09 PM
      pegasus pegasus is offline
      VaultWiki Team
      I don't know if this would be possible with the XenForo simple search, since I think it is a general search that doesn't apply any filters and might not support that capability. If it is possible to add filters without messing up results from other content types (like forum posts), then I will see about adding an admin setting for simple search filters.

      Your experience with the advanced search sounds like a bug; technically, the default search selection for Prefix should match the output of the simple search.
      Reply Reply
    4. February 20, 2017 1:26 PM
      ACL ACL is offline
      Regular Member
      Another option for hiding templates in simple search, if perhaps a little drastic, might be to look at providing an admin setting to not index "Template" pages at all. While this approach would work for me since I'm keeping all Templates in a dedicated Area, it probably doesn't have broad enough appeal with other VaultWiki customers to make the change worth the development time...

      Then again, a similar but different way that would still achieve the same outcome I'd like would be to exclude specific Areas from being indexed (since it would fit nicely in the Areas administration section and there is already an option to request external search engines not crawl/index selected Areas on their servers) - this one might be more useful/flexible of the two ideas? A third party paid Xenforo resource exists which offers this kind of functionality but for specific forum node sections: https://xenforo.com/community/resour...e-forums.3476/

      Anyway, these are just a couple of ideas should the simple search be unable to apply filters to the results
      Reply Reply
    5. March 23, 2020 5:23 PM
      pegasus pegasus is offline
      VaultWiki Team
      In the next release, added a new setting under Wiki: Miscellaneous > Exclude Content-Types from Generic Search Results, to both XF 1.x and 2.x.

      Wiki content matching the selected content-types are excluded from general search results (advanced search still works as before).
      This definitely does not work in XenForo 1.x if you are using Enhanced Search. This is due to XF 1.x search not natively supporting exclusion search criteria.
      I expect it to work in XenForo 2.x even with Enhanced Search (since XF 2.x search natively supports exclusion criteria), but YMMV (attempting to exclude metadata fields that are not registered as valid enhanced-search fields may yield unexpected results or error messages -- more testing is needed).
      This is not possible in the current search implementation under vBulletin, due to no native support for metadata fields. We could potentially redesign VaultWiki's indexes to put metadata fields into the normal keyword fields, if there is enough demand for this on vBulletin 4.
      Reply Reply
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 1:21 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.