Hi Folks,
I have two questions that I am stumped on:
1) Is there a way to construct an interwiki link that references a past version of an article?
Presently, the only way I know how to do so is to copy the whole URL as an external link. The only down-side to this is that it is not a portable link if the wiki host should move. One solution I would be happy with is if someone could show me how to make an external link that contains a relative path from the wiki. Solutions requireing extentions are welcomed.
2) Is it possible to effectively transclude only the TOC of another page?
I am using a few articles as collaborative news pages whose headings change regularly. What I'd like to do is transclude the section headers only into a summary page which would act as a headline listing. Does anyone know of a technique and/or extenstion which when used in an article will list the section headers of another article (with links).
truest thanks all, - Rich
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Rich Evans wrote:
Hi Folks,
I have two questions that I am stumped on:
- Is there a way to construct an interwiki link that references a
past version of an article?
You can use the fullurl: function on interwikis as well as internal links:
[{{fullurl:Wikipedia:Foo|oldid=123}} Old foo]
Of course, revision ID numbers aren't necessarily going to be portable either, your target site may change in future.
- Is it possible to effectively transclude only the TOC of another
page?
No built-in way to do this.
- -- brion vibber (brion @ wikimedia.org)
- Is it possible to effectively transclude only the TOC of another
page?
No built-in way to do this.
I suspected that, but I am pretty much counting on someone knowing of an extention or a hook or at least a SQL strategy for me to write my own extention. I can do the programming, I'm just not up to speed with the way section headers are saved in the wikidb.....will someone help me construct a valid SQL statement that I could parse for the TOC data myself?
I don't fully understand the wikidb schema, so I'll start with something foolishly abstract...
SELECT [columns with header info] FROM [page, text, etc..] WHERE [mysterious-page-title-text-joining-condition] AND [article_ID = MyArticleID] AND [line-of-text-in-an-article LIKE %headerflag%] ORDER BY [headings] ASC
can someone help me turn this into a real statement?
Also, regarding question #1,
You can use the fullurl... [{{fullurl:Wikipedia:Foo|oldid=123}} Old foo]
Bingo! Thanks.
Brion Vibber brion@wikimedia.org wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Rich Evans wrote:
Hi Folks,
I have two questions that I am stumped on:
- Is there a way to construct an interwiki link that references a
past version of an article?
You can use the fullurl: function on interwikis as well as internal links:
[{{fullurl:Wikipedia:Foo|oldid=123}} Old foo]
Of course, revision ID numbers aren't necessarily going to be portable either, your target site may change in future.
- Is it possible to effectively transclude only the TOC of another
page?
No built-in way to do this.
- -- brion vibber (brion @ wikimedia.org)
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Rich Evans wrote:
- Is it possible to effectively transclude only the TOC of another
page?
No built-in way to do this.
I suspected that, but I am pretty much counting on someone knowing of an extention or a hook or at least a SQL strategy for me to write my own extention. I can do the programming, I'm just not up to speed with the way section headers are saved in the wikidb.....will someone help me construct a valid SQL statement that I could parse for the TOC data myself?
I don't fully understand the wikidb schema, so I'll start with something foolishly abstract...
SELECT [columns with header info] FROM [page, text, etc..] WHERE [mysterious-page-title-text-joining-condition] AND [article_ID = MyArticleID] AND [line-of-text-in-an-article LIKE %headerflag%] ORDER BY [headings] ASC
can someone help me turn this into a real statement?
Nope, there's nothing in the database for this.
You'd need to load up the article text, pass it through the parser, and grab the header information and/or toc out of there. Offhand, don't know how cleanly this can be done.
- -- brion vibber (brion @ wikimedia.org)
mediawiki-l@lists.wikimedia.org