PDA

View Full Version : change username link


plongeur.com
04-10-2018, 06:46 AM
Hi,

My vbulletin instance is part of a wider site with external pages. These external pages have a user profile containing much more info than the vbulletin profile so i would rather have the username linked to the external profile than the vbulletin one (and have link from the external to go to the vbulletin profile for settings)

Is there any way to achieve this ?
Having a look at the template this would mean changing the "vb:url 'profile'" to get it to point to the external one, but would the vbulletin profile still be accessible ?
Can i do the change globally using replacement variables ?

I will also ask on vbulletin.org

Thanks in advance.

Dave
04-10-2018, 10:42 AM
So by only having the username, you want to create a link that shows them the profile page on vBulletin?

plongeur.com
04-10-2018, 11:12 AM
Not at all :).

Basically, anywhere the username is mentionned in vbulletin, you have a link to the public profile of the user vbulletin if you click on the username.
I would like to change the target of this link to point it to the public profile of the same user on my site.

Dave
04-10-2018, 12:36 PM
The easy way to do this is by creating a replacement variable (under Styles & Templates).

For example, with SEO turned off, you can make it rewrite
https://yoursite.com/forum/member.php?u=1
to
https://yoursite.com/member/1

But it depends on the structure of the URL. What does it look like?
It might be necessary to make modifications to the function that creates the SEO friendly URL.

plongeur.com
04-10-2018, 01:22 PM
Well the hard part is i still want user to be able to access the vbulletin profile from a link in the "site" profile , just not getting there when clicking on the username link...

Dave
04-10-2018, 01:44 PM
You can still do that with a .htaccess rewrite rule.

For example when they visit https://yoursite.com/forum/member/1 it will redirect them to the vbulletin profile page and when they visit https://yoursite.com/member/1 it will redirect them to the profile page of the other software.

plongeur.com
04-10-2018, 02:01 PM
Ok this is nice, i can achiev what i want with the replacement variable.
All i have to do is make sure the end the url is the same on both profiles, but this is manageable with rewrite.