There are a couple ways of doing this.
- Modify ..\12\TEMPLATE\FEATURES\ContentLightup\Controls\searchArea.xml
- Modify ..\12\TEMPLATE\CONTROLTEMPLATES\searcharea.ascx
- Create a new feature and control
- Create a new feature that changes parameters for "SmallSearchInputBox"
I believe option 4 to be the best as it uses Microsoft.SharePoint.PortalWebControls.SearchBoxEx class and you don't need to create a new control.
There are a large number of properties you can use to customize the control and you should find the one you're looking for
microsoft.sharepoint.portal.webcontrols.searchboxex_properties.
So how do we customize it?
Create a new feature.
- Create a new directory anywhere eg: C:\RPSearchFeature
- Create a new manifest.xml in C:\RPSearchFeature with the following:
<?xml version="1.0" encoding="utf-8"?>
<Solution
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SolutionId="GENERATE_A_GUID"
ResetWebServer="True"
xmlns="http://schemas.microsoft.com/sharepoint/">
<FeatureManifests>
<FeatureManifest Location="PortalSearch\feature.xml" />
</FeatureManifests>
</Solution> - Create "C:\RPSearchFeature\PortalSearch\feature.xml" with:
<?xml version="1.0" encoding="utf-8"?>
<Feature Id="7095f774-1efa-4879-b074-ff211f5559c7"
Title="Small Portal Search"
Description="Smaller search bar without scopes"
Version="12.0.0.0"
Hidden="FALSE"
Scope="Web"
DefaultResourceFile="core"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="elements.xml"/>
</ElementManifests>
</Feature> - Create "C:\RPSearchFeature\PortalSearch\elements.xml" with:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control
Id="SmallSearchInputBox"
Sequence="25"
ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx"
ControlAssembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Property Name="SearchResultPageURL">/search/results.aspx</Property>
<Property Name="FrameType">None</Property>
<Property Name="DropDownMode">HideDD_NoScope</Property>
<Property Name="TextBoxWidth">140</Property>
<Property Name="ShowAdvancedSearch">false</Property>
</Control>
</Elements>
Wrap the feature up in to a solution "SearchFeature.wsp" with cabpack
Deploy the solution.
Enable the feature (Scope is web, but you can change it to site if that suits you).
The instruction that will enable these parameters over the default is the sequence number. The default sequence is 99, so anything below 99 will load first. The parameters I'm using set the "SearchResultPageURL", hide the scope drop down and remove the advance search link.