phpBB3 user profile redirect to dolphin profile

Hello,

Does anyone know how to change the user profile link in phpBB3 forum posts so that they redirected to the user profile in Dolphin instead of the profile page in phpBB3?

I think it's very stupid that the user have to profiles to work with and to messaging systems also.

I bought the mscott phpBB3 integration from Expertz, and was also wondering if anyone who has done the same ever has gotten any support?

When testing his site, makesocialnetwork.com, it looked like the user profile link in phpBB3 forum posts was redirected to the user profile in Dolphin, however, this is not the case in the mod he is selling... ;-(

Since I'm pretty sure he must have figured out how to solve this problem, I was hoping he would just answer one of my mails, but absolutely no sound from him.

I did tryed to get an answer from him before buying, but then failing to get an answer I just took a chance ;-(

Any idea as to which file or code to look into would be much appreciated!

Cheers ;-)

Quote · 7 Dec 2008

You would need to edit the templates files under the phpBB directory.

 

There are several that would have links to the member's profile.

 

Simply do a search for memberlist.php and change it accordingly.

 

If you have any troubles - let me know, I can at least get you pointed in the right direction.

 

D

 

 

Quote · 8 Dec 2008

Hi again,

Dadniel, I don't excactly understand what you mean about searching template files for memberlist.php? I did a search source code of all files in template folder and didn't find one instance of 'memberlist.php'...!???

I've already tried to work with memberlist.php itself, where I've found the line:

L.1403: 'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id))

I've tried to change it to: 'U_VIEW_PROFILE' => append_sid("../", '' . $username))

But my profile links still ends excactly same place, as mydatery also noticed, at 'memberlist.php?mode=viewprofile&u=[user_id]'

I'm very very confused. Is there something I don't know - like I need to update my database or somewhere in admin before uploaded files work - or what?

Or, as far as I can see, memberlist.php is the file to work with, but am I wrong...?

Cheers,

Dorit

PS. mydatery, do you know this Buxton161? From what I can find on Expertz his support doesn't look so promising...

Quote · 9 Dec 2008

In memberslist.php:::

 

 

Find:::

 

case 'viewprofile':

// Display a profile

if ($user_id == ANONYMOUS && !$username)

{

trigger_error('NO_USER');

}

 

// Get user...

$sql = 'SELECT *

FROM ' . USERS_TABLE . '

WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id");

$result = $db->sql_query($sql);

$member = $db->sql_fetchrow($result);

$db->sql_freeresult($result);

 

if (!$member)

{

trigger_error('NO_USER');

}

 

 

After it place ::

 

 

header('Location: http://www.yourdomain.com/$username');

exit;

 

 

Hope that helps. Let me know.

Quote · 9 Dec 2008

 

I dont have a test phpBB installed - so these are just guesses... ;)

 

You could try removing the append_sid from the U_VIEW_PROFILE set - like so...:::

 

U_VIEW_PROFILE => "/$username"

 

That will change the link on any page that use the memberlist.php - but would not change the link on say a user's post -- if this change works for the member's list - maybe search for U_VIEW_PROFILE in all files and change them as well.

 

If I had a test install or your FTP access I could take a look.

 

I look forward to hearing your results.

 

D

Quote · 9 Dec 2008

Aaargh, wrote long post - and got logged out... ;-(

Here we go again

Dadniel, thanks for good ideas/suggestions. No luck yet, though ;-(

Tried placing your code: header('Location: http://www.yourdomain.com/$username');
exit;

Result: same url (/memberlist.php?mode=viewprofile&u=55) but no page display (IE error message: The webpage cannot be found

Then tried removing username string, which now made the link go to www.yourdomain.com and also displayed the page.

So far so good!

But have then tried to append the username string in different ways, but with no luck. Any suggestions?

Have tried different variations of ('Location: http://www.yourdomain.dk/' . $username)

PS. Still doesn't seem the L1403 'U_VIEW_PROFILE'-code has any effect on the link - though if removed will give error message.

Quote · 9 Dec 2008

Uh, and just testet on my actual website and see that I also, somehow, need to set target, since I'm in an iframe...

Quote · 9 Dec 2008

Hey, I'm attempting to do the same thing ( have phpbb profile links go to dolphin profile links).  Has anyone figured out what code to put in on the memberslist.php file?

thank

Quote · 20 Dec 2008

This seems to work alright.

 

Open up the file:  includes/functions_content.php

 

about line 1177, replace with this:

 

   $profile_url = ($custom_profile_url !== true) ? "../".$username : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . (int) $user_id);

 

 

 

worked for almost all the profile links, i found a couple spots it added a space and havent figured out how to get rid of that.  Let me know if anyone else can tweak it more.

 

 

Quote · 21 Dec 2008

I believe it is version 3.0.3 phpbb,

 

Here is the section around it so you can search for it in functions_content:

I put the one line that I changed in red below...  Hope it works for you!

 

 

 

 // Only show the link if not anonymous
 if ($mode != 'no_profile' && $user_id && $user_id != ANONYMOUS)
 {
  // Do not show the link if the user is already logged in but do not have u_viewprofile permissions (relevant for bots mostly).
  // For all others the link leads to a login page or the profile.
  if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile'))
  {
   $profile_url = '';
  }
  else
  {
   $profile_url = ($custom_profile_url !== true) ? "../".$username : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . (int) $user_id);
  }
 }
 else
 {
  $profile_url = '';
 }

 switch ($mode)
 {
  case 'profile':
   return $profile_url;
  break;

Quote · 21 Dec 2008

Hi again,

I just found out that my phpBB3 version is only 3.0.1 (from mscott dolphin/phpbb3 integration mod)!

I've tried the modification to functions_content.php as suggested by reenacthistory, and it really does work Laughing

Just one problem still - the board is fetched into an iframe in Dolphin, and thus the dolphin profile page is also fetched into that iframe. I've tried to figure out how to add a target path, but no luck yet.

What are you guys doing? Have you moved the forum outside the iframe? Or do you have a solution to the profile link?

Cheers,

Dorit

Quote · 22 Dec 2008

Glad you got it working mydatery! and Dorit, I'm not sure on the iframe, I don't use that either, but you may be able to add a target field somewhere around that code to make it open to a blank page.

 

Also, anyone have a script or code that will insert the thumbnails auto-generated by Dolphin into the Avatar link on phpbb3?  Along with the dimension information in the phpbb_users table??

 

 

I used an integration for phpbb and dolphin on expertzz, but it doesn't seem to do this seemingly easy thing...

 

 

Quote · 24 Dec 2008

Hi, found where to insert my target="_top". Works great. If you decide to revert to iframe, you just have to insert target in functions_content.php around line 1183 and 1187(in phpBB3 3.0.1) where you find this code:

$tpl = '';
if (!$profile_url && !$username_colour)
{
$tpl = '{USERNAME}';
}
else if (!$profile_url && $username_colour)
{
$tpl = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';
}
else if ($profile_url && !$username_colour)
{
$tpl = '<a href="{PROFILE_URL}" target="_top">{USERNAME}</a>';
}
else if ($profile_url && $username_colour)
{
$tpl = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured" target="_top">{USERNAME}</a>';
}

return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), $tpl);
break;

Now I don't have to make a new global header/menu to work with the forum files. And my phpBB3 forum looks like a part of my site ;-)

PS. I am not using avatars on my site, since it was not integrated with the solution I bought on Expertz either. It's not very important compared to many other problems I'm still working on. If I get around to work on it, I'll let you know.

Quote · 27 Dec 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.