Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Solaris 10
Web server: Apache 2
Perl version: 5.8.6
Client OS:  
Web Browser:  
Categories: Add-Ons

-- AlexRaabe - 28 Jul 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list 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

 
Topic revision: r5 - 2006-08-01 - AlexRaabe
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.