Question
Hi,
I tried to create some links to published
iCal
calendars in a topic on our local TWiki, but the link was not recognised. It's because the link protocol is
webcal:, and this is not recognised in TWiki.pm, where the $linkProtocolPattern variable is hard-coded to a specific set of protocols.
It was easy enough to edit TWiki.pm and add webcal to $linkProtocolPattern.
But I thought I would try and be clever and make it a variables in TWiki.TWikiPreferences as a variable called LINKPROTOCOLPATTERN, then use
TWiki::Prefs::getPreferencesValue("LINKPROTOCOLPATTERN") to initialise it. Unfortunately, it doesn't work.
Have I missed something?
Is this even a good thing to do? Maybe the preference should be
additional protocols?
Thanks for any advice.
- TWiki version: Feb 2003
- Perl version: 5.6.0
- Web server & version: Apache 1.3.27
- Server OS: Mac OS X Server
- Web browser & version: Safari
- Client OS: Mac OS X
--
SteveFolly - 09 Jun 2003
Answer
As you found out, adding this to
$linkProtocolPattern in
TWiki.pm is the easiest fix.
For your preferences variable solution you need to make sure that you get the value
after the preferences are initialized, e.g. after
&TWiki::Prefs::initializePrefs( $wikiUserName, $webName ); in
TWiki.pm's initialize.
--
PeterThoeny - 10 Jun 2003