1 (edited by colak 2009-12-29 06:22)

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>

New Download link

Forum, Art, Architecture, Passion.

Have you ever visited the textpattern forum?

Re: [Extension released] Display real name

You should add "u.realname" to the query at line 276 of viewtopic.php with the hook "vt_qr_get_posts".

I will look on how to do that.

Re: [Extension released] Display real name

<?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 
 * @author NeMe - http://www.neme.org
 * @license GPL - http://www.gnu.org/copyleft/gpl.html
 */
-->

<extension engine="1.0">
    <id>bbcode_realname</id>
    <title>Display real name</title>
    <version>0.1.2</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>

This should work.

4 (edited by colak 2009-12-27 18:44)

Re: [Extension released] Display real name

Indeed it does. Thanks kierownik! very much appreciated. I corrected my code and the nomenclature on the first post should anyone wants to use it.

Forum, Art, Architecture, Passion.

Have you ever visited the textpattern forum?

Re: [Extension released] Display real name

Your welcome.

Maby you could put the link somewhere on the wiki so other people can easily find it.

http://punbb.informer.com/wiki/punbb13/extensions

Re: [Extension released] Display real name

nice work, uploaded the ext here;
Mediafire &
Rapidshare

Demo

Re: [Extension released] Display real name

Why not upload it in the wiki?!

8

Re: [Extension released] Display real name

kierownik wrote:

Your welcome.

Maby you could put the link somewhere on the wiki so other people can easily find it.

http://punbb.informer.com/wiki/punbb13/extensions

Thanks Daniël, Added it to the wiki. The download link is from the neme site as I can keep track of download numbers from there.

Forum, Art, Architecture, Passion.

Have you ever visited the textpattern forum?

Re: [Extension released] Display real name

Any extention that allows user to enter real name in registration process?

Re: [Extension released] Display real name

I used my real name when I signed up for this forum. It worked just fine and the software did not complain about it. smile

Re: [Extension released] Display real name

I would add

if(!empty($cur_post['realname']))

12

Re: [Extension released] Display real name

nhodges wrote:

I would add

if(!empty($cur_post['realname']))

Hi nhodges,

Thanks sooo much for looking at this. where should I add the code?

Forum, Art, Architecture, Passion.

Have you ever visited the textpattern forum?

13

Re: [Extension released] Display real name

Apologies for those trying to download the plugin. We have recently redesigned our site and the file was somehow excluded in the upload. New download link is now working

Forum, Art, Architecture, Passion.

Have you ever visited the textpattern forum?

Re: [Extension released] Display real name

Is an updated version of this extension for version 1.4 in the works? I would love to be able to use this for my forum. It's exactly what I'm looking for.

15

Re: [Extension released] Display real name

I don't think author will develop this extension anymore. I can do that, but I think it will work with only small changes in manifest.xml for maxtestedon value.

Re: [Extension released] Display real name

That would be great. I tried to explore the XML file to see if I could discern how to make the file work for 1.4, but I'm quite the newbie.

17

Re: [Extension released] Display real name

Hi guys

I'm not a programmer. I put together this extension after advice from people in this forum. Please feel free to update, enrich or adopt it.

Forum, Art, Architecture, Passion.

Have you ever visited the textpattern forum?

18

Re: [Extension released] Display real name

Just try to change maxtestedon to 1.4.2.