Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2013, 02:46 PM
rgreene1971 rgreene1971 is offline
 
Join Date: Mar 2012
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default user profile fields

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
Reply With Quote
  #2  
Old 04-13-2013, 03:26 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #3  
Old 04-13-2013, 03:43 PM
rgreene1971 rgreene1971 is offline
 
Join Date: Mar 2012
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

An example of what they would enter is a link to a thread on the forum.

example: https://xxxxxxxxxxxx.com/vbforum/sho...30079-myreview

I would like it to show on all templates and be found in the users about me tab of their profile.
Reply With Quote
  #4  
Old 04-13-2013, 03:49 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

HTML Code:
<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.)
Reply With Quote
  #5  
Old 04-14-2013, 02:55 AM
rgreene1971 rgreene1971 is offline
 
Join Date: Mar 2012
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Attached Images
File Type: jpg profile link needed.jpg (41.0 KB, 0 views)
Reply With Quote
  #6  
Old 04-14-2013, 03:01 AM
rgreene1971 rgreene1971 is offline
 
Join Date: Mar 2012
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using the bp- light styles from bluepearl skins

http://www.bluepearl-skins.com/forum...ulletin-skins/
Reply With Quote
  #7  
Old 04-14-2013, 03:01 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.)
Reply With Quote
  #8  
Old 04-14-2013, 04:02 AM
rgreene1971 rgreene1971 is offline
 
Join Date: Mar 2012
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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?
Reply With Quote
  #9  
Old 04-14-2013, 02:39 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #10  
Old 04-14-2013, 05:32 PM
vBNinja's Avatar
vBNinja vBNinja is offline
 
Join Date: May 2011
Location: USA
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add a new plugin:

Product: vBulletin
Hook Location: member_profileblock_profilefieldbit
Name: Show Profile Field as link
Execution Order: 5
PHP Code:
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
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 12:45 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.07905 seconds
  • Memory Usage 2,271KB
  • Queries Executed 14 (?)
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)bbcode_html
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete