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

Reply
 
Thread Tools Display Modes
  #11  
Old 04-18-2013, 04:54 AM
rgreene1971 rgreene1971 is offline
 
Join Date: Mar 2012
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PERFECT! Thank you!

Greatly appreciated.




Quote:
Originally Posted by vBNinja View Post
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
  #12  
Old 04-10-2014, 05:32 PM
jb-net jb-net is offline
 
Join Date: Jul 2003
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Please see this article - https://vborg.vbsupport.ru/showthread.php?t=250418
Reply With Quote
  #14  
Old 04-11-2014, 06:57 AM
jb-net jb-net is offline
 
Join Date: Jul 2003
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #15  
Old 04-11-2014, 10:45 AM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jb-net View Post
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,
Code:
$userinfo['fieldxx']
Reply With Quote
  #16  
Old 04-11-2014, 05:53 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jb-net View Post
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.
Reply With Quote
  #17  
Old 06-28-2016, 09:11 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vBNinja View Post
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
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
Reply With Quote
  #18  
Old 06-29-2016, 05:55 AM
mokujin's Avatar
mokujin mokujin is offline
 
Join Date: Oct 2005
Location: Czech
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try:
HTML Code:
target=\"_blank\"
Reply With Quote
  #19  
Old 06-29-2016, 11:49 AM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mokujin View Post
Try:
HTML Code:
target=\"_blank\"
Ah yes of course, I forgot to escape the quotes. I'll give that a try thanks.
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 05:05 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.04455 seconds
  • Memory Usage 2,274KB
  • Queries Executed 12 (?)
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_code
  • (2)bbcode_html
  • (3)bbcode_php
  • (7)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
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete