Topic: [Extension released] Display real name
The extension below is my first attempt and it would definitely not happen without Slava and kierownik's code.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">
<!--
/**
* Show real name extension in PunBB forum
* Special thanks to Slava and Daniël Rokven
* @author NeMe - http://www.neme.org
* @license GPL - http://www.gnu.org/copyleft/gpl.html
*/
-->
<extension engine="1.0">
<id>display_realname</id>
<title>Display real name</title>
<version>0.1.5</version>
<description>Displays real name under username in posts</description>
<author>NeMe - http://www.neme.org</author>
<minversion>1</minversion>
<maxtestedon>1.3.4</maxtestedon>
<hooks>
<hook id="vt_row_pre_post_actions_merge">
<![CDATA[
// display real name
if ($cur_post['poster_id'] > 1)
{
$forum_page['author_ident']['realname'] = '<li><span>Real name: '.forum_htmlencode($cur_post['realname']).'</span></li>';
}
]]>
</hook>
<hook id="vt_qr_get_posts">
<![CDATA[
// Add the select to the query
$query['SELECT'] .= ', u.realname';
]]>
</hook>
</hooks>
</extension>