Question
Hi,
I want to write a perl script for server administration. The thing is, I would like to query the
WikiName within that script (if the user has logged in). The script is situated on the same server, so how is it possible to get the
WikiName?
Thanks
Alex
Environment
--
AlexRaabe - 28 Jul 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
you could either
use TWiki and use the official
TWikiFuncDotPm calls, or you could parse
data/Main/TWikiUsers.txt to map from login name to WikiName. The former one is more portable.
Sample entry:
* JohnSmith - jsmith - 28 Jul 2006
--
PeterThoeny - 29 Jul 2006
The snippet of code:
use TWiki;
$TWiki::Plugins::SESSION = new TWiki();
print TWiki::Func::getSkin(),"\n";
works indeed! Thank you Peter and Will for your fast answer.
--
AlexRaabe - 31 Jul 2006