vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   change username link (https://vborg.vbsupport.ru/showthread.php?t=326282)

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

change username link
 
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.


All times are GMT. The time now is 05:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01022 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete