Hi,
It seems that a search always leads to Special:Search, no matter what. That has to do with the search parameter in the url. Is there an elegant way to make a search request go to another search page?
Thanks! Ad
like what?
On Thu, Jul 21, 2016 at 10:27 AM, Ad Strack van Schijndel < ad.strackvanschijndel@gmail.com> wrote:
Hi,
It seems that a search always leads to Special:Search, no matter what. That has to do with the search parameter in the url. Is there an elegant way to make a search request go to another search page?
Thanks! Ad _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
A configuration setting would be nice, but I couldn't find one. Same with hooks.
So any way would do I suppose.
We created an extension with a new search page by making a subclass of SpecialSearch and changing some functions and adding some hooks. That seems like a good idea but when searching there is always a redirect to Special:Search and I can't figure out how to change that.
On 21 Jul 2016, at 16:29, John phoenixoverride@gmail.com wrote:
like what?
On Thu, Jul 21, 2016 at 10:27 AM, Ad Strack van Schijndel < ad.strackvanschijndel@gmail.com> wrote:
Hi,
It seems that a search always leads to Special:Search, no matter what. That has to do with the search parameter in the url. Is there an elegant way to make a search request go to another search page?
Thanks! Ad _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
That's probably a question that Discovery could answer. Forwarding to that list...
On Fri, Jul 22, 2016 at 11:01 AM, Ad Strack van Schijndel ad.strackvanschijndel@gmail.com wrote:
A configuration setting would be nice, but I couldn't find one. Same with hooks.
So any way would do I suppose.
We created an extension with a new search page by making a subclass of SpecialSearch and changing some functions and adding some hooks. That seems like a good idea but when searching there is always a redirect to Special:Search and I can't figure out how to change that.
On 21 Jul 2016, at 16:29, John phoenixoverride@gmail.com wrote:
like what?
On Thu, Jul 21, 2016 at 10:27 AM, Ad Strack van Schijndel < ad.strackvanschijndel@gmail.com> wrote:
Hi,
It seems that a search always leads to Special:Search, no matter what. That has to do with the search parameter in the url. Is there an elegant way to make a search request go to another search page?
Thanks! Ad _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I guess you should modify your skin template date either directly or via hook to override 'searchtitle' data item. By default $template->get('searchtitle') returns name of Special:Search page [1]. You should change it to yours.
1. see /includes/skins/SkinTemplate.php:312
22.07.2016 12:16, Guillaume Lederrey пишет:
That's probably a question that Discovery could answer. Forwarding to that list...
On Fri, Jul 22, 2016 at 11:01 AM, Ad Strack van Schijndel ad.strackvanschijndel@gmail.com wrote:
A configuration setting would be nice, but I couldn't find one. Same with hooks.
So any way would do I suppose.
We created an extension with a new search page by making a subclass of SpecialSearch and changing some functions and adding some hooks. That seems like a good idea but when searching there is always a redirect to Special:Search and I can't figure out how to change that.
On 21 Jul 2016, at 16:29, John phoenixoverride@gmail.com wrote:
like what?
On Thu, Jul 21, 2016 at 10:27 AM, Ad Strack van Schijndel < ad.strackvanschijndel@gmail.com> wrote:
Hi,
It seems that a search always leads to Special:Search, no matter what. That has to do with the search parameter in the url. Is there an elegant way to make a search request go to another search page?
Thanks! Ad _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I have done what you said and it made a difference, but did not yield the desired result.
The search parameter in the url is still the boss and that makes it redirect to Special:Search in stead of the new one.
By the way I changed not only 'searchtitle' but also 'searchaction', which can be seen in the template, but as I said still the Special:Search comes up.
On 22 Jul 2016, at 11:21, Vedmaka god.vedmaka@gmail.com wrote:
I guess you should modify your skin template date either directly or via hook to override 'searchtitle' data item. By default $template->get('searchtitle') returns name of Special:Search page [1]. You should change it to yours.
- see /includes/skins/SkinTemplate.php:312
22.07.2016 12:16, Guillaume Lederrey пишет:
That's probably a question that Discovery could answer. Forwarding to that list...
On Fri, Jul 22, 2016 at 11:01 AM, Ad Strack van Schijndel ad.strackvanschijndel@gmail.com wrote:
A configuration setting would be nice, but I couldn't find one. Same with hooks.
So any way would do I suppose.
We created an extension with a new search page by making a subclass of SpecialSearch and changing some functions and adding some hooks. That seems like a good idea but when searching there is always a redirect to Special:Search and I can't figure out how to change that.
On 21 Jul 2016, at 16:29, John phoenixoverride@gmail.com wrote:
like what?
On Thu, Jul 21, 2016 at 10:27 AM, Ad Strack van Schijndel < ad.strackvanschijndel@gmail.com> wrote:
Hi,
It seems that a search always leads to Special:Search, no matter what. That has to do with the search parameter in the url. Is there an elegant way to make a search request go to another search page?
Thanks! Ad _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
--
Mediawiki & Semantic Mediawiki support: https://mediawiki.pro https://mediawiki.pro/
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I found the cause of the special treatment of 'search' parameters in the url. In the MediaWiki::parseTitle() function there is this piece of code:
if ( $request->getCheck( 'search' ) ) { // Compatibility with old search URLs which didn't use Special:Search // Just check for presence here, so blank requests still // show the search page when using ugly URLs (bug 8054). $ret = SpecialPage::getTitleFor( 'Search' ); }
No hooks anywhere there to influence this, so it seems that the only way to use another search page is to change the MediaWiki class :-).
Or am I missing some other option?
On 23 Jul 2016, at 13:58, Ad Strack van Schijndel ad.strackvanschijndel@gmail.com wrote:
I have done what you said and it made a difference, but did not yield the desired result.
The search parameter in the url is still the boss and that makes it redirect to Special:Search in stead of the new one.
By the way I changed not only 'searchtitle' but also 'searchaction', which can be seen in the template, but as I said still the Special:Search comes up.
On 22 Jul 2016, at 11:21, Vedmaka <god.vedmaka@gmail.com mailto:god.vedmaka@gmail.com> wrote:
I guess you should modify your skin template date either directly or via hook to override 'searchtitle' data item. By default $template->get('searchtitle') returns name of Special:Search page [1]. You should change it to yours.
- see /includes/skins/SkinTemplate.php:312
22.07.2016 12:16, Guillaume Lederrey пишет:
That's probably a question that Discovery could answer. Forwarding to that list...
On Fri, Jul 22, 2016 at 11:01 AM, Ad Strack van Schijndel <ad.strackvanschijndel@gmail.com mailto:ad.strackvanschijndel@gmail.com> wrote:
A configuration setting would be nice, but I couldn't find one. Same with hooks.
So any way would do I suppose.
We created an extension with a new search page by making a subclass of SpecialSearch and changing some functions and adding some hooks. That seems like a good idea but when searching there is always a redirect to Special:Search and I can't figure out how to change that.
On 21 Jul 2016, at 16:29, John <phoenixoverride@gmail.com mailto:phoenixoverride@gmail.com> wrote:
like what?
On Thu, Jul 21, 2016 at 10:27 AM, Ad Strack van Schijndel < ad.strackvanschijndel@gmail.com mailto:ad.strackvanschijndel@gmail.com> wrote:
Hi,
It seems that a search always leads to Special:Search, no matter what. That has to do with the search parameter in the url. Is there an elegant way to make a search request go to another search page?
Thanks! Ad _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
--
Mediawiki & Semantic Mediawiki support: https://mediawiki.pro https://mediawiki.pro/
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
You could probably take over the core Special:Search entirely and replace it with your own special page with the 'SpecialPage_initList' hook from SpecialPageFactory. (I didn't test that it works.)
I'm not sure what you propose. If it means giving the search page another name, that won't work. That leads to an error 'Too many redirects'. Changing SpecialSearch.php will work of course, but that is not the idea of an extension, is it?
On 25 Jul 2016, at 17:01, Bartosz Dziewoński matma.rex@gmail.com wrote:
You could probably take over the core Special:Search entirely and replace it with your own special page with the 'SpecialPage_initList' hook from SpecialPageFactory. (I didn't test that it works.)
-- Bartosz Dziewoński
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
No, I mean killing the original Special:Search page and callings yours Special:Search. Using that hook you should my able to set `$list['Search'] = 'MySpecialSearchWhatever'`.
mediawiki-l@lists.wikimedia.org