[MediaWiki-l] hide talk namespaces from "Special:Search" Advanced

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] hide talk namespaces from "Special:Search" Advanced

rkevans
I use Flow (Structured Discussions) on all of my Talk namespaces.

My understanding is that Flow discussions are not text searchable using the mediawiki search tool.

Is there a way to eliminate the talk namespaces from the list of namespaces that result when you select "Advanced"  on the "Special:Search" page?

-Rich


_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: hide talk namespaces from "Special:Search" Advanced

Brian Wolff
Try something like (untested):

$wgHooks['SearchableNamespaces'][] = function (&$ns) {
  unset( $ns[NS_TALK] );
}

--
Brian

On Wed, Jul 11, 2018 at 6:18 PM, Evans, Richard K. (GRC-H000)
<[hidden email]> wrote:

> I use Flow (Structured Discussions) on all of my Talk namespaces.
>
> My understanding is that Flow discussions are not text searchable using the mediawiki search tool.
>
> Is there a way to eliminate the talk namespaces from the list of namespaces that result when you select "Advanced"  on the "Special:Search" page?
>
> -Rich
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: hide talk namespaces from "Special:Search" Advanced

rkevans
Neat. I may try that later. For now, I think I'm on to something with CSS, namely:

#mw-search-ns3001 { display:none; visibility:hidden; }

Which successfully removes the input checkbox, but I'm still struggling to figure out the css code for the input's label where the html is:

<label for="mw-search-ns4401">TWAPB talk</label>

I've never encountered the "label for" html tag.

-Rich

-----Original Message-----
From: MediaWiki-l [mailto:[hidden email]] On Behalf Of Brian Wolff
Sent: Wednesday, July 11, 2018 2:27 PM
To: MediaWiki announcements and site admin list
Subject: Re: [MediaWiki-l] hide talk namespaces from "Special:Search" Advanced

Try something like (untested):

$wgHooks['SearchableNamespaces'][] = function (&$ns) {
  unset( $ns[NS_TALK] );
}

--
Brian

On Wed, Jul 11, 2018 at 6:18 PM, Evans, Richard K. (GRC-H000) <[hidden email]> wrote:

> I use Flow (Structured Discussions) on all of my Talk namespaces.
>
> My understanding is that Flow discussions are not text searchable using the mediawiki search tool.
>
> Is there a way to eliminate the talk namespaces from the list of namespaces that result when you select "Advanced"  on the "Special:Search" page?
>
> -Rich
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: [non-nasa source] Re: hide talk namespaces from "Special:Search" Advanced

rkevans
Got it! \o/

#mw-search-ns4401 { display:none; visibility:hidden; }
label[for=mw-search-ns4401] { display:none; visibility:hidden; }

I also tested the Hook script you shared.. it crashed the site. If you are bored and have the interest, I would still love to see that script work. I can think of other ways it might be helpful. But for now, I'm comfortable with using CSS to hide the talk page options.

Thanks, Brian!

-Rich

-----Original Message-----
From: MediaWiki-l [mailto:[hidden email]] On Behalf Of Evans, Richard K. (GRC-H000)
Sent: Wednesday, July 11, 2018 2:40 PM
To: MediaWiki announcements and site admin list
Subject: [non-nasa source] Re: [MediaWiki-l] hide talk namespaces from "Special:Search" Advanced

Neat. I may try that later. For now, I think I'm on to something with CSS, namely:

#mw-search-ns3001 { display:none; visibility:hidden; }

Which successfully removes the input checkbox, but I'm still struggling to figure out the css code for the input's label where the html is:

<label for="mw-search-ns4401">TWAPB talk</label>

I've never encountered the "label for" html tag.

-Rich

-----Original Message-----
From: MediaWiki-l [mailto:[hidden email]] On Behalf Of Brian Wolff
Sent: Wednesday, July 11, 2018 2:27 PM
To: MediaWiki announcements and site admin list
Subject: Re: [MediaWiki-l] hide talk namespaces from "Special:Search" Advanced

Try something like (untested):

$wgHooks['SearchableNamespaces'][] = function (&$ns) {
  unset( $ns[NS_TALK] );
}

--
Brian

On Wed, Jul 11, 2018 at 6:18 PM, Evans, Richard K. (GRC-H000) <[hidden email]> wrote:

> I use Flow (Structured Discussions) on all of my Talk namespaces.
>
> My understanding is that Flow discussions are not text searchable using the mediawiki search tool.
>
> Is there a way to eliminate the talk namespaces from the list of namespaces that result when you select "Advanced"  on the "Special:Search" page?
>
> -Rich
>
>
> _______________________________________________
> 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-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: hide talk namespaces from "Special:Search" Advanced

Brian Wolff
In reply to this post by rkevans
The label tag labels form controls (e.g. If you click on the label, it
causes the checkbox to be ticked. Its also important for
accessibility).

You can select with something like:

#mw-search-ns3001, label[for=mw-search-ns3001] { display:none }

An alternative selector is to use sibling selectors:

#mw-search-ns3001, #mw-search-ns3001 + label { display:none }

--
Brian

On Wed, Jul 11, 2018 at 6:40 PM, Evans, Richard K. (GRC-H000)
<[hidden email]> wrote:

> Neat. I may try that later. For now, I think I'm on to something with CSS, namely:
>
> #mw-search-ns3001 { display:none; visibility:hidden; }
>
> Which successfully removes the input checkbox, but I'm still struggling to figure out the css code for the input's label where the html is:
>
> <label for="mw-search-ns4401">TWAPB talk</label>
>
> I've never encountered the "label for" html tag.
>
> -Rich
>
> -----Original Message-----
> From: MediaWiki-l [mailto:[hidden email]] On Behalf Of Brian Wolff
> Sent: Wednesday, July 11, 2018 2:27 PM
> To: MediaWiki announcements and site admin list
> Subject: Re: [MediaWiki-l] hide talk namespaces from "Special:Search" Advanced
>
> Try something like (untested):
>
> $wgHooks['SearchableNamespaces'][] = function (&$ns) {
>   unset( $ns[NS_TALK] );
> }
>
> --
> Brian
>
> On Wed, Jul 11, 2018 at 6:18 PM, Evans, Richard K. (GRC-H000) <[hidden email]> wrote:
>> I use Flow (Structured Discussions) on all of my Talk namespaces.
>>
>> My understanding is that Flow discussions are not text searchable using the mediawiki search tool.
>>
>> Is there a way to eliminate the talk namespaces from the list of namespaces that result when you select "Advanced"  on the "Special:Search" page?
>>
>> -Rich
>>
>>
>> _______________________________________________
>> 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-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: [non-nasa source] Re: hide talk namespaces from "Special:Search" Advanced

Brian Wolff
In reply to this post by rkevans
Whoops, I missed a semi-colon. Should be:


$wgHooks['SearchableNamespaces'][] = function (&$ns) {
  unset( $ns[NS_TALK] );
};

With the semi-colon after the closing brace.

On Wed, Jul 11, 2018 at 7:02 PM, Evans, Richard K. (GRC-H000)
<[hidden email]> wrote:

> Got it! \o/
>
> #mw-search-ns4401 { display:none; visibility:hidden; }
> label[for=mw-search-ns4401] { display:none; visibility:hidden; }
>
> I also tested the Hook script you shared.. it crashed the site. If you are bored and have the interest, I would still love to see that script work. I can think of other ways it might be helpful. But for now, I'm comfortable with using CSS to hide the talk page options.
>
> Thanks, Brian!
>
> -Rich
>
> -----Original Message-----
> From: MediaWiki-l [mailto:[hidden email]] On Behalf Of Evans, Richard K. (GRC-H000)
> Sent: Wednesday, July 11, 2018 2:40 PM
> To: MediaWiki announcements and site admin list
> Subject: [non-nasa source] Re: [MediaWiki-l] hide talk namespaces from "Special:Search" Advanced
>
> Neat. I may try that later. For now, I think I'm on to something with CSS, namely:
>
> #mw-search-ns3001 { display:none; visibility:hidden; }
>
> Which successfully removes the input checkbox, but I'm still struggling to figure out the css code for the input's label where the html is:
>
> <label for="mw-search-ns4401">TWAPB talk</label>
>
> I've never encountered the "label for" html tag.
>
> -Rich
>
> -----Original Message-----
> From: MediaWiki-l [mailto:[hidden email]] On Behalf Of Brian Wolff
> Sent: Wednesday, July 11, 2018 2:27 PM
> To: MediaWiki announcements and site admin list
> Subject: Re: [MediaWiki-l] hide talk namespaces from "Special:Search" Advanced
>
> Try something like (untested):
>
> $wgHooks['SearchableNamespaces'][] = function (&$ns) {
>   unset( $ns[NS_TALK] );
> }
>
> --
> Brian
>
> On Wed, Jul 11, 2018 at 6:18 PM, Evans, Richard K. (GRC-H000) <[hidden email]> wrote:
>> I use Flow (Structured Discussions) on all of my Talk namespaces.
>>
>> My understanding is that Flow discussions are not text searchable using the mediawiki search tool.
>>
>> Is there a way to eliminate the talk namespaces from the list of namespaces that result when you select "Advanced"  on the "Special:Search" page?
>>
>> -Rich
>>
>>
>> _______________________________________________
>> 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-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
Reply | Threaded
Open this post in threaded view
|

Re: [non-nasa source] Re: hide talk namespaces from "Special:Search" Advanced

rkevans
Heh heh.. cool. thanks :-)

I'm pretty happy with the CSS solution for now.
-Rich

-----Original Message-----
From: MediaWiki-l [mailto:[hidden email]] On Behalf Of Brian Wolff
Sent: Wednesday, July 11, 2018 3:06 PM
To: MediaWiki announcements and site admin list
Subject: Re: [MediaWiki-l] [non-nasa source] Re: hide talk namespaces from "Special:Search" Advanced

Whoops, I missed a semi-colon. Should be:


$wgHooks['SearchableNamespaces'][] = function (&$ns) {
  unset( $ns[NS_TALK] );
};

With the semi-colon after the closing brace.

On Wed, Jul 11, 2018 at 7:02 PM, Evans, Richard K. (GRC-H000) <[hidden email]> wrote:

> Got it! \o/
>
> #mw-search-ns4401 { display:none; visibility:hidden; }
> label[for=mw-search-ns4401] { display:none; visibility:hidden; }
>
> I also tested the Hook script you shared.. it crashed the site. If you are bored and have the interest, I would still love to see that script work. I can think of other ways it might be helpful. But for now, I'm comfortable with using CSS to hide the talk page options.
>
> Thanks, Brian!
>
> -Rich
>
> -----Original Message-----
> From: MediaWiki-l [mailto:[hidden email]] On
> Behalf Of Evans, Richard K. (GRC-H000)
> Sent: Wednesday, July 11, 2018 2:40 PM
> To: MediaWiki announcements and site admin list
> Subject: [non-nasa source] Re: [MediaWiki-l] hide talk namespaces from
> "Special:Search" Advanced
>
> Neat. I may try that later. For now, I think I'm on to something with CSS, namely:
>
> #mw-search-ns3001 { display:none; visibility:hidden; }
>
> Which successfully removes the input checkbox, but I'm still struggling to figure out the css code for the input's label where the html is:
>
> <label for="mw-search-ns4401">TWAPB talk</label>
>
> I've never encountered the "label for" html tag.
>
> -Rich
>
> -----Original Message-----
> From: MediaWiki-l [mailto:[hidden email]] On
> Behalf Of Brian Wolff
> Sent: Wednesday, July 11, 2018 2:27 PM
> To: MediaWiki announcements and site admin list
> Subject: Re: [MediaWiki-l] hide talk namespaces from "Special:Search"
> Advanced
>
> Try something like (untested):
>
> $wgHooks['SearchableNamespaces'][] = function (&$ns) {
>   unset( $ns[NS_TALK] );
> }
>
> --
> Brian
>
> On Wed, Jul 11, 2018 at 6:18 PM, Evans, Richard K. (GRC-H000) <[hidden email]> wrote:
>> I use Flow (Structured Discussions) on all of my Talk namespaces.
>>
>> My understanding is that Flow discussions are not text searchable using the mediawiki search tool.
>>
>> Is there a way to eliminate the talk namespaces from the list of namespaces that result when you select "Advanced"  on the "Special:Search" page?
>>
>> -Rich
>>
>>
>> _______________________________________________
>> 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-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