3.3.12 Can one Remove mode=viewprofile

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
Dead Man
Registered User
Posts: 312
Joined: Tue Jun 05, 2012 12:35 am

3.3.12 Can one Remove mode=viewprofile

Post by Dead Man »

Using phpbb 3.3.12

Was wondering if there is a way to remove mode=viewprofile from the URL when one goes to members profile.

Instead of the URL being

Code: Select all

member/user.2?mode=viewprofile
To be only

Code: Select all

member/user.2
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53514
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: 3.3.12 Can one Remove mode=viewprofile

Post by Brf »

Dead Man wrote: Fri Aug 09, 2024 1:32 am Instead of the URL being

Code: Select all

member/user.2?mode=viewprofile
Where are you seeing a URL like that?
User avatar
Dead Man
Registered User
Posts: 312
Joined: Tue Jun 05, 2012 12:35 am

Re: 3.3.12 Can one Remove mode=viewprofile

Post by Dead Man »

Whenever you click someone’s username. It always takes you to there profile but it says

Code: Select all

 ?mode=viewprofile
On this website it does the same thing. If you click my username or yours it will take you to the MODE -> ?mode=viewprofile

Was trying to see how to stop so it username links go directly to

Code: Select all

https://website.com/member/user.2
User avatar
danieltj
Infrastructure Team Member
Infrastructure Team Member
Posts: 491
Joined: Thu May 03, 2018 9:32 pm
Location: United Kingdom
Name: Daniel James

Re: 3.3.12 Can one Remove mode=viewprofile

Post by danieltj »

The proper URL used to view a members profile is:

Code: Select all

DOMAIN/memberlist.php?mode=viewprofile&u=USER_ID
You can't remove the mode=viewprofile because the member list controller uses that value for mode to determine which type of member list page to use. You could possibly find an extension that rewrites the URLs for you although I'm not sure if there's a validated one for 3.3.12 that would do exactly what you're asking.

In terms of changing this URL in the phpBB core though, it's not possible. It needs some kind of custom coding.
💷 Purchase the Awesome Payments extension today!
Monetise your forum with one off payments and subscriptions.

Need a premium extension created? Send me a PM.
User avatar
Dead Man
Registered User
Posts: 312
Joined: Tue Jun 05, 2012 12:35 am

Re: 3.3.12 Can one Remove mode=viewprofile

Post by Dead Man »

Would it be possible that instead of removing that part.
For it to RiDirect directly to users profile out of that MODE.

For some reason an extension I have Followers can detect the a Difference between being in the Members Profile directly and being in the Mode=ViewProfile
User avatar
danieltj
Infrastructure Team Member
Infrastructure Team Member
Posts: 491
Joined: Thu May 03, 2018 9:32 pm
Location: United Kingdom
Name: Daniel James

Re: 3.3.12 Can one Remove mode=viewprofile

Post by danieltj »

If you're having issues with an extension, you'll need to seek help from the extension author. As I said, the viewprofile mode is a core part of phpBB that cannot be modified without custom coding. If you want to effectively remove that from your board, you'll need an extension to redirect users away from there or modify the core code and remove it entirely which is highly discouraged.
💷 Purchase the Awesome Payments extension today!
Monetise your forum with one off payments and subscriptions.

Need a premium extension created? Send me a PM.
HB
Registered User
Posts: 229
Joined: Mon May 16, 2005 9:30 pm

Re: 3.3.12 Can one Remove mode=viewprofile

Post by HB »

Code: Select all

RewriteRule ^member/user\.([0-9])+ memberlist\.php?mode=viewprofile&u=$1
Dan Kehn
User avatar
Talk19Zehn
Registered User
Posts: 885
Joined: Tue Aug 09, 2011 1:10 pm

Re: 3.3.12 Can one Remove mode=viewprofile

Post by Talk19Zehn »

Hello Dead Man, I agree with danieltj. A link to your board can also help you to look at the construct for your self-help request. Otherwise, it remains to consult the author of that extension, - at least I think so, since you do not name this EXT you are using, only that author can take responsibility, regulations and because much more in this context for you.
Which extension enables that query / difference? In my opinion, this hint is important for helpers. Other users of that EXT may be affected, which may not be developed phpBB compliant. :?:
The impression that this could affect phpBB itself, I can unfortunately not reproduce in principle since your question of 09 Aug 2024, 03:32.
Good luck

Return to “phpBB Custom Coding”