* Added optional alternative Search form look - Go button & Advanced search link...
authorDanny B <danny_b@users.mediawiki.org>
Thu, 22 Jan 2009 23:31:31 +0000 (23:31 +0000)
committerDanny B <danny_b@users.mediawiki.org>
Thu, 22 Jan 2009 23:31:31 +0000 (23:31 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/Skin.php
skins/CologneBlue.php
skins/Modern.php
skins/MonoBook.php
skins/modern/main.css
skins/monobook/main.css

index 0f01061..2950d81 100644 (file)
@@ -22,6 +22,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 
 * Added $wgNewPasswordExpiry, to specify an expiry time (in seconds) to
   temporary passwords
+* Added $wgUseTwoButtonsSearchForm to choose the Search form behavior/look
 
 === New features in 1.15 ===
 
@@ -48,20 +49,23 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bugs 16957/16969) Add show/hide to preferences for RC patrol options on
   specialpages
 * (bug 11443) Auto-noindex user/user talk pages for blocked user
-* (bug 11644) Add $wgMaxRedirects variable to control how many redirects are recursed
-  through until the "destination" page is reached.
-* Add $wgInvalidRedirectTargets variable to prevent redirects to certain special pages.
+* (bug 11644) Add $wgMaxRedirects variable to control how many redirects are
+  recursed through until the "destination" page is reached.
+* Add $wgInvalidRedirectTargets variable to prevent redirects to certain
+  special pages.
 * Use HTML5 rel attributes for some links, where appropriate
+* Added optional alternative Search form look - Go button & Advanced search
+  link instead of Go button & Search button
   
 === Bug fixes in 1.15 ===
 * (bug 16968) Special:Upload no longer throws useless warnings.
-* (bug 17000) Special:RevisionDelete now checks if the database is locked before
-  trying to delete the edit.
+* (bug 17000) Special:RevisionDelete now checks if the database is locked
+  before trying to delete the edit.
 * (bug 16852) padleft and padright now handle multibyte characters correctly
 * (bug 17010) maintenance/namespaceDupes.php now add the suffix recursively if
   the destination page exists
-* (bug 17035) Special:Upload now fails gracefully if PHP's file_uploads has been
-  disabled
+* (bug 17035) Special:Upload now fails gracefully if PHP's file_uploads has
+  been disabled
 * Fixing the caching issue by using -{T|xxx}- syntax (only applies on wiki with
   LanguageConverter class)
 * Improving the efficiency by using -{A|xxx}- syntax (only applies on wiki with
@@ -70,8 +74,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 11527) Diff on page with one revision shows "Next" link to same diff
 * (bug 15936) New page's patrol button should always be visible
 * (bug 8065) Fix summary forcing for new pages
-* (bug 10569) redirects to Special:Mypage and Special:Mytalk are no longer allowed
-  by default. Change $wgInvalidRedirectTargets to re-enable.
+* (bug 10569) redirects to Special:Mypage and Special:Mytalk are no longer
+  allowed by default. Change $wgInvalidRedirectTargets to re-enable.
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index ab60b06..cf12b37 100644 (file)
@@ -1455,7 +1455,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches don't keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '198';
+$wgStyleVersion = '199';
 
 
 # Server-side caching:
@@ -3657,10 +3657,10 @@ $wgPasswordAttemptThrottle = array( 'count' => 5, 'seconds' => 300 );
 $wgEdititis = false;
 
 /**
-* Enable the UniversalEditButton for browsers that support it
-* (currently only Firefox with an extension)
-* See http://universaleditbutton.org for more background information
-*/
+ * Enable the UniversalEditButton for browsers that support it
+ * (currently only Firefox with an extension)
+ * See http://universaleditbutton.org for more background information
+ */
 $wgUniversalEditButton = true;
 
 /**
@@ -3669,3 +3669,10 @@ $wgUniversalEditButton = true;
  * and the functionality will be enabled universally.
  */
 $wgEnforceHtmlIds = true;
+
+/**
+ * Search form behavior
+ * true = use Go & Search buttons
+ * false = use Go button & Advanced search link
+ */
+$wgUseTwoButtonsSearchForm = true;
index 9d7584b..40b480d 100644 (file)
@@ -1140,16 +1140,22 @@ END;
        }
 
        function searchForm() {
-               global $wgRequest;
+               global $wgRequest, $wgUseTwoButtonsSearchForm;
                $search = $wgRequest->getText( 'search' );
 
                $s = '<form id="searchform'.$this->searchboxes.'" name="search" class="inline" method="post" action="'
                  . $this->escapeSearchLink() . "\">\n"
                  . '<input type="text" id="searchInput'.$this->searchboxes.'" name="search" size="19" value="'
                  . htmlspecialchars(substr($search,0,256)) . "\" />\n"
-                 . '<input type="submit" name="go" value="' . wfMsg ('searcharticle') . '" />&nbsp;'
-                 . '<input type="submit" name="fulltext" value="' . wfMsg ('searchbutton') . "\" />\n</form>";
-
+                 . '<input type="submit" name="go" value="' . wfMsg ('searcharticle') . '" />';
+               
+               if ($wgUseTwoButtonsSearchForm)
+                       $s .= '&nbsp;<input type="submit" name="fulltext" value="' . wfMsg ('searchbutton') . "\" />\n";
+               else
+                       $s .= ' <a href="' . $this->escapeSearchLink() . '" rel="search">' . wfMsg ('powersearch-legend') . "</a>\n";
+               
+               $s .= '</form>';
+               
                // Ensure unique id's for search boxes made after the first
                $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1;
                
index 9cd41e8..b784c55 100644 (file)
@@ -289,7 +289,7 @@ class SkinCologneBlue extends Skin {
 
        function searchForm( $label = "" )
        {
-               global $wgRequest;
+               global $wgRequest, $wgUseTwoButtonsSearchForm;
 
                $search = $wgRequest->getText( 'search' );
                $action = $this->escapeSearchLink();
@@ -298,8 +298,14 @@ class SkinCologneBlue extends Skin {
 
                $s .= "<input type='text' id=\"searchInput{$this->searchboxes}\" class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
                  . htmlspecialchars(substr($search,0,256)) . "\" /><br />"
-                 . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( "searcharticle" ) ) . "\" />"
-                 . "<input type='submit' id=\"mw-searchButton{$this->searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>";
+                 . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( "searcharticle" ) ) . "\" />";
+
+               if ($wgUseTwoButtonsSearchForm) 
+                       $s .= "<input type='submit' id=\"mw-searchButton{$this->searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" />\n";
+               else
+                       $s .= '<div><a href="$action" rel="search">' . wfMsg ('powersearch-legend') . "</a></div>\n";
+               
+               $s .= '</form>';
 
                // Ensure unique id's for search boxes made after the first
                $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1;
index cb24baf..c91d0e1 100644 (file)
@@ -245,6 +245,7 @@ class ModernTemplate extends QuickTemplate {
 
        /*************************************************************************************************/
        function searchBox() {
+               global $wgUseTwoButtonsSearchForm;
 ?>
        <!-- search -->
        <div id="p-search" class="portlet">
@@ -254,8 +255,11 @@ class ModernTemplate extends QuickTemplate {
                                <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
                                        if( isset( $this->data['search'] ) ) {
                                                ?> value="<?php $this->text('search') ?>"<?php } ?> />
-                               <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />&nbsp;
-                               <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
+                               <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> /><?php if ($wgUseTwoButtonsSearchForm) { ?>&nbsp;
+                               <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> /><?php } else { ?>
+
+                               <div><a href="<?php $this->text('searchaction') ?>" rel="search"><?php $this->msg('powersearch-legend') ?></a></div><?php } ?>
+
                        </div></form>
                </div><!-- pBody -->
        </div><!-- portlet -->
index 8afc498..bc405e8 100644 (file)
@@ -249,6 +249,7 @@ class MonoBookTemplate extends QuickTemplate {
 
        /*************************************************************************************************/
        function searchBox() {
+               global $wgUseTwoButtonsSearchForm;
 ?>
        <div id="p-search" class="portlet">
                <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
@@ -257,8 +258,11 @@ class MonoBookTemplate extends QuickTemplate {
                                <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
                                        if( isset( $this->data['search'] ) ) {
                                                ?> value="<?php $this->text('search') ?>"<?php } ?> />
-                               <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />&nbsp;
-                               <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
+                               <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> /><?php if ($wgUseTwoButtonsSearchForm) { ?>&nbsp;
+                               <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> /><?php } else { ?>
+
+                               <div><a href="<?php $this->text('searchaction') ?>" rel="search"><?php $this->msg('powersearch-legend') ?></a></div><?php } ?>
+
                        </div></form>
                </div>
        </div>
index d9537c1..80ef008 100644 (file)
@@ -158,6 +158,10 @@ textarea {
        margin-right: auto;
 }
 
+#p-search #searchform div div {
+       margin-top: .4em;
+}
+
 .portlet h5 {
        padding: 0.1em 0 0.3em 1em;
        margin: 0 0 0 0;
index 7e5809b..63ce572 100644 (file)
@@ -715,7 +715,10 @@ input.searchButton {
        padding: .5em .4em .4em .4em;
        text-align: center;
 }
-
+#p-search #searchform div div {
+       margin-top: .4em;
+       font-size: 95%;
+}
 /*
 ** the personal toolbar
 */