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
Next revisionBoth sides next revision
plugin:userpagecreate [2015-02-26 15:50] – [Intial setup] grosseplugin:userpagecreate [2021-07-15 15:29] andi
Line 1: Line 1:
-====== userpagecreate plugin ======+====== userpagecreate Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: creates a user page or user namespace when a user first logs in+description: Creates a user page or user namespace when a user first logs in
 author     : Adrian Lang author     : Adrian Lang
 email      : dokuwiki@cosmocode.de  email      : dokuwiki@cosmocode.de 
 type       : action type       : action
-lastupdate : 2015-02-26 +lastupdate : 2016-01-24 
-compatible : 2009-12-25+, anteater, rincewind, weatherwax+compatible : 2009-12-25+, anteater, rincewind, weatherwax, hogfather
 depends    :  depends    : 
 conflicts  conflicts 
Line 18: Line 18:
 ---- ----
  
-[[http://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 29: 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 generated, set "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!) 
  
 ==== Template Example ==== ==== Template Example ====
Line 48: Line 53:
  
 In the example below syntax from the plugins [[plugin:do]], [[plugin:nslist]], [[plugin:starred]] and [[plugin:changes]] is used. In the example below syntax from the plugins [[plugin:do]], [[plugin:nslist]], [[plugin:starred]] and [[plugin:changes]] is used.
 +
 <code dokuwiki> <code dokuwiki>
 ====== @NAME Dashboard ====== ====== @NAME Dashboard ======
Line 68: Line 74:
 ===== New Blogpost in our company's blog ===== ===== New Blogpost in our company's blog =====
 {{rss>http://link.to.your/company/blog 3}} {{rss>http://link.to.your/company/blog 3}}
- 
  
 </code> </code>
-===== Development ===== 
  
-==== Change Log ====+===== Additional Setup =====
  
-{{rss>https://github.com/cosmocode/userpagecreate/commits/master.atom date}}+Once you have user pages, you probably want to use them whenever user names are displayed in the WikiFor example in changelog.
  
-==== Known Bugs and Issues ====+To do so, switch the [[config:showuseras|showuseras config]] to "username_link" and reconfigure the ''user'' interwiki link if necessary.
  
-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: 2023-10-30 23:42 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki