phpBB URL For User Profile www.domain.com/User Name

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

phpBB URL For User Profile www.domain.com/User Name

Post by Blue Blood »

URL For User Profile http://www.domain.com/User Name
This will allow the user profile link to be the users name

Code: Select all

http://www.projectblueblood.com/memberlist.php?mode=viewprofile&u=2
Will now be

Code: Select all

http://www.projectblueblood.com/Blue Blood
Open
.htaccess

At the end of the file add

Code: Select all

RewriteEngine on
Rewriterule ^([^/\.]{3,})$ ./memberlist.php?mode=viewprofile&un=$1
Open
includes/functions_content.php

Find:

Code: Select all

$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']);
After Add

Code: Select all

$profile_url = generate_board_url() . '/' . $username;
Last edited by Blue Blood on 05 Dec 2012, 22:29, edited 1 time in total.

phpBB URL For User Profile www.domain.com/User Name

Post by Stoker »

Open
includes/functions_content.php
Find does not exist.

phpBB URL For User Profile www.domain.com/User Name

Post by martin123456 »

Closest i can find is

Code: Select all

$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']);

phpBB URL For User Profile www.domain.com/User Name

Post by Blue Blood »

martin123456 wrote:Closest i can find is

Code: Select all

$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']);
This is it...

The edits were for phpBB 3.0.8

I updated the edit!!

phpBB URL For User Profile www.domain.com/User Name

Post by martin123456 »

Confirmed and works nice edit blueblood
2012-12-05_224504.png
You do not have the required permissions to view the files attached to this post.

phpBB URL For User Profile www.domain.com/User Name

Post by Solidjeuh »

Nice! Now I can use short link to profiles in Prochatrooms!
Thank you :D

phpBB URL For User Profile www.domain.com/User Name

Post by Solidjeuh »

This is also replacing the url in the Arcade mod
So we cannot click on a user to see his game statistics..
it leads directly to their profile..
Anyway ti fix this please?

http://phpbbarcade.jatek-vilag.com/viewtopic.php?p=4

phpBB URL For User Profile www.domain.com/User Name

Post by Blue Blood »

Solidjeuh wrote:This is also replacing the url in the Arcade mod
So we cannot click on a user to see his game statistics..
it leads directly to their profile..
Anyway ti fix this please?

http://phpbbarcade.jatek-vilag.com/viewtopic.php?p=4
I will check it out tonight!!

EDIT:

See if this works


Replace this

Code: Select all

$profile_url = generate_board_url() . '/' . $username;
With this

Code: Select all

$profile_url = append_sid($phpbb_root_path . $username);
Its really should be

Code: Select all

append_sid
instead of

Code: Select all

generate_board_url
this could possibly log users out any way

This probably wont fix the problem but this code is better then the original line.

I will have to look at the Arcade code...

phpBB URL For User Profile www.domain.com/User Name

Post by Solidjeuh »

No this changes nothing .. still the same problem :)

phpBB URL For User Profile www.domain.com/User Name

Post by Blackwolf »

I tried it & got my default self modified 404 page..... :|