Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
  #1  
Old 04-10-2018, 06:46 AM
plongeur.com plongeur.com is offline
 
Join Date: Mar 2017
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 04-10-2018, 10:42 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So by only having the username, you want to create a link that shows them the profile page on vBulletin?
Reply With Quote
  #3  
Old 04-10-2018, 11:12 AM
plongeur.com plongeur.com is offline
 
Join Date: Mar 2017
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 04-10-2018, 12:36 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 04-10-2018, 01:22 PM
plongeur.com plongeur.com is offline
 
Join Date: Mar 2017
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #6  
Old 04-10-2018, 01:44 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 04-10-2018, 02:01 PM
plongeur.com plongeur.com is offline
 
Join Date: Mar 2017
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05121 seconds
  • Memory Usage 2,208KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete