DokuWiki

It's better when it's simple

User Tools

Site Tools


config:showuseras

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
config:showuseras [2010-03-09 12:53] 193.200.150.82config:showuseras [2022-01-27 00:47] (current) Klap-in
Line 2: Line 2:
  
 What to display when showing the user that last edited a page. Used in page footer and recent changes pages. What to display when showing the user that last edited a page. Used in page footer and recent changes pages.
- 
-  * 'loginname' users login name 
-  * 'username' users full name 
-  * 'email' e-mail address (will be obfuscated as per mailguard) 
-  * 'email_link' e-mail address as a mailto: link (obfuscated) 
- 
  
   * Type: String   * Type: String
   * Default: ''loginname''   * Default: ''loginname''
  
-:!: Please note that other settings than default may give performance penalties in combination with authentication backends like [[auth:ad]].+Options:
  
-===== Anonymous posting ===== +  ''loginname'': User's login name 
-In wiki/inc/template.php, search for ** function tpl_pageinfo($ret=false){ **.  Under that look for the following code. +  * ''username'': User's full name 
-  *   if($INFO['editor']){ +  * ''username_link'': User's full name as interwiki user link 
-  *     $out .= ' '.$lang['by'].'; +  * ''email'': Email address (will be obfuscated as per [[mailguard]]) 
-  *     $out .= editorinfo($INFO['editor'])+  * ''email_link'': Email address as a mailto: link (obfuscated)
-  *   }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'].')'; 
-  *       } */ 
  
 +:!: Please note that other settings than default may give performance penalties in combination with authentication plugins like [[plugin:authAD]] plugin.
  
 +==== Modifying the user interwiki link ====
 +Default the ''username_link'' option uses the ''user'' interwiki link. This interwiki link refers to the page '':user:<loginname>''. See [[:interwiki#Configuring interwiki shortcuts]] for how to modify this link target (e.g. for dokuwiki.org the user profiles are on the forum: [[user>Example User]]).
 +
 +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 [[devel:event:COMMON USER LINK]] event for development info.
  
 ===== See also ===== ===== See also =====
  
   * [[:config:|Configuring DokuWiki]]   * [[:config:|Configuring DokuWiki]]
 +  * [[:interwiki|Interwiki links]]
 +
 +
 +===== Anonymous posting =====
 +In [[xref>inc/template.php]], search for the function [[xref>tpl_pageinfo()|tpl_pageinfo($ret=false)]] .  Under that look for the following code.
 +<code php>
 +   if($INFO['editor']){
 +     $out .= ' '.$lang['by'].' ';
 +     $out .= editorinfo($INFO['editor']);
 +   }else{
 +     $out .= ' ('.$lang['external_edit'].')';
 +   }
 +</code>
 +
 +Delete or comment it out by adding the PHP comment code /* */ shown below
 +<code php>
 + /   if($INFO['editor']){
 +         $out .= ' '.$lang['by'].' ';
 +         $out .= editorinfo($INFO['editor']);
 +       }else{
 +         $out .= ' ('.$lang['external_edit'].')';
 +       } */
 +</code>
 +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:
 +<code php>
 +  <?php tpl_pageinfo() ?>
 +</code>
 +
 +Replace it with:
 +<code php>
 +  <?php echo preg_replace("/by.*/", "", tpl_pageinfo(true)) ?>
 +</code>
 +A drawback to this technique is that it will have to be repeated each time the template is updated.
  
 +==== Want to hide IP address? ====
 +If you just want to hide the IP address of the poster from the bottom of the page, you can consider using [[plugin:hidingip|Hiding IP Plugin]].
  
config/showuseras.1268135597.txt.gz · Last modified: 2010-03-09 12:53 by 193.200.150.82

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