I'd like to create a custom namespace that isn't searchable. Defaulting search to be disabled for the namespace is easy with $wgNamespacesToBeSearchedDefault, but is there a way to keep it from showing up under the Search options of "my preferences"? This is for an intranet site, so I don't have any problem completely hiding the Search options tab for setting namespaces to search. But I do need the preferences available to users for other reasons. It would be nice to be able to accomplish this without editing any mediawiki files.
I'm using MW 1.16.
Thanks for reading.
Sal
Add some JavaScript to MediaWiki:Common.js that hides the items on Special:Preferences that you don't want shown.
If you have a later Mediawiki, you can use the $wgHiddenPrefs array to hide specific areas of Special:Preferences.
DanB
Perfect, thanks Dan
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Daniel Barrett Sent: Thursday, December 01, 2011 6:19 PM To: salquint@gmail.com; MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Custom Namespace hidden from search
Add some JavaScript to MediaWiki:Common.js that hides the items on Special:Preferences that you don't want shown.
If you have a later Mediawiki, you can use the $wgHiddenPrefs array to hide specific areas of Special:Preferences.
DanB
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Actually I take back "perfect" a little. $wgHiddenPrefs seems to be the right thing to use, but there's no documented support for hiding the ability to hide the "Advanced options" box under "Search options". Looking at includes/Preferences.php doesn't show any code that would respond to $wgHiddenPrefs in that way either. Am I stuck editing Preferences.php?
-----Original Message----- From: Sal Quintanilla [mailto:salquint@gmail.com] Sent: Thursday, December 01, 2011 7:02 PM To: 'MediaWiki announcements and site admin list'; 'salquint@gmail.com' Subject: RE: [Mediawiki-l] Custom Namespace hidden from search
Perfect, thanks Dan
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Daniel Barrett Sent: Thursday, December 01, 2011 6:19 PM To: salquint@gmail.com; MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Custom Namespace hidden from search
Add some JavaScript to MediaWiki:Common.js that hides the items on Special:Preferences that you don't want shown.
If you have a later Mediawiki, you can use the $wgHiddenPrefs array to hide specific areas of Special:Preferences.
DanB
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Nevermind, I jumped the gun on that one. Not all of the options are listed in under $wgDefaultUserOptions. In my case, to hide the ability to search all namespaces or select namespaces to search in, this did the job:
$wgHiddenPrefs = array ( 'searcheverything', 'searchnamespaces' );
Hope that helps someone else too.
Regards, Sal
-----Original Message----- From: Sal Quintanilla [mailto:salquint@gmail.com] Sent: Monday, December 05, 2011 4:07 PM To: 'MediaWiki announcements and site admin list' Subject: RE: [Mediawiki-l] Custom Namespace hidden from search
Actually I take back "perfect" a little. $wgHiddenPrefs seems to be the right thing to use, but there's no documented support for hiding the ability to hide the "Advanced options" box under "Search options". Looking at includes/Preferences.php doesn't show any code that would respond to $wgHiddenPrefs in that way either. Am I stuck editing Preferences.php?
-----Original Message----- From: Sal Quintanilla [mailto:salquint@gmail.com] Sent: Thursday, December 01, 2011 7:02 PM To: 'MediaWiki announcements and site admin list'; 'salquint@gmail.com' Subject: RE: [Mediawiki-l] Custom Namespace hidden from search
Perfect, thanks Dan
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Daniel Barrett Sent: Thursday, December 01, 2011 6:19 PM To: salquint@gmail.com; MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Custom Namespace hidden from search
Add some JavaScript to MediaWiki:Common.js that hides the items on Special:Preferences that you don't want shown.
If you have a later Mediawiki, you can use the $wgHiddenPrefs array to hide specific areas of Special:Preferences.
DanB
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org