Jump to content

Topic on Project:Support desk

Adding structure via fieldset (html tag)

2
67.54.192.52 (talkcontribs)

MediaWiki 1.16.2 PHP 5.2.11 (apache2handler) MySQL 5.0.77

I am trying to use <fieldset> and <legend> tags in wiki articles alongside wikitext. To make things more strained I'm trying to make the legend element compatible with the wikitext headlines.

The rationale is, I'd like to document to the bit, in a very clear fashion, some binary file formats and data structures. My hope is to arrive at a feasible system which can be adopted for this purpose once and for all. The thinking is, the wiki document headline model is a little too unstructured, or at least, the structure is not explicitly evident. The hope is to make things a little more presentable with an encapsulated presentation...

A table is not really a capsule. The fieldset model does a good job of encapsulation. Think, nested "tables" with each table only having one cell. It can be argued that doing that with tables is an abuse of tables (much like table page layouts)

I'd prefer myself if there was a wikitext way to do this. Seems like a simple lightweight treatment of the table syntax would be in order. At present, fieldset and legend are not included in Sanitizer.php. I've added them for this purpose. Btw, fieldset and legend are used on pages such as "recent changes"; in fact that was the first place I had ever seen a fieldset element.

I first tried naively to make a template around this, but it was obvious the transclusion model upon which templates depend would not be able to generate headlines for an article, and was not an ideal way to encapsulate large amounts of wikitext.

For now I've experimented with just manually placing html tags in the article. Along with some clever CSS, this does get the job done. But it's a little intimidating to editors. The highly technical pages however are not meant to be maintained by casual/novice editors. So it's not a big wooping deal.

The only problem is the parser refuses to play nice. Placing arbitrary opening/closing p tags throughout the page where the html is used. There doesn't seem to be a way to arrange the html tags in the article to work around this. If not for all the permitted tags in the Sanitizer.php file, I'd guess that mixing html and wikitext was a big no no. So at this point, A) I'm wondering if the parser is just not respecting the new tags the way it would other block tags, because they've not been fully integrated somehow (you'd think MediaWiki would know better than to nest blocks in p's period) or if B) I should setup some kind of tag hook in order to filter out the malformed html generated by MediaWiki.

Either way, I strongly encourage MediaWiki developers to integrate fieldsets into wikitext. The fieldset is a clean way to present all kinds of information, and would probably even have something to add to the likes of Wikipedia.

Please advise me any way you can. I'd really like to make this work, non-invasively as possible.

PS: The concept is simple. In short, each headline becomes a block with a border, nested within the headline above it. Non-headline fieldsets are cool too. If you've never heard of fieldset, there's an illustration at w3schools. Will include links to the page I'm experimenting with if desirable.

This post was posted by 67.54.192.52, but signed as 99.197.224.57.

99.197.224.57 (talkcontribs)

BUMP I SUPPOSE,

Is there a better place to being looking for guidance with this sort of thing?

Thanks

This post was posted by 99.197.224.57, but signed as 72.173.160.50.

Reply to "Adding structure via fieldset (html tag)"