View Full Version : user profile fields
rgreene1971
04-13-2013, 02:46 PM
I have added a user profile field for all of my members to add a link to a thread in my forum which is a review of their product or ad. How can I make this link clickable instead of the members needing to copy the link and pasting it in a browser?
Thanks for any help
Lynne
04-13-2013, 03:26 PM
What is an example of what they enter into the field? And where is it (what template?) that you want it to show as clickable?
rgreene1971
04-13-2013, 03:43 PM
An example of what they would enter is a link to a thread on the forum.
example: https://xxxxxxxxxxxx.com/vbforum/showthread.php?30079-myreview
I would like it to show on all templates and be found in the users about me tab of their profile.
Lynne
04-13-2013, 03:49 PM
Well, you aren't being that specific, so I really can't be too specific either. But, you'd do something like this in the template:
<vb:if condition="$post['fieldx']"><a href="{vb:raw post.fieldx}">My Link</a> </vb:if>
(That's for in a post, the variable will be different depending on the template you put it in.)
rgreene1971
04-14-2013, 02:55 AM
Here is a clip section of the about me page of my profile. I have highlighted the profile field I would like to make a link
rgreene1971
04-14-2013, 03:01 AM
I am using the bp- light styles from bluepearl skins
http://www.bluepearl-skins.com/forums/store/product/11-bp-light-vbulletin-skins/
Lynne
04-14-2013, 03:01 AM
You would have to manually add it to the template there instead of allowing it to automatically be added if you want it to be a link. (Well, you may be able to do a plugin, but I haven't looked into that for that page - maybe someone else has.)
rgreene1971
04-14-2013, 04:02 AM
You would have to manually add it to the template there instead of allowing it to automatically be added if you want it to be a link. (Well, you may be able to do a plugin, but I haven't looked into that for that page - maybe someone else has.)
I would have to add the code you supplied or the code and the link? Assuming just the code you provided?
Lynne
04-14-2013, 02:39 PM
You would need to add the code I posted only using the variable availabe on that page (and the html formatting may be a bit different, so you would make it similar to the code above it).
vBNinja
04-14-2013, 05:32 PM
Add a new plugin:
Product: vBulletin
Hook Location: member_profileblock_profilefieldbit
Name: Show Profile Field as link
Execution Order: 5
if($profilefield['profilefieldid'] == X){
$profilefield['value'] = "<a href=\"{$profilefield['value']}\">{$profilefield['value']}</a>";
}
Change X to your own profiled field ID
Plugin is active: yes
this can bring some security issues depending on what the user sets the field to
rgreene1971
04-18-2013, 04:54 AM
PERFECT! Thank you!
Greatly appreciated.
Add a new plugin:
Product: vBulletin
Hook Location: member_profileblock_profilefieldbit
Name: Show Profile Field as link
Execution Order: 5
if($profilefield['profilefieldid'] == X){
$profilefield['value'] = "<a href=\"{$profilefield['value']}\">{$profilefield['value']}</a>";
}
Change X to your own profiled field ID
Plugin is active: yes
this can bring some security issues depending on what the user sets the field to
jb-net
04-10-2014, 05:32 PM
Add a new plugin:
Product: vBulletin
Hook Location: member_profileblock_profilefieldbit
Name: Show Profile Field as link
Execution Order: 5
if($profilefield['profilefieldid'] == X){
$profilefield['value'] = "<a href=\"{$profilefield['value']}\">{$profilefield['value']}</a>";
}
Change X to your own profiled field ID
Plugin is active: yes
Thanks!
Do you have an idea how to change the link to the value of the selected option in case of an drop down menu? If I make an advanced member search by using a custom field and a dropdown menu I get the value of the selected option in the url. Is there a way to modify this code in the same way to get the value of the dropdown option?
Lynne
04-10-2014, 05:53 PM
Please see this article - https://vborg.vbsupport.ru/showthread.php?t=250418
jb-net
04-11-2014, 06:57 AM
Please see this article - https://vborg.vbsupport.ru/showthread.php?t=250418
Thanks for this link. The problem is that I can't use $post['fieldx'] because I want to link the profilfields in the profile and not within the postbit.
blind-eddie
04-11-2014, 10:45 AM
Thanks for this link. The problem is that I can't use $post['fieldx'] because I want to link the profilfields in the profile and not within the postbit.
What are you going to show in member profile field pages, links, images, video?
Try, $userinfo['fieldxx']
Lynne
04-11-2014, 05:53 PM
Thanks for this link. The problem is that I can't use $post['fieldx'] because I want to link the profilfields in the profile and not within the postbit.
The code would be the same - just the variable name changed.
HM666
06-28-2016, 09:11 PM
Add a new plugin:
Product: vBulletin
Hook Location: member_profileblock_profilefieldbit
Name: Show Profile Field as link
Execution Order: 5
if($profilefield['profilefieldid'] == X){
$profilefield['value'] = "<a href=\"{$profilefield['value']}\">{$profilefield['value']}</a>";
}
Change X to your own profiled field ID
Plugin is active: yes
this can bring some security issues depending on what the user sets the field to
That works great! I have two questions. 1. How do you make the field open in a new window. I tried adding target="_blank" and got some nifty PHP errors lol. Tried it a couple of different ways which leads me to believe that either I had put the code in incorrectly or in PHP it would use some other bit of code all together and 2. How can you add it in an array for more than one profile field, ssay you have several profile fields you want to do this with. Thanks
mokujin
06-29-2016, 05:55 AM
Try: target=\"_blank\"
HM666
06-29-2016, 11:49 AM
Try: target=\"_blank\"
Ah yes of course, I forgot to escape the quotes. I'll give that a try thanks.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.