Question
Can ActionTracker be simply modified to work with login names rather than wikinames?
It seems like actiontracker relies on wikinames to look up a user's email address.
However using LoginNamePlugin from
UseLoginNames and the mod from
SimplifyingActionTrackerInput should get us real close to using login names instead.
--
SamAbrams - 18 Feb 2004
GETTING CLOSER:
It is very easy to setup a wikiname to be the same as a login name, with the first letter of the wikiname capitalized.
For example, sabrams for login and Sabrams for wikiname.
The last challenge then is for actiontracker to autocapitalize the first letter of a login name, just as it automatically appends mainweb. to the name today.
Then users only need remember their login name, and don't need to learn the second wikiname convention at all.
Crawford, is it possible to adapt the javascript below, from the registration form, to do the autocapitalization of the first letter?
<input type="text" name="Twk1Name" size="25" STYLE="background:#FFEFC6;" value="" onblur="var sIn = this.value; var sOut = ''; var chgUpper = true; for ( var i = 0; i < sIn.length; i++ ) { var ch = sIn.charAt( i ); var ch2 = ''; if((ch=='à')||(ch=='á')||(ch=='â')||(ch=='ã')||(ch=='å') ) { ch = 'a'; } if( (ch=='è')||(ch=='é')||(ch=='ê') ) { ch = 'e'; } if( ch=='ç') { ch = 'c'; } if( ch=='ñ') { ch = 'n'; } if( (ch=='ò')||(ch=='ó')||(ch=='ô') ) { ch = 'o'; } if( ch=='ä') { ch = 'a'; ch2 = 'e'; } if( ch=='ö') { ch = 'o'; ch2 = 'e'; } if( (ch=='ù')||(ch=='ú')||(ch=='û') ) { ch = 'o'; } if( ch=='ü') { ch = 'u'; ch2 = 'e'; } if( ch=='Ä') { ch = 'A'; ch2 = 'e'; } if( ch=='Ö') { ch = 'O'; ch2 = 'e'; } if( ch=='Ü') { ch = 'U'; ch2 = 'e'; } if( ch=='ß') { ch = 's'; ch2 = 's'; } if( ((ch>='a')&&(ch<='z')) || ((ch>='A')&&(ch<='Z')) ) { if( chgUpper ) { ch = ch.toUpperCase(); chgUpper = false; } sOut+=ch; if( ch2!='') { sOut+=ch2; } } else { if( ch==' ' ) { chgUpper = true; } } } this.form.Twk1WikiName.value=sOut;" />
--
SamAbrams - 24 Feb 2004
Answer
It's possible, but it's a rather clunky approach. If you are always going to use login names (though I'm still not clear why you want to do this) then you can just convert login names to wiki names using TWiki::userToWikiname() in the beforeSaveHandler.
--
CrawfordCurrie - 08 May 2004