SpecialSearchResultsPrepend lets you add html directly to the search page
but doesn't let you add your own results. The html actually gets injected
above the search for so it'd take some css trickery to move it. Example:
"This wiki is using a new search engine. (Learn
more<https://www.mediawiki.org/wiki/Special:MyLanguage/Help:CirrusSearch…
on
https://www.mediawiki.org/wiki/Special:Search
Beyond that I think you have three options:
1. Extend SearchMySQL.
2. Add a hook yourself and know that you are running a patched version of
core. I'm happy to help get the patch upstream if you don't want to live
with that burden forever.
3. Add that pages with importTextFile.
Nik
On Thu, Dec 12, 2013 at 9:15 PM, Paul Dugas <paul(a)dugasenterprises.com>wrote;wrote:
I have an extension using the ArticleFromTitle hook to
generate pages
for components of a large system we operate. There are approximately
6000 components at the moment with static inventory and config data in
a database and live status data in a number of other systems. We are
using MediaWiki as a historical maintenance knowledge-base for the
staff. With this extension, we can integrate all the data for each
device in one place. We can hit MyNS:DeviceName and get a page that
describes a device and that page can link to other pages in the main
namespace that techs create with vendor details, model info, manuals,
etc. We can even keep a talk page for each device. Very handy.
Trouble now is I want to be able to find devices using the search
feature. SpecialSearchResults looked promising but that only gets
called when there is at least one match in "normal" pages. So, I
looked at SpecialSearchNoResults but that doesn't allow me to add to
the empty results. Doesn't anyone have a suggestion on how I could go
about this? I really want to avoid generating the text of pages
externally periodically and loading them into the wiki using the
importTextFile maintenance script.
The only other thought I had was to extend the SearchMySQL class and
change $wgSearchType but I'm hoping to avoid that.
Any ideas?
--Paul
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l