[Mediawiki-l] 2 questions: link OldID and {{sections headings only}}

Rich Evans revansx at yahoo.com
Wed Apr 9 19:50:57 UTC 2008


>> 2) 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 at wikimedia.org> wrote: 
  -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rich Evans wrote:
> 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?

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.

> 2) 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 


More information about the MediaWiki-l mailing list