1

Topic: Perfect integration of phpBB3 on vldPersonals.

(This message has been modified to make this topic more clear)

I hired a coder to make the integration of phpBB3 into vldpersonals really perfect and I would like to share this modification for free.
At the time when it has been written versions were vldPersonals 2.5.6 and PhpBB 3.0.7 PL1.
I don't know if the modification works with the new versions of the scripts.

I needed this mod for a specific reason (in Italy it's not possible to keep into DB all data related to a member if he decides to unsubscribe. Anyway, it's possible to keep the messages he posted into the forum and the nickname he used. The meaning of the law is to protect user privacy and personal informations).
I think this modification could be useful for ALL vldp users that want to integrate a phpbb3 forum into their sites without losing posts and topics when a user unsubscribes or is deleted.

The modification makes the integration into vldpersonals really perfect and allows to delete all data related to a user into phpbb3 forum too, but his nicknames, topics and messages stay into the forum, so user deletion doesn't affect the topics and messages he wrote. Moreover, the nickname is kept available for new subscribers as vldpersonal does when a user is deleted from its DB.

REMEMBER TO BACKUP BEFORE APPLYING MODIFICATION.
Maybe it will not work on your server and I don't want to be responsible for this.
-----------------------------------------------------------------------
INSTRUCTIONS TO ADD THE MODIFICATION AND RELATED CODE HAVE BEEN UPDATED SOME TIMES DURING THIS TOPIC, SO PLEASE SEARCH FOR THE LATEST RIGHT CODE IN FOLLOWING POSTS.
-----------------------------------------------------------------------

Last edited by orange_slice (2011-01-13 09:40:39)

2

Re: Perfect integration of phpBB3 on vldPersonals.

If debug mode activated, i get

Notice: Undefined index: username in /home/web/iubire.com/ftp/www/includes/modules/forums/mod.phpbb3.php  on line 226

Notice: Undefined index: user_posts in /home/web/iubire.com/ftp/www/includes/modules/forums/mod.phpbb3.php on line 267

Warning: Cannot modify header information - headers already sent by (output started at /home/web/iubire.com/ftp/www/includes/modules/forums/mod.phpbb3.php:226) in /home/web/iubire.com/ftp/www/includes/fns/fns.misc.php on line 26

3

Re: Perfect integration of phpBB3 on vldPersonals.

Please, add more details. When does it appear and if you checked what's in lines 226 and 267, meaning if it is in the piece of script about modification.

Last edited by orange_slice (2010-06-27 13:31:35)

4

Re: Perfect integration of phpBB3 on vldPersonals.

If i delete a member from vld Control Pannel i get that error.

In my files, look what i have :

/includes/modules/forums/mod.phpbb3.php

line 226
        $uname=$arrUserID['username'];
       
line 267
        if ($arrUserID['user_posts']) {
       
/includes/fns/fns.misc.php on line 26       
       
        header("location: $url");

5

Re: Perfect integration of phpBB3 on vldPersonals.

POST HAS BEEN DELETED BY ME TO CLEAN THIS TOPIC AND PUBLISH ONLY THE LATEST RIGHT CODE.
SEARCH FOR IT IN FOLLOWING POSTS.

Last edited by orange_slice (2010-06-27 13:30:27)

6

Re: Perfect integration of phpBB3 on vldPersonals.

>>> UPDATED 27/06/2010 <<<

GOOD NEWS FOR PEOPLE THAT WANT TO INTEGRATE A PHPBB3 FORUM INTO THEIR VLDPERSONALS SITE
File modified: /includes/modules/forums/mod.phpbb3.php
Remember to backup your system!!!

PLEASE, POST YOUR FEEDBACK ABOUT MODIFICATION WORKING IF USED FOR VERSIONS AFTER VLDPERSONALS 2.5.6 and PHPBB 3.0.7 PL1

<?php
/*
=====================================================
vldPersonals - by VLD Interactive
----------------------------------------------------
http://www.vldpersonals.com/
http://www.vldinteractive.com/
-----------------------------------------------------
Copyright (c) 2005-2010 VLD Interactive
=====================================================
THIS IS COPYRIGHTED SOFTWARE
PLEASE READ THE LICENSE AGREEMENT
http://www.vldpersonals.com/agreement/
=====================================================
*/
// ------------------------------------------------
// Add member
// ------------------------------------------------
function mod_phpbb3_add_member(&$MDB, $params)
{
    global $DB, $SESSION, $PREFS;
    // fetch system member
    $result = $DB->query("SELECT username, password, email, lastvisit, joindate, ipaddress FROM  " . DB_PREFIX . "members WHERE member_id='" . $params['member_id'] . "' LIMIT 1");
    if (!$DB->num_rows($result)) return;
    $user_data = $DB->fetch_array($result);
    // set general details
    $user_data['username'] = mysql_real_escape_string($user_data['username']);
    $user_data['email'] = mysql_real_escape_string($user_data['email']);
    $user_data['ipaddress'] = mysql_real_escape_string($user_data['ipaddress']);
    $user_data['lastvisit'] = mysql_real_escape_string($user_data['lastvisit'] ? $user_data['lastvisit'] : time());
    $user_data['joindate'] = mysql_real_escape_string($user_data['joindate']);
    $user_data['ipaddress'] = mysql_real_escape_string($user_data['ipaddress'] != 'Uknown' ? $user_data['ipaddress'] : '127.0.0.1');
    // set password
    if (isset($params['password']) && $params['password']) {
        $user_data['password'] = mysql_real_escape_string(md5($params['password']));
    } else {
        $user_data['password'] = mysql_real_escape_string($user_data['password']);
    }
    // set group/block
    if (isset($params['block']) && $params['block']) {
        $user_data['inactive'] = "1";
        $user_data['admin'] = "0";
    } elseif (isset($params['admin']) && $params['admin']) {
        $user_data['inactive'] = "0";
        $user_data['admin'] = "1";
    } else {
        $user_data['inactive'] = "0";
        $user_data['admin'] = "0";
    }
    $usernameTL = strtolower($user_data['username']);
    // fetch forum member
    $result = $MDB->query("SELECT user_id, user_type FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "users WHERE username_clean='" . $usernameTL . "' LIMIT 1");
    if ($MDB->num_rows($result)) {
        $arrUserID = $MDB->fetch_array($result);
    } else {
        $arrUserID = array('user_id' => 0, 'user_type' => 0);
    }
    // set commmon details
    $where_sql = "SET group_id=2,
        username = '" . $user_data['username'] . "',
        username_clean = '" . strtolower($user_data['username']) . "',
        user_password = '{$user_data['password']}',
        user_passchg = '{$user_data['lastvisit']}',
        user_email = '{$user_data['email']}',
        user_type = {$user_data['inactive']},
        user_inactive_reason = {$user_data['inactive']},
        user_regdate = '{$user_data['joindate']}',
        user_lastmark = '{$user_data['lastvisit']}',
        user_lastvisit = '{$user_data['lastvisit']}'";
    
    // new member
    if (! $arrUserID['user_id']) {
        $where_sql .= ",user_style = 1,
                         user_ip = '{$user_data['ipaddress']}',
                          user_lang = 'en'";

        $MDB->query("INSERT INTO " . $PREFS->conf['module_phpbb3_table_prefix'] . "users {$where_sql}");
        $userID = $MDB->get_insert_id();

        $MDB->query("INSERT INTO " . $PREFS->conf['module_phpbb3_table_prefix'] . "user_group (user_id, group_id, group_leader, user_pending) VALUES ({$userID}, 2, 0, 0)");

        if (!$user_data['inactive']) {
            $MDB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "config SET config_value=config_value+1 WHERE config_name='num_users' LIMIT 1");
        }
    }
    // existing member
    else {
        $MDB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "users {$where_sql} WHERE user_id = {$arrUserID['user_id']} LIMIT 1");

        if (!$arrUserID['user_type'] && $user_data['inactive']) {
            $MDB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "config SET config_value=config_value-1 WHERE config_name='num_users' LIMIT 1");
        } elseif ($arrUserID['user_type'] && !$user_data['inactive']) {
            $MDB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "config SET config_value=config_value+1 WHERE config_name='num_users' LIMIT 1");
        }
    }
    // set admin permissions
    if ($user_data['admin']) {
        $MDB->query("INSERT INTO " . $PREFS->conf['module_phpbb3_table_prefix'] . "acl_users (user_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES ({$arrUserID['user_id']}, 0, 0, 11, 0)");
        $MDB->query("INSERT INTO " . $PREFS->conf['module_phpbb3_table_prefix'] . "moderator_cache (forum_id, user_id, username, group_id, group_name, display_on_index) values (0,{$arrUserID['user_id']},'{$user_data['username']}',0,'',1)");
    } else {
        $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "acl_users WHERE user_id = {$arrUserID['user_id']}");
        $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "moderator_cache WHERE user_id = {$arrUserID['user_id']}");
    }
}
// End function
// ------------------------------------------------
// Update member
// ------------------------------------------------
function mod_phpbb3_update_member(&$MDB, $params)
{
    global $DB, $SESSION, $PREFS;

    mod_phpbb3_add_member($MDB, $params);
}
// End function
// ------------------------------------------------
// Block member
// ------------------------------------------------
function mod_phpbb3_block_member(&$MDB, $params)
{
    global $DB, $SESSION, $PREFS;
    // fetch system member
    $result = $DB->query("SELECT username FROM  " . DB_PREFIX . "members WHERE member_id='" . $params['member_id'] . "' LIMIT 1");
    if (!$DB->num_rows($result)) return;
    $user_data = $DB->fetch_array($result);
    $usernameTL = strtolower($user_data['username']);
    // fetch forum member
    $result = $MDB->query("SELECT user_id FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "users WHERE username_clean = '$usernameTL' LIMIT 1");
    if ($MDB->num_rows($result)) {
        $arrUserID = $MDB->fetch_array($result);
    } else {
        $arrUserID = array('user_id' => 0);
    }
    // block member
    if ($arrUserID['user_id']) {
        $DB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "users SET user_type=1, user_inactive_reason=1 WHERE user_id = {$arrUserID['user_id']} LIMIT 1");
        $DB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "config SET config_value=config_value-1 WHERE config_name='num_users' LIMIT 1");
    }
}
// End function
// ------------------------------------------------
// Unblock member
// ------------------------------------------------
function mod_phpbb3_unblock_member(&$MDB, $params)
{
    global $DB, $SESSION, $PREFS;
    // fetch system member
    $result = $DB->query("SELECT username FROM  " . DB_PREFIX . "members WHERE member_id='" . $params['member_id'] . "' LIMIT 1");
    if (!$DB->num_rows($result)) return;
    $user_data = $DB->fetch_array($result);
    $usernameTL = strtolower($user_data['username']);
    // fetch forum member
    $result = $MDB->query("SELECT user_id FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "users WHERE username_clean = '$usernameTL' LIMIT 1");
    if ($MDB->num_rows($result)) {
        $arrUserID = $MDB->fetch_array($result);
    } else {
        $arrUserID = array('user_id' => 0);
    }
    // unblock member
    if ($arrUserID['user_id']) {
        $MDB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "users SET user_type=0, user_inactive_reason=0 WHERE user_id = {$arrUserID['user_id']} LIMIT 1");
        $MDB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "config SET config_value=config_value+1 WHERE config_name='num_users' LIMIT 1");
    }
}
// End function
// ------------------------------------------------
// Delete member
// ------------------------------------------------
function mod_phpbb3_delete_member(&$MDB, $params)
{
    global $DB, $SESSION, $PREFS;
    // fetch system member
    $result = $DB->query("SELECT username, email, joindate FROM  " . DB_PREFIX . "members WHERE member_id='" . $params['member_id'] . "' LIMIT 1");
    if (!$DB->num_rows($result)) return;
    $user_data = $DB->fetch_array($result);
    $usernameTL = strtolower($user_data['username']);
    // fetch forum member
    $result = $MDB->query("SELECT * FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "users WHERE username_clean = '$usernameTL' LIMIT 1");
    if ($MDB->num_rows($result)) {
        $arrUserID = $MDB->fetch_array($result);
    } else {
        $arrUserID = array('user_id' => 0, 'user_type' => 0);
    }
    // delete member
    if ($arrUserID['user_id']) {
        // $arrUserID - contains a user;
        if(!defined("GUEST_NAME"))
            define("GUEST_NAME", "Ospite"); // name of the guest in your language;
        if(!defined("ANONYMOUS"))
            define('ANONYMOUS', 1); //Anonymous ID. Default is 1;

        $uname=$arrUserID['username'];

        // set forum's laster postred name to Guest;
        $sql = 'UPDATE ' . $PREFS->conf['module_phpbb3_table_prefix'] . 'forums
                    SET forum_last_poster_id = ' . ANONYMOUS . ",   forum_last_poster_colour = '',
                     forum_last_poster_name = '" .$uname . "'
                    WHERE forum_last_poster_id = " . $arrUserID['user_id'] ;
        $MDB->query($sql);
        // reset all their posts to Anonymous user
        $sql = 'UPDATE ' . $PREFS->conf['module_phpbb3_table_prefix'] . 'posts
                    SET poster_id = ' . ANONYMOUS . ",
                    post_username = '" . $uname . "'
                    WHERE poster_id = " . $arrUserID['user_id'] ;
        $MDB->query($sql);
        // reset last edit
        $sql = 'UPDATE ' . $PREFS->conf['module_phpbb3_table_prefix'] . 'posts
                    SET post_edit_user = ' . ANONYMOUS . "
                    WHERE post_edit_user = " . $arrUserID['user_id'] ;
        $MDB->query($sql);
        // reset first poster for every topic;
        $sql = 'UPDATE ' . $PREFS->conf['module_phpbb3_table_prefix'] . 'topics
                    SET topic_poster = ' . ANONYMOUS . ",   topic_first_poster_colour = '',  topic_first_poster_name = '" . $uname . "'
                    WHERE topic_poster = " . $arrUserID['user_id'] ;
        $MDB->query($sql);

        // reset last poster for every topic
        $sql = 'UPDATE ' . $PREFS->conf['module_phpbb3_table_prefix'] . 'topics
                    SET topic_last_poster_id = ' . ANONYMOUS . ", topic_last_poster_colour = '',
                    topic_last_poster_name = '" . $uname . "'
                    WHERE topic_last_poster_id = " . $arrUserID['user_id'] ;
        $MDB->query($sql);

        // reset attachments;
        $sql = 'UPDATE ' . $PREFS->conf['module_phpbb3_table_prefix'] . 'attachments
                    SET poster_id = ' . ANONYMOUS . "
                    WHERE poster_id = " . $arrUserID['user_id'] ;
        $MDB->query($sql);
        // if user had posts; we increment the number of posts for anonymous;
        if ($arrUserID['user_posts']) {
            $sql = 'UPDATE ' . $PREFS->conf['module_phpbb3_table_prefix'] . 'users
                        SET user_posts = user_posts + ' . $arrUserID['user_posts'] . '
                        WHERE user_id = ' . ANONYMOUS;
            $MDB->query($sql);
        }
        // removing the user as per original script;
        $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "users WHERE user_id = {$arrUserID['user_id']} LIMIT 1");
        $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "banlist WHERE ban_userid = {$arrUserID['user_id']} LIMIT 1");
        $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "sessions WHERE session_user_id = {$arrUserID['user_id']}");
        $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "sessions_keys WHERE user_id = {$arrUserID['user_id']}");
        $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "user_group WHERE user_id = {$arrUserID['user_id']}");
        $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "acl_users WHERE user_id = {$arrUserID['user_id']}");

        if (!$arrUserID['user_type']) {
            $MDB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "config SET config_value=config_value-1 WHERE config_name='num_users' LIMIT 1");
        }
    }
}
// End function
// ------------------------------------------------
// Login member
// ------------------------------------------------
function mod_phpbb3_login_member(&$MDB, $params)
{
    global $DB, $SESSION, $PREFS, $LANG;

    $config = array();
    $config = get_config($MDB);

    $usernameTL = strtolower($params['username']);
    // fetch forum member
    $result = $MDB->query("SELECT user_id FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "users WHERE username_clean = '$usernameTL' LIMIT 1");
    if ($MDB->num_rows($result)) {
        $arrUserID = $MDB->fetch_array($result);
    } else {
        return;
    }

    unset($result);

    $userID = $arrUserID['user_id'];
    $current_time = time();
    $auto_login_key = unique_id($MDB);
    // fetch forum data
    $result = $MDB->query("SELECT key_id FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "sessions_keys WHERE user_id = '$userID' LIMIT 1");
    if ($MDB->num_rows($result)) {
        $arrUSK = $MDB->fetch_array($result);
        $key_id = $arrUSK['key_id'];

        $MDB->query("UPDATE " . $PREFS->conf['module_phpbb3_table_prefix'] . "sessions_keys
            SET key_id = '" . md5($auto_login_key) . "' WHERE key_id = '$key_id' LIMIT 1");
    } else {
        $MDB->query("INSERT INTO " . $PREFS->conf['module_phpbb3_table_prefix'] . "sessions_keys
            (key_id, user_id, last_ip, last_login)
            VALUES ('" . md5($auto_login_key) . "', $userID, 0, $current_time)");
    }
    // And now rebuild the cookie
    $cookie_expire = time() + (($config['max_autologin_time']) ? 86400 * (int) $config['max_autologin_time'] : 31536000);

    set_cookie('u', $userID, $cookie_expire, $MDB);
    set_cookie('k', $auto_login_key, $cookie_expire, $MDB);
    set_cookie('sid', session_id(), $cookie_expire, $MDB);
}
// End function
// ------------------------------------------------
// Logout member
// ------------------------------------------------
function mod_phpbb3_logout_member(&$MDB, $params)
{
    global $DB, $SESSION, $PREFS, $LANG;
    $config = array();
    $config = get_config($MDB);

    $usernameTL = strtolower($params['username']);
    // fetch forum member
    $result = $MDB->query("SELECT user_id FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "users WHERE username_clean = '$usernameTL' LIMIT 1");
    if ($MDB->num_rows($result)) {
        $arrUserID = $MDB->fetch_array($result);
    } else {
        return;
    }

    unset($result);

    $userID = $arrUserID['user_id'];
    $current_time = time();

    $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "sessions WHERE session_user_id ='$userID'");
    $MDB->query("DELETE FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "sessions_keys WHERE user_id = '$userID'");
    // And now kill the cookie
    $cookie_expire = $current_time - 31536000;

    set_cookie('u', '', $cookie_expire, $MDB);
    set_cookie('k', '', $cookie_expire, $MDB);
    set_cookie('sid', '', $cookie_expire, $MDB);

    unset($current_time, $cookie_expire);
}
// End Function
function get_config(&$MDB)
{
    global $DB, $PREFS;

    $result = $MDB->query("SELECT config_name, config_value
                FROM " . $PREFS->conf['module_phpbb3_table_prefix'] . "config");

    if ($MDB->num_rows($result)) {
        // ------------------------------------------------
        // Fetch resultset
        // ------------------------------------------------
        while ($obj = $MDB->fetch_array($result, MYSQL_ASSOC)) {
            $board_config[$obj['config_name']] = $obj['config_value'];
        }

        unset($obj);
    }
    unset($result);
    return $board_config;
}

function set_cookie($name, $cookiedata, $cookietime, &$MDB)
{
    $config = get_config($MDB);

    $name_data = rawurlencode($config['cookie_name'] . '_' . $name) . '=' . rawurlencode($cookiedata);
    $expire = gmdate('D, d-M-Y H:i:s \\G\\M\\T', $cookietime);
    $domain = (!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain'];

    header('Set-Cookie: ' . $name_data . (($cookietime) ? '; expires=' . $expire : '') . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
}

/**
 * Return unique id
 *
 * @param string $extra additional entropy
 */
function unique_id(&$MDB)
{
    global $DB;
    $config = get_config($MDB);

    $val = $config['rand_seed'] . microtime();
    $val = md5($val);

    return substr($val, 4, 16);
}

?>

Last edited by orange_slice (2011-01-13 09:34:42)

7

Re: Perfect integration of phpBB3 on vldPersonals.

bump this

8

Re: Perfect integration of phpBB3 on vldPersonals.

THANK YOU SO MUCH !!!! ;-)

9

Re: Perfect integration of phpBB3 on vldPersonals.

I am happy this helps.

10

Re: Perfect integration of phpBB3 on vldPersonals.

Hi orange, after I integrated phpBB3.08 into Vld2.7 use nightlife style, others all work good, the only thing not work is when click the member "profile" button from forum, it goes to forum profile, but not goes to vld member profile. I don't know if it can be solved, I am not a programmer, just return my solution and say " thank you " to you. :-)

Last edited by nvwokman (2011-08-19 23:40:41)

11

Re: Perfect integration of phpBB3 on vldPersonals.

This is very strange, because I just upgraded vldpersonals to 2.7 and modifications stopped working, meaning I have issues with members registration and deletion. My phpbb3 is still at 3.0.7 PL1

12

Re: Perfect integration of phpBB3 on vldPersonals.

Hey, this is my first post, and I'd like to start with a small "mod" ... this one shows vldpersonals avatars in phpBB3.
I modified some things in mod.phpbb3.php:

In function mod_phpbb3_add_member(), change

    $result = $DB->query("SELECT username, password, email, lastvisit, joindate, ipaddress, picture, picture_active FROM  " . DB_PREFIX . "members WHERE member_id='" . $params['member_id'] . "' LIMIT 1");

add

    if ($user_data['picture_active']) {
        $user_avatar = mod_phpbb3_get_avatar($user_data['joindate'], mysql_real_escape_string($user_data['picture']), $params['member_id']);
        $user_avatar_type = "2";
    } else {
        $user_avatar = '';
        $user_avatar_type = "0";
    }

change

    $where_sql = "SET group_id=2,
        username = '" . $user_data['username'] . "',
        username_clean = '" . strtolower($user_data['username']) . "',
        user_password = '{$user_data['password']}',
        user_passchg = '{$user_data['lastvisit']}',
        user_email = '{$user_data['email']}',
        user_type = {$user_data['inactive']},
        user_inactive_reason = {$user_data['inactive']},
        user_regdate = '{$user_data['joindate']}',
        user_lastmark = '{$user_data['lastvisit']}',
        user_avatar = '{$user_avatar}',
        user_avatar_type = '{$user_avatar_type}',
        user_avatar_width = '100',
        user_avatar_height = '100',
        user_lastvisit = '{$user_data['lastvisit']}'";

Also add a new function:

function mod_phpbb3_get_avatar($joindate, $image, $id)
{
    $media = substr($joindate, -1, 1).'/'.
    substr($joindate, -2, 1).'/'.
    substr($joindate, -3, 1).'/'.
    substr($joindate, -4, 1).'/'.
    $id.'/'; 
    return '/v2/media/uploads/'.$media.'t_photo_'.$image;
}

That's it. Adapt to your path, and you should be ready to go. (Of course, external avatars have to be activated in phpbb3.) What do you think?

13

Re: Perfect integration of phpBB3 on vldPersonals.

If it works it's very good. Another step to make phpbb3 more integrated into vldpersonals.

The problem is that the modification I am sharing in this topic doesn't work with current vldpersonals 2.7 and phpbb3 3.0.9 versions.
I am bidding on vworker to find a coder which could fix the old modification and make it working fine again with new versions.

14

Re: Perfect integration of phpBB3 on vldPersonals.

The modification doesn't work with vldp 2.7 and phpbb 3.0.9.
I got frustrated for a very long time trying to find a solution so I just decided to search for another dating script and migrate to it.
Sorry, I absolutely need to have a forum which works professionally into my dating site and I can't go on this way even if vldpersonals is great.

Last edited by orange_slice (2011-09-21 14:25:25)