DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

config:showuseras

Configuration Setting: showuseras

What to display when showing the user that last edited a page. Used in page footer and recent changes pages.

  • Type: String
  • Default: loginname

Options:

  • loginname: User's login name
  • username: User's full name
  • username_link: User's full name as interwiki user link
  • email: Email address (will be obfuscated as per mailguard)
  • email_link: Email address as a mailto: link (obfuscated)

:!: Please note that other settings than default may give performance penalties in combination with authentication plugins like authAD plugin.

Default the username_link option uses the user interwiki link. This interwiki link refers to the page :user:<loginname>. See Configuring interwiki shortcuts for how to modify this link target.

When you develop a plugin or template, you can use the event trigger around the interwiki link creating, to modify the result link or replace it by your own mechanism. See the COMMON USER LINK event for development info.

See also

Anonymous posting

In inc/template.php, search for the function tpl_pageinfo($ret=false) . Under that look for the following code.

   if($INFO['editor']){
     $out .= ' '.$lang['by'].' ';
     $out .= editorinfo($INFO['editor']);
   }else{
     $out .= ' ('.$lang['external_edit'].')';
   }

Delete or comment it out by adding the PHP comment code /* */ shown below

 /*    if($INFO['editor']){
         $out .= ' '.$lang['by'].' ';
         $out .= editorinfo($INFO['editor']);
       }else{
         $out .= ' ('.$lang['external_edit'].')';
       } */

If successful, the name or IP address of the poster will not show at the bottom of the page.

An alternative, which avoids altering the core Dokuwiki files, is to make your change in main.php. In main.php, you will find the following PHP code:

  <?php tpl_pageinfo() ?>

Replace it with:

  <?php echo preg_replace("/by.*/", "", tpl_pageinfo(true)) ?>

A drawback to this technique is that it will have to be repeated each time the template is updated.

config/showuseras.txt · Last modified: 2014-10-07 12:20 by Klap-in