DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:userpagecreate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Both sides next revision
plugin:userpagecreate [2018-12-07 10:11]
Barbara [userpagecreate Plugin]
plugin:userpagecreate [2021-07-15 23:51]
andi version upped
Line 6: Line 6:
 email      : dokuwiki@cosmocode.de  email      : dokuwiki@cosmocode.de 
 type       : action type       : action
-lastupdate : 2016-01-24 +lastupdate : 2021-07-15 
-compatible : 2009-12-25+, anteater, rincewind, weatherwax+compatible : 2009-12-25+, anteater, rincewind, weatherwax, hogfather
 depends    :  depends    : 
 conflicts  conflicts 
Line 18: Line 18:
 ---- ----
  
-[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]+This plugin creates a userpage for users on their first login. 
  
 ===== Installation ===== ===== Installation =====
 +
 +[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]
  
 Install the plugin using the [[plugin:extension|Extension Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. Install the plugin using the [[plugin:extension|Extension Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.
Line 30: Line 33:
  
   * **target**: The user page ID prefix   * **target**: The user page ID prefix
 +    * You probably want to configure a namespace here, using a trailing colon. A common option is to set this to ''user:''
   * **template**: The user page template (page or namespace)   * **template**: The user page template (page or namespace)
 +    * Either a single page that is copied for the user (eg. ''template:userpage'')
 +    * Or a full namespace hierarchy that is copied (eg. ''template:user:'')
 +      * This requires a namespace in the above option
 +      * The template namespace should have [[config:startpage]]
   * **create_summary**: The summary for the page creation(s)   * **create_summary**: The summary for the page creation(s)
 +    * The default is probably fine unless you want to localize it
 +  * **delete**: If user pages should be deleted on user deletion
 +    * If you set this, **all** pages for the user, including their old revisions will be deleted permanently when the user is deleted
  
  
-===== Usage ===== +In the template pages, all [[:namespace_templates#replacement_patterns|template replacement patterns]] can be used. Further patterns can be used if your auth-backend provides them (e.g. LDAP).
- +
-==== Intial setup ==== +
- +
-  - Got to the plugin configuration dialog: admin-menu => configuration => plugin userpagecreate +
-  - Configure the namespace where the userpages should be generatedset "plugin userpagecreate target" to e.g. "user:" +
-  - Then define which template is to be used for the new userpage by setting the "plugin userpagecreate template" configuration option to e.g. "template:usertemplate:" +
-  - create the e.g. "template:usertemplate:start". For this purpose you can use all **[[:namespace_templates#replacement_patterns|template replacement patterns]]**. +
-  - **Further patterns can be used if your used auth-backend provides them** (e.g. LDAP) +
-  * :!: Please note, that the userpage will be created after the first login (not when the user account is set up!)+
  
  
Line 75: Line 77:
 </code> </code>
  
-===== Development =====+===== Additional Setup =====
  
-==== Change Log ====+Once you have user pages, you probably want to use them whenever user names are displayed in the Wiki. For example in changelog.
  
-{{rss>https://github.com/cosmocode/userpagecreate/commits/master.atom date}}+To do so, switch the [[config:showuseras|showuseras config]] to "username_link" and reconfigure the ''user'' interwiki link if necessary.
  
-==== Known Bugs and Issues ==== 
- 
-Please report bugs and issues at: https://github.com/cosmocode/userpagecreate/issues 
- 
-====== Discussion ====== 
- 
-  * More info please! 
- 
-  * It was nice if you could give some sample configuration. For example, I want the new page to be "user:{$newuserid}:start" -- how can I achieve this?  --- [[user>werner.flamme|Werner Flamme]] //2012/07/06 15:02 CEST// 
-    * :!: Please note, that the userpage will be created after the first login (not when the user account is set up!) 
-    * Just go to the admin-menu => configuration => plugin userpagecreate 
-    * set "plugin userpagecreate target" to "user:"  
-    * set "plugin userpagecreate <del>target</del> template" to "template:usertemplate:" 
-    * create the "template:usertemplate:start" and edit it (see the following code example), use the [[:namespace_templates#replacement_patterns|replacement patterns]] 
- 
-<code> 
-====== @NAME@ ====== 
-===== contact details ===== 
-  * Username: @USER@ 
-  * Mail: [[@MAIL@]] 
-  * Member of this wiki since: @DATE@ 
-</code> 
- 
-  * What a pity, it could be a nice feature, but unfortunaly there is no documentation how to configure it or how to use it. 
- 
-==== Placing Link in Header Bar ==== 
- 
-I added the following to the header_tpl.php file at line 47. 
-<code php> 
-//added 
-$pageid = "users:home_" . $INFO['client']; 
-$wlink = wl( $pageid ); 
-echo "<a href='$wlink' class='action'>Userpage </a>"; 
-//end mod 
-</code> 
-That section now looks like this. 
- 
-<code php> 
- <?php 
-                        if (!empty($_SERVER['REMOTE_USER'])) { 
-                            echo '<li class="user">'; 
-                            tpl_userinfo(); /* 'Logged in as ...' */ 
-                            //added  
-                            $pageid = "users:home_" . $INFO['client']; 
-                            $wlink = wl( $pageid ); 
-                            echo "<a href='$wlink' class='action'>Userpage </a>"; 
-                            //end mod 
-                            echo '</li>'; 
-                        } 
-                        tpl_action('admin', 1, 'li'); 
-                        tpl_action('profile', 1, 'li'); 
-                        tpl_action('register', 1, 'li'); 
-                        tpl_action('login', 1, 'li'); 
-                    ?> 
-</code> 
  
plugin/userpagecreate.txt · Last modified: 2021-07-15 23:51 by andi