Physikerwelt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/150690

Change subject: Add MathSearchImage
......................................................................

Add MathSearchImage

Add the image that is used for the MathSearch
Button to the extension code.

Change-Id: I389582dd49ec6fd641b61332dc30124a4f6ff818
---
M FormulaInfo.php
A images/math_search_logo.png
2 files changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch 
refs/changes/90/150690/1

diff --git a/FormulaInfo.php b/FormulaInfo.php
index 5244cb6..6eb8cc7 100644
--- a/FormulaInfo.php
+++ b/FormulaInfo.php
@@ -55,7 +55,7 @@
        }
 
        public function DisplayInfo( $pid, $eid ) {
-               global $wgMathDebug, $wgOut;
+               global $wgMathDebug, $wgExtensionAssetsPath;
                /* $out Output page find out how to get that variable in a 
static context*/
                $out = $this->getOutput();
                $out->addWikiText( '==General==' );
@@ -81,8 +81,10 @@
                // $wgOut->addWikiText('<b>:'.var_export($res,true).'</b>');
                $out->addWikiText( 'TeX (as stored in database): 
<syntaxhighlight lang="latex">' . $mo->getTex() . '</syntaxhighlight>' );
                $out->addWikiText( 'MathML (' . self::getlengh( 
$mo->getMathml() ) . ') :', false );
-               // TODO: Add logo
-               $out->addHtml( '<a href="/wiki/Special:MathSearch?mathpattern=' 
. urlencode( $mo->getTex() ) . '&searchx=Search"><img 
src="http://wikidemo.formulasearchengine.com/images/FSE-PIC.png"; width="15" 
height="15"></a>' );
+
+               $imgUrl = $wgExtensionAssetsPath . 
"/MathSearch/images/math_search_logo.png";
+               $mathSearchImg = Html::element( 'img', array( 'src' => $imgUrl, 
'width' => 15, 'height' => 15 ) );
+               $out->addHtml( '<a href="/wiki/Special:MathSearch?mathpattern=' 
. urlencode( $mo->getTex() ) . '&searchx=Search">' . $mathSearchImg . '</a>' );
                $out->addHtml(  $mo->getMathml() );
                # $log=htmlspecialchars( $res->math_log );
                $out->addHtml( "<br />\n" );
diff --git a/images/math_search_logo.png b/images/math_search_logo.png
new file mode 100644
index 0000000..68ecf8a
--- /dev/null
+++ b/images/math_search_logo.png
Binary files differ

-- 
To view, visit https://gerrit.wikimedia.org/r/150690
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I389582dd49ec6fd641b61332dc30124a4f6ff818
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>

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

Reply via email to