Index: trunk/extensions/SemanticDrilldown/includes/SD_PageSchemas.php |
— | — | @@ -211,13 +211,14 @@ |
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
215 | | - * Displays the information about filters contained in the |
216 | | - * Page Schemas XML. |
| 215 | + * Displays the information about the filter (if any exists) |
| 216 | + * for one field in the Page Schemas XML. |
217 | 217 | */ |
218 | | - public static function parseFieldElements( $field_xml, &$text_object ) { |
| 218 | + public static function getFilterDisplayInfo( $field_xml, &$text_object ) { |
219 | 219 | foreach ( $field_xml->children() as $tag => $child ) { |
220 | 220 | if ( $tag == "semanticdrilldown_Filter" ) { |
221 | | - $text = PageSchemas::tableMessageRowHTML( "paramAttr", wfMsg( 'specialpages-group-sd_group' ), "Filter" ); |
| 221 | + $filterName = $child->attributes()->name; |
| 222 | + $values = array(); |
222 | 223 | foreach ( $child->children() as $prop => $value) { |
223 | 224 | if ( $prop == "Values" ) { |
224 | 225 | $filterValues = array(); |
— | — | @@ -225,12 +226,12 @@ |
226 | 227 | $filterValues[] = (string)$valTag; |
227 | 228 | } |
228 | 229 | $valuesStr = implode( ', ', $filterValues ); |
229 | | - $text .= PageSchemas::tableMessageRowHTML("paramAttrMsg", wfMsg( 'sd-pageschemas-values' ), $valuesStr ); |
| 230 | + $values[wfMsg( 'sd-pageschemas-values' )] = $valuesStr; |
230 | 231 | } else { |
231 | | - $text .= PageSchemas::tableMessageRowHTML("paramAttrMsg", $prop, $value ); |
| 232 | + $values[$prop] = $value; |
232 | 233 | } |
233 | 234 | } |
234 | | - $text_object['sd'] = $text; |
| 235 | + $text_object['sd'] = array( 'Filter', $filterName, '#FEE', $values ); |
235 | 236 | } |
236 | 237 | } |
237 | 238 | return true; |
Index: trunk/extensions/SemanticDrilldown/SemanticDrilldown.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | |
15 | 15 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
16 | 16 | |
17 | | -define( 'SD_VERSION', '0.8.4 alpha' ); |
| 17 | +define( 'SD_VERSION', '0.8.3' ); |
18 | 18 | |
19 | 19 | $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'specialpage'][] = array( |
20 | 20 | 'path' => __FILE__, |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | $wgHooks['MagicWordwgVariableIDs'][] = 'SDUtils::addMagicWordVariableIDs'; |
67 | 67 | $wgHooks['LanguageGetMagic'][] = 'SDUtils::addMagicWordLanguage'; |
68 | 68 | $wgHooks['ParserBeforeTidy'][] = 'SDUtils::handleShowAndHide'; |
69 | | -$wgHooks['PSParseFieldElements'][] = 'SDPageSchemas::parseFieldElements'; |
| 69 | +$wgHooks['PageSchemasGetFieldDisplayInfo'][] = 'SDPageSchemas::getFilterDisplayInfo'; |
70 | 70 | $wgHooks['PageSchemasGetObject'][] = 'SDPageSchemas::createPageSchemasObject'; |
71 | 71 | $wgHooks['PageSchemasGetFieldHTML'][] = 'SDPageSchemas::getFieldHTML'; |
72 | 72 | $wgHooks['PageSchemasGetFieldXML'][] = 'SDPageSchemas::getFieldXML'; |