Question
How do you take away "Main." from the signatures that TWiki prepares for you and from the revision info line at the top right of a topic (e.g., " r33 - 30 Apr 2006 - 02:14:04 -
PeterThoeny")?
As you know, the "Main." prefix is to make sure that the
WikiName is a good link. But like many, I am setting up TWiki to use our LDAP server to authenticate users. Until a plugin is written to automatically register LDAP users (or until I learn Perl and write it myself), I think that just going to have users go unregistered.
But then everywhere I am known as "Main.abanks" instead of just "abanks". For example:
- in "Your signature to copy in paste, it says, "-- Main.abanks - 13 Jun 2006"
- I would like it to say "-- abanks - 13 Jun 2006"
- I also need to catch the signature that is automatically written in the textarea of a new topic when I create it.
- Likewise the revision info line at the top right says "r2 - 07 Feb 2006 - 09:09 - Main.abanks"
- I would like it to say "-- r2 - 07 Feb 2006 - 09:09 - abanks"
For access control and groups, I assume that I can use usernames instead of
WikiNames?
If I take away "Main" as I have described and do not register, is there anything that would break?
Environment
--
AndrewBanks - 13 Jun 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.
That's a bit tricky to get completely done.... and you may curse yourself once an automatic registration is available. But here you are:
- The signature for copy and paste is defined in
templates/edit.pattern.tmpl - there's a block called %TMPL:DEF{"sig"}%. Replace %WIKIUSERNAME% by %USERNAME% (use an editor, can't be done with web interface).
- The signature in the textarea of new topics is created from the template in TWiki.WebTopicEditTemplate.txt. Again, replace
%WIKIUSERNAME% by %USERNAME%, either with an editor or "normal" TWiki editing.
- The revision info when viewing is derived from
templates/view.pattern.tmpl which contains a line starting with %TMPL:DEF{"revinfo"}%. In this line, replace %REVINFO% by %REVINFO{"r$rev - $date - $username"}% (again needs an editor).
And yes, you sort of can use login names instead of wiki names for access control. But in this case you'll curse yourself twice once registration works because you have to manually change every access control list, so don't do that. If you must, use groups with proper wikinames, so that you can add both the login names
and the wiki names as group members.
Last year I have suggested that
UnregisteredUsersShouldBeTWikiGuests but this has not yet made its way to the release....
--
HaraldJoerg - 13 Jun 2006
The question is if you really want to remove the Main prefix. Is there any reason why TWiki's standard mapping from login name to
WikiName would not work for you, assuming users are registering? See
{MapUserToWikiName} setting in configure.
--
PeterThoeny - 14 Jun 2006
As someone that
has done this, I'd like to say
- yep, it works
- we changed our minds, and changed instead to a concatination of FirstnameLastname - as this allows the creation of that topic in one web. most users don't seem to do it, but some do.
- importantly, this site does not do registration in TWiki - as its quite redundant - user registration, home page and other interaction are done outside TWiki.
- The distributed Main web has been deleted.
--
SvenDowideit - 14 Jun 2006
Thank you, Harald.
Peter, we're assuming users are
not registering (see Question).
Sven, thank you also for another route. I wonder if, instead of using an .htaccess file I switch back to a using web form for signing in, but one that I write myself to:
- query LDAP,
- register the user in TWiki if unregistered, and
- set up the session.
--
AndrewBanks - 15 Jun 2006