On Jan 22, 2011 at 21:04 Platonides wrote:
An internally handled parser function doesn't conflict with showing it as a textbox.
We could for instance store it as a hidden page prefix.
Data stored in the text blob: "Author: [[Author:Bryan]] License: GPL
{{Information| This is a nice picture I took }} {{Deletion request|Copyvio from http://www.example.org%7D%7D "
Data shown when clicking edit:
Author: <input type="text value="Bryan" /> License: <select>GPL</select>
<textarea name="textbox1"> {{Information| This is a nice picture I took }} {{Deletion request|Copyvio from http://www.example.org}} </textarea>
So PHP would extract {{#author:4}} and {{#license:12}} from the textblob when showing the editpage. And show the remaining wikitext in the <textarea> and the author/ license as seperate form elements. And upon saving, generate "{{#author:4}} {{#license:12}}\n" again and prepend to the textblob.
Double instances of these would be ignored (ie. stripped automatically since they're not re-inserted to the textblob upon saving). One small downside would be that if someone would edit the textarea manually to do stuff with author and license, the next edit would re-arrange them since they're extracted and re-insterted thus showing messy diffs. (not a major point as long as it's done independant from JavaScript, which it can be if done from core / php).
If that's what you meant, I think it is an interesting concept that should not be ignored, however personally I am not yet convinced this is the way to go. But when looking at the complete picture of up/down sides, this could be something to consider.
-- Krinkle