topicsolved icon indicating copy to clipboard operation
topicsolved copied to clipboard

Add Search Filters for Solved Topics

Open tierra opened this issue 10 years ago • 4 comments

Searching by solved topics forced display of results by topic and not by posts. It might be possible to support both options, but should at least support results by topic. This involves the following sub-tasks:

  • [ ] Add yes/no option to advanced search form.
  • [ ] Add SQL condition in keyword_search() for each search engine.
  • [ ] Add SQL condition in author_search() for each search engine.
  • [ ] Add unsolved_topics and your_unsolved_topics quick searches.

Note that the search results already show the solved indicators in both topic and post display modes.

tierra avatar Feb 16 '15 11:02 tierra

Currently, phpBB 3.1.3 does not contain the hooks necessary to add the solved search conditions to each search engine, so this is blocked. It will require patches to phpBB upstream to add the necessary hooks.

tierra avatar Feb 16 '15 11:02 tierra

I have no skills in this area but it is a needed feature and I want to help.

If I were to look for someone that could help with this, what skills should I look for?

And specifically, what are the hooks that are missing in phpBB? Perhaps I can get a feature request going with the phpBB guys.

SupBob avatar Feb 26 '15 16:02 SupBob

These are specifically going to be "core events" (not "template events"), but the process is pretty much the same either way: http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=42685

It's also worth noting that any patches being submitting to phpBB should wait until I've had a chance to test those patches with this extension first. It would be a shame to get new hooks added just to find out that they aren't adequate to implement this feature.

I can't tell you exactly which events are missing because we don't really know yet what kind of events will make the search engines the most flexible for other extensions as well. That needs to be discussed with the core phpBB team as well. They will only accept new events if they are useful for all extension authors, not just one extension.

tierra avatar Feb 26 '15 17:02 tierra

I'm just going to repeat some of the discussion we had on this topic on the phpBB forums for anyone else catching up on this issue:

I haven't started work on it besides taking a quick look at it to figure out that it needs new events. Each class derived from \phpbb\search\base needs these hooks inside of keyword_search() and author_search() since it needs to be able to modify the SQL search query. The events need to be the same in each fulltext search engine, so each of these files will need them:

phpbb/search/fulltext_mysql.php
phpbb/search/fulltext_native.php
phpbb/search/fulltext_postgres.php
phpbb/search/fulltext_sphinx.php

I'm a bit over my own head on how to implement the Sphinx engine changes, but if we get that far, we can just disable the feature if the forums are using Sphinx for now. The original MOD only supported the MySQL and native engines anyway, though I don't think Sphinx was possible in 3.0.x either.

tierra avatar Feb 26 '15 17:02 tierra