http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69095
Revision: 69095 Author: daniel Date: 2010-07-06 14:07:04 +0000 (Tue, 06 Jul 2010) Log Message: ----------- strip down search response Modified Paths: -------------- trunk/WikiWord/WikiWordWeb/src/main/maintenance/concept-info-local.sql trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/response.html.php trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/search.php Modified: trunk/WikiWord/WikiWordWeb/src/main/maintenance/concept-info-local.sql =================================================================== --- trunk/WikiWord/WikiWordWeb/src/main/maintenance/concept-info-local.sql 2010-07-06 13:45:06 UTC (rev 69094) +++ trunk/WikiWord/WikiWordWeb/src/main/maintenance/concept-info-local.sql 2010-07-06 14:07:04 UTC (rev 69095) @@ -59,3 +59,13 @@ on X.concept = I.concept and I.lang = "{lang}" set I.related = X.related; +-- collect features +update {collection}_{thesaurus}_concept_info as I +join ( select concept1 as concept, group_concat(distinct concat(concept2, ":", if (local_concept_name is null, "", local_concept_name)) separator "|") as related +from {collection}_{thesaurus}_features + left join {collection}_{thesaurus}_origin as O on O.global_concept = concept2 and O.lang = "{lang}" + where bilink >= 1 + group by concept1 ) as X +on X.concept = I.concept and I.lang = "{lang}" +set I.features = X.features; + Modified: trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/response.html.php =================================================================== --- trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/response.html.php 2010-07-06 13:45:06 UTC (rev 69094) +++ trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/response.html.php 2010-07-06 14:07:04 UTC (rev 69095) @@ -254,6 +254,8 @@ <td colspan="3"> <h1 class="name <?php print "weight_$wclass"; ?>"><?php print getConceptDetailsLink($langs, $concept); ?>:</h1> <p class="definition"><?php print htmlspecialchars($definition); ?></p> + <div class="wikipages"><?php printConceptPageList( $langs, $concept, $lclass, $terse ? $wwMaxPreviewLinks : $wwMaxDetailLinks ); ?></div> + <strong class="more">[<?php print getConceptDetailsLink($langs, $concept, "details..."); ?>]</strong> </td> </tr> @@ -264,14 +266,17 @@ else $more = printConceptImageList( $gallery, $terse, $wwGalleryColumns, $terse ? $wwMaxPreviewImages : $wwMaxGalleryImages ); ?> </td> - <?php if ($gallery) { ?> - <td class="cell_more_images" colspan="1" width="100%" style="vertical-align:bottom; padding: 1ex; font-size:normal;"> - <?php if ($terse) print " <div><strong class=\"more\">[" . getConceptDetailsLink($langs, $concept, "more/details...") . "]</strong></div>"; ?> + </tr> + + <?php if ($gallery && $terse && $more) { ?> + <tr class="row_images row_more_images"> + <td class="cell_more_images" colspan="3" width="100%" style="vertical-align:bottom; padding: 1ex; font-size:normal;"> + <?php print " <div><strong class=\"more\">[" . getConceptDetailsLink($langs, $concept, "all ".count($gallery)." images...") . "]</strong></div>"; ?> </td> - <?php } ?> </tr> + <?php } ?> - <?php if (@$concept['narrower']) { ?> + <?php if (!$terse && @$concept['narrower']) { ?> <tr class="row_narrower"> <td class="cell_related" colspan="3"> <strong class="label">Narrower:</strong> @@ -283,6 +288,7 @@ </tr> <?php } ?> + <?php if (!$terse && @$concept['narrower']) { ?> <?php $related = getRelatedConceptList($concept); if ($related) { @@ -297,8 +303,9 @@ </td> </tr> <?php } ?> + <?php } ?> - <?php if (@$concept['broader']) { ?> + <?php if (!$terse && @$concept['broader']) { ?> <tr class="row_category"> <td class="cell_related" colspan="3"> <strong class="label">Broader:</strong> @@ -310,15 +317,6 @@ </tr> <?php } ?> - <?php if (!$terse && @$concept['pages']) { ?> - <tr class="row_pages"> - <td class="cell_pages wikipages" colspan="3"> - <strong class="label">Wiki pages:</strong> <?php $more = printConceptPageList( $langs, $concept, $lclass, $terse ? $wwMaxPreviewLinks : $wwMaxDetailLinks ); ?> - <?php if ($terse && $more) print " <strong class=\"more\">[" . getConceptDetailsLink($langs, $concept, "more...") . "]</strong>"; ?> - </td> - </tr> - <?php } ?> - <tr class="row_blank"> <td class="cell_blank" colspan="3"> Modified: trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/search.php =================================================================== --- trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/search.php 2010-07-06 13:45:06 UTC (rev 69094) +++ trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/search.php 2010-07-06 14:07:04 UTC (rev 69095) @@ -253,7 +253,7 @@ try { if ($lang && $conceptId) { $mode = "concept"; - $result = $thesaurus->getConceptInfo($conceptId, $lang, null, $allLanguages, $wwMax); + $result = $thesaurus->getConceptInfo($conceptId, $lang, null, $allLanguages); if ( $result ) $result = array( $result ); //hack } else if ($lang && $term) { $mode = "term"; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs