DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:common_user_link

This is an old revision of the document!


COMMON_USER_LINK

develonly

Description:
Lets modify/replace the user interwiki link
DefaultAction:
Shows user's full name as the interwiki user link
Preventable:
yes
Added:
2014-03-16

When the showuseras config is set to the user interwiki link, this event is signalled by userlink() in inc/common.php. Handlers can use it to implement there own formatted user name instead of the user interwiki link.

Passed Data

The passed $data structure:

  • $data['username'] The unique user name
  • $data['name'] The name of the user which is used as the name of the link
  • $data['link'] Array with link properties which will be rendered by _formatLink().
  • $data['userlink'] The formatted user name as will be returned by userlink()
  • $data['textonly'] false: return html output, true: return plain text output

The BEFORE event has only the username and textonly fields filled. The AFTER event has all field filled.

Plugins handling this event

The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.

See also

devel/event/common_user_link.1395009090.txt.gz · Last modified: 2014-03-16 23:31 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