Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Template editing

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


magnusmanske at googlemail

Sep 25, 2009, 9:14 AM

Post #1 of 5 (854 views)
Permalink
Template editing

IMHO the question, in this case, is not "how to build the perfect
wikitext grammar/parser", but how to ease editing of wikitext through
editor enhancements. For that, it seems sufficient to cover the vast
majority of cases instead of writing a perfect solution, as long as it
falls back to "ugly" wikitext when in doubt. Having 1% of templates
appear in all their ugliness is better than 100%.

To that end, I have just written some proof-of-concept JavaScript:
http://en.wikipedia.org/wiki/User:Magnus_Manske/tmpl.js

It is not a solution, but shows a possible approach (example text to
use: [[Picopict]]):
* On edit start, it finds all templates in wikitext
* It does so only in namespace 0, so no template variables need to be
considered (otherwise, move the damned text out of article namespace!
;-)
* It will not touch templates that have no parameter - {{reflist}} is
easy enough
* It will replace all other templates with strings like
##TEMPLATEnumber:name##, e.g., ##TEMPLATE1:Infobox VG##
* These will be replaced with the original text again on save/preview/diff
* Double-clicking on, say, TEMPLATE1 will select that entire word. If
it is a template placeholder, an action is performed. For this demo,
it only shows the original text of the template (note that nested
templates are left as wikitext).

Obviously, this can be expanded to call up an editor of some kind. I
don't want to write one now that JQuery is around the corner :-)

And yes, I am introducing new syntax. That's not the point here; could
just as well be some other, pretty placeholder in a wysiwyg editor.


As to the issue of getting possible template variable names: Why not
* load the wikitext of the template in the background
* remove all nowiki, noinclude, etc
* get everything that looks like "{{{NAME|" or "{{{NAME}}}"
* remove known magic words
* Profit!


Cheers,
Magnus

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


roan.kattouw at gmail

Sep 25, 2009, 10:11 AM

Post #2 of 5 (797 views)
Permalink
Re: Template editing [In reply to]

2009/9/25 Magnus Manske <magnusmanske [at] googlemail>:
> As to the issue of getting possible template variable names: Why not
> * load the wikitext of the template in the background
> * remove all nowiki, noinclude, etc
> * get everything that looks like "{{{NAME|" or "{{{NAME}}}"
> * remove known magic words
> * Profit!
>
We (the usability team) do intend to get 'content folding' (folding
template calls and tables into stubs that can be expanded at will)
done in the Citron (third) release.

Roan Kattouw (Catrope)

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


stevagewp at gmail

Sep 27, 2009, 3:15 AM

Post #3 of 5 (790 views)
Permalink
Re: Template editing [In reply to]

On Sat, Sep 26, 2009 at 3:11 AM, Roan Kattouw <roan.kattouw [at] gmail> wrote:
> We (the usability team) do intend to get 'content folding' (folding
> template calls and tables into stubs that can be expanded at will)
> done in the Citron (third) release.

*falls to the ground and starts kissing your feet*

Awesome. Timeframe? Screenshots?

(Also, you're not actually calling them "stubs" are you? Confusing...)

Steve

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


roan.kattouw at gmail

Sep 27, 2009, 5:07 AM

Post #4 of 5 (790 views)
Permalink
Re: Template editing [In reply to]

2009/9/27 Steve Bennett <stevagewp [at] gmail>:
> *falls to the ground and starts kissing your feet*
>
*refers praise to other people; I'm mostly just a code monkey there*

> Awesome. Timeframe? Screenshots?
>
Nothing just yet. Right now we're focusing on getting the Babaco
release deployed shortly. When that's done and the inevitable
post-deployment problems have settled down, we're gonna get cracking
at Citron features. We do have some mockups for Citron features at
http://usability.wikimedia.org/wiki/Babaco_Designs#BEYOND_BABACO ; for
a list of features per release see
http://usability.wikimedia.org/wiki/Releases .

> (Also, you're not actually calling them "stubs" are you? Confusing...)
>
No, fortunately not; I was just trying to come up with a shorter word
for "visual placeholder for table/template/ref syntax that's much
shorter than the actual syntax and that can be expanded and
collapsed". They probably won't be called anything at all: we don't
really need a name for them.

Roan Kattouw (Catrope)

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


lists at nadir-seen-fire

Sep 28, 2009, 12:59 PM

Post #5 of 5 (775 views)
Permalink
Re: Template editing [In reply to]

Hmmm... reminds me of
http://www.wikicreole.org/wiki/Placeholder

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]

Magnus Manske wrote:
> ...
> * It will replace all other templates with strings like
> ##TEMPLATEnumber:name##, e.g., ##TEMPLATE1:Infobox VG##
> ...
>
> Cheers,
> Magnus


_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.