Hi folks.
I'm a relatively new wikipedian (http://en.wikipedia.org/wiki/User:Friedo) and also a programmer, so I'd like to get your feedback on some ideas I had for improving the code. I'm not too familiar with PHP (I come from the Perl/C side of things) so I haven't quite wrapped my brain around all the source files yet. (Ergo pointers on where to start would be great.)
I think there needs to be a method for creating sub-articles which share content with their parent in a permanent way. I think this would be extremely beneficial in creating content where there is a need for hierarchical organization. In particular, what I envision is a special tag which could be placed in a sub-heading, which would collapse everything from that point to the next heading behind a link that says "Read more..." (or similar.)
So, for example, in an article on programming syntax, you could have something like:
==Foo== Foo is a [[metasyntactic variable]]. Blah blah blah.
{{sub:Foo}} ===Uses for foo=== ... ===Origin of foo=== ... ==Bar==
Everything between {{sub:Foo}} and ==Bar== would then be replaced by a "Read More.." link. Since the actual content is all in the master article, sub-articles can be edited as sections and a user could set a preference to automatically expand all sub-articles. And of course they should be nestable. Ideally sub-articles would be browse-able independently of their parents (but with a link to the parent) and have their own TOC. (However, this raises the conundrum of how to do the markup -- you'd probably end up with really low-level headings which would need to be rendered as top-level when displayed on the sub-page.)
So, thoughts? Is this practical or doable? I'd be happy to write the code just as soon as I learn some more PHP.
Mike Friedman wrote:
I think there needs to be a method for creating sub-articles which share content with their parent in a permanent way. I think this would be extremely beneficial in creating content where there is a need for hierarchical organization. In particular, what I envision is a special tag which could be placed in a sub-heading, which would collapse everything from that point to the next heading behind a link that says "Read more..." (or similar.) [...] So, thoughts? Is this practical or doable? I'd be happy to write the code just as soon as I learn some more PHP.
Before you code this in PHP: How do I write the wiki link to one of these sub-articles? And how do I write the URL if I want to link to a sub-article from an external web page? And if I arrive at such a sub-article URL, and then press "edit this page", will I also edit the common introduction to the bigger article?
The traditional reaction to the word "hierarchical" has been "think again". Neither wiki nor hypertext in general is hierarchical, but networked, with many small pieces of information each reachable by a unique URL.
On Mar 23, 2004, at 5:56 AM, Lars Aronsson wrote:
Before you code this in PHP: How do I write the wiki link to one of these sub-articles?
There would be some delimiter, (perhaps a ':' or '/' ). You would then write something like [[New York City:History]]
And how do I write the URL if I want to link to a sub-article from an external web page?
Something like http://en.wikipedia.org/wiki/New_York_City:History
And if I arrive at such a sub-article URL, and then press "edit this page", will I also edit the common introduction to the bigger article?
That's the idea; it would be similar to editing a section, but the intro (i.e. everything before the TOC) would be shared between the parent article and the child, so any changes there would appear on both. Also, a child article would feature a link under the title saying something like "Parent article: New York City"
Note that since I'm not very familiar with the code yet, I have no idea what would be an easy or proper method (or syntactical/semantic structure) for implementing this; that's why I'm putting the idea out for discussion. A simpler idea that occurred to me after my initial message is to maintain the sub-articles as separate articles in the DB, and link them into the parent article via a {{msg: }} type mechanism which would pull in the intro from the sub at the appropriate heading level. For example, you would put in the main New York City article:
==={{sub:New York City:History}}===
...and that would insert the intro paragraphs for New York City:History at a second level heading in the parent. (Does that make sense?)
That solves the problem of very deep headings and makes it possible for a sub to be included in more than one parent, even at different levels.
The traditional reaction to the word "hierarchical" has been "think again". Neither wiki nor hypertext in general is hierarchical, but networked, with many small pieces of information each reachable by a unique URL.
True, but I don't see any reason why it can't be both. I think this feature would be most useful for maintaining large complexes of related articles (such as the ones I've been working on relating to New York City.) Specifically, it would be a great tool for working towards creating detailed topics and sub-topics (and sub-sub-topics) without making master articles too big or polluting the main namespace with billions of stubs that are difficult to keep track of.
Wikipedia does cover a lot of material that would benefit from a formalized hierarchical structure, but I am NOT advocating forcing hierarchy anywhere where it doesn't belong.
Mike Friedman wrote:
again". Neither wiki nor hypertext in general is hierarchical, but networked, with many small pieces of information each reachable by a
True, but I don't see any reason why it can't be both. I think this feature would be most useful for maintaining large complexes of related articles (such as the ones I've been working on relating to New York City.)
One objection would be that the history of New York City is both a subcategory of New York City and of American history. This looks more like a network (web, mesh) than a hierarchy:
United States --> History of the United States | | | | V V New York City --> History of New York City
There used to be "subpages" in Wikipedia's first year, because the originally used UseModWiki software supported this. However, this was abandoned. Articles such as [[Sweden/History]] were then renamed [[History of Sweden]]. Some argumentation is found on http://en.wikipedia.org/wiki/Wikipedia:Subpages
"Real" (classic, printed) encyclopediae have also wrestled with this problem. In some, "language" and "art" are mere subheadings in the article on Poland, in others, "Polish language" and "Polish art" are articles of their own.
I think the least intrusive way to implement a part of your idea is to introduce a "hide this subsection" link (a triangle icon) next to today's subheadings, just like you can hide the table of contents at the top of the article. For editing, storage and URLs, the article would still be one whole. But for viewing, subsections could be folded in and out.
"MF" == Mike Friedman friedo@friedo.com writes:
MF> I think there needs to be a method for creating sub-articles MF> which share content with their parent in a permanent way. I MF> think this would be extremely beneficial in creating content MF> where there is a need for hierarchical organization.
MF> In particular, what I envision is a special tag which could be MF> placed in a sub-heading, which would collapse everything from MF> that point to the next heading behind a link that says "Read MF> more..." (or similar.)
The way this is currently done in Wikipedia is thus:
Algeria.
== Agriculture ==
See [[Agriculture of Algeria]]
== Metallurgy ==
See [[Metallurgy of Algeria]]
Subpages are pretty much disparaged on Wikipedia, but this could also be:
Algeria.
== Agriculture ==
See [[Algeria/Agriculture]]
== Metallurgy ==
See [[Algeria/Metallurgy]]
The big problem with sub-pages, as I understand it, is that hierarchical information networks imply a certain way of looking at that information. And that's not always justified. For example, why wouldn't "Metallurgy" be like this?
Metallurgy.
== In Algeria ==
See [[Metallurgy/Algeria]]
== In Spain ==
See [[Metallurgy/Spain]]
Having an intertwingled network rather than a strict hierarchy allows us to structure and re-structure information in extremely interesting ways.
That said, I think twist-down sub-sections of MediaWiki articles would be somewhat useful.
~ESP
Evan Prodromou wrote:
Subpages are pretty much disparaged on Wikipedia
I once was in favor of subpages, when they still existed. Larry convinced me otherwise. Let's bow to his wisdom and not re-introduce subpages.
That said, maybe an inline JavaScript display, loading an "insert" on demand, would be a nice option. Compare slashdot.
We should keep the current title system, though.
Magnus
wikitech-l@lists.wikimedia.org