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 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

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2006-08-01 - AlexRaabe
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.