DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:userpagecreate

userpagecreate Plugin

Compatible with DokuWiki

2009-12-25+, anteater, rincewind, weatherwax

plugin Creates a user page or user namespace when a user first logs in

Last updated on
2016-01-24
Provides
Action
Repository
Source

Tagged with home, page, users

A CosmoCode Plugin

Installation

Install the plugin using the Extension Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Configuration

The plugin adds three options to the config manager:

  • target: The user page ID prefix
  • template: The user page template (page or namespace)
  • create_summary: The summary for the page creation(s)

Usage

Intial setup

  1. Got to the plugin configuration dialog: admin-menu ⇒ configuration ⇒ plugin userpagecreate
  2. Configure the namespace where the userpages should be generated, set “plugin userpagecreate target” to e.g. “user:”
  3. 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:”
  4. create the e.g. “template:usertemplate:start”. For this purpose you can use all template replacement patterns.
  5. 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

  • In this page you can use all the normal syntax/markup your wiki and your installed plugins support

In the example below syntax from the plugins do, nslist, starred and changes is used.

====== @NAME Dashboard ======
===== ToDO =====
{{dolist>:?user=@user@&status=undone}}
 
===== ToDos Created =====
{{dolist>:?creator=@user@&status=undone}}
 
===== pages in your namespace =====
 
{{nslist>.}}
 
===== Your Favorites =====
{{starred}}
 
===== Newest Pages in this wiki =====
{{changes>type=create&count=4}}
 
===== New Blogpost in our company's blog =====
{{rss>http://link.to.your/company/blog 3}}

Development

Change Log

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? — Werner FlammeWerner 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 target template” to “template:usertemplate:”
    • create the “template:usertemplate:start” and edit it (see the following code example), use the replacement patterns
====== @NAME@ ======
===== contact details =====
  * Username: @USER@
  * Mail: [[@MAIL@]]
  * Member of this wiki since: @DATE@
  • What a pity, it could be a nice feature, but unfortunaly there is no documentation how to configure it or how to use it.

I added the following to the header_tpl.php file at line 47.

//added
$pageid = "users:home_" . $INFO['client'];
$wlink = wl( $pageid );
echo "<a href='$wlink' class='action'>Userpage </a>";
//end mod

That section now looks like this.

 <?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');
                    ?>
plugin/userpagecreate.txt · Last modified: 2016-01-24 14:33 by andi