Index: trunk/WikiWord/WikiWord/src/main/php/wikiword.php |
— | — | @@ -13,13 +13,32 @@ |
14 | 14 | <ul class="terselist"> |
15 | 15 | <?php |
16 | 16 | foreach ($concepts as $c) { |
| 17 | + ?><li><?php |
17 | 18 | printLocalConceptLink($lang, $c); |
| 19 | + ?></li><?php |
18 | 20 | } |
19 | 21 | ?> |
20 | 22 | </ul> |
21 | 23 | <?php |
22 | 24 | } |
23 | 25 | |
| 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 | + |
24 | 43 | function printLocalConceptLink($lang, $row) { |
25 | 44 | global $wwSelf; |
26 | 45 | |
— | — | @@ -120,7 +139,7 @@ |
121 | 140 | } |
122 | 141 | |
123 | 142 | function printLocalConcept($a_lang, $a_row, $b_lang, $b_row, $pos = 0) { |
124 | | - global $wwSelf; |
| 143 | + global $wwSelf, $images; |
125 | 144 | |
126 | 145 | $a_row = normalizeConceptRow($a_lang, $a_row); |
127 | 146 | $b_row = normalizeConceptRow($b_lang, $b_row); |
— | — | @@ -214,6 +233,16 @@ |
215 | 234 | <?php } ?> |
216 | 235 | </tr> |
217 | 236 | <?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 } ?> |
218 | 247 | <?php |
219 | 248 | if (isset($a_weight) && $a_weight && $a_weight<2 && $pos>=3) return false; |
220 | 249 | else return true; |
— | — | @@ -223,6 +252,7 @@ |
224 | 253 | $term = @$_REQUEST['term']; |
225 | 254 | $lang = @$_REQUEST['lang']; |
226 | 255 | $tolang = @$_REQUEST['tolang']; |
| 256 | +$images = @$_REQUEST['images']; |
227 | 257 | |
228 | 258 | if (!isset($_REQUEST['translate'])) $tolang = NULL; |
229 | 259 | if ($lang == $tolang) $tolang = NULL; |
— | — | @@ -311,6 +341,10 @@ |
312 | 342 | <td> |
313 | 343 | <input type="submit" name="go" value="go"/> |
314 | 344 | </td> |
| 345 | + <td> |
| 346 | + <label for="images">Images: </label> |
| 347 | + <input type="checkbox" name="images" value="Images" <?php $images ? "checked=\"checked\"" : ""?>/> |
| 348 | + </td> |
315 | 349 | </tr> |
316 | 350 | <tr> |
317 | 351 | <td> |
Index: trunk/WikiWord/WikiWord/src/main/php/config.sample.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | |
13 | 13 | #error_reporting(E_ALL); |
14 | 14 | |
15 | | -$wwThumbSite = 90; |
| 15 | +$wwThumbSitze = 90; |
16 | 16 | $wwThumbnailURL = "http://toolserver.org/tsthumb/tsthumb?f={name}&domain=commons.wikimedia.org&w={width}&h={height}"; |
17 | 17 | $wwImagePageURL = "http://commons.wikimedia.org/wiki/File:{name}"; |
18 | 18 | |