Hi all!
I've just registered the mailing list, as I have some technical issues about MediaWiki customization.
I'm right now a senior studying Informatics in University of Washington, and I'm doing my capstone project on designing a Wiki/Knowledge base on Home network issues.
I've chosen MediaWiki to be a starting point since I think it supports many ideas of what I'm trying to accomplish.
One of the problem I have now is that I want to change the order of topics in each article depending on the user who views it.
Since each article represents a network device, and each topic represents a network problem, I want to sort the problems depending on the user network device background information and user input device background information.
I don't know if this sounds too vague, or I'm even at the right place to ask this.
But I wonder if you guys can give me a direction where to start looking about adding this type of logic?
Let me know if I should ask this somewhere else!
Thank you!!
Timothy Chen
Timothy Chen schreef:
One of the problem I have now is that I want to change the order of topics in each article depending on the user who views it.
Since each article represents a network device, and each topic represents a network problem, I want to sort the problems depending on the user network device background information and user input device background information.
I don't know if this sounds too vague, or I'm even at the right place to ask this.
But I wonder if you guys can give me a direction where to start looking about adding this type of logic?
Let me know if I should ask this somewhere else!
First off, you should install the ParserFunctions extension [1] and the Variables extension [2]. The latter is actually intended as a demo for extension writing, but implements the {{CURRENTUSER}} magic word that you'll need.
Second, you want to split your stuff into subpages. So if you have an article called "Example router", every problem will be a subpage ("Example router/Problem 1", "Example router/Problem 2", etc.). The "Example router" page will be no more than a series of inclusions, like:
{{/Problem 1}}
{{/Problem 2}}
etc.
To sort this stuff dynamically, you'll need to write some smartness using ParserFunctions. Maybe StringFunctions [3] could come in handy as well.
Roan Kattouw (Catrope)
[1] http://www.mediawiki.org/wiki/Extension:ParserFunctions [2] http://www.mediawiki.org/wiki/Extension:Variables [3] http://www.mediawiki.org/wiki/Extension:StringFunctions
On Jan 24, 2008 3:30 AM, Timothy Chen tnachen@u.washington.edu wrote:
One of the problem I have now is that I want to change the order of topics in each article depending on the user who views it.
Since each article represents a network device, and each topic represents a network problem, I want to sort the problems depending on the user network device background information and user input device background information.
I don't know if this sounds too vague, or I'm even at the right place to ask this.
But I wonder if you guys can give me a direction where to start looking about adding this type of logic?
MediaWiki does not currently have any explicit facility for in-wiki creation of "wizards" or any other kind of adaptive page. Pages are static or very close to it, and definitely cannot vary by user. You may be able to use the quasi-programming-language features of MediaWiki and some of its extensions to obtain something close to what you want, but those are difficult for an average person to understand, and so you'll lose a lot of the point of creating a wiki (low barrier to contribution).
My recommendation would be that you use the features of standard HTML, i.e., hyperlinks, and have a page for each possibility, with links in between pages. If this is *really* not sufficient for your needs, my recommendation would be to investigate extensions to MediaWiki and other wiki packages entirely to see if they do what you want. If none does, you can consider writing an extension.
You *could* probably work up some complicated system for every page using parser functions and variables within MediaWiki itself, but if you're already programming you may as well program in something approaching a real language, do it once instead of repeating it for every page, and do it in a way that non-programmers can contribute to -- i.e., write an extension.
wikitech-l@lists.wikimedia.org