Tags:
archive_me1Add my vote for this tag create new tag
, view all tags
Please, add the following line to the registration script, just before saving the user page topic generated:
    # create user topic if not exist
    if( ! &wiki::topicExists( $wiki::mainWebname, $wikiName ) ) {
        $text = &wiki::readTemplate( "register" );
        ( $before, $after) = split( /%FORMDATA%/, $text );
        for( $x = 0; $x < $formLen; $x++ ) {
            $name = $formDataName[$x];
            $value = $formDataValue[$x];
            $value =~ s/[\n\r]/ /go;
            if( ! (    ( $name eq "Wiki Name" )
                    || ( $name eq "Password" )
                    || ( $name eq "Confirm" ) ) ) {
                $before .= "   * $name\: $value\n";
            }
        }
        $text = "$before$after";
#AS to automagically add the proper ALLOWTOPICCHANGE entry
        $text =~ s/TWikiGuest/$wikiName/go; 
#AS
        $text =~ s/ {3}/\t/go;
        &wiki::saveTopic( $wikiName, $text, "" );
    }                                                                           

This will automatically protect the user's page.

This way we can give add to the redister.tmpl the following line:

   * Set ALLOWTOPICCHANGE = %WIKINAME%

-- AndreaSterbini - 10 Nov 2000

I prefer to keep that optional to keep it in line with the WikiCulture. Therefore I added this to the register.tmpl file:

  • Optionally write protect your home page: (set it to your WikiName)
    • Set ALLOWTOPICCHANGE =

Commited to TWikiAlphaRelease.

-- PeterThoeny - 10 Nov 2000

I agree, thanks for the lesson (I mean it!).

-- AndreaSterbini - 13 Nov 2000

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-03-13 - RafaelAlvarez
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.