Revision history for AutomaticUserPageCreation
Revision [18262]
Last edited on 2008-01-28 00:10:56 by JavaWoman [Modified links pointing to docs server]No Differences
Additions:
~~~~~~&Oh, I see what you mean now, Nils. The idea was to include such a "dynamic welcome" in the WelcomeUser page though - where it would be just the action. But then we'd have to create such a page on an install - for now it's only here... Hmmm. --JavaWoman
Additions:
~~~~~&I know that. But it is to the admin of a wiki, if he includes such thing into the template-page, or not. Not of the user-registration :) --NilsLindenberg
Additions:
~~~~&DarTar, Eggzakly! :) -- JavaWoman
~~~~&Nils, look at the **code** DarTar used here - one of the "little actions" is all that's needed - which will quite likely be included in the //next// version (after 1.1.6.0) Wikka release :) -- JavaWoman
~~~~&Nils, look at the **code** DarTar used here - one of the "little actions" is all that's needed - which will quite likely be included in the //next// version (after 1.1.6.0) Wikka release :) -- JavaWoman
Deletions:
Additions:
Note that this needs some testing, for example it will surely fail, if you don't give the user the right to load (view?) the template-page.
The user is redirected to WelcomeUser after registration. If you don't want that, just delete the //$this->Redirect(WelcomeUser);// line after inserting the code.
$from = $this->GetConfigValue('userpagetemplate');
$note = 'automatic creation';
$thepage=$this->LoadPage($from); # load the source page
if ($thepage) $pagecontent = $thepage['body']; # get its content
$this->SavePage($name, $pagecontent, $note); #create target page
$this->Redirect(WelcomeUser);
~~&How about a short "who" action without you are? Do actions work in headers? --NilsLindenberg
~~~&Well, this is the case now. Except from the dynamic message. That is something the admin of a wiki has to/can do :) --NilsLindenberg
The user is redirected to WelcomeUser after registration. If you don't want that, just delete the //$this->Redirect(WelcomeUser);// line after inserting the code.
$from = $this->GetConfigValue('userpagetemplate');
$note = 'automatic creation';
$thepage=$this->LoadPage($from); # load the source page
if ($thepage) $pagecontent = $thepage['body']; # get its content
$this->SavePage($name, $pagecontent, $note); #create target page
$this->Redirect(WelcomeUser);
~~&How about a short "who" action without you are? Do actions work in headers? --NilsLindenberg
~~~&Well, this is the case now. Except from the dynamic message. That is something the admin of a wiki has to/can do :) --NilsLindenberg
Deletions:
$from = $this->GetConfigValue('userpagetemplate');
$note = 'automatic creation';
$thepage=$this->LoadPage($from); # load the source page
if ($thepage) $pagecontent = $thepage['body']; # get its content
$this->SavePage($name, $pagecontent, $note); #create target page
Additions:
~~~~&Eggzakly! :) -- JavaWoman
Additions:
Based on a request in the SuggestionBox, this code will automatically create the page of a newly registered user. Therefore it uses another page, you can choose, as template.
Deletions:
Additions:
~~~&Yes, I definitely agree that on registration, the user should be redirected to WelcomeUser (which might also contain a dynamic welcome message like: Hi, {{who}}). -- DarTar
Deletions:
Additions:
~~~&Yes, I definitely agree that on registration, the user should be redirected to WelcomeUser (which might also contain a dynamic welcome message like: //Hi, {{who}} //). -- DarTar
Deletions:
Additions:
~~~&Yes, I definitely agree that on registration, the user should be redirected to WelcomeUser (which might also contain a dynamic welcome message like: //Hi, {{who}}//). -- DarTar
Additions:
~~&I was also thinking that on registration the user should be redirected //either// to his/her own new page, or to WelcomeUser which could have a dynamic //link// to the current user's page. --JavaWoman
Additions:
~& Nils, nice idea - one extra feature I would like to see here is the automatic creation of a main header with the user name, so as to produce something like ##""=====NilsLindenberg=====""## on page creation. This can either be done 'online' during page generation or by preg_replacing a placeholder on the template page. -- DarTar
Deletions:
Additions:
~& Nils, nice idea - one extra feature I would like to see here is the automatic creation of a main header with the user name, so as to produce something like ##""=====NilsLindenberg=====""## on page creation. This can either be done 'online' during page generation or by preg_replacing a keyword on the template page. -- DarTar
Deletions:
Additions:
{{lastedit}}
~& Nils, nice idea - one extra feature I would like to see here is the automatic creation of a main heading with the user name, so as to produce something like ##""=====NilsLindenberg=====""## on page creation. This can either be done 'online' during page generation or by preg_replacing a keyword on the template page. -- DarTar
~& Nils, nice idea - one extra feature I would like to see here is the automatic creation of a main heading with the user name, so as to produce something like ##""=====NilsLindenberg=====""## on page creation. This can either be done 'online' during page generation or by preg_replacing a keyword on the template page. -- DarTar
Additions:
===3. Todo and comments===
- make the note for the creation a config-option (i love having everything configurable ;) --NilsLindenberg
- document
- test a little bit more
- offtopic: urgent note to myself: before registering ten times, should not forget to "comment-in" the code [don't ask ;)]
- make the note for the creation a config-option (i love having everything configurable ;) --NilsLindenberg
- document
- test a little bit more
- offtopic: urgent note to myself: before registering ten times, should not forget to "comment-in" the code [don't ask ;)]
Additions:
%%(php)
%%(php)
if ($createuserpage == 'on')
%%(php)
if ($createuserpage == 'on')
Deletions:
Additions:
====Automatic Creation of Userpages on registration====
===2. Changes to actions/usersettings.php===
===2. Changes to actions/usersettings.php===
Deletions:
==2. Changes to actions/usersettings.php==