Hey guys,
While I don't think this is possible (yet?), I still think it's worth discussing:
It'd be great if you could define variables on a page that could be included in the text and which would then be expanded when displaying the output. Here's an example of what I mean (syntax arbitrary): <!-- variable definitions --> @status_done = <span style="color: green;">canceled</span> @status_inProgress = <span style="color: blue;">canceled</span> @status_canceled = <span style="color: red;">canceled</span> @document_manualEN = ''User Manual and Usage Notes'' @document_manualDE = ''Benutzerhandbuch und Anwendungshinweise'' <!-- text body --> This is an overview of current tasks: * Install MediaWiki %status_done% * Create Help pages %status_inProgress% * Go on vacation %status_canceled% * Create manuals: ** %document_manualEN% ** %document_manualDE% ** ensure consistency between %document_manualEN% and %document_manualDE% (sorry for the lack of creativity in this example, but it should suffice to get my point across)
I believe this could enhance consistency within structured pages, and would probably be easy to implement - and learn - as well (too bad I'm not very experienced with PHP). While I guess the same could be achieved with regular templates, it can be quite bothersome having to create a new template page for each tiny element - not to mention the issue of coming up with unique names for a large number of templates that are each only used on one particular page...
Any thoughts?
-- Frederik
Semantic MediaWiki could be used to do this.
2006/12/4, FDG001@gmx.net FDG001@gmx.net:
Hey guys,
While I don't think this is possible (yet?), I still think it's worth discussing:
It'd be great if you could define variables on a page that could be included in the text and which would then be expanded when displaying the output. Here's an example of what I mean (syntax arbitrary): <!-- variable definitions --> @status_done = <span style="color: green;">canceled</span> @status_inProgress = <span style="color: blue;">canceled</span> @status_canceled = <span style="color: red;">canceled</span> @document_manualEN = ''User Manual and Usage Notes'' @document_manualDE = ''Benutzerhandbuch und Anwendungshinweise'' <!-- text body --> This is an overview of current tasks: * Install MediaWiki %status_done% * Create Help pages %status_inProgress% * Go on vacation %status_canceled% * Create manuals: ** %document_manualEN% ** %document_manualDE% ** ensure consistency between %document_manualEN% and %document_manualDE% (sorry for the lack of creativity in this example, but it should suffice to get my point across)
I believe this could enhance consistency within structured pages, and would probably be easy to implement - and learn - as well (too bad I'm not very experienced with PHP). While I guess the same could be achieved with regular templates, it can be quite bothersome having to create a new template page for each tiny element
- not to mention the issue of coming up with unique names for a large number
of templates that are each only used on one particular page...
Any thoughts?
-- Frederik
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht! _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Oh really, that'd be great! I haven't yet had the time to install the Semantic MediaWiki extension, but I have taken a quick look at their website. Unfortunately, I haven't been able to find anything like that yet - could you point me in the right direction here?
From what I understand, SMW 'only' adds some more advanced tags to the MW syntax - so it doesn't change anything that might confuse basic users, correct? They could still use the wiki as they always have, while advanced users could get their hands dirty with the geeky stuff!?
-- Frederik
----- Original Message ----- From: Fernando Correia Date: 2006-12-04 18:15
Semantic MediaWiki could be used to do this.
2006/12/4, FDG001@gmx.net FDG001@gmx.net:
Hey guys,
While I don't think this is possible (yet?), I still think it's worth discussing:
It'd be great if you could define variables on a page that could be included in the text and which would then be expanded when displaying the output. Here's an example of what I mean (syntax arbitrary): <!-- variable definitions --> @status_done = <span style="color: green;">canceled</span> @status_inProgress = <span style="color: blue;">canceled</span> @status_canceled = <span style="color: red;">canceled</span> @document_manualEN = ''User Manual and Usage Notes'' @document_manualDE = ''Benutzerhandbuch und Anwendungshinweise'' <!-- text body --> This is an overview of current tasks: * Install MediaWiki %status_done% * Create Help pages %status_inProgress% * Go on vacation %status_canceled% * Create manuals: ** %document_manualEN% ** %document_manualDE% ** ensure consistency between %document_manualEN% and %document_manualDE% (sorry for the lack of creativity in this example, but it should suffice to get my point across)
I believe this could enhance consistency within structured pages, and would probably be easy to implement - and learn - as well (too bad I'm not very experienced with PHP). While I guess the same could be achieved with regular templates, it can be quite bothersome having to create a new template page for each tiny element
- not to mention the issue of coming up with unique names for a large number
of templates that are each only used on one particular page...
Any thoughts?
-- Frederik
For an example, take a look at http://ontoworld.org/index.php?title=Sandbox&oldid=24061
I guess that's similar to what you want.
For help: http://ontoworld.org/wiki/Help:Inline_queries#In-line_use_of_queries
Yes, it does not change any behavior, just adds more options.
2006/12/4, Frederik Dohr fdg001@gmx.net:
Oh really, that'd be great! I haven't yet had the time to install the Semantic MediaWiki extension, but I have taken a quick look at their website. Unfortunately, I haven't been able to find anything like that yet - could you point me in the right direction here?
From what I understand, SMW 'only' adds some more advanced tags to the MW syntax - so it doesn't change anything that might confuse basic users, correct? They could still use the wiki as they always have, while advanced users could get their hands dirty with the geeky stuff!?
-- Frederik
----- Original Message ----- From: Fernando Correia Date: 2006-12-04 18:15
Semantic MediaWiki could be used to do this.
2006/12/4, FDG001@gmx.net FDG001@gmx.net:
Hey guys,
While I don't think this is possible (yet?), I still think it's worth discussing:
It'd be great if you could define variables on a page that could be included in the text and which would then be expanded when displaying
the
output. Here's an example of what I mean (syntax arbitrary): <!-- variable definitions --> @status_done = <span style="color: green;">canceled</span> @status_inProgress = <span style="color: blue;">canceled</span> @status_canceled = <span style="color: red;">canceled</span> @document_manualEN = ''User Manual and Usage Notes'' @document_manualDE = ''Benutzerhandbuch und Anwendungshinweise'' <!-- text body --> This is an overview of current tasks: * Install MediaWiki %status_done% * Create Help pages %status_inProgress% * Go on vacation %status_canceled% * Create manuals: ** %document_manualEN% ** %document_manualDE% ** ensure consistency between %document_manualEN% and %document_manualDE% (sorry for the lack of creativity in this example, but it should
suffice
to get my point across)
I believe this could enhance consistency within structured pages, and would probably be easy to implement - and learn - as well (too bad I'm
not
very experienced with PHP). While I guess the same could be achieved with regular templates, it can
be
quite bothersome having to create a new template page for each tiny
element
- not to mention the issue of coming up with unique names for a large
number
of templates that are each only used on one particular page...
Any thoughts?
-- Frederik
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Well, while that's kinda like what I want, it doesn't really help me, unfortunately. The syntax there is quite complex and verbose, so I'd end up being faster (if not necessarily more consistent) with typing everything out manually.
Thanks for the tip though, SMW keeps getting more and more interesting!
-- Frederik
----- Original Message ----- From: Fernando Correia Date: 2006-12-04 21:20
For an example, take a look at http://ontoworld.org/index.php?title=Sandbox&oldid=24061
I guess that's similar to what you want.
For help: http://ontoworld.org/wiki/Help:Inline_queries#In-line_use_of_queries
Yes, it does not change any behavior, just adds more options.
I was able to make this more practical by using templates. For instance,
{{Date|2006|12|05}}
Could output 05/12/2006 and create 4 attributes in the page: day, month, year and date.
2006/12/4, Frederik Dohr fdg001@gmx.net:
Well, while that's kinda like what I want, it doesn't really help me, unfortunately. The syntax there is quite complex and verbose, so I'd end up being faster (if not necessarily more consistent) with typing everything out manually.
Thanks for the tip though, SMW keeps getting more and more interesting!
-- Frederik
----- Original Message ----- From: Fernando Correia Date: 2006-12-04 21:20
For an example, take a look at http://ontoworld.org/index.php?title=Sandbox&oldid=24061
I guess that's similar to what you want.
For help: http://ontoworld.org/wiki/Help:Inline_queries#In-line_use_of_queries
Yes, it does not change any behavior, just adds more options.
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
I was able to make this more practical by using templates. For instance,
{{Date|2006|12|05}}
Could output 05/12/2006 and create 4 attributes in the page: day, month, year and date.
Looks good! Could you give me the "source code" for that template?
Gladly. Something like this:
[[day:={{{1}}}]]/[[month:={{{2}}}]]/[[year:={{{3}}}]][[date:={{{3}}}/{{{2}}}/{{{1}}}|]]
Usage: {{Date|day|month|year}}
Change parameter order and "/" sign for other date formats.
It defines 4 attributes and outputs the formatted date.
2006/12/8, Frederik Dohr fdg001@gmx.net:
I was able to make this more practical by using templates. For instance,
{{Date|2006|12|05}}
Could output 05/12/2006 and create 4 attributes in the page: day, month, year and date.
Looks good! Could you give me the "source code" for that template? _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Sorry for reviving this thread, but SMW proved to be a little overkill for this.
As such "intra-page templates" (or local variables, if you will) would be very helpful to us, we are considering creating a tiny extension for this. However, we don't have an experienced PHP programmer at hand; could anyone point me to a simple template for replacing existing text in a wiki page? I believe we could take it from there then.
In essence, all we want is something like this: <var name="definitions"> var1="some variable" var2="yet another variable" </var> In the text, we now have <var name="var1"/> and <var name="var2"/>. (I revised the originally proposed syntax... )
The idea popped up again while looking at the source code for the Multilang extension, which does a similar thing, but unfortunately is too complicated for me to understand...
It'd be great if there was a template for learning about how to do such a thing - but if there isn't, well, this isn't exactly a vital issue...
Also, is there anyone else who'd benefit from this? Of course we'd make the extension publicly available if we actually managed to get it working.
-- F.
----- Original Message ----- From: Fernando Correia Date: 2006-12-04 18:15
Semantic MediaWiki could be used to do this.
2006/12/4, FDG001@gmx.net FDG001@gmx.net:
Hey guys,
While I don't think this is possible (yet?), I still think it's worth discussing:
It'd be great if you could define variables on a page that could be included in the text and which would then be expanded when displaying the output. Here's an example of what I mean (syntax arbitrary): <!-- variable definitions --> @status_done = <span style="color: green;">canceled</span> @status_inProgress = <span style="color: blue;">canceled</span> @status_canceled = <span style="color: red;">canceled</span> @document_manualEN = ''User Manual and Usage Notes'' @document_manualDE = ''Benutzerhandbuch und Anwendungshinweise'' <!-- text body --> This is an overview of current tasks: * Install MediaWiki %status_done% * Create Help pages %status_inProgress% * Go on vacation %status_canceled% * Create manuals: ** %document_manualEN% ** %document_manualDE% ** ensure consistency between %document_manualEN% and %document_manualDE% (sorry for the lack of creativity in this example, but it should suffice to get my point across)
I believe this could enhance consistency within structured pages, and would probably be easy to implement - and learn - as well (too bad I'm not very experienced with PHP). While I guess the same could be achieved with regular templates, it can be quite bothersome having to create a new template page for each tiny element
- not to mention the issue of coming up with unique names for a large number
of templates that are each only used on one particular page...
Any thoughts?
-- Frederik
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht! _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Never mind this thread - it seems that such an extension already exists: http://meta.wikimedia.org/wiki/VariablesExtension seems to be exactly what I wanted! (I haven't tested it yet, but it seems perfect.)
This find again proves how important it is to know the right keyword(s) to search for...
Apologies for having bothered you all with this.
-- F.
mediawiki-l@lists.wikimedia.org