(AlexanderVH?)remote wikilinks contain an url that is concatenated with a remotename. Generalizing, an interwikilink consists of a formatting part(localname, part before the :) and a parameter(remotename, part after the :)

Generalized syntax allows for urls that look like this:

RemoteWikiURL: http://www.\%s.com or RemoteWikiURL: http://www.google.com/\%s

The second example refers to the existing functionality. The first example refers to extended functionality.

In _interwikilink_replace, add a few lines after retrieval of remoteurl:

            if m is not None:
                remoteurl = html_unquote(m.group(2)) # NB: pages are 
                                                     # stored html-quoted
                                                     # XXX eh ? they are ?
                                                     # something's not
                                                     # right
                                                     # somewhere.. 
                                                     # I have lost my
                                                     # grip on this
                                                     # whole quoting
                                                     # issue.
                #the new part: allow use of a '\%s' parameter in the remote url. 
                #If the parameter is not present, revert to old behaviour for backward compatibility
                if find(remoteurl,'%s')<0: 
                    fullurl = remoteurl+ remotename
                    fullurl = remoteurl % remotename 

Of course you'll have to substitute fullurl in a few other places in this function. The use of the backslash in front of %s is a bit annoying and could be avoided by introducing an extra substition step.

The first usage i had was in order to link to specific renderings of a zwiki, like without header or footer, or just as plaintext. You can't have a remote url that systematically returns the /text member for each remote wikiname. A workaround is to add a dispatch method at the other end which accepts the remote wikiname as a parameter. Not pretty

FlorianKonnertz, 2002/12/17 13:08 GMT (via web):
I don't understand exactly, what ParametrizedRemoteLinks are and what the code above does. Could somebody explain this to me, please?