*** edit.orig Tue Jun 4 14:28:39 2002 --- edit Thu Jun 13 16:56:12 2002 *************** *** 219,224 **** --- 219,250 ---- $tmpl =~ s/%FORMFIELDS%//go; } + # simplified signature. ColasNahaboo, v3 - 13 Jun 2002 + my( $sec, $min, $hour, $day, $mon, $year ) = gmtime( time() ); + my $wikiName = &TWiki::userToWikiName( $userName, 1); + my $homePage = $wikiUserName; + my $initials = $wikiName; + if ( $wikiName ne "TWikiGuest" ) { + $initials =~ s/[a-z0-9]//go; + } else { + $initials="Guest"; + } + if (&TWiki::Store::topicExists($TWiki::mainWebname, $wikiName)) { + foreach (split( /\n/, &TWiki::Store::readWebTopic($TWiki::mainWebname, + $wikiName))) { + if (/^\s\*\sInitials:\s+([^\s]+)/) { # Initials field + $initials=$1; + TWiki::handleInternalTags( $initials, $webName, $theTopic); + last; + } + } + } else { # no home page? no link to avoid creating one by mistake + $homePage = "Test.$wikiName"; + } + my $simplesig = "[[" . $homePage . "#" . sprintf("%.2u",$day) . + $TWiki::isoMonth[$mon] . $year . "][" . $initials . "]]"; + $tmpl =~ s/%INITIALS%/$simplesig/go; + $tmpl =~ s/%FORMTEMPLATE%//go; # Clear if not being used $tmpl =~ s/%TEXT%/$text/go; *************** *** 227,229 **** --- 253,256 ---- print $tmpl; } +