vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   user profile fields (https://vborg.vbsupport.ru/showthread.php?t=297163)

rgreene1971 04-18-2013 04:54 AM

PERFECT! Thank you!

Greatly appreciated.




Quote:

Originally Posted by vBNinja (Post 2416357)
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


jb-net 04-10-2014 05:32 PM

Quote:

Originally Posted by vBNinja (Post 2416357)
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?

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

Quote:

Originally Posted by Lynne (Post 2492492)

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

Quote:

Originally Posted by jb-net (Post 2492603)
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']

Lynne 04-11-2014 05:53 PM

Quote:

Originally Posted by jb-net (Post 2492603)
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

Quote:

Originally Posted by vBNinja (Post 2416357)
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

mokujin 06-29-2016 05:55 AM

Try:
HTML Code:

target=\"_blank\"

HM666 06-29-2016 11:49 AM

Quote:

Originally Posted by mokujin (Post 2572606)
Try:
HTML Code:

target=\"_blank\"

Ah yes of course, I forgot to escape the quotes. I'll give that a try thanks.


All times are GMT. The time now is 05:56 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.01028 seconds
  • Memory Usage 1,748KB
  • 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)bbcode_code_printable
  • (2)bbcode_html_printable
  • (3)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete