Search code examples
phpmysqlregistrationforumphpbb

User marked option depending on domain he joined phpbb


I create three forums sharing part of topics and user, it's working fine. Even the avatars and stuff like that.

The question is how can I marked a user who make a registration on www.domain_1.com and his post is also visible on on ma last forums like: www.domain_2.com and domain_3.com.

The perfect situation is, when this informations is showing in the user profile in every post before or after his nick or avatar.

Have You guys some experience with it?


Solution

  • make an sql column in phpbb_users table called user_domain.

    in includes/ucp/ucp_register.php


    find


                $user_row = array(
    

    insert

                    'user_domain'               => urlencode(generate_board_url()),
    

    in viewtopic.php


    find

            $user_cache[$poster_id] = array(
    

    insert

            'user_domain'           => $row['user_domain'],
    

    find

        $postrow = array(
    

    insert

        'POSTER_DOMAIN'     => $user_cache[$poster_id]['user_domain'],
    

    in your template folder in viewtopic_body.html


    find

                <!-- IF postrow.POSTER_AVATAR -->
                    <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{postrow.POSTER_AVATAR}</a><!-- ELSE -->{postrow.POSTER_AVATAR}<!-- ENDIF --><br />
                <!-- ENDIF -->
    

    add before and after

                {postrow.POSTER_DOMAIN}<br />