cosmocode / groupusers

DokuWiki Plugin groupusers
2 stars 2 forks source link

No user links #4

Open airflo opened 8 years ago

airflo commented 8 years ago

Since a few weeks, there are no more user links shown. Comparing files shows, that a portion of the render function is now different to the plugin's info page at https://www.dokuwiki.org/plugin:groupusers.

NOW:

$renderer->doc .= htmlspecialchars($user);

BEFORE:

$renderer->doc .= '<td>'; //thorsten@th-petersen.de ergänzt
$renderer->internallink('user:'.$user); ////thorsten@th-petersen.de Original: $renderer->doc .= '<td>'.htmlspecialchars($user).'</td>';
$renderer->doc .= '</td>'; //thorsten@th-petersen.de ergänzt

Maybe there was a mixup, please fix.

Best regards,

Florian

ebora commented 7 years ago

In case some other person new to Dokuwiki and PHP stumbles over this issue and wonders what to do to make it work:

in dokuwiki_directory/lib/plugins/groupusers/syntax.php replace the line $renderer->doc .= htmlspecialchars($user);

by the following lines: $renderer->doc .= '<td>'; $renderer->internallink('user:'.hsc($user)); $renderer->doc .= '</td>';

This will result in a link to the userhomepages (which are located in the namespace user) of all users of the given group in the first column of the table. If you leave out 'user:'. the current namespace will be used. You could leave out hsc(), too, but as I read somewhere that htmlspecialchars() or hsc() is a security measure, I decided to leave it in. Probably somebody put it in for a good reason ;-)