*/
$wgDisableInternalSearch = false;
+/**
+ * Set this to a URL to forward search requests to some external location.
+ * If the URL includes '$1', this will be replaced with the URL-encoded
+ * search term.
+ *
+ * For example, to forward to Google you'd have something like:
+ * $wgSearchForwardUrl = 'http://www.google.com/search?q=$1' .
+ * '&domains=http://example.com' .
+ * '&sitesearch=http://example.com' .
+ * '&ie=utf-8&oe=utf-8';
+ */
+$wgSearchForwardUrl = null;
+
} else {
die();
}
$tpl->set( "helppage", wfMsg('helppage'));
*/
$tpl->set( 'searchaction', $this->escapeSearchLink() );
+ $tpl->set( 'search', trim( $wgRequest->getVal( 'search' ) ) );
$tpl->setRef( 'stylepath', $wgStylePath );
$tpl->setRef( 'logopath', $wgLogo );
$tpl->setRef( "lang", $wgContLanguageCode );
global $wgDisableTextSearch;
if ( $wgDisableTextSearch ) {
+ global $wgForwardSearchUrl;
+ if( $wgForwardSearchUrl ) {
+ $url = str_replace( '$1', urlencode( $term ), $wgForwardSearchUrl );
+ $wgOut->redirect( $url );
+ return;
+ }
global $wgInputEncoding;
$wgOut->addHTML( wfMsg( 'searchdisabled' ) );
$wgOut->addHTML( wfMsg( 'googlesearch',
!! end
+
+!! test
+Bug 1219 URL next to image (good)
+!! input
+http://example.com [[Image:foobar.jpg]]
+!! result
+<p><a href="http://example.com" class='external'>http://example.com</a> <a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a>
+</p>
+!!end
+
+!! test
+Bug 1219 URL next to image (broken)
+!! input
+http://example.com[[Image:foobar.jpg]]
+!! result
+<p><a href="http://example.com" class='external'>http://example.com</a><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a>
+</p>
+!!end
+
TODO:
more images
more tables
<form name="searchform" action="<?php $this->text('searchaction') ?>" id="searchform">
<input id="searchInput" name="search" type="text"
<?php if($this->haveMsg('accesskey-search')) {
- ?>accesskey="<?php $this->msg('accesskey-search') ?>"<?php } ?> />
+ ?>accesskey="<?php $this->msg('accesskey-search') ?>"<?php }
+ if( isset( $this->data['search'] ) ) {
+ ?>value="<?php $this->text('search') ?>"<?php } ?> />
<input type='submit' name="go" class="searchButton"
value="<?php $this->msg('go') ?>"
/> <input type='submit' name="fulltext"