r51607 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51606‎ | r51607 | r51608 >
Date:21:04, 8 June 2009
Author:daniel
Status:deferred
Tags:
Comment:
image search ui
Modified paths:
  • /trunk/WikiWord/WikiWord/src/main/php/config.sample.php (modified) (history)
  • /trunk/WikiWord/WikiWord/src/main/php/wikiword.php (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWord/src/main/php/wikiword.php
@@ -13,13 +13,32 @@
1414 <ul class="terselist">
1515 <?php
1616 foreach ($concepts as $c) {
 17+ ?><li><?php
1718 printLocalConceptLink($lang, $c);
 19+ ?></li><?php
1820 }
1921 ?>
2022 </ul>
2123 <?php
2224 }
2325
 26+function printConceptImageList($id) {
 27+ global $utils, $wwThumbSize;
 28+ $images = $utils->getImagesAbout($id);
 29+
 30+ ?>
 31+ <ul class="terselist">
 32+ <?php
 33+ foreach ($images as $img) {
 34+ ?><li><?php
 35+ print $utils->getThumbnailHTML($img);
 36+ ?></li><?php
 37+ }
 38+ ?>
 39+ </ul>
 40+ <?php
 41+}
 42+
2443 function printLocalConceptLink($lang, $row) {
2544 global $wwSelf;
2645
@@ -120,7 +139,7 @@
121140 }
122141
123142 function printLocalConcept($a_lang, $a_row, $b_lang, $b_row, $pos = 0) {
124 - global $wwSelf;
 143+ global $wwSelf, $images;
125144
126145 $a_row = normalizeConceptRow($a_lang, $a_row);
127146 $b_row = normalizeConceptRow($b_lang, $b_row);
@@ -214,6 +233,16 @@
215234 <?php } ?>
216235 </tr>
217236 <?php } ?>
 237+
 238+ <?php if ($images) { ?>
 239+ <tr class="row_details row_images">
 240+ <td></td>
 241+ <td class="cell_label">Images:</td>
 242+ <td class="cell_broader" colspan="<?php $b_row ? 5 : 2 ?>">
 243+ <?php printConceptImageList($a_reference_id); ?>
 244+ </td>
 245+ </tr>
 246+ <?php } ?>
218247 <?php
219248 if (isset($a_weight) && $a_weight && $a_weight<2 && $pos>=3) return false;
220249 else return true;
@@ -223,6 +252,7 @@
224253 $term = @$_REQUEST['term'];
225254 $lang = @$_REQUEST['lang'];
226255 $tolang = @$_REQUEST['tolang'];
 256+$images = @$_REQUEST['images'];
227257
228258 if (!isset($_REQUEST['translate'])) $tolang = NULL;
229259 if ($lang == $tolang) $tolang = NULL;
@@ -311,6 +341,10 @@
312342 <td>
313343 <input type="submit" name="go" value="go"/>
314344 </td>
 345+ <td>
 346+ <label for="images">Images: </label>
 347+ <input type="checkbox" name="images" value="Images" <?php $images ? "checked=\"checked\"" : ""?>/>
 348+ </td>
315349 </tr>
316350 <tr>
317351 <td>
Index: trunk/WikiWord/WikiWord/src/main/php/config.sample.php
@@ -11,7 +11,7 @@
1212
1313 #error_reporting(E_ALL);
1414
15 -$wwThumbSite = 90;
 15+$wwThumbSitze = 90;
1616 $wwThumbnailURL = "http://toolserver.org/tsthumb/tsthumb?f={name}&domain=commons.wikimedia.org&w={width}&h={height}";
1717 $wwImagePageURL = "http://commons.wikimedia.org/wiki/File:{name}";
1818

Status & tagging log