Revision: 46042
Author:   danny_b
Date:     2009-01-22 23:31:31 +0000 (Thu, 22 Jan 2009)

Log Message:
-----------
* Added optional alternative Search form look - Go button & Advanced search 
link instead of Go button & Search button

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES
    trunk/phase3/includes/DefaultSettings.php
    trunk/phase3/includes/Skin.php
    trunk/phase3/skins/CologneBlue.php
    trunk/phase3/skins/Modern.php
    trunk/phase3/skins/MonoBook.php
    trunk/phase3/skins/modern/main.css
    trunk/phase3/skins/monobook/main.css

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES  2009-01-22 23:28:33 UTC (rev 46041)
+++ trunk/phase3/RELEASE-NOTES  2009-01-22 23:31:31 UTC (rev 46042)
@@ -22,6 +22,7 @@
 
 * 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 @@
 * (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 @@
 * (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

Modified: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php   2009-01-22 23:28:33 UTC (rev 
46041)
+++ trunk/phase3/includes/DefaultSettings.php   2009-01-22 23:31:31 UTC (rev 
46042)
@@ -1455,7 +1455,7 @@
  * 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 @@
 $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 @@
  * 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;

Modified: trunk/phase3/includes/Skin.php
===================================================================
--- trunk/phase3/includes/Skin.php      2009-01-22 23:28:33 UTC (rev 46041)
+++ trunk/phase3/includes/Skin.php      2009-01-22 23:31:31 UTC (rev 46042)
@@ -1140,16 +1140,22 @@
        }
 
        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;
                

Modified: trunk/phase3/skins/CologneBlue.php
===================================================================
--- trunk/phase3/skins/CologneBlue.php  2009-01-22 23:28:33 UTC (rev 46041)
+++ trunk/phase3/skins/CologneBlue.php  2009-01-22 23:31:31 UTC (rev 46042)
@@ -289,7 +289,7 @@
 
        function searchForm( $label = "" )
        {
-               global $wgRequest;
+               global $wgRequest, $wgUseTwoButtonsSearchForm;
 
                $search = $wgRequest->getText( 'search' );
                $action = $this->escapeSearchLink();
@@ -298,9 +298,15 @@
 
                $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;
 

Modified: trunk/phase3/skins/Modern.php
===================================================================
--- trunk/phase3/skins/Modern.php       2009-01-22 23:28:33 UTC (rev 46041)
+++ trunk/phase3/skins/Modern.php       2009-01-22 23:31:31 UTC (rev 46042)
@@ -245,6 +245,7 @@
 
        
/*************************************************************************************************/
        function searchBox() {
+               global $wgUseTwoButtonsSearchForm;
 ?>
        <!-- search -->
        <div id="p-search" class="portlet">
@@ -254,8 +255,11 @@
                                <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 -->

Modified: trunk/phase3/skins/MonoBook.php
===================================================================
--- trunk/phase3/skins/MonoBook.php     2009-01-22 23:28:33 UTC (rev 46041)
+++ trunk/phase3/skins/MonoBook.php     2009-01-22 23:31:31 UTC (rev 46042)
@@ -249,6 +249,7 @@
 
        
/*************************************************************************************************/
        function searchBox() {
+               global $wgUseTwoButtonsSearchForm;
 ?>
        <div id="p-search" class="portlet">
                <h5><label for="searchInput"><?php $this->msg('search') 
?></label></h5>
@@ -257,8 +258,11 @@
                                <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>

Modified: trunk/phase3/skins/modern/main.css
===================================================================
--- trunk/phase3/skins/modern/main.css  2009-01-22 23:28:33 UTC (rev 46041)
+++ trunk/phase3/skins/modern/main.css  2009-01-22 23:31:31 UTC (rev 46042)
@@ -158,6 +158,10 @@
        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;

Modified: trunk/phase3/skins/monobook/main.css
===================================================================
--- trunk/phase3/skins/monobook/main.css        2009-01-22 23:28:33 UTC (rev 
46041)
+++ trunk/phase3/skins/monobook/main.css        2009-01-22 23:31:31 UTC (rev 
46042)
@@ -715,7 +715,10 @@
        padding: .5em .4em .4em .4em;
        text-align: center;
 }
-
+#p-search #searchform div div {
+       margin-top: .4em;
+       font-size: 95%;
+}
 /*
 ** the personal toolbar
 */



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to