From: Reini U. <ru...@x-...> - 2004-08-05 10:21:22
|
Arthaey Angosii schrieb: > I want to add a new inline syntax, to make a word link to its > dictionary entry. This is no new inline syntax, this is just an addon for interwiki links. > I would like to be able to type as the page source, > for example: > > The Spanish word Spanish:hablar means to speak. > > I want "hablar" to be a wiki link to > index.php/Spanish/Dictonary/Hablar, with a tooltip that says "to > speak" and without the text "Spanish:" actually being displayed. I can > get the link to happen by adding the line > > Spanish Spanish/Dictionary/ > > to the InterWikiMap page. This doesn't solve the tooltip problem, nor > does it allow me to not display the "Spanish:" tag. To get rid of the "Spanish:" prefix use [hablar|Spanish:hablar]. To add custom tooltips from some kind of external database (hablar => "to speak") you have to look into the interwiki map linking code and add your logic there. It will not be supported by us. Best is to add this method to your custom themeinfo.php. So extend the Theme method linkExistingWikiWord() as it is done similarly in the 'MacOSX' and 'Portland' theme. > Will I need to create a dictionary database to get this done? Is there already > something similar in the code that I could use as a model? What > functions should I be studying? -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |